MUD is a framework for building ambitious onchain applications
MIT License
Bot releases are visible (Hide)
Published by github-actions[bot] 7 months ago
curry
in @latticexyz/common
and useDeprecatedComputedValue
from @latticexyz/react
.Published by github-actions[bot] 7 months ago
Published by github-actions[bot] 7 months ago
/internal
import path to indicate that these are now internal-only and deprecated. We'll be replacing these types and functions with new ones that are compatible with our new, strongly-typed config.d7b1c588a: Upgraded all packages and templates to viem v2.7.12 and abitype v1.0.0.
Some viem APIs have changed and we've updated getContract
to reflect those changes and keep it aligned with viem. It's one small code change:
const worldContract = getContract({
address: worldAddress,
abi: IWorldAbi,
- publicClient,
- walletClient,
+ client: { public: publicClient, wallet: walletClient },
});
PackedCounter
to EncodedLengths
for consistency.Published by github-actions[bot] 7 months ago
--isolate
flag in forge test
for more accurate gas measurement.Published by github-actions[bot] 7 months ago
d7b1c588a: Upgraded all packages and templates to viem v2.7.12 and abitype v1.0.0.
Some viem APIs have changed and we've updated getContract
to reflect those changes and keep it aligned with viem. It's one small code change:
const worldContract = getContract({
address: worldAddress,
abi: IWorldAbi,
- publicClient,
- walletClient,
+ client: { public: publicClient, wallet: walletClient },
});
Published by github-actions[bot] 7 months ago
d7b1c588a: Upgraded all packages and templates to viem v2.7.12 and abitype v1.0.0.
Some viem APIs have changed and we've updated getContract
to reflect those changes and keep it aligned with viem. It's one small code change:
const worldContract = getContract({
address: worldAddress,
abi: IWorldAbi,
- publicClient,
- walletClient,
+ client: { public: publicClient, wallet: walletClient },
});
{namespace}__{name}
for consistency with world function signatures.Published by github-actions[bot] 7 months ago
59267655: Added viem custom client actions that work the same as MUD's now-deprecated getContract
, writeContract
, and sendTransaction
wrappers. Templates have been updated to reflect the new patterns.
You can migrate your own code like this:
-import { createWalletClient } from "viem";
-import { getContract, writeContract, sendTransaction } from "@latticexyz/common";
+import { createWalletClient, getContract } from "viem";
+import { transactionQueue, writeObserver } from "@latticexyz/common/actions";
-const walletClient = createWalletClient(...);
+const walletClient = createWalletClient(...)
+ .extend(transactionQueue())
+ .extend(writeObserver({ onWrite });
const worldContract = getContract({
client: { publicClient, walletClient },
- onWrite,
});
d7b1c588a: Upgraded all packages and templates to viem v2.7.12 and abitype v1.0.0.
Some viem APIs have changed and we've updated getContract
to reflect those changes and keep it aligned with viem. It's one small code change:
const worldContract = getContract({
address: worldAddress,
abi: IWorldAbi,
- publicClient,
- walletClient,
+ client: { public: publicClient, wallet: walletClient },
});
44236041: Moved table ID and field layout constants in code-generated table libraries from the file level into the library, for clearer access and cleaner imports.
-import { SomeTable, SomeTableTableId } from "./codegen/tables/SomeTable.sol";
+import { SomeTable } from "./codegen/tables/SomeTable.sol";
-console.log(SomeTableTableId);
+console.log(SomeTable._tableId);
-console.log(SomeTable.getFieldLayout());
+console.log(SomeTable._fieldLayout);
257a0afc: Bumped typescript
to 5.4.2
, eslint
to 8.57.0
, and both @typescript-eslint/eslint-plugin
and @typescript-eslint/parser
to 7.1.1
.
5237e320: Added dbaeumer.vscode-eslint
and esbenp.prettier-vscode
to recommended VSCode extensions.
3042f86e: Moved key schema and value schema methods to constants in code-generated table libraries for less bytecode and less gas in register/install methods.
-console.log(SomeTable.getKeySchema());
+console.log(SomeTable._keySchema);
-console.log(SomeTable.getValueSchema());
+console.log(SomeTable._valueSchema);
3e7d83d0: Renamed PackedCounter
to EncodedLengths
for consistency.
Published by github-actions[bot] 7 months ago
d7b1c588a: Upgraded all packages and templates to viem v2.7.12 and abitype v1.0.0.
Some viem APIs have changed and we've updated getContract
to reflect those changes and keep it aligned with viem. It's one small code change:
const worldContract = getContract({
address: worldAddress,
abi: IWorldAbi,
- publicClient,
- walletClient,
+ client: { public: publicClient, wallet: walletClient },
});
Published by github-actions[bot] 7 months ago
44236041: Moved table ID and field layout constants in code-generated table libraries from the file level into the library, for clearer access and cleaner imports.
-import { SomeTable, SomeTableTableId } from "./codegen/tables/SomeTable.sol";
+import { SomeTable } from "./codegen/tables/SomeTable.sol";
-console.log(SomeTableTableId);
+console.log(SomeTable._tableId);
-console.log(SomeTable.getFieldLayout());
+console.log(SomeTable._fieldLayout);
59267655: Added viem custom client actions that work the same as MUD's now-deprecated getContract
, writeContract
, and sendTransaction
wrappers. Templates have been updated to reflect the new patterns.
You can migrate your own code like this:
-import { createWalletClient } from "viem";
-import { getContract, writeContract, sendTransaction } from "@latticexyz/common";
+import { createWalletClient, getContract } from "viem";
+import { transactionQueue, writeObserver } from "@latticexyz/common/actions";
-const walletClient = createWalletClient(...);
+const walletClient = createWalletClient(...)
+ .extend(transactionQueue())
+ .extend(writeObserver({ onWrite });
const worldContract = getContract({
client: { publicClient, walletClient },
- onWrite,
});
d7b1c588a: Upgraded all packages and templates to viem v2.7.12 and abitype v1.0.0.
Some viem APIs have changed and we've updated getContract
to reflect those changes and keep it aligned with viem. It's one small code change:
const worldContract = getContract({
address: worldAddress,
abi: IWorldAbi,
- publicClient,
- walletClient,
+ client: { public: publicClient, wallet: walletClient },
});
82693072: waitForIdle
now falls back to setTimeout
for environments without requestIdleCallback
.
d5c0682fb: Updated all human-readable resource IDs to use {namespace}__{name}
for consistency with world function signatures.
01e46d99: Removed some unused files, namely curry
in @latticexyz/common
and useDeprecatedComputedValue
from @latticexyz/react
.
307abab3: resourceToLabel
now correctly returns just the resource name if its in the root namespace.
e34d1170: Moved the transaction simulation step to just before sending the transaction in our transaction queue actions (sendTransaction
and writeContract
).
This helps avoid cascading transaction failures for deep queues or when a transaction succeeding depends on the value of the previous.
db314a74: Upgraded prettier version to 3.2.5 and prettier-plugin-solidity version to 1.3.1.
Updated dependencies [b38c096d]
Updated dependencies [d7b1c588a]
Published by github-actions[bot] 7 months ago
44236041: Moved table ID and field layout constants in code-generated table libraries from the file level into the library, for clearer access and cleaner imports.
-import { SomeTable, SomeTableTableId } from "./codegen/tables/SomeTable.sol";
+import { SomeTable } from "./codegen/tables/SomeTable.sol";
-console.log(SomeTableTableId);
+console.log(SomeTable._tableId);
-console.log(SomeTable.getFieldLayout());
+console.log(SomeTable._fieldLayout);
252a1852: Migrated to new config format.
645736df: Added an --rpcBatch
option to mud deploy
command to batch RPC calls for rate limited RPCs.
5554b197: mud deploy
now supports public/linked libraries.
This helps with cases where system contracts would exceed the EVM bytecode size limit and logic would need to be split into many smaller systems.
Instead of the overhead and complexity of system-to-system calls, this logic can now be moved into public libraries that will be deployed alongside your systems and automatically delegatecall
ed.
d7b1c588a: Upgraded all packages and templates to viem v2.7.12 and abitype v1.0.0.
Some viem APIs have changed and we've updated getContract
to reflect those changes and keep it aligned with viem. It's one small code change:
const worldContract = getContract({
address: worldAddress,
abi: IWorldAbi,
- publicClient,
- walletClient,
+ client: { public: publicClient, wallet: walletClient },
});
8f49c277d: Attempting to deploy multiple systems where there are overlapping system IDs now throws an error.
d5c0682fb: Updated all human-readable resource IDs to use {namespace}__{name}
for consistency with world function signatures.
257a0afc: Bumped typescript
to 5.4.2
, eslint
to 8.57.0
, and both @typescript-eslint/eslint-plugin
and @typescript-eslint/parser
to 7.1.1
.
9c83adc01: Added a non-deterministic fallback for deploying to chains that have replay protection on and do not support pre-EIP-155 transactions (no chain ID).
If you're using mud deploy
and there's already a deterministic deployer on your target chain, you can provide the address with --deployerAddress 0x...
to still get some determinism.
3e7d83d0: Renamed PackedCounter
to EncodedLengths
for consistency.
Updated dependencies [c9ee5e4a]
Updated dependencies [8f49c277d]
Updated dependencies [82693072]
Updated dependencies [d5c0682fb]
Updated dependencies [01e46d99]
Updated dependencies [4be22ba4]
Updated dependencies [2c920de7]
Updated dependencies [44236041]
Updated dependencies [3be4deecf]
Updated dependencies [5debcca8]
Updated dependencies [9aa5e786]
Updated dependencies [307abab3]
Updated dependencies [c991c71a]
Updated dependencies [b38c096d]
Updated dependencies [e34d1170]
Updated dependencies [190fdd11]
Updated dependencies [db314a74]
Updated dependencies [59267655]
Updated dependencies [1a82c278]
Updated dependencies [a02da555b]
Updated dependencies [8193136a9]
Updated dependencies [86766ce1]
Updated dependencies [93390d89]
Updated dependencies [144c0d8d]
Updated dependencies [90d0d79c]
Updated dependencies [c58da9ad]
Updated dependencies [be18b75b]
Updated dependencies [3042f86e]
Updated dependencies [d7b1c588a]
Updated dependencies [95f64c85]
Updated dependencies [3e7d83d0]
Updated dependencies [252a1852]
Published by github-actions[bot] 7 months ago
d7b1c588a: Upgraded all packages and templates to viem v2.7.12 and abitype v1.0.0.
Some viem APIs have changed and we've updated getContract
to reflect those changes and keep it aligned with viem. It's one small code change:
const worldContract = getContract({
address: worldAddress,
abi: IWorldAbi,
- publicClient,
- walletClient,
+ client: { public: publicClient, wallet: walletClient },
});
Published by github-actions[bot] 7 months ago
Published by github-actions[bot] 8 months ago
SystemSwitch
to properly call non-root systems from root systems.bytes32
table ID value rather than computing it in Solidity. This saves a bit of gas across all storage operations.args
parameter to encodedArgs
to better reflect that it is ABI-encoded arguments.Published by github-actions[bot] 8 months ago
aabd3076: Bumped Solidity version to 0.8.24.
db7798be: Renamed CoreModule
to InitModule
and CoreRegistrationSystem
to RegistrationSystem
.
618dd0e8: WorldFactory
now expects a user-provided salt
when calling deployWorld(...)
(instead of the previous globally incrementing counter). This enables deterministic world addresses across different chains.
When using mud deploy
, you can provide a bytes32
hex-encoded salt using the --salt
option, otherwise it defaults to a random hex value.
WorldFactory
now derives a salt based on number of worlds deployed by msg.sender
, which should help with predictable world deployments across chains.bytes32
table ID value rather than computing it in Solidity. This saves a bit of gas across all storage operations.WorldRegistrationSystem
to check that systems exist before registering system hooks.args
parameter to encodedArgs
to better reflect that it is ABI-encoded arguments.StoreCore
's registerCoreTables
method to registerInternalTables
.Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
createStoreSync
now waits for idle between each chunk of logs in a block to allow for downstream render cycles to trigger. This means that hydrating logs from an indexer will no longer block until hydration completes, but rather allow for onProgress
callbacks to trigger.int32
, uint32
, int64
, and uint64
types to avoid overflowsPublished by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
StoreCore
's registerCoreTables
method to registerInternalTables
.bytes32
table ID value rather than computing it in Solidity. This saves a bit of gas across all storage operations.ResourceIds
table before the table was registered.StoreCore.registerStoreHook
to use StoreHooks._push
for gas efficiency.StoreCore
to check that tables exist before registering store hooks.Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago