Releases: latticexyz/mud
Releases · latticexyz/mud
@latticexyz/[email protected]
Major Changes
-
#1458
b9e562d8
Thanks @alvrs! - TheWorld
now performsERC165
interface checks to ensure that theStoreHook
,SystemHook
,System
,DelegationControl
andModule
contracts to actually implement their respective interfaces before registering them in the World.The required
supportsInterface
methods are implemented on the respective base contracts.
When creating one of these contracts, the recommended approach is to extend the base contract rather than the interface.- import { IStoreHook } from "@latticexyz/store/src/IStore.sol"; + import { StoreHook } from "@latticexyz/store/src/StoreHook.sol"; - contract MyStoreHook is IStoreHook {} + contract MyStoreHook is StoreHook {}
- import { ISystemHook } from "@latticexyz/world/src/interfaces/ISystemHook.sol"; + import { SystemHook } from "@latticexyz/world/src/SystemHook.sol"; - contract MySystemHook is ISystemHook {} + contract MySystemHook is SystemHook {}
- import { IDelegationControl } from "@latticexyz/world/src/interfaces/IDelegationControl.sol"; + import { DelegationControl } from "@latticexyz/world/src/DelegationControl.sol"; - contract MyDelegationControl is IDelegationControl {} + contract MyDelegationControl is DelegationControl {}
- import { IModule } from "@latticexyz/world/src/interfaces/IModule.sol"; + import { Module } from "@latticexyz/world/src/Module.sol"; - contract MyModule is IModule {} + contract MyModule is Module {}
Minor Changes
-
#1422
1d60930d
Thanks @alvrs! - It is now possible to unregister Store hooks and System hooks.interface IStore { function unregisterStoreHook(bytes32 table, IStoreHook hookAddress) external; // ... } interface IWorld { function unregisterSystemHook(bytes32 resourceSelector, ISystemHook hookAddress) external; // ... }
-
#1443
5e71e1cb
Thanks @holic! - MovedKeySchema
,ValueSchema
,SchemaToPrimitives
andTableRecord
types into@latticexyz/protocol-parser
Patch Changes
- Updated dependencies []:
- @latticexyz/[email protected]
- @latticexyz/[email protected]
- @latticexyz/[email protected]
@latticexyz/[email protected]
Patch Changes
- Updated dependencies [
1d60930d
,b9e562d8
,51914d65
,2ca75f9b
,5e71e1cb
,5e71e1cb
]:- @latticexyz/[email protected]
- @latticexyz/[email protected]
- @latticexyz/[email protected]
- @latticexyz/[email protected]
- @latticexyz/[email protected]
- @latticexyz/[email protected]
- @latticexyz/[email protected]
@latticexyz/[email protected]
Patch Changes
- Updated dependencies [
1d60930d
,b9e562d8
,5e71e1cb
]:- @latticexyz/[email protected]
- @latticexyz/[email protected]
- @latticexyz/[email protected]
- @latticexyz/[email protected]
@latticexyz/[email protected]
@latticexyz/[email protected]
@latticexyz/[email protected]
@latticexyz/[email protected]
@latticexyz/[email protected]
Patch Changes
- Updated dependencies []:
- @latticexyz/[email protected]
- @latticexyz/[email protected]
@latticexyz/[email protected]
Patch Changes
- Updated dependencies [
1d60930d
,b9e562d8
,5e71e1cb
]:- @latticexyz/[email protected]
- @latticexyz/[email protected]
@latticexyz/[email protected]
Minor Changes
- #1443
5e71e1cb
Thanks @holic! - AddsdecodeKey
,decodeValue
,encodeKey
, andencodeValue
helpers to decode/encode from key/value schemas. Deprecates previous methods that use a schema object with static/dynamic field arrays, originally attempting to model our on-chain behavior but ended up not very ergonomic when working with table configs.
Patch Changes
- Updated dependencies []:
- @latticexyz/[email protected]
- @latticexyz/[email protected]
@latticexyz/[email protected]
Patch Changes
- Updated dependencies []:
- @latticexyz/[email protected]
@latticexyz/[email protected]
@latticexyz/[email protected]