Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
@latticexyz/abi-ts
Advanced tools
Create TypeScript type declaration files (`.d.ts`) for your ABI JSON files.
Create TypeScript type declaration files (.d.ts
) for your ABI JSON files.
This allows you to import your JSON ABI and use it directly with libraries like viem and abitype.
pnpm add @latticexyz/abi-ts
pnpm abi-ts
By default, abi-ts
looks for files with the glob **/*.abi.json
, but you can customize this glob with the --input
argument, e.g.
pnpm abi-ts --input 'abi/IWorld.sol/IWorld.abi.json'
Version 2.0.0-next.11
feat(cli): remove backup/restore/force options from set-version (#1687) (@latticexyz/cli)
Removes .mudbackup
file handling and --backup
, --restore
, and --force
options from mud set-version
command.
To revert to a previous MUD version, use git diff
to find the version that you changed from and want to revert to and run pnpm mud set-version <prior-version>
again.
feat(world-modules): add SystemSwitch util (#1665) (@latticexyz/world-modules)
Since #1564 the World can no longer call itself via an external call.
This made the developer experience of calling other systems via root systems worse, since calls from root systems are executed from the context of the World.
The recommended approach is to use delegatecall
to the system if in the context of a root system, and an external call via the World if in the context of a non-root system.
To bring back the developer experience of calling systems from other sysyems without caring about the context in which the call is executed, we added the SystemSwitch
util.
- // Instead of calling the system via an external call to world...
- uint256 value = IBaseWorld(_world()).callMySystem();
+ // ...you can now use the `SystemSwitch` util.
+ // This works independent of whether used in a root system or non-root system.
+ uint256 value = abi.decode(SystemSwitch.call(abi.encodeCall(IBaseWorld.callMySystem, ()), (uint256));
Note that if you already know your system is always executed as non-root system, you can continue to use the approach of calling other systems via the IBaseWorld(world)
.
refactor(common): move createContract
's internal write logic to writeContract
(#1693) (@latticexyz/common)
createContract
into its own writeContract
method so that it can be used outside of the contract instance, and for consistency with viem.createContract
in favor of getContract
for consistency with viem.createNonceManager
's BroadcastChannel
setup and moves out the notion of a "nonce manager ID" to getNonceManagerId
so we can create an internal cache with getNonceManager
for use in writeContract
.If you were using the createNonceManager
before, you'll just need to rename publicClient
argument to client
:
const publicClient = createPublicClient({ ... });
- const nonceManager = createNonceManager({ publicClient, ... });
+ const nonceManager = createNonceManager({ client: publicClient, ... });
feat(gas-reporter): allow gas-reporter to parse stdin (#1688) (@latticexyz/gas-report)
Allow the gas-report
CLI to parse logs via stdin
, so it can be used with custom test commands (e.g. mud test
).
Usage:
GAS_REPORTER_ENABLED=true forge test -vvv | pnpm gas-report --stdin
feat(store-sync): export postgres column type helpers (#1699) (@latticexyz/store-sync)
Export postgres column type helpers from @latticexyz/store-sync
.
fix(common): workaround for zero base fee (#1689) (@latticexyz/common)
Adds viem workaround for zero base fee used by MUD's anvil config
fix(world): register store namespace during initialization (#1712) (@latticexyz/world)
Register the store
namespace in the CoreModule
.
Since namespaces are a World concept, registering the Store's internal tables does not automatically register the Store's namespace, so we do this manually during initialization in the CoreModule
.
build: bump viem and abitype (#1684) (@latticexyz/block-logs-stream, @latticexyz/cli, @latticexyz/common, @latticexyz/dev-tools, @latticexyz/faucet, @latticexyz/protocol-parser, @latticexyz/schema-type, @latticexyz/store-indexer, @latticexyz/store-sync, @latticexyz/store, create-mud)
Bump viem to 1.14.0 and abitype to 0.9.8
feat(gas-report): add more logs to stdin piping (#1694) (@latticexyz/gas-report)
Pass through stdin
logs in gas-report
. Since the script piping in logs to gas-report
can be long-running, it is useful to see its logs to know if it's stalling.
fix(protocol-parser): allow arbitrary key order when encoding values (#1674) (@latticexyz/protocol-parser)
Allow arbitrary key order when encoding values
FAQs
Create TypeScript type declaration files (`.d.ts`) for your ABI JSON files.
The npm package @latticexyz/abi-ts receives a total of 2,657 weekly downloads. As such, @latticexyz/abi-ts popularity was classified as popular.
We found that @latticexyz/abi-ts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.