@latticexyz/world-modules 2.0.0-march-19-skystrife-playtest-f486281e → 2.0.0-next-17-awakening-9c07ab3a2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mud.config.d.ts +256 -0
- package/out/AccessControl.sol/AccessControl.json +1 -1
- package/out/AccessControlLib.sol/AccessControlLib.json +1 -1
- package/out/AccessManagementSystem.sol/AccessManagementSystem.abi.json +55 -0
- package/out/AccessManagementSystem.sol/AccessManagementSystem.abi.json.d.ts +55 -0
- package/out/AccessManagementSystem.sol/AccessManagementSystem.json +1 -1
- package/out/AddressArray.sol/AddressArray.json +1 -1
- package/out/Allowances.sol/Allowances.json +1 -1
- package/out/ArrayLib.sol/ArrayLib.json +1 -1
- package/out/BalanceTransferSystem.sol/BalanceTransferSystem.abi.json +16 -0
- package/out/BalanceTransferSystem.sol/BalanceTransferSystem.abi.json.d.ts +16 -0
- package/out/BalanceTransferSystem.sol/BalanceTransferSystem.json +1 -1
- package/out/Balances.sol/Balances.json +1 -1
- package/out/Base.sol/CommonBase.json +1 -1
- package/out/Base.sol/ScriptBase.json +1 -1
- package/out/Base.sol/TestBase.json +1 -1
- package/out/BatchCallSystem.sol/BatchCallSystem.abi.json +5 -0
- package/out/BatchCallSystem.sol/BatchCallSystem.abi.json.d.ts +5 -0
- package/out/BatchCallSystem.sol/BatchCallSystem.json +1 -1
- package/out/Bool.sol/Bool.json +1 -1
- package/out/Bytes.sol/Bytes.json +1 -1
- package/out/CallboundDelegationControl.sol/CallboundDelegationControl.json +1 -1
- package/out/CallboundDelegations.sol/CallboundDelegations.json +1 -1
- package/out/DecodeSlice.sol/DecodeSlice.json +1 -1
- package/out/Delegation.sol/Delegation.json +1 -1
- package/out/DelegationControl.sol/DelegationControl.json +1 -1
- package/out/DelegationControlMock.sol/DelegationControlMock.json +1 -1
- package/out/ERC165Checker.sol/ERC165Checker.json +1 -0
- package/out/ERC20.t.sol/ERC20Test.json +1 -1
- package/out/ERC20Metadata.sol/ERC20Metadata.json +1 -1
- package/out/ERC20Module.sol/ERC20Module.abi.json +120 -20
- package/out/ERC20Module.sol/ERC20Module.abi.json.d.ts +120 -20
- package/out/ERC20Module.sol/ERC20Module.json +1 -1
- package/out/ERC20Module.sol/ERC20ModuleRegistrationLibrary.abi.json +117 -4
- package/out/ERC20Module.sol/ERC20ModuleRegistrationLibrary.abi.json.d.ts +117 -4
- package/out/ERC20Module.sol/ERC20ModuleRegistrationLibrary.json +1 -1
- package/out/ERC20Registry.sol/ERC20Registry.json +1 -1
- package/out/ERC20System.sol/ERC20System.json +1 -1
- package/out/ERC721.t.sol/ERC721Recipient.json +1 -1
- package/out/ERC721.t.sol/ERC721Test.abi.json +1 -1
- package/out/ERC721.t.sol/ERC721Test.abi.json.d.ts +1 -1
- package/out/ERC721.t.sol/ERC721Test.json +1 -1
- package/out/ERC721.t.sol/ERC721TokenReceiver.json +1 -1
- package/out/ERC721.t.sol/NonERC721Recipient.json +1 -1
- package/out/ERC721.t.sol/RevertingERC721Recipient.json +1 -1
- package/out/ERC721.t.sol/WrongReturnDataERC721Recipient.json +1 -1
- package/out/ERC721Metadata.sol/ERC721Metadata.json +1 -1
- package/out/ERC721Module.sol/ERC721Module.abi.json +120 -20
- package/out/ERC721Module.sol/ERC721Module.abi.json.d.ts +120 -20
- package/out/ERC721Module.sol/ERC721Module.json +1 -1
- package/out/ERC721Module.sol/ERC721ModuleRegistrationLibrary.abi.json +117 -4
- package/out/ERC721Module.sol/ERC721ModuleRegistrationLibrary.abi.json.d.ts +117 -4
- package/out/ERC721Module.sol/ERC721ModuleRegistrationLibrary.json +1 -1
- package/out/ERC721Registry.sol/ERC721Registry.json +1 -1
- package/out/ERC721System.sol/ERC721System.json +1 -1
- package/out/EchoSubscriber.sol/EchoSubscriber.json +1 -1
- package/out/EncodeArray.sol/EncodeArray.json +1 -1
- package/out/FieldLayout.sol/FieldLayoutInstance.json +1 -1
- package/out/FieldLayout.sol/FieldLayoutLib.abi.json +69 -4
- package/out/FieldLayout.sol/FieldLayoutLib.abi.json.d.ts +69 -4
- package/out/FieldLayout.sol/FieldLayoutLib.json +1 -1
- package/out/FieldLayoutEncodeHelper.sol/FieldLayoutEncodeHelper.json +1 -1
- package/out/FunctionSelectors.sol/FunctionSelectors.json +1 -1
- package/out/FunctionSignatures.sol/FunctionSignatures.json +1 -1
- package/out/GasReporter.sol/GasReporter.json +1 -1
- package/out/Hook.sol/HookInstance.json +1 -1
- package/out/Hook.sol/HookLib.json +1 -1
- package/out/Hooks.sol/Hooks.json +1 -1
- package/out/IAccessManagementSystem.sol/IAccessManagementSystem.abi.json +13 -0
- package/out/IAccessManagementSystem.sol/IAccessManagementSystem.abi.json.d.ts +13 -0
- package/out/IAccessManagementSystem.sol/IAccessManagementSystem.json +1 -1
- package/out/IBalanceTransferSystem.sol/IBalanceTransferSystem.json +1 -1
- package/out/IBaseWorld.sol/IBaseWorld.abi.json +64 -5
- package/out/IBaseWorld.sol/IBaseWorld.abi.json.d.ts +64 -5
- package/out/IBaseWorld.sol/IBaseWorld.json +1 -1
- package/out/IBatchCallSystem.sol/IBatchCallSystem.json +1 -1
- package/out/IDelegationControl.sol/IDelegationControl.json +1 -1
- package/out/IERC165.sol/IERC165.json +1 -0
- package/out/IERC20.sol/IERC20.json +1 -1
- package/out/IERC20Errors.sol/IERC20Errors.json +1 -1
- package/out/IERC20Events.sol/IERC20Events.json +1 -1
- package/out/IERC20Mintable.sol/IERC20Mintable.json +1 -1
- package/out/IERC20System.sol/IERC20System.json +1 -1
- package/out/IERC721.sol/IERC721.json +1 -1
- package/out/IERC721Errors.sol/IERC721Errors.json +1 -1
- package/out/IERC721Events.sol/IERC721Events.json +1 -1
- package/out/IERC721Metadata.sol/IERC721Metadata.json +1 -1
- package/out/IERC721Mintable.sol/IERC721Mintable.json +1 -1
- package/out/IERC721Receiver.sol/IERC721Receiver.json +1 -1
- package/out/IModule.sol/IModule.abi.json +4 -17
- package/out/IModule.sol/IModule.abi.json.d.ts +4 -17
- package/out/IModule.sol/IModule.json +1 -1
- package/out/IModuleInstallationSystem.sol/IModuleInstallationSystem.abi.json +1 -1
- package/out/IModuleInstallationSystem.sol/IModuleInstallationSystem.abi.json.d.ts +1 -1
- package/out/IModuleInstallationSystem.sol/IModuleInstallationSystem.json +1 -1
- package/out/IMulticall3.sol/IMulticall3.json +1 -1
- package/out/IPuppetFactorySystem.sol/IPuppetFactorySystem.json +1 -1
- package/out/IRegistrationSystem.sol/IRegistrationSystem.abi.json +1 -0
- package/out/IRegistrationSystem.sol/IRegistrationSystem.json +1 -0
- package/out/IStore.sol/IStore.abi.json +51 -3
- package/out/IStore.sol/IStore.abi.json.d.ts +51 -3
- package/out/IStore.sol/IStore.json +1 -1
- package/out/IStoreData.sol/IStoreData.json +1 -1
- package/out/IStoreErrors.sol/IStoreErrors.abi.json +51 -3
- package/out/IStoreErrors.sol/IStoreErrors.abi.json.d.ts +51 -3
- package/out/IStoreErrors.sol/IStoreErrors.json +1 -1
- package/out/IStoreEvents.sol/IStoreEvents.json +1 -1
- package/out/IStoreHook.sol/IStoreHook.json +1 -1
- package/out/IStoreRead.sol/IStoreRead.json +1 -1
- package/out/IStoreRegistration.sol/IStoreRegistration.json +1 -1
- package/out/IStoreWrite.sol/IStoreWrite.json +1 -1
- package/out/ISystemHook.sol/ISystemHook.json +1 -1
- package/out/IWorldContextConsumer.sol/IWorldContextConsumer.json +1 -1
- package/out/IWorldErrors.sol/IWorldErrors.abi.json +11 -0
- package/out/IWorldErrors.sol/IWorldErrors.abi.json.d.ts +11 -0
- package/out/IWorldErrors.sol/IWorldErrors.json +1 -1
- package/out/IWorldKernel.sol/IWorldCall.json +1 -1
- package/out/IWorldKernel.sol/IWorldKernel.abi.json +13 -2
- package/out/IWorldKernel.sol/IWorldKernel.abi.json.d.ts +13 -2
- package/out/IWorldKernel.sol/IWorldKernel.json +1 -1
- package/out/IWorldKernel.sol/IWorldModuleInstallation.abi.json +1 -1
- package/out/IWorldKernel.sol/IWorldModuleInstallation.abi.json.d.ts +1 -1
- package/out/IWorldKernel.sol/IWorldModuleInstallation.json +1 -1
- package/out/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.abi.json +27 -1
- package/out/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.abi.json.d.ts +27 -1
- package/out/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.json +1 -1
- package/out/{CoreModule.sol/CoreModule.abi.json → InitModule.sol/InitModule.abi.json} +145 -19
- package/out/{CoreModule.sol/CoreModule.abi.json.d.ts → InitModule.sol/InitModule.abi.json.d.ts} +145 -19
- package/out/InitModule.sol/InitModule.json +1 -0
- package/out/InitModuleAddress.sol/InitModuleAddress.abi.json +1 -0
- package/out/InitModuleAddress.sol/InitModuleAddress.json +1 -0
- package/out/InstalledModules.sol/InstalledModules.json +1 -1
- package/out/KeysInTable.sol/KeysInTable.json +1 -1
- package/out/KeysInTableHook.sol/KeysInTableHook.abi.json +16 -0
- package/out/KeysInTableHook.sol/KeysInTableHook.abi.json.d.ts +16 -0
- package/out/KeysInTableHook.sol/KeysInTableHook.json +1 -1
- package/out/KeysInTableModule.sol/KeysInTableModule.abi.json +3 -16
- package/out/KeysInTableModule.sol/KeysInTableModule.abi.json.d.ts +3 -16
- package/out/KeysInTableModule.sol/KeysInTableModule.json +1 -1
- package/out/KeysInTableModule.t.sol/KeysInTableModuleTest.abi.json +39 -6
- package/out/KeysInTableModule.t.sol/KeysInTableModuleTest.abi.json.d.ts +39 -6
- package/out/KeysInTableModule.t.sol/KeysInTableModuleTest.json +1 -1
- package/out/KeysWithValue.sol/KeysWithValue.json +1 -1
- package/out/KeysWithValueHook.sol/KeysWithValueHook.json +1 -1
- package/out/KeysWithValueModule.sol/KeysWithValueModule.abi.json +3 -16
- package/out/KeysWithValueModule.sol/KeysWithValueModule.abi.json.d.ts +3 -16
- package/out/KeysWithValueModule.sol/KeysWithValueModule.json +1 -1
- package/out/KeysWithValueModule.t.sol/KeysWithValueModuleTest.abi.json +39 -6
- package/out/KeysWithValueModule.t.sol/KeysWithValueModuleTest.abi.json.d.ts +39 -6
- package/out/KeysWithValueModule.t.sol/KeysWithValueModuleTest.json +1 -1
- package/out/LimitedCallContext.sol/LimitedCallContext.abi.json +7 -0
- package/out/LimitedCallContext.sol/LimitedCallContext.abi.json.d.ts +7 -0
- package/out/LimitedCallContext.sol/LimitedCallContext.json +1 -0
- package/out/Memory.sol/Memory.json +1 -1
- package/out/Module.sol/Module.abi.json +4 -17
- package/out/Module.sol/Module.abi.json.d.ts +4 -17
- package/out/Module.sol/Module.json +1 -1
- package/out/ModuleInstallationSystem.sol/ModuleInstallationSystem.abi.json +6 -1
- package/out/ModuleInstallationSystem.sol/ModuleInstallationSystem.abi.json.d.ts +6 -1
- package/out/ModuleInstallationSystem.sol/ModuleInstallationSystem.json +1 -1
- package/out/NamespaceDelegationControl.sol/NamespaceDelegationControl.json +1 -1
- package/out/NamespaceOwner.sol/NamespaceOwner.json +1 -1
- package/out/OperatorApproval.sol/OperatorApproval.json +1 -1
- package/out/Owners.sol/Owners.json +1 -1
- package/out/PackedCounter.sol/PackedCounterInstance.json +1 -1
- package/out/PackedCounter.sol/PackedCounterLib.json +1 -1
- package/out/Puppet.sol/Puppet.json +1 -1
- package/out/PuppetDelegationControl.sol/PuppetDelegationControl.json +1 -1
- package/out/PuppetFactorySystem.sol/PuppetFactorySystem.json +1 -1
- package/out/PuppetMaster.sol/PuppetMaster.json +1 -1
- package/out/PuppetModule.sol/PuppetModule.abi.json +119 -19
- package/out/PuppetModule.sol/PuppetModule.abi.json.d.ts +119 -19
- package/out/PuppetModule.sol/PuppetModule.json +1 -1
- package/out/PuppetModule.t.sol/PuppetModuleTest.abi.json +14 -0
- package/out/PuppetModule.t.sol/PuppetModuleTest.abi.json.d.ts +14 -0
- package/out/PuppetModule.t.sol/PuppetModuleTest.json +1 -1
- package/out/PuppetModule.t.sol/PuppetTestSystem.json +1 -1
- package/out/PuppetRegistry.sol/PuppetRegistry.json +1 -1
- package/out/{CoreSystem.sol/CoreSystem.abi.json → RegistrationSystem.sol/RegistrationSystem.abi.json} +154 -150
- package/out/{CoreSystem.sol/CoreSystem.abi.json.d.ts → RegistrationSystem.sol/RegistrationSystem.abi.json.d.ts} +154 -150
- package/out/RegistrationSystem.sol/RegistrationSystem.json +1 -0
- package/out/ResourceAccess.sol/ResourceAccess.json +1 -1
- package/out/ResourceId.sol/ResourceIdInstance.json +1 -1
- package/out/ResourceId.sol/ResourceIdLib.json +1 -1
- package/out/ResourceIds.sol/ResourceIds.json +1 -1
- package/out/RevertSubscriber.sol/RevertSubscriber.json +1 -1
- package/out/Schema.sol/SchemaInstance.json +1 -1
- package/out/Schema.sol/SchemaLib.json +1 -1
- package/out/SchemaEncodeHelper.sol/SchemaEncodeHelper.json +1 -1
- package/out/Slice.sol/SliceInstance.json +1 -1
- package/out/Slice.sol/SliceLib.json +1 -1
- package/out/StandardDelegationsModule.sol/StandardDelegationsModule.abi.json +119 -19
- package/out/StandardDelegationsModule.sol/StandardDelegationsModule.abi.json.d.ts +119 -19
- package/out/StandardDelegationsModule.sol/StandardDelegationsModule.json +1 -1
- package/out/StandardDelegationsModule.t.sol/StandardDelegationsModuleTest.json +1 -1
- package/out/StdAssertions.sol/StdAssertions.json +1 -1
- package/out/StdChains.sol/StdChains.json +1 -1
- package/out/StdCheats.sol/StdCheats.json +1 -1
- package/out/StdCheats.sol/StdCheatsSafe.json +1 -1
- package/out/StdError.sol/stdError.json +1 -1
- package/out/StdInvariant.sol/StdInvariant.json +1 -1
- package/out/StdJson.sol/stdJson.json +1 -1
- package/out/StdMath.sol/stdMath.json +1 -1
- package/out/StdStorage.sol/stdStorage.json +1 -1
- package/out/StdStorage.sol/stdStorageSafe.json +1 -1
- package/out/StdStyle.sol/StdStyle.json +1 -1
- package/out/StdUtils.sol/StdUtils.json +1 -1
- package/out/Storage.sol/Storage.json +1 -1
- package/out/StoreCore.sol/StoreCore.json +1 -1
- package/out/StoreCore.sol/StoreCoreInternal.json +1 -1
- package/out/StoreData.sol/StoreData.abi.json +16 -0
- package/out/StoreData.sol/StoreData.abi.json.d.ts +16 -0
- package/out/StoreData.sol/StoreData.json +1 -1
- package/out/StoreHook.sol/StoreHook.json +1 -1
- package/out/StoreHooks.sol/StoreHooks.json +1 -1
- package/out/StoreRead.sol/StoreRead.abi.json +16 -0
- package/out/StoreRead.sol/StoreRead.abi.json.d.ts +16 -0
- package/out/StoreRead.sol/StoreRead.json +1 -1
- package/out/StoreRegistrationSystem.sol/StoreRegistrationSystem.abi.json +149 -4
- package/out/StoreRegistrationSystem.sol/StoreRegistrationSystem.abi.json.d.ts +149 -4
- package/out/StoreRegistrationSystem.sol/StoreRegistrationSystem.json +1 -1
- package/out/StoreSwitch.sol/StoreSwitch.json +1 -1
- package/out/System.sol/System.json +1 -1
- package/out/SystemCall.sol/SystemCall.json +1 -1
- package/out/SystemHook.sol/SystemHook.json +1 -1
- package/out/SystemHooks.sol/SystemHooks.json +1 -1
- package/out/SystemRegistry.sol/SystemRegistry.json +1 -1
- package/out/SystemSwitch.sol/SystemSwitch.json +1 -1
- package/out/SystemSwitch.t.sol/EchoSystem.abi.json +98 -1
- package/out/SystemSwitch.t.sol/EchoSystem.abi.json.d.ts +98 -1
- package/out/SystemSwitch.t.sol/EchoSystem.json +1 -1
- package/out/SystemSwitch.t.sol/SystemSwitchTest.abi.json +59 -15
- package/out/SystemSwitch.t.sol/SystemSwitchTest.abi.json.d.ts +59 -15
- package/out/SystemSwitch.t.sol/SystemSwitchTest.json +1 -1
- package/out/SystemboundDelegationControl.sol/SystemboundDelegationControl.json +1 -1
- package/out/SystemboundDelegations.sol/SystemboundDelegations.json +1 -1
- package/out/Systems.sol/Systems.json +1 -1
- package/out/Tables.sol/Tables.json +1 -1
- package/out/Test.sol/Test.json +1 -1
- package/out/TightCoder.sol/TightCoder.json +1 -1
- package/out/TimeboundDelegationControl.sol/TimeboundDelegationControl.json +1 -1
- package/out/TimeboundDelegations.sol/TimeboundDelegations.json +1 -1
- package/out/TokenApproval.sol/TokenApproval.json +1 -1
- package/out/TokenURI.sol/TokenURI.json +1 -1
- package/out/TotalSupply.sol/TotalSupply.json +1 -1
- package/out/TwoFields.sol/TwoFields.json +1 -1
- package/out/UniqueEntity.sol/UniqueEntity.json +1 -1
- package/out/UniqueEntityModule.sol/UniqueEntityModule.abi.json +121 -21
- package/out/UniqueEntityModule.sol/UniqueEntityModule.abi.json.d.ts +121 -21
- package/out/UniqueEntityModule.sol/UniqueEntityModule.json +1 -1
- package/out/UniqueEntityModule.t.sol/UniqueEntityModuleTest.json +1 -1
- package/out/UniqueEntityModule.t.sol/UniqueEntityTestSystem.abi.json +68 -0
- package/out/UniqueEntityModule.t.sol/UniqueEntityTestSystem.abi.json.d.ts +68 -0
- package/out/UniqueEntityModule.t.sol/UniqueEntityTestSystem.json +1 -1
- package/out/UniqueEntitySystem.sol/UniqueEntitySystem.json +1 -1
- package/out/UsedKeysIndex.sol/UsedKeysIndex.json +1 -1
- package/out/UserDelegationControl.sol/UserDelegationControl.json +1 -1
- package/out/Vm.sol/Vm.json +1 -1
- package/out/Vm.sol/VmSafe.json +1 -1
- package/out/World.sol/World.abi.json +29 -2
- package/out/World.sol/World.abi.json.d.ts +29 -2
- package/out/World.sol/World.json +1 -1
- package/out/World.t.sol/EchoSystemHook.json +1 -1
- package/out/World.t.sol/IWorldTestSystem.abi.json +1 -1
- package/out/World.t.sol/IWorldTestSystem.abi.json.d.ts +1 -1
- package/out/World.t.sol/IWorldTestSystem.json +1 -1
- package/out/World.t.sol/PayableFallbackSystem.json +1 -1
- package/out/World.t.sol/RevertSystemHook.json +1 -1
- package/out/World.t.sol/WorldTest.abi.json +74 -6
- package/out/World.t.sol/WorldTest.abi.json.d.ts +74 -6
- package/out/World.t.sol/WorldTest.json +1 -1
- package/out/World.t.sol/WorldTestSystem.json +1 -1
- package/out/WorldContext.sol/WorldContextConsumer.json +1 -1
- package/out/WorldContext.sol/WorldContextConsumerLib.json +1 -1
- package/out/WorldContext.sol/WorldContextProviderLib.json +1 -1
- package/out/WorldRegistrationSystem.sol/WorldRegistrationSystem.abi.json +43 -1
- package/out/WorldRegistrationSystem.sol/WorldRegistrationSystem.abi.json.d.ts +43 -1
- package/out/WorldRegistrationSystem.sol/WorldRegistrationSystem.json +1 -1
- package/out/WorldResourceId.sol/WorldResourceIdInstance.json +1 -1
- package/out/WorldResourceId.sol/WorldResourceIdLib.json +1 -1
- package/out/console.sol/console.json +1 -1
- package/out/console2.sol/console2.json +1 -1
- package/out/constants.sol/LayoutOffsets.json +1 -1
- package/out/interfaces/IBaseWorld.sol/IBaseWorld.abi.json +105 -7
- package/out/interfaces/IBaseWorld.sol/IBaseWorld.abi.json.d.ts +105 -7
- package/out/interfaces/IBaseWorld.sol/IBaseWorld.json +1 -1
- package/out/query.t.sol/QueryTest.abi.json +39 -6
- package/out/query.t.sol/QueryTest.abi.json.d.ts +39 -6
- package/out/query.t.sol/QueryTest.json +1 -1
- package/out/safeconsole.sol/safeconsole.json +1 -1
- package/out/src/IERC165.sol/IERC165.json +1 -1
- package/out/tables/Balances.sol/Balances.json +1 -1
- package/out/test.sol/DSTest.json +1 -1
- package/package.json +9 -9
- package/src/index.sol +1 -1
- package/src/interfaces/IBaseWorld.sol +1 -1
- package/src/interfaces/IERC20System.sol +1 -1
- package/src/interfaces/IPuppetFactorySystem.sol +1 -1
- package/src/modules/erc20-puppet/ERC20Module.sol +18 -25
- package/src/modules/erc20-puppet/ERC20System.sol +1 -1
- package/src/modules/erc20-puppet/IERC20.sol +1 -1
- package/src/modules/erc20-puppet/IERC20Errors.sol +1 -1
- package/src/modules/erc20-puppet/IERC20Events.sol +1 -1
- package/src/modules/erc20-puppet/IERC20Mintable.sol +1 -1
- package/src/modules/erc20-puppet/constants.sol +1 -2
- package/src/modules/erc20-puppet/registerERC20.sol +1 -1
- package/src/modules/erc20-puppet/tables/Allowances.sol +2 -3
- package/src/modules/erc20-puppet/tables/ERC20Metadata.sol +2 -3
- package/src/modules/erc20-puppet/tables/ERC20Registry.sol +2 -3
- package/src/modules/erc20-puppet/tables/TotalSupply.sol +2 -3
- package/src/modules/erc20-puppet/utils.sol +1 -1
- package/src/modules/erc721-puppet/ERC721Module.sol +18 -25
- package/src/modules/erc721-puppet/ERC721System.sol +1 -1
- package/src/modules/erc721-puppet/IERC721.sol +1 -1
- package/src/modules/erc721-puppet/IERC721Errors.sol +1 -1
- package/src/modules/erc721-puppet/IERC721Events.sol +1 -1
- package/src/modules/erc721-puppet/IERC721Metadata.sol +1 -1
- package/src/modules/erc721-puppet/IERC721Mintable.sol +1 -1
- package/src/modules/erc721-puppet/IERC721Receiver.sol +1 -1
- package/src/modules/erc721-puppet/constants.sol +1 -2
- package/src/modules/erc721-puppet/registerERC721.sol +1 -1
- package/src/modules/erc721-puppet/tables/ERC721Metadata.sol +2 -3
- package/src/modules/erc721-puppet/tables/ERC721Registry.sol +2 -3
- package/src/modules/erc721-puppet/tables/OperatorApproval.sol +2 -3
- package/src/modules/erc721-puppet/tables/Owners.sol +2 -3
- package/src/modules/erc721-puppet/tables/TokenApproval.sol +2 -3
- package/src/modules/erc721-puppet/tables/TokenURI.sol +2 -3
- package/src/modules/erc721-puppet/utils.sol +1 -1
- package/src/modules/keysintable/KeysInTableHook.sol +1 -1
- package/src/modules/keysintable/KeysInTableModule.sol +4 -10
- package/src/modules/keysintable/constants.sol +1 -1
- package/src/modules/keysintable/getKeysInTable.sol +1 -1
- package/src/modules/keysintable/hasKey.sol +1 -1
- package/src/modules/keysintable/query.sol +1 -1
- package/src/modules/keysintable/tables/KeysInTable.sol +4 -6
- package/src/modules/keysintable/tables/UsedKeysIndex.sol +4 -6
- package/src/modules/keyswithvalue/KeysWithValueHook.sol +1 -1
- package/src/modules/keyswithvalue/KeysWithValueModule.sol +19 -14
- package/src/modules/keyswithvalue/constants.sol +1 -1
- package/src/modules/keyswithvalue/getKeysWithValue.sol +1 -1
- package/src/modules/keyswithvalue/getTargetTableId.sol +1 -1
- package/src/modules/keyswithvalue/tables/KeysWithValue.sol +2 -3
- package/src/modules/puppet/Puppet.sol +1 -1
- package/src/modules/puppet/PuppetDelegationControl.sol +1 -1
- package/src/modules/puppet/PuppetFactorySystem.sol +1 -1
- package/src/modules/puppet/PuppetMaster.sol +1 -1
- package/src/modules/puppet/PuppetModule.sol +24 -9
- package/src/modules/puppet/constants.sol +4 -3
- package/src/modules/puppet/createPuppet.sol +1 -1
- package/src/modules/puppet/tables/PuppetRegistry.sol +2 -3
- package/src/modules/puppet/utils.sol +1 -1
- package/src/modules/std-delegations/CallboundDelegationControl.sol +1 -1
- package/src/modules/std-delegations/StandardDelegationsModule.sol +2 -6
- package/src/modules/std-delegations/SystemboundDelegationControl.sol +1 -1
- package/src/modules/std-delegations/TimeboundDelegationControl.sol +1 -1
- package/src/modules/std-delegations/constants.sol +1 -3
- package/src/modules/std-delegations/tables/CallboundDelegations.sol +4 -6
- package/src/modules/std-delegations/tables/SystemboundDelegations.sol +4 -6
- package/src/modules/std-delegations/tables/TimeboundDelegations.sol +4 -6
- package/src/modules/tokens/tables/Balances.sol +2 -3
- package/src/modules/uniqueentity/UniqueEntityModule.sol +16 -15
- package/src/modules/uniqueentity/UniqueEntitySystem.sol +1 -1
- package/src/modules/uniqueentity/constants.sol +3 -3
- package/src/modules/uniqueentity/getUniqueEntity.sol +2 -3
- package/src/modules/uniqueentity/tables/UniqueEntity.sol +2 -3
- package/src/modules/utils/ArrayLib.sol +2 -2
- package/src/utils/AccessControlLib.sol +1 -1
- package/src/utils/SystemSwitch.sol +7 -10
- package/out/CoreModule.sol/CoreModule.json +0 -1
- package/out/CoreSystem.sol/CoreSystem.json +0 -1
- package/out/ICoreSystem.sol/ICoreSystem.json +0 -1
- package/out/IUniqueEntitySystem.sol/IUniqueEntitySystem.abi.json +0 -15
- package/out/IUniqueEntitySystem.sol/IUniqueEntitySystem.abi.json.d.ts +0 -15
- package/out/IUniqueEntitySystem.sol/IUniqueEntitySystem.json +0 -1
- package/out/world/src/IERC165.sol/IERC165.json +0 -1
- package/src/interfaces/IUniqueEntitySystem.sol +0 -7
- /package/out/{ICoreSystem.sol/ICoreSystem.abi.json → ERC165Checker.sol/ERC165Checker.abi.json} +0 -0
- /package/out/{world/src/IERC165.sol → IERC165.sol}/IERC165.abi.json +0 -0
- /package/out/{world/src/IERC165.sol → IERC165.sol}/IERC165.abi.json.d.ts +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
2
|
-
pragma solidity >=0.8.
|
2
|
+
pragma solidity >=0.8.24;
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
@@ -18,7 +18,6 @@ import { FieldLayout, FieldLayoutLib } from "@latticexyz/store/src/FieldLayout.s
|
|
18
18
|
import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
|
19
19
|
import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
|
20
20
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
|
-
import { RESOURCE_TABLE, RESOURCE_OFFCHAIN_TABLE } from "@latticexyz/store/src/storeResourceTypes.sol";
|
22
21
|
|
23
22
|
// Import user types
|
24
23
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
@@ -206,7 +205,7 @@ library ERC20Registry {
|
|
206
205
|
* @notice Encode all of a record's fields.
|
207
206
|
* @return The static (fixed length) data, encoded into a sequence of bytes.
|
208
207
|
* @return The lengths of the dynamic fields (packed into a single bytes32 value).
|
209
|
-
* @return The
|
208
|
+
* @return The dynamic (variable length) data, encoded into a sequence of bytes.
|
210
209
|
*/
|
211
210
|
function encode(address tokenAddress) internal pure returns (bytes memory, PackedCounter, bytes memory) {
|
212
211
|
bytes memory _staticData = encodeStatic(tokenAddress);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
2
|
-
pragma solidity >=0.8.
|
2
|
+
pragma solidity >=0.8.24;
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
@@ -18,7 +18,6 @@ import { FieldLayout, FieldLayoutLib } from "@latticexyz/store/src/FieldLayout.s
|
|
18
18
|
import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
|
19
19
|
import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
|
20
20
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
|
-
import { RESOURCE_TABLE, RESOURCE_OFFCHAIN_TABLE } from "@latticexyz/store/src/storeResourceTypes.sol";
|
22
21
|
|
23
22
|
FieldLayout constant _fieldLayout = FieldLayout.wrap(
|
24
23
|
0x0020010020000000000000000000000000000000000000000000000000000000
|
@@ -191,7 +190,7 @@ library TotalSupply {
|
|
191
190
|
* @notice Encode all of a record's fields.
|
192
191
|
* @return The static (fixed length) data, encoded into a sequence of bytes.
|
193
192
|
* @return The lengths of the dynamic fields (packed into a single bytes32 value).
|
194
|
-
* @return The
|
193
|
+
* @return The dynamic (variable length) data, encoded into a sequence of bytes.
|
195
194
|
*/
|
196
195
|
function encode(uint256 totalSupply) internal pure returns (bytes memory, PackedCounter, bytes memory) {
|
197
196
|
bytes memory _staticData = encodeStatic(totalSupply);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
2
|
-
pragma solidity >=0.8.
|
2
|
+
pragma solidity >=0.8.24;
|
3
3
|
|
4
4
|
import { ResourceIds } from "@latticexyz/store/src/codegen/tables/ResourceIds.sol";
|
5
5
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
@@ -7,13 +7,13 @@ import { Module } from "@latticexyz/world/src/Module.sol";
|
|
7
7
|
import { WorldResourceIdLib } from "@latticexyz/world/src/WorldResourceId.sol";
|
8
8
|
import { IBaseWorld } from "@latticexyz/world/src/codegen/interfaces/IBaseWorld.sol";
|
9
9
|
import { InstalledModules } from "@latticexyz/world/src/codegen/tables/InstalledModules.sol";
|
10
|
+
import { revertWithBytes } from "@latticexyz/world/src/revertWithBytes.sol";
|
10
11
|
|
11
12
|
import { Puppet } from "../puppet/Puppet.sol";
|
12
13
|
import { createPuppet } from "../puppet/createPuppet.sol";
|
13
|
-
import { MODULE_NAME as PUPPET_MODULE_NAME } from "../puppet/constants.sol";
|
14
14
|
import { Balances } from "../tokens/tables/Balances.sol";
|
15
15
|
|
16
|
-
import {
|
16
|
+
import { MODULE_NAMESPACE, MODULE_NAMESPACE_ID, ERC721_REGISTRY_TABLE_ID } from "./constants.sol";
|
17
17
|
import { _erc721SystemId, _balancesTableId, _metadataTableId, _tokenUriTableId, _operatorApprovalTableId, _ownersTableId, _tokenApprovalTableId } from "./utils.sol";
|
18
18
|
import { ERC721System } from "./ERC721System.sol";
|
19
19
|
|
@@ -29,37 +29,24 @@ contract ERC721Module is Module {
|
|
29
29
|
|
30
30
|
address immutable registrationLibrary = address(new ERC721ModuleRegistrationLibrary());
|
31
31
|
|
32
|
-
function
|
33
|
-
return MODULE_NAME;
|
34
|
-
}
|
35
|
-
|
36
|
-
function _requireDependencies() internal {
|
37
|
-
// Require PuppetModule to be installed
|
38
|
-
if (InstalledModules.get(PUPPET_MODULE_NAME, keccak256(new bytes(0))) == address(0)) {
|
39
|
-
revert Module_MissingDependency(string(bytes.concat(PUPPET_MODULE_NAME)));
|
40
|
-
}
|
41
|
-
}
|
42
|
-
|
43
|
-
function install(bytes memory args) public {
|
32
|
+
function install(bytes memory encodedArgs) public {
|
44
33
|
// Require the module to not be installed with these args yet
|
45
|
-
|
46
|
-
revert Module_AlreadyInstalled();
|
47
|
-
}
|
34
|
+
requireNotInstalled(__self, encodedArgs);
|
48
35
|
|
49
|
-
//
|
50
|
-
(bytes14 namespace, ERC721MetadataData memory metadata) = abi.decode(
|
36
|
+
// Decode args
|
37
|
+
(bytes14 namespace, ERC721MetadataData memory metadata) = abi.decode(encodedArgs, (bytes14, ERC721MetadataData));
|
51
38
|
|
52
39
|
// Require the namespace to not be the module's namespace
|
53
40
|
if (namespace == MODULE_NAMESPACE) {
|
54
41
|
revert ERC721Module_InvalidNamespace(namespace);
|
55
42
|
}
|
56
43
|
|
57
|
-
// Require dependencies
|
58
|
-
_requireDependencies();
|
59
|
-
|
60
44
|
// Register the ERC721 tables and system
|
61
45
|
IBaseWorld world = IBaseWorld(_world());
|
62
|
-
|
46
|
+
(bool success, bytes memory returnData) = registrationLibrary.delegatecall(
|
47
|
+
abi.encodeCall(ERC721ModuleRegistrationLibrary.register, (world, namespace))
|
48
|
+
);
|
49
|
+
if (!success) revertWithBytes(returnData);
|
63
50
|
|
64
51
|
// Initialize the Metadata
|
65
52
|
ERC721Metadata.set(_metadataTableId(namespace), metadata);
|
@@ -74,6 +61,7 @@ contract ERC721Module is Module {
|
|
74
61
|
|
75
62
|
// Register the ERC721 in the ERC20Registry
|
76
63
|
if (!ResourceIds.getExists(ERC721_REGISTRY_TABLE_ID)) {
|
64
|
+
world.registerNamespace(MODULE_NAMESPACE_ID);
|
77
65
|
ERC721Registry.register(ERC721_REGISTRY_TABLE_ID);
|
78
66
|
}
|
79
67
|
ERC721Registry.set(ERC721_REGISTRY_TABLE_ID, namespaceId, puppet);
|
@@ -89,8 +77,13 @@ contract ERC721ModuleRegistrationLibrary {
|
|
89
77
|
* Register systems and tables for a new ERC721 token in a given namespace
|
90
78
|
*/
|
91
79
|
function register(IBaseWorld world, bytes14 namespace) public {
|
92
|
-
// Register the
|
80
|
+
// Register the namespace if it doesn't exist yet
|
81
|
+
ResourceId tokenNamespace = WorldResourceIdLib.encodeNamespace(namespace);
|
82
|
+
if (!ResourceIds.getExists(tokenNamespace)) {
|
83
|
+
world.registerNamespace(tokenNamespace);
|
84
|
+
}
|
93
85
|
|
86
|
+
// Register the tables
|
94
87
|
OperatorApproval.register(_operatorApprovalTableId(namespace));
|
95
88
|
Owners.register(_ownersTableId(namespace));
|
96
89
|
TokenApproval.register(_tokenApprovalTableId(namespace));
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
2
2
|
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)
|
3
|
-
pragma solidity >=0.8.
|
3
|
+
pragma solidity >=0.8.24;
|
4
4
|
|
5
5
|
import { IERC721Events } from "./IERC721Events.sol";
|
6
6
|
import { IERC721Errors } from "./IERC721Errors.sol";
|
@@ -1,10 +1,9 @@
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
2
|
-
pragma solidity >=0.8.
|
2
|
+
pragma solidity >=0.8.24;
|
3
3
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
4
4
|
import { RESOURCE_TABLE } from "@latticexyz/store/src/storeResourceTypes.sol";
|
5
5
|
import { RESOURCE_SYSTEM, RESOURCE_NAMESPACE } from "@latticexyz/world/src/worldResourceTypes.sol";
|
6
6
|
|
7
|
-
bytes16 constant MODULE_NAME = "erc721-puppet";
|
8
7
|
bytes14 constant MODULE_NAMESPACE = "erc721-puppet";
|
9
8
|
ResourceId constant MODULE_NAMESPACE_ID = ResourceId.wrap(
|
10
9
|
bytes32(abi.encodePacked(RESOURCE_NAMESPACE, MODULE_NAMESPACE))
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
2
|
-
pragma solidity >=0.8.
|
2
|
+
pragma solidity >=0.8.24;
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
@@ -18,7 +18,6 @@ import { FieldLayout, FieldLayoutLib } from "@latticexyz/store/src/FieldLayout.s
|
|
18
18
|
import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
|
19
19
|
import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
|
20
20
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
|
-
import { RESOURCE_TABLE, RESOURCE_OFFCHAIN_TABLE } from "@latticexyz/store/src/storeResourceTypes.sol";
|
22
21
|
|
23
22
|
FieldLayout constant _fieldLayout = FieldLayout.wrap(
|
24
23
|
0x0000000300000000000000000000000000000000000000000000000000000000
|
@@ -709,7 +708,7 @@ library ERC721Metadata {
|
|
709
708
|
* @notice Encode all of a record's fields.
|
710
709
|
* @return The static (fixed length) data, encoded into a sequence of bytes.
|
711
710
|
* @return The lengths of the dynamic fields (packed into a single bytes32 value).
|
712
|
-
* @return The
|
711
|
+
* @return The dynamic (variable length) data, encoded into a sequence of bytes.
|
713
712
|
*/
|
714
713
|
function encode(
|
715
714
|
string memory name,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
2
|
-
pragma solidity >=0.8.
|
2
|
+
pragma solidity >=0.8.24;
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
@@ -18,7 +18,6 @@ import { FieldLayout, FieldLayoutLib } from "@latticexyz/store/src/FieldLayout.s
|
|
18
18
|
import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
|
19
19
|
import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
|
20
20
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
|
-
import { RESOURCE_TABLE, RESOURCE_OFFCHAIN_TABLE } from "@latticexyz/store/src/storeResourceTypes.sol";
|
22
21
|
|
23
22
|
// Import user types
|
24
23
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
@@ -206,7 +205,7 @@ library ERC721Registry {
|
|
206
205
|
* @notice Encode all of a record's fields.
|
207
206
|
* @return The static (fixed length) data, encoded into a sequence of bytes.
|
208
207
|
* @return The lengths of the dynamic fields (packed into a single bytes32 value).
|
209
|
-
* @return The
|
208
|
+
* @return The dynamic (variable length) data, encoded into a sequence of bytes.
|
210
209
|
*/
|
211
210
|
function encode(address tokenAddress) internal pure returns (bytes memory, PackedCounter, bytes memory) {
|
212
211
|
bytes memory _staticData = encodeStatic(tokenAddress);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
2
|
-
pragma solidity >=0.8.
|
2
|
+
pragma solidity >=0.8.24;
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
@@ -18,7 +18,6 @@ import { FieldLayout, FieldLayoutLib } from "@latticexyz/store/src/FieldLayout.s
|
|
18
18
|
import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
|
19
19
|
import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
|
20
20
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
|
-
import { RESOURCE_TABLE, RESOURCE_OFFCHAIN_TABLE } from "@latticexyz/store/src/storeResourceTypes.sol";
|
22
21
|
|
23
22
|
FieldLayout constant _fieldLayout = FieldLayout.wrap(
|
24
23
|
0x0001010001000000000000000000000000000000000000000000000000000000
|
@@ -215,7 +214,7 @@ library OperatorApproval {
|
|
215
214
|
* @notice Encode all of a record's fields.
|
216
215
|
* @return The static (fixed length) data, encoded into a sequence of bytes.
|
217
216
|
* @return The lengths of the dynamic fields (packed into a single bytes32 value).
|
218
|
-
* @return The
|
217
|
+
* @return The dynamic (variable length) data, encoded into a sequence of bytes.
|
219
218
|
*/
|
220
219
|
function encode(bool approved) internal pure returns (bytes memory, PackedCounter, bytes memory) {
|
221
220
|
bytes memory _staticData = encodeStatic(approved);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
2
|
-
pragma solidity >=0.8.
|
2
|
+
pragma solidity >=0.8.24;
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
@@ -18,7 +18,6 @@ import { FieldLayout, FieldLayoutLib } from "@latticexyz/store/src/FieldLayout.s
|
|
18
18
|
import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
|
19
19
|
import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
|
20
20
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
|
-
import { RESOURCE_TABLE, RESOURCE_OFFCHAIN_TABLE } from "@latticexyz/store/src/storeResourceTypes.sol";
|
22
21
|
|
23
22
|
FieldLayout constant _fieldLayout = FieldLayout.wrap(
|
24
23
|
0x0014010014000000000000000000000000000000000000000000000000000000
|
@@ -203,7 +202,7 @@ library Owners {
|
|
203
202
|
* @notice Encode all of a record's fields.
|
204
203
|
* @return The static (fixed length) data, encoded into a sequence of bytes.
|
205
204
|
* @return The lengths of the dynamic fields (packed into a single bytes32 value).
|
206
|
-
* @return The
|
205
|
+
* @return The dynamic (variable length) data, encoded into a sequence of bytes.
|
207
206
|
*/
|
208
207
|
function encode(address owner) internal pure returns (bytes memory, PackedCounter, bytes memory) {
|
209
208
|
bytes memory _staticData = encodeStatic(owner);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
2
|
-
pragma solidity >=0.8.
|
2
|
+
pragma solidity >=0.8.24;
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
@@ -18,7 +18,6 @@ import { FieldLayout, FieldLayoutLib } from "@latticexyz/store/src/FieldLayout.s
|
|
18
18
|
import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
|
19
19
|
import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
|
20
20
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
|
-
import { RESOURCE_TABLE, RESOURCE_OFFCHAIN_TABLE } from "@latticexyz/store/src/storeResourceTypes.sol";
|
22
21
|
|
23
22
|
FieldLayout constant _fieldLayout = FieldLayout.wrap(
|
24
23
|
0x0014010014000000000000000000000000000000000000000000000000000000
|
@@ -203,7 +202,7 @@ library TokenApproval {
|
|
203
202
|
* @notice Encode all of a record's fields.
|
204
203
|
* @return The static (fixed length) data, encoded into a sequence of bytes.
|
205
204
|
* @return The lengths of the dynamic fields (packed into a single bytes32 value).
|
206
|
-
* @return The
|
205
|
+
* @return The dynamic (variable length) data, encoded into a sequence of bytes.
|
207
206
|
*/
|
208
207
|
function encode(address account) internal pure returns (bytes memory, PackedCounter, bytes memory) {
|
209
208
|
bytes memory _staticData = encodeStatic(account);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
2
|
-
pragma solidity >=0.8.
|
2
|
+
pragma solidity >=0.8.24;
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
@@ -18,7 +18,6 @@ import { FieldLayout, FieldLayoutLib } from "@latticexyz/store/src/FieldLayout.s
|
|
18
18
|
import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
|
19
19
|
import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
|
20
20
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
|
-
import { RESOURCE_TABLE, RESOURCE_OFFCHAIN_TABLE } from "@latticexyz/store/src/storeResourceTypes.sol";
|
22
21
|
|
23
22
|
FieldLayout constant _fieldLayout = FieldLayout.wrap(
|
24
23
|
0x0000000100000000000000000000000000000000000000000000000000000000
|
@@ -458,7 +457,7 @@ library TokenURI {
|
|
458
457
|
* @notice Encode all of a record's fields.
|
459
458
|
* @return The static (fixed length) data, encoded into a sequence of bytes.
|
460
459
|
* @return The lengths of the dynamic fields (packed into a single bytes32 value).
|
461
|
-
* @return The
|
460
|
+
* @return The dynamic (variable length) data, encoded into a sequence of bytes.
|
462
461
|
*/
|
463
462
|
function encode(string memory tokenURI) internal pure returns (bytes memory, PackedCounter, bytes memory) {
|
464
463
|
bytes memory _staticData;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
2
|
-
pragma solidity >=0.8.
|
2
|
+
pragma solidity >=0.8.24;
|
3
3
|
|
4
4
|
import { BEFORE_SET_RECORD, AFTER_SPLICE_STATIC_DATA, AFTER_SPLICE_DYNAMIC_DATA, BEFORE_DELETE_RECORD } from "@latticexyz/store/src/storeHookTypes.sol";
|
5
5
|
import { ResourceIds } from "@latticexyz/store/src/codegen/tables/ResourceIds.sol";
|
@@ -33,19 +33,13 @@ contract KeysInTableModule is Module {
|
|
33
33
|
// from the source table id (passed as argument to the hook methods)
|
34
34
|
KeysInTableHook private immutable hook = new KeysInTableHook();
|
35
35
|
|
36
|
-
function
|
37
|
-
return bytes16("keysInTable");
|
38
|
-
}
|
39
|
-
|
40
|
-
function installRoot(bytes memory args) public override {
|
36
|
+
function installRoot(bytes memory encodedArgs) public override {
|
41
37
|
// Naive check to ensure this is only installed once
|
42
38
|
// TODO: only revert if there's nothing to do
|
43
|
-
|
44
|
-
revert Module_AlreadyInstalled();
|
45
|
-
}
|
39
|
+
requireNotInstalled(__self, encodedArgs);
|
46
40
|
|
47
41
|
// Extract source table id from args
|
48
|
-
ResourceId sourceTableId = ResourceId.wrap(abi.decode(
|
42
|
+
ResourceId sourceTableId = ResourceId.wrap(abi.decode(encodedArgs, (bytes32)));
|
49
43
|
|
50
44
|
IBaseWorld world = IBaseWorld(_world());
|
51
45
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
2
|
-
pragma solidity >=0.8.
|
2
|
+
pragma solidity >=0.8.24;
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
@@ -18,14 +18,12 @@ import { FieldLayout, FieldLayoutLib } from "@latticexyz/store/src/FieldLayout.s
|
|
18
18
|
import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
|
19
19
|
import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
|
20
20
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
|
-
import { RESOURCE_TABLE, RESOURCE_OFFCHAIN_TABLE } from "@latticexyz/store/src/storeResourceTypes.sol";
|
22
21
|
|
23
22
|
// Import user types
|
24
23
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
25
24
|
|
26
|
-
|
27
|
-
|
28
|
-
);
|
25
|
+
// Hex below is the result of `WorldResourceIdLib.encode({ namespace: "", name: "KeysInTable", typeId: RESOURCE_TABLE });`
|
26
|
+
ResourceId constant _tableId = ResourceId.wrap(0x746200000000000000000000000000004b657973496e5461626c650000000000);
|
29
27
|
ResourceId constant KeysInTableTableId = _tableId;
|
30
28
|
|
31
29
|
FieldLayout constant _fieldLayout = FieldLayout.wrap(
|
@@ -1628,7 +1626,7 @@ library KeysInTable {
|
|
1628
1626
|
* @notice Encode all of a record's fields.
|
1629
1627
|
* @return The static (fixed length) data, encoded into a sequence of bytes.
|
1630
1628
|
* @return The lengths of the dynamic fields (packed into a single bytes32 value).
|
1631
|
-
* @return The
|
1629
|
+
* @return The dynamic (variable length) data, encoded into a sequence of bytes.
|
1632
1630
|
*/
|
1633
1631
|
function encode(
|
1634
1632
|
bytes32[] memory keys0,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
2
|
-
pragma solidity >=0.8.
|
2
|
+
pragma solidity >=0.8.24;
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
@@ -18,14 +18,12 @@ import { FieldLayout, FieldLayoutLib } from "@latticexyz/store/src/FieldLayout.s
|
|
18
18
|
import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
|
19
19
|
import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
|
20
20
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
|
-
import { RESOURCE_TABLE, RESOURCE_OFFCHAIN_TABLE } from "@latticexyz/store/src/storeResourceTypes.sol";
|
22
21
|
|
23
22
|
// Import user types
|
24
23
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
25
24
|
|
26
|
-
|
27
|
-
|
28
|
-
);
|
25
|
+
// Hex below is the result of `WorldResourceIdLib.encode({ namespace: "", name: "UsedKeysIndex", typeId: RESOURCE_TABLE });`
|
26
|
+
ResourceId constant _tableId = ResourceId.wrap(0x74620000000000000000000000000000557365644b657973496e646578000000);
|
29
27
|
ResourceId constant UsedKeysIndexTableId = _tableId;
|
30
28
|
|
31
29
|
FieldLayout constant _fieldLayout = FieldLayout.wrap(
|
@@ -412,7 +410,7 @@ library UsedKeysIndex {
|
|
412
410
|
* @notice Encode all of a record's fields.
|
413
411
|
* @return The static (fixed length) data, encoded into a sequence of bytes.
|
414
412
|
* @return The lengths of the dynamic fields (packed into a single bytes32 value).
|
415
|
-
* @return The
|
413
|
+
* @return The dynamic (variable length) data, encoded into a sequence of bytes.
|
416
414
|
*/
|
417
415
|
function encode(bool has, uint40 index) internal pure returns (bytes memory, PackedCounter, bytes memory) {
|
418
416
|
bytes memory _staticData = encodeStatic(has, index);
|
@@ -1,9 +1,10 @@
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
2
|
-
pragma solidity >=0.8.
|
2
|
+
pragma solidity >=0.8.24;
|
3
3
|
import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
|
4
4
|
import { BEFORE_SET_RECORD, BEFORE_SPLICE_STATIC_DATA, AFTER_SPLICE_STATIC_DATA, BEFORE_SPLICE_DYNAMIC_DATA, AFTER_SPLICE_DYNAMIC_DATA, BEFORE_DELETE_RECORD } from "@latticexyz/store/src/storeHookTypes.sol";
|
5
|
-
import {
|
5
|
+
import { ResourceIds } from "@latticexyz/store/src/codegen/tables/ResourceIds.sol";
|
6
6
|
|
7
|
+
import { Module } from "@latticexyz/world/src/Module.sol";
|
7
8
|
import { IBaseWorld } from "@latticexyz/world/src/codegen/interfaces/IBaseWorld.sol";
|
8
9
|
import { InstalledModules } from "@latticexyz/world/src/codegen/index.sol";
|
9
10
|
|
@@ -34,29 +35,31 @@ contract KeysWithValueModule is Module {
|
|
34
35
|
// from the source table id (passed as argument to the hook methods)
|
35
36
|
KeysWithValueHook private immutable hook = new KeysWithValueHook();
|
36
37
|
|
37
|
-
function
|
38
|
-
return bytes16("index");
|
39
|
-
}
|
40
|
-
|
41
|
-
function installRoot(bytes memory args) public {
|
38
|
+
function installRoot(bytes memory encodedArgs) public {
|
42
39
|
// Naive check to ensure this is only installed once
|
43
40
|
// TODO: only revert if there's nothing to do
|
44
|
-
|
45
|
-
revert Module_AlreadyInstalled();
|
46
|
-
}
|
41
|
+
requireNotInstalled(__self, encodedArgs);
|
47
42
|
|
48
43
|
// Extract source table id from args
|
49
|
-
ResourceId sourceTableId = ResourceId.wrap(abi.decode(
|
50
|
-
ResourceId
|
44
|
+
ResourceId sourceTableId = ResourceId.wrap(abi.decode(encodedArgs, (bytes32)));
|
45
|
+
ResourceId targetTableId = getTargetTableId(MODULE_NAMESPACE, sourceTableId);
|
51
46
|
|
52
47
|
IBaseWorld world = IBaseWorld(_world());
|
53
48
|
|
49
|
+
// Register the target namespace if it doesn't exist yet
|
50
|
+
if (!ResourceIds.getExists(targetTableId.getNamespaceId())) {
|
51
|
+
(bool registrationSuccess, bytes memory registrationReturnData) = address(world).delegatecall(
|
52
|
+
abi.encodeCall(world.registerNamespace, (targetTableId.getNamespaceId()))
|
53
|
+
);
|
54
|
+
if (!registrationSuccess) revertWithBytes(registrationReturnData);
|
55
|
+
}
|
56
|
+
|
54
57
|
// Register the target table
|
55
58
|
(bool success, bytes memory returnData) = address(world).delegatecall(
|
56
59
|
abi.encodeCall(
|
57
60
|
world.registerTable,
|
58
61
|
(
|
59
|
-
|
62
|
+
targetTableId,
|
60
63
|
KeysWithValue.getFieldLayout(),
|
61
64
|
KeysWithValue.getKeySchema(),
|
62
65
|
KeysWithValue.getValueSchema(),
|
@@ -66,9 +69,11 @@ contract KeysWithValueModule is Module {
|
|
66
69
|
)
|
67
70
|
);
|
68
71
|
|
72
|
+
if (!success) revertWithBytes(returnData);
|
73
|
+
|
69
74
|
// Grant the hook access to the target table
|
70
75
|
(success, returnData) = address(world).delegatecall(
|
71
|
-
abi.encodeCall(world.grantAccess, (
|
76
|
+
abi.encodeCall(world.grantAccess, (targetTableId, address(hook)))
|
72
77
|
);
|
73
78
|
|
74
79
|
if (!success) revertWithBytes(returnData);
|