Minor Changes
-
7fa2ca1: Added TS helpers for calling systems dynamically via the World.
-
encodeSystemCall
forworld.call
worldContract.write.call(encodeSystemCall({ abi: worldContract.abi, systemId: resourceToHex({ ... }), functionName: "registerDelegation", args: [ ... ], }));
-
encodeSystemCallFrom
forworld.callFrom
worldContract.write.callFrom(encodeSystemCallFrom({ abi: worldContract.abi, from: "0x...", systemId: resourceToHex({ ... }), functionName: "registerDelegation", args: [ ... ], }));
-
encodeSystemCalls
forworld.batchCall
worldContract.write.batchCall(encodeSystemCalls(abi, [{ systemId: resourceToHex({ ... }), functionName: "registerDelegation", args: [ ... ], }]));
-
encodeSystemCallsFrom
forworld.batchCallFrom
worldContract.write.batchCallFrom(encodeSystemCallsFrom(abi, "0x...", [{ systemId: resourceToHex({ ... }), functionName: "registerDelegation", args: [ ... ], }]));
-
-
6ca1874: Added a
Module_AlreadyInstalled
error toIModule
. -
25086be: Replaced temporary
.mudtest
file in favor ofWORLD_ADDRESS
environment variable when running tests withMudTest
contract
Patch Changes
-
7ce82b6: Store config now defaults
storeArgument: false
for all tables. This means that table libraries, by default, will no longer include the extra functions with the_store
argument. This default was changed to clear up the confusion around using table libraries in tests,PostDeploy
scripts, etc.If you are sure you need to manually specify a store when interacting with tables, you can still manually toggle it back on with
storeArgument: true
in the table settings of your MUD config.If you want to use table libraries in
PostDeploy.s.sol
, you can add the following lines:import { Script } from "forge-std/Script.sol"; import { console } from "forge-std/console.sol"; import { IWorld } from "../src/codegen/world/IWorld.sol"; + import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; contract PostDeploy is Script { function run(address worldAddress) external { + StoreSwitch.setStoreAddress(worldAddress); + + SomeTable.get(someKey);
-
29c3f50: With resource types in resource IDs, the World config no longer requires table and system names to be unique.
-
Updated dependencies [7ce82b6]
-
Updated dependencies [0660561]
-
Updated dependencies [f62c767]
-
Updated dependencies [f62c767]
-
Updated dependencies [d2f8e94]
-
Updated dependencies [25086be]
- @latticexyz/[email protected]
- @latticexyz/[email protected]
- @latticexyz/[email protected]
- @latticexyz/[email protected]