@latticexyz/world-modules 2.0.0-transaction-context-324984c5 → 2.0.0
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 +689 -222
- package/dist/mud.config.js +1 -1
- package/dist/mud.config.js.map +1 -1
- package/out/AccessControl.sol/AccessControl.json +1 -1
- package/out/AccessControlLib.sol/AccessControlLib.json +1 -1
- package/out/AccessManagementSystem.sol/AccessManagementSystem.abi.json +0 -13
- package/out/AccessManagementSystem.sol/AccessManagementSystem.abi.json.d.ts +0 -13
- 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 +0 -24
- package/out/BalanceTransferSystem.sol/BalanceTransferSystem.abi.json.d.ts +0 -24
- 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 +0 -13
- package/out/BatchCallSystem.sol/BatchCallSystem.abi.json.d.ts +0 -13
- 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.abi.json +0 -13
- package/out/CallboundDelegationControl.sol/CallboundDelegationControl.abi.json.d.ts +0 -13
- 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.abi.json +0 -13
- package/out/DelegationControl.sol/DelegationControl.abi.json.d.ts +0 -13
- package/out/DelegationControl.sol/DelegationControl.json +1 -1
- package/out/DelegationControlMock.sol/DelegationControlMock.abi.json +0 -13
- package/out/DelegationControlMock.sol/DelegationControlMock.abi.json.d.ts +0 -13
- package/out/DelegationControlMock.sol/DelegationControlMock.json +1 -1
- package/out/ERC165Checker.sol/ERC165Checker.json +1 -1
- package/out/ERC20.t.sol/ERC20Test.json +1 -1
- package/out/ERC20Metadata.sol/ERC20Metadata.json +1 -1
- package/out/ERC20Module.sol/ERC20Module.abi.json +10 -23
- package/out/ERC20Module.sol/ERC20Module.abi.json.d.ts +10 -23
- package/out/ERC20Module.sol/ERC20Module.json +1 -1
- package/out/ERC20Module.sol/ERC20ModuleRegistrationLibrary.abi.json +10 -10
- package/out/ERC20Module.sol/ERC20ModuleRegistrationLibrary.abi.json.d.ts +10 -10
- package/out/ERC20Module.sol/ERC20ModuleRegistrationLibrary.json +1 -1
- package/out/ERC20Registry.sol/ERC20Registry.json +1 -1
- package/out/ERC20System.sol/ERC20System.abi.json +0 -13
- package/out/ERC20System.sol/ERC20System.abi.json.d.ts +0 -13
- package/out/ERC20System.sol/ERC20System.json +1 -1
- package/out/ERC721.t.sol/ERC721Recipient.json +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 +10 -23
- package/out/ERC721Module.sol/ERC721Module.abi.json.d.ts +10 -23
- package/out/ERC721Module.sol/ERC721Module.json +1 -1
- package/out/ERC721Module.sol/ERC721ModuleRegistrationLibrary.abi.json +10 -10
- package/out/ERC721Module.sol/ERC721ModuleRegistrationLibrary.abi.json.d.ts +10 -10
- package/out/ERC721Module.sol/ERC721ModuleRegistrationLibrary.json +1 -1
- package/out/ERC721Registry.sol/ERC721Registry.json +1 -1
- package/out/ERC721System.sol/ERC721System.abi.json +0 -13
- package/out/ERC721System.sol/ERC721System.abi.json.d.ts +0 -13
- package/out/ERC721System.sol/ERC721System.json +1 -1
- package/out/EchoSubscriber.sol/EchoSubscriber.abi.json +4 -4
- package/out/EchoSubscriber.sol/EchoSubscriber.abi.json.d.ts +4 -4
- package/out/EchoSubscriber.sol/EchoSubscriber.json +1 -1
- package/out/EncodeArray.sol/EncodeArray.json +1 -1
- package/out/EncodedLengths.sol/EncodedLengthsInstance.json +1 -0
- package/out/EncodedLengths.sol/EncodedLengthsLib.json +1 -0
- package/out/FieldLayout.sol/FieldLayoutInstance.json +1 -1
- package/out/FieldLayout.sol/FieldLayoutLib.abi.json +1 -88
- 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.json +1 -1
- package/out/IBalanceTransferSystem.sol/IBalanceTransferSystem.json +1 -1
- package/out/IBaseWorld.sol/IBaseWorld.abi.json +171 -16
- package/out/IBaseWorld.sol/IBaseWorld.abi.json.d.ts +171 -16
- package/out/IBaseWorld.sol/IBaseWorld.json +1 -1
- package/out/IBatchCallSystem.sol/IBatchCallSystem.json +1 -1
- package/out/IDelegationControl.sol/IDelegationControl.abi.json +0 -13
- package/out/IDelegationControl.sol/IDelegationControl.abi.json.d.ts +0 -13
- package/out/IDelegationControl.sol/IDelegationControl.json +1 -1
- 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/{PackedCounter.sol/PackedCounterInstance.abi.json → IEncodedLengthsErrors.sol/IEncodedLengthsErrors.abi.json} +1 -1
- package/out/{PackedCounter.sol/PackedCounterInstance.abi.json.d.ts → IEncodedLengthsErrors.sol/IEncodedLengthsErrors.abi.json.d.ts} +1 -1
- package/out/IEncodedLengthsErrors.sol/IEncodedLengthsErrors.json +1 -0
- package/out/IFieldLayoutErrors.sol/IFieldLayoutErrors.abi.json +88 -0
- package/out/{FieldLayout.sol/FieldLayoutLib.abi.json.d.ts → IFieldLayoutErrors.sol/IFieldLayoutErrors.abi.json.d.ts} +7 -7
- package/out/IFieldLayoutErrors.sol/IFieldLayoutErrors.json +1 -0
- package/out/IModule.sol/IModule.json +1 -1
- package/out/IModuleErrors.sol/IModuleErrors.abi.json +28 -0
- package/out/IModuleErrors.sol/IModuleErrors.abi.json.d.ts +28 -0
- package/out/IModuleErrors.sol/IModuleErrors.json +1 -0
- 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.json +1 -1
- package/out/ISchemaErrors.sol/ISchemaErrors.abi.json +18 -0
- package/out/{Schema.sol/SchemaLib.abi.json.d.ts → ISchemaErrors.sol/ISchemaErrors.abi.json.d.ts} +2 -2
- package/out/ISchemaErrors.sol/ISchemaErrors.json +1 -0
- package/out/ISliceErrors.sol/ISliceErrors.abi.json +23 -0
- package/out/ISliceErrors.sol/ISliceErrors.json +1 -0
- package/out/IStore.sol/IStore.abi.json +145 -5
- package/out/IStore.sol/IStore.abi.json.d.ts +145 -5
- package/out/IStore.sol/IStore.json +1 -1
- package/out/IStoreErrors.sol/IStoreErrors.json +1 -1
- package/out/IStoreEvents.sol/IStoreEvents.abi.json +21 -2
- package/out/IStoreEvents.sol/IStoreEvents.abi.json.d.ts +21 -2
- package/out/IStoreEvents.sol/IStoreEvents.json +1 -1
- package/out/IStoreHook.sol/IStoreHook.abi.json +4 -4
- package/out/IStoreHook.sol/IStoreHook.abi.json.d.ts +4 -4
- package/out/IStoreHook.sol/IStoreHook.json +1 -1
- package/out/{IStoreData.sol/IStoreData.abi.json → IStoreKernel.sol/IStoreKernel.abi.json} +347 -5
- package/out/{IStoreData.sol/IStoreData.abi.json.d.ts → IStoreKernel.sol/IStoreKernel.abi.json.d.ts} +347 -5
- package/out/IStoreKernel.sol/IStoreKernel.json +1 -0
- package/out/IStoreRead.sol/IStoreRead.abi.json +2 -2
- package/out/IStoreRead.sol/IStoreRead.abi.json.d.ts +2 -2
- package/out/IStoreRead.sol/IStoreRead.json +1 -1
- package/out/IStoreRegistration.sol/IStoreRegistration.json +1 -1
- package/out/IStoreWrite.sol/IStoreWrite.abi.json +22 -3
- package/out/IStoreWrite.sol/IStoreWrite.abi.json.d.ts +22 -3
- package/out/IStoreWrite.sol/IStoreWrite.json +1 -1
- package/out/ISystemHook.sol/ISystemHook.json +1 -1
- package/out/IWorldContextConsumer.sol/IWorldContextConsumer.abi.json +0 -13
- package/out/IWorldContextConsumer.sol/IWorldContextConsumer.abi.json.d.ts +0 -13
- package/out/IWorldContextConsumer.sol/IWorldContextConsumer.json +1 -1
- package/out/IWorldErrors.sol/IWorldErrors.abi.json +0 -11
- package/out/IWorldErrors.sol/IWorldErrors.abi.json.d.ts +0 -11
- package/out/IWorldErrors.sol/IWorldErrors.json +1 -1
- package/out/IWorldEvents.sol/IWorldEvents.abi.json +15 -0
- package/out/IWorldEvents.sol/IWorldEvents.abi.json.d.ts +15 -0
- package/out/IWorldEvents.sol/IWorldEvents.json +1 -0
- package/out/IWorldKernel.sol/IWorldCall.json +1 -1
- package/out/IWorldKernel.sol/IWorldKernel.abi.json +26 -11
- package/out/IWorldKernel.sol/IWorldKernel.abi.json.d.ts +26 -11
- package/out/IWorldKernel.sol/IWorldKernel.json +1 -1
- package/out/IWorldKernel.sol/IWorldModuleInstallation.json +1 -1
- package/out/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.abi.json +3 -3
- package/out/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.abi.json.d.ts +3 -3
- package/out/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.json +1 -1
- package/out/InitModule.sol/InitModule.abi.json +10 -23
- package/out/InitModule.sol/InitModule.abi.json.d.ts +10 -23
- package/out/InitModule.sol/InitModule.json +1 -1
- package/out/InitModuleAddress.sol/InitModuleAddress.json +1 -1
- package/out/InstalledModules.sol/InstalledModules.json +1 -1
- package/out/KeysInTable.sol/KeysInTable.json +1 -1
- package/out/KeysInTableHook.sol/KeysInTableHook.abi.json +13 -7
- package/out/KeysInTableHook.sol/KeysInTableHook.abi.json.d.ts +13 -7
- package/out/KeysInTableHook.sol/KeysInTableHook.json +1 -1
- package/out/KeysInTableModule.sol/KeysInTableModule.abi.json +0 -29
- package/out/KeysInTableModule.sol/KeysInTableModule.abi.json.d.ts +0 -29
- package/out/KeysInTableModule.sol/KeysInTableModule.json +1 -1
- package/out/KeysInTableModule.t.sol/KeysInTableModuleTest.abi.json +6 -6
- package/out/KeysInTableModule.t.sol/KeysInTableModuleTest.abi.json.d.ts +6 -6
- package/out/KeysInTableModule.t.sol/KeysInTableModuleTest.json +1 -1
- package/out/KeysWithValue.sol/KeysWithValue.json +1 -1
- package/out/KeysWithValueHook.sol/KeysWithValueHook.abi.json +12 -6
- package/out/KeysWithValueHook.sol/KeysWithValueHook.abi.json.d.ts +12 -6
- package/out/KeysWithValueHook.sol/KeysWithValueHook.json +1 -1
- package/out/KeysWithValueModule.sol/KeysWithValueModule.abi.json +0 -29
- package/out/KeysWithValueModule.sol/KeysWithValueModule.abi.json.d.ts +0 -29
- package/out/KeysWithValueModule.sol/KeysWithValueModule.json +1 -1
- package/out/KeysWithValueModule.t.sol/KeysWithValueModuleTest.abi.json +6 -6
- package/out/KeysWithValueModule.t.sol/KeysWithValueModuleTest.abi.json.d.ts +6 -6
- package/out/KeysWithValueModule.t.sol/KeysWithValueModuleTest.json +1 -1
- package/out/LimitedCallContext.sol/LimitedCallContext.json +1 -1
- package/out/Memory.sol/Memory.json +1 -1
- package/out/Module.sol/Module.abi.json +0 -13
- package/out/Module.sol/Module.abi.json.d.ts +0 -13
- package/out/Module.sol/Module.json +1 -1
- package/out/ModuleInstallationSystem.sol/ModuleInstallationSystem.abi.json +0 -13
- package/out/ModuleInstallationSystem.sol/ModuleInstallationSystem.abi.json.d.ts +0 -13
- 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/Puppet.sol/Puppet.json +1 -1
- package/out/PuppetDelegationControl.sol/PuppetDelegationControl.abi.json +0 -13
- package/out/PuppetDelegationControl.sol/PuppetDelegationControl.abi.json.d.ts +0 -13
- package/out/PuppetDelegationControl.sol/PuppetDelegationControl.json +1 -1
- package/out/PuppetFactorySystem.sol/PuppetFactorySystem.abi.json +0 -13
- package/out/PuppetFactorySystem.sol/PuppetFactorySystem.abi.json.d.ts +0 -13
- package/out/PuppetFactorySystem.sol/PuppetFactorySystem.json +1 -1
- package/out/PuppetMaster.sol/PuppetMaster.json +1 -1
- package/out/PuppetModule.sol/PuppetModule.abi.json +10 -23
- package/out/PuppetModule.sol/PuppetModule.abi.json.d.ts +10 -23
- package/out/PuppetModule.sol/PuppetModule.json +1 -1
- package/out/PuppetModule.t.sol/PuppetModuleTest.json +1 -1
- package/out/PuppetModule.t.sol/PuppetTestSystem.abi.json +0 -13
- package/out/PuppetModule.t.sol/PuppetTestSystem.abi.json.d.ts +0 -13
- package/out/PuppetModule.t.sol/PuppetTestSystem.json +1 -1
- package/out/PuppetRegistry.sol/PuppetRegistry.json +1 -1
- package/out/RegistrationSystem.sol/RegistrationSystem.abi.json +31 -49
- package/out/RegistrationSystem.sol/RegistrationSystem.abi.json.d.ts +31 -49
- package/out/RegistrationSystem.sol/RegistrationSystem.json +1 -1
- 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.abi.json +4 -4
- package/out/RevertSubscriber.sol/RevertSubscriber.abi.json.d.ts +4 -4
- package/out/RevertSubscriber.sol/RevertSubscriber.json +1 -1
- package/out/Schema.sol/SchemaInstance.json +1 -1
- package/out/Schema.sol/SchemaLib.abi.json +1 -18
- 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.abi.json +1 -23
- package/out/Slice.sol/SliceLib.json +1 -1
- package/out/StandardDelegationsModule.sol/StandardDelegationsModule.abi.json +10 -23
- package/out/StandardDelegationsModule.sol/StandardDelegationsModule.abi.json.d.ts +10 -23
- 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.abi.json +1 -132
- package/out/StoreCore.sol/StoreCore.json +1 -1
- package/out/StoreCore.sol/StoreCoreInternal.json +1 -1
- package/out/StoreHook.sol/StoreHook.abi.json +4 -4
- package/out/StoreHook.sol/StoreHook.abi.json.d.ts +4 -4
- package/out/StoreHook.sol/StoreHook.json +1 -1
- package/out/StoreHooks.sol/StoreHooks.json +1 -1
- package/out/{StoreData.sol/StoreData.abi.json → StoreKernel.sol/StoreKernel.abi.json} +299 -5
- package/out/{StoreData.sol/StoreData.abi.json.d.ts → StoreKernel.sol/StoreKernel.abi.json.d.ts} +299 -5
- package/out/StoreKernel.sol/StoreKernel.json +1 -0
- package/out/StoreRead.sol/StoreRead.abi.json +2 -2
- package/out/StoreRead.sol/StoreRead.abi.json.d.ts +2 -2
- package/out/StoreRead.sol/StoreRead.json +1 -1
- package/out/StoreRegistrationSystem.sol/StoreRegistrationSystem.abi.json +28 -46
- package/out/StoreRegistrationSystem.sol/StoreRegistrationSystem.abi.json.d.ts +28 -46
- package/out/StoreRegistrationSystem.sol/StoreRegistrationSystem.json +1 -1
- package/out/StoreSwitch.sol/StoreSwitch.json +1 -1
- package/out/System.sol/System.abi.json +0 -13
- package/out/System.sol/System.abi.json.d.ts +0 -13
- 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 +0 -13
- package/out/SystemSwitch.t.sol/EchoSystem.abi.json.d.ts +0 -13
- package/out/SystemSwitch.t.sol/EchoSystem.json +1 -1
- package/out/SystemSwitch.t.sol/SystemSwitchTest.abi.json +0 -16
- package/out/SystemSwitch.t.sol/SystemSwitchTest.abi.json.d.ts +0 -16
- package/out/SystemSwitch.t.sol/SystemSwitchTest.json +1 -1
- package/out/SystemboundDelegationControl.sol/SystemboundDelegationControl.abi.json +0 -13
- package/out/SystemboundDelegationControl.sol/SystemboundDelegationControl.abi.json.d.ts +0 -13
- 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.abi.json +0 -13
- package/out/TimeboundDelegationControl.sol/TimeboundDelegationControl.abi.json.d.ts +0 -13
- 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 +10 -23
- package/out/UniqueEntityModule.sol/UniqueEntityModule.abi.json.d.ts +10 -23
- 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 +0 -13
- package/out/UniqueEntityModule.t.sol/UniqueEntityTestSystem.abi.json.d.ts +0 -13
- package/out/UniqueEntityModule.t.sol/UniqueEntityTestSystem.json +1 -1
- package/out/UniqueEntitySystem.sol/UniqueEntitySystem.abi.json +0 -13
- package/out/UniqueEntitySystem.sol/UniqueEntitySystem.abi.json.d.ts +0 -13
- 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 +232 -127
- package/out/World.sol/World.abi.json.d.ts +232 -127
- package/out/World.sol/World.json +1 -1
- package/out/World.t.sol/EchoSystemHook.json +1 -1
- package/out/World.t.sol/IWorldTestSystem.json +1 -1
- package/out/World.t.sol/PayableFallbackSystem.abi.json +0 -13
- package/out/World.t.sol/PayableFallbackSystem.abi.json.d.ts +0 -13
- 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 +7 -7
- package/out/World.t.sol/WorldTest.abi.json.d.ts +7 -7
- package/out/World.t.sol/WorldTest.json +1 -1
- package/out/World.t.sol/WorldTestSystem.abi.json +1 -14
- package/out/World.t.sol/WorldTestSystem.abi.json.d.ts +1 -14
- package/out/World.t.sol/WorldTestSystem.json +1 -1
- package/out/WorldContext.sol/WorldContextConsumer.abi.json +0 -13
- package/out/WorldContext.sol/WorldContextConsumer.abi.json.d.ts +0 -13
- 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 +12 -30
- package/out/WorldRegistrationSystem.sol/WorldRegistrationSystem.abi.json.d.ts +12 -30
- 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 +174 -19
- package/out/interfaces/IBaseWorld.sol/IBaseWorld.abi.json.d.ts +174 -19
- package/out/interfaces/IBaseWorld.sol/IBaseWorld.json +1 -1
- package/out/query.t.sol/QueryTest.abi.json +6 -6
- package/out/query.t.sol/QueryTest.abi.json.d.ts +6 -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/out/world/src/IERC165.sol/IERC165.json +1 -1
- package/package.json +8 -9
- package/src/index.sol +5 -5
- package/src/interfaces/IBaseWorld.sol +2 -3
- package/src/interfaces/IERC20System.sol +1 -0
- package/src/interfaces/IPuppetFactorySystem.sol +1 -0
- package/src/modules/erc20-puppet/ERC20Module.sol +1 -3
- package/src/modules/erc20-puppet/tables/Allowances.sol +13 -43
- package/src/modules/erc20-puppet/tables/ERC20Metadata.sol +24 -54
- package/src/modules/erc20-puppet/tables/ERC20Registry.sol +13 -42
- package/src/modules/erc20-puppet/tables/TotalSupply.sol +13 -41
- package/src/modules/erc721-puppet/ERC721Module.sol +1 -3
- package/src/modules/erc721-puppet/IERC721Metadata.sol +1 -0
- package/src/modules/erc721-puppet/IERC721Receiver.sol +1 -0
- package/src/modules/erc721-puppet/tables/ERC721Metadata.sol +23 -53
- package/src/modules/erc721-puppet/tables/ERC721Registry.sol +13 -42
- package/src/modules/erc721-puppet/tables/OperatorApproval.sol +13 -43
- package/src/modules/erc721-puppet/tables/Owners.sol +13 -42
- package/src/modules/erc721-puppet/tables/TokenApproval.sol +13 -42
- package/src/modules/erc721-puppet/tables/TokenURI.sol +15 -44
- package/src/modules/keysintable/KeysInTableHook.sol +3 -3
- package/src/modules/keysintable/KeysInTableModule.sol +13 -13
- package/src/modules/keysintable/query.sol +7 -7
- package/src/modules/keysintable/tables/KeysInTable.sol +47 -63
- package/src/modules/keysintable/tables/UsedKeysIndex.sol +25 -57
- package/src/modules/keyswithvalue/KeysWithValueHook.sol +5 -5
- package/src/modules/keyswithvalue/KeysWithValueModule.sol +3 -3
- package/src/modules/keyswithvalue/getKeysWithValue.sol +3 -3
- package/src/modules/keyswithvalue/tables/KeysWithValue.sol +16 -45
- package/src/modules/puppet/tables/PuppetRegistry.sol +13 -42
- package/src/modules/std-delegations/tables/CallboundDelegations.sol +15 -48
- package/src/modules/std-delegations/tables/SystemboundDelegations.sol +15 -47
- package/src/modules/std-delegations/tables/TimeboundDelegations.sol +15 -46
- package/src/modules/tokens/tables/Balances.sol +13 -42
- package/src/modules/uniqueentity/tables/UniqueEntity.sol +14 -42
- package/src/utils/AccessControlLib.sol +1 -0
- package/src/utils/SystemSwitch.sol +1 -0
- package/ts/scripts/tablegen.ts +2 -2
- package/ts/scripts/worldgen.ts +6 -5
- package/out/IStoreData.sol/IStoreData.json +0 -1
- package/out/PackedCounter.sol/PackedCounterInstance.json +0 -1
- package/out/PackedCounter.sol/PackedCounterLib.json +0 -1
- package/out/StoreCore.sol/StoreCore.abi.json.d.ts +0 -132
- package/out/StoreData.sol/StoreData.json +0 -1
- package/out/TransactionContext.sol/TransactionContext.json +0 -1
- /package/out/{PackedCounter.sol/PackedCounterLib.abi.json → EncodedLengths.sol/EncodedLengthsInstance.abi.json} +0 -0
- /package/out/{TransactionContext.sol/TransactionContext.abi.json → EncodedLengths.sol/EncodedLengthsLib.abi.json} +0 -0
- /package/out/{Slice.sol/SliceLib.abi.json.d.ts → ISliceErrors.sol/ISliceErrors.abi.json.d.ts} +0 -0
@@ -3,9 +3,6 @@ pragma solidity >=0.8.24;
|
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
6
|
-
// Import schema type
|
7
|
-
import { SchemaType } from "@latticexyz/schema-type/src/solidity/SchemaType.sol";
|
8
|
-
|
9
6
|
// Import store internals
|
10
7
|
import { IStore } from "@latticexyz/store/src/IStore.sol";
|
11
8
|
import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
|
@@ -14,48 +11,22 @@ import { Bytes } from "@latticexyz/store/src/Bytes.sol";
|
|
14
11
|
import { Memory } from "@latticexyz/store/src/Memory.sol";
|
15
12
|
import { SliceLib } from "@latticexyz/store/src/Slice.sol";
|
16
13
|
import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol";
|
17
|
-
import { FieldLayout
|
18
|
-
import { Schema
|
19
|
-
import {
|
14
|
+
import { FieldLayout } from "@latticexyz/store/src/FieldLayout.sol";
|
15
|
+
import { Schema } from "@latticexyz/store/src/Schema.sol";
|
16
|
+
import { EncodedLengths, EncodedLengthsLib } from "@latticexyz/store/src/EncodedLengths.sol";
|
20
17
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
18
|
|
22
19
|
// Import user types
|
23
20
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
24
21
|
|
25
|
-
FieldLayout constant _fieldLayout = FieldLayout.wrap(
|
26
|
-
0x0014010014000000000000000000000000000000000000000000000000000000
|
27
|
-
);
|
28
|
-
|
29
22
|
library ERC721Registry {
|
30
|
-
|
31
|
-
|
32
|
-
* @return _fieldLayout The field layout for the table.
|
33
|
-
*/
|
34
|
-
function getFieldLayout() internal pure returns (FieldLayout) {
|
35
|
-
return _fieldLayout;
|
36
|
-
}
|
37
|
-
|
38
|
-
/**
|
39
|
-
* @notice Get the table's key schema.
|
40
|
-
* @return _keySchema The key schema for the table.
|
41
|
-
*/
|
42
|
-
function getKeySchema() internal pure returns (Schema) {
|
43
|
-
SchemaType[] memory _keySchema = new SchemaType[](1);
|
44
|
-
_keySchema[0] = SchemaType.BYTES32;
|
45
|
-
|
46
|
-
return SchemaLib.encode(_keySchema);
|
47
|
-
}
|
23
|
+
FieldLayout constant _fieldLayout =
|
24
|
+
FieldLayout.wrap(0x0014010014000000000000000000000000000000000000000000000000000000);
|
48
25
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
function getValueSchema() internal pure returns (Schema) {
|
54
|
-
SchemaType[] memory _valueSchema = new SchemaType[](1);
|
55
|
-
_valueSchema[0] = SchemaType.ADDRESS;
|
56
|
-
|
57
|
-
return SchemaLib.encode(_valueSchema);
|
58
|
-
}
|
26
|
+
// Hex-encoded key schema of (bytes32)
|
27
|
+
Schema constant _keySchema = Schema.wrap(0x002001005f000000000000000000000000000000000000000000000000000000);
|
28
|
+
// Hex-encoded value schema of (address)
|
29
|
+
Schema constant _valueSchema = Schema.wrap(0x0014010061000000000000000000000000000000000000000000000000000000);
|
59
30
|
|
60
31
|
/**
|
61
32
|
* @notice Get the table's key field names.
|
@@ -79,14 +50,14 @@ library ERC721Registry {
|
|
79
50
|
* @notice Register the table with its config.
|
80
51
|
*/
|
81
52
|
function register(ResourceId _tableId) internal {
|
82
|
-
StoreSwitch.registerTable(_tableId, _fieldLayout,
|
53
|
+
StoreSwitch.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
83
54
|
}
|
84
55
|
|
85
56
|
/**
|
86
57
|
* @notice Register the table with its config.
|
87
58
|
*/
|
88
59
|
function _register(ResourceId _tableId) internal {
|
89
|
-
StoreCore.registerTable(_tableId, _fieldLayout,
|
60
|
+
StoreCore.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
90
61
|
}
|
91
62
|
|
92
63
|
/**
|
@@ -207,10 +178,10 @@ library ERC721Registry {
|
|
207
178
|
* @return The lengths of the dynamic fields (packed into a single bytes32 value).
|
208
179
|
* @return The dynamic (variable length) data, encoded into a sequence of bytes.
|
209
180
|
*/
|
210
|
-
function encode(address tokenAddress) internal pure returns (bytes memory,
|
181
|
+
function encode(address tokenAddress) internal pure returns (bytes memory, EncodedLengths, bytes memory) {
|
211
182
|
bytes memory _staticData = encodeStatic(tokenAddress);
|
212
183
|
|
213
|
-
|
184
|
+
EncodedLengths _encodedLengths;
|
214
185
|
bytes memory _dynamicData;
|
215
186
|
|
216
187
|
return (_staticData, _encodedLengths, _dynamicData);
|
@@ -3,9 +3,6 @@ pragma solidity >=0.8.24;
|
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
6
|
-
// Import schema type
|
7
|
-
import { SchemaType } from "@latticexyz/schema-type/src/solidity/SchemaType.sol";
|
8
|
-
|
9
6
|
// Import store internals
|
10
7
|
import { IStore } from "@latticexyz/store/src/IStore.sol";
|
11
8
|
import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
|
@@ -14,46 +11,19 @@ import { Bytes } from "@latticexyz/store/src/Bytes.sol";
|
|
14
11
|
import { Memory } from "@latticexyz/store/src/Memory.sol";
|
15
12
|
import { SliceLib } from "@latticexyz/store/src/Slice.sol";
|
16
13
|
import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol";
|
17
|
-
import { FieldLayout
|
18
|
-
import { Schema
|
19
|
-
import {
|
14
|
+
import { FieldLayout } from "@latticexyz/store/src/FieldLayout.sol";
|
15
|
+
import { Schema } from "@latticexyz/store/src/Schema.sol";
|
16
|
+
import { EncodedLengths, EncodedLengthsLib } from "@latticexyz/store/src/EncodedLengths.sol";
|
20
17
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
18
|
|
22
|
-
FieldLayout constant _fieldLayout = FieldLayout.wrap(
|
23
|
-
0x0001010001000000000000000000000000000000000000000000000000000000
|
24
|
-
);
|
25
|
-
|
26
19
|
library OperatorApproval {
|
27
|
-
|
28
|
-
|
29
|
-
* @return _fieldLayout The field layout for the table.
|
30
|
-
*/
|
31
|
-
function getFieldLayout() internal pure returns (FieldLayout) {
|
32
|
-
return _fieldLayout;
|
33
|
-
}
|
34
|
-
|
35
|
-
/**
|
36
|
-
* @notice Get the table's key schema.
|
37
|
-
* @return _keySchema The key schema for the table.
|
38
|
-
*/
|
39
|
-
function getKeySchema() internal pure returns (Schema) {
|
40
|
-
SchemaType[] memory _keySchema = new SchemaType[](2);
|
41
|
-
_keySchema[0] = SchemaType.ADDRESS;
|
42
|
-
_keySchema[1] = SchemaType.ADDRESS;
|
43
|
-
|
44
|
-
return SchemaLib.encode(_keySchema);
|
45
|
-
}
|
20
|
+
FieldLayout constant _fieldLayout =
|
21
|
+
FieldLayout.wrap(0x0001010001000000000000000000000000000000000000000000000000000000);
|
46
22
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
function getValueSchema() internal pure returns (Schema) {
|
52
|
-
SchemaType[] memory _valueSchema = new SchemaType[](1);
|
53
|
-
_valueSchema[0] = SchemaType.BOOL;
|
54
|
-
|
55
|
-
return SchemaLib.encode(_valueSchema);
|
56
|
-
}
|
23
|
+
// Hex-encoded key schema of (address, address)
|
24
|
+
Schema constant _keySchema = Schema.wrap(0x0028020061610000000000000000000000000000000000000000000000000000);
|
25
|
+
// Hex-encoded value schema of (bool)
|
26
|
+
Schema constant _valueSchema = Schema.wrap(0x0001010060000000000000000000000000000000000000000000000000000000);
|
57
27
|
|
58
28
|
/**
|
59
29
|
* @notice Get the table's key field names.
|
@@ -78,14 +48,14 @@ library OperatorApproval {
|
|
78
48
|
* @notice Register the table with its config.
|
79
49
|
*/
|
80
50
|
function register(ResourceId _tableId) internal {
|
81
|
-
StoreSwitch.registerTable(_tableId, _fieldLayout,
|
51
|
+
StoreSwitch.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
82
52
|
}
|
83
53
|
|
84
54
|
/**
|
85
55
|
* @notice Register the table with its config.
|
86
56
|
*/
|
87
57
|
function _register(ResourceId _tableId) internal {
|
88
|
-
StoreCore.registerTable(_tableId, _fieldLayout,
|
58
|
+
StoreCore.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
89
59
|
}
|
90
60
|
|
91
61
|
/**
|
@@ -216,10 +186,10 @@ library OperatorApproval {
|
|
216
186
|
* @return The lengths of the dynamic fields (packed into a single bytes32 value).
|
217
187
|
* @return The dynamic (variable length) data, encoded into a sequence of bytes.
|
218
188
|
*/
|
219
|
-
function encode(bool approved) internal pure returns (bytes memory,
|
189
|
+
function encode(bool approved) internal pure returns (bytes memory, EncodedLengths, bytes memory) {
|
220
190
|
bytes memory _staticData = encodeStatic(approved);
|
221
191
|
|
222
|
-
|
192
|
+
EncodedLengths _encodedLengths;
|
223
193
|
bytes memory _dynamicData;
|
224
194
|
|
225
195
|
return (_staticData, _encodedLengths, _dynamicData);
|
@@ -3,9 +3,6 @@ pragma solidity >=0.8.24;
|
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
6
|
-
// Import schema type
|
7
|
-
import { SchemaType } from "@latticexyz/schema-type/src/solidity/SchemaType.sol";
|
8
|
-
|
9
6
|
// Import store internals
|
10
7
|
import { IStore } from "@latticexyz/store/src/IStore.sol";
|
11
8
|
import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
|
@@ -14,45 +11,19 @@ import { Bytes } from "@latticexyz/store/src/Bytes.sol";
|
|
14
11
|
import { Memory } from "@latticexyz/store/src/Memory.sol";
|
15
12
|
import { SliceLib } from "@latticexyz/store/src/Slice.sol";
|
16
13
|
import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol";
|
17
|
-
import { FieldLayout
|
18
|
-
import { Schema
|
19
|
-
import {
|
14
|
+
import { FieldLayout } from "@latticexyz/store/src/FieldLayout.sol";
|
15
|
+
import { Schema } from "@latticexyz/store/src/Schema.sol";
|
16
|
+
import { EncodedLengths, EncodedLengthsLib } from "@latticexyz/store/src/EncodedLengths.sol";
|
20
17
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
18
|
|
22
|
-
FieldLayout constant _fieldLayout = FieldLayout.wrap(
|
23
|
-
0x0014010014000000000000000000000000000000000000000000000000000000
|
24
|
-
);
|
25
|
-
|
26
19
|
library Owners {
|
27
|
-
|
28
|
-
|
29
|
-
* @return _fieldLayout The field layout for the table.
|
30
|
-
*/
|
31
|
-
function getFieldLayout() internal pure returns (FieldLayout) {
|
32
|
-
return _fieldLayout;
|
33
|
-
}
|
34
|
-
|
35
|
-
/**
|
36
|
-
* @notice Get the table's key schema.
|
37
|
-
* @return _keySchema The key schema for the table.
|
38
|
-
*/
|
39
|
-
function getKeySchema() internal pure returns (Schema) {
|
40
|
-
SchemaType[] memory _keySchema = new SchemaType[](1);
|
41
|
-
_keySchema[0] = SchemaType.UINT256;
|
42
|
-
|
43
|
-
return SchemaLib.encode(_keySchema);
|
44
|
-
}
|
20
|
+
FieldLayout constant _fieldLayout =
|
21
|
+
FieldLayout.wrap(0x0014010014000000000000000000000000000000000000000000000000000000);
|
45
22
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
function getValueSchema() internal pure returns (Schema) {
|
51
|
-
SchemaType[] memory _valueSchema = new SchemaType[](1);
|
52
|
-
_valueSchema[0] = SchemaType.ADDRESS;
|
53
|
-
|
54
|
-
return SchemaLib.encode(_valueSchema);
|
55
|
-
}
|
23
|
+
// Hex-encoded key schema of (uint256)
|
24
|
+
Schema constant _keySchema = Schema.wrap(0x002001001f000000000000000000000000000000000000000000000000000000);
|
25
|
+
// Hex-encoded value schema of (address)
|
26
|
+
Schema constant _valueSchema = Schema.wrap(0x0014010061000000000000000000000000000000000000000000000000000000);
|
56
27
|
|
57
28
|
/**
|
58
29
|
* @notice Get the table's key field names.
|
@@ -76,14 +47,14 @@ library Owners {
|
|
76
47
|
* @notice Register the table with its config.
|
77
48
|
*/
|
78
49
|
function register(ResourceId _tableId) internal {
|
79
|
-
StoreSwitch.registerTable(_tableId, _fieldLayout,
|
50
|
+
StoreSwitch.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
80
51
|
}
|
81
52
|
|
82
53
|
/**
|
83
54
|
* @notice Register the table with its config.
|
84
55
|
*/
|
85
56
|
function _register(ResourceId _tableId) internal {
|
86
|
-
StoreCore.registerTable(_tableId, _fieldLayout,
|
57
|
+
StoreCore.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
87
58
|
}
|
88
59
|
|
89
60
|
/**
|
@@ -204,10 +175,10 @@ library Owners {
|
|
204
175
|
* @return The lengths of the dynamic fields (packed into a single bytes32 value).
|
205
176
|
* @return The dynamic (variable length) data, encoded into a sequence of bytes.
|
206
177
|
*/
|
207
|
-
function encode(address owner) internal pure returns (bytes memory,
|
178
|
+
function encode(address owner) internal pure returns (bytes memory, EncodedLengths, bytes memory) {
|
208
179
|
bytes memory _staticData = encodeStatic(owner);
|
209
180
|
|
210
|
-
|
181
|
+
EncodedLengths _encodedLengths;
|
211
182
|
bytes memory _dynamicData;
|
212
183
|
|
213
184
|
return (_staticData, _encodedLengths, _dynamicData);
|
@@ -3,9 +3,6 @@ pragma solidity >=0.8.24;
|
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
6
|
-
// Import schema type
|
7
|
-
import { SchemaType } from "@latticexyz/schema-type/src/solidity/SchemaType.sol";
|
8
|
-
|
9
6
|
// Import store internals
|
10
7
|
import { IStore } from "@latticexyz/store/src/IStore.sol";
|
11
8
|
import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
|
@@ -14,45 +11,19 @@ import { Bytes } from "@latticexyz/store/src/Bytes.sol";
|
|
14
11
|
import { Memory } from "@latticexyz/store/src/Memory.sol";
|
15
12
|
import { SliceLib } from "@latticexyz/store/src/Slice.sol";
|
16
13
|
import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol";
|
17
|
-
import { FieldLayout
|
18
|
-
import { Schema
|
19
|
-
import {
|
14
|
+
import { FieldLayout } from "@latticexyz/store/src/FieldLayout.sol";
|
15
|
+
import { Schema } from "@latticexyz/store/src/Schema.sol";
|
16
|
+
import { EncodedLengths, EncodedLengthsLib } from "@latticexyz/store/src/EncodedLengths.sol";
|
20
17
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
18
|
|
22
|
-
FieldLayout constant _fieldLayout = FieldLayout.wrap(
|
23
|
-
0x0014010014000000000000000000000000000000000000000000000000000000
|
24
|
-
);
|
25
|
-
|
26
19
|
library TokenApproval {
|
27
|
-
|
28
|
-
|
29
|
-
* @return _fieldLayout The field layout for the table.
|
30
|
-
*/
|
31
|
-
function getFieldLayout() internal pure returns (FieldLayout) {
|
32
|
-
return _fieldLayout;
|
33
|
-
}
|
34
|
-
|
35
|
-
/**
|
36
|
-
* @notice Get the table's key schema.
|
37
|
-
* @return _keySchema The key schema for the table.
|
38
|
-
*/
|
39
|
-
function getKeySchema() internal pure returns (Schema) {
|
40
|
-
SchemaType[] memory _keySchema = new SchemaType[](1);
|
41
|
-
_keySchema[0] = SchemaType.UINT256;
|
42
|
-
|
43
|
-
return SchemaLib.encode(_keySchema);
|
44
|
-
}
|
20
|
+
FieldLayout constant _fieldLayout =
|
21
|
+
FieldLayout.wrap(0x0014010014000000000000000000000000000000000000000000000000000000);
|
45
22
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
function getValueSchema() internal pure returns (Schema) {
|
51
|
-
SchemaType[] memory _valueSchema = new SchemaType[](1);
|
52
|
-
_valueSchema[0] = SchemaType.ADDRESS;
|
53
|
-
|
54
|
-
return SchemaLib.encode(_valueSchema);
|
55
|
-
}
|
23
|
+
// Hex-encoded key schema of (uint256)
|
24
|
+
Schema constant _keySchema = Schema.wrap(0x002001001f000000000000000000000000000000000000000000000000000000);
|
25
|
+
// Hex-encoded value schema of (address)
|
26
|
+
Schema constant _valueSchema = Schema.wrap(0x0014010061000000000000000000000000000000000000000000000000000000);
|
56
27
|
|
57
28
|
/**
|
58
29
|
* @notice Get the table's key field names.
|
@@ -76,14 +47,14 @@ library TokenApproval {
|
|
76
47
|
* @notice Register the table with its config.
|
77
48
|
*/
|
78
49
|
function register(ResourceId _tableId) internal {
|
79
|
-
StoreSwitch.registerTable(_tableId, _fieldLayout,
|
50
|
+
StoreSwitch.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
80
51
|
}
|
81
52
|
|
82
53
|
/**
|
83
54
|
* @notice Register the table with its config.
|
84
55
|
*/
|
85
56
|
function _register(ResourceId _tableId) internal {
|
86
|
-
StoreCore.registerTable(_tableId, _fieldLayout,
|
57
|
+
StoreCore.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
87
58
|
}
|
88
59
|
|
89
60
|
/**
|
@@ -204,10 +175,10 @@ library TokenApproval {
|
|
204
175
|
* @return The lengths of the dynamic fields (packed into a single bytes32 value).
|
205
176
|
* @return The dynamic (variable length) data, encoded into a sequence of bytes.
|
206
177
|
*/
|
207
|
-
function encode(address account) internal pure returns (bytes memory,
|
178
|
+
function encode(address account) internal pure returns (bytes memory, EncodedLengths, bytes memory) {
|
208
179
|
bytes memory _staticData = encodeStatic(account);
|
209
180
|
|
210
|
-
|
181
|
+
EncodedLengths _encodedLengths;
|
211
182
|
bytes memory _dynamicData;
|
212
183
|
|
213
184
|
return (_staticData, _encodedLengths, _dynamicData);
|
@@ -3,9 +3,6 @@ pragma solidity >=0.8.24;
|
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
6
|
-
// Import schema type
|
7
|
-
import { SchemaType } from "@latticexyz/schema-type/src/solidity/SchemaType.sol";
|
8
|
-
|
9
6
|
// Import store internals
|
10
7
|
import { IStore } from "@latticexyz/store/src/IStore.sol";
|
11
8
|
import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
|
@@ -14,45 +11,19 @@ import { Bytes } from "@latticexyz/store/src/Bytes.sol";
|
|
14
11
|
import { Memory } from "@latticexyz/store/src/Memory.sol";
|
15
12
|
import { SliceLib } from "@latticexyz/store/src/Slice.sol";
|
16
13
|
import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol";
|
17
|
-
import { FieldLayout
|
18
|
-
import { Schema
|
19
|
-
import {
|
14
|
+
import { FieldLayout } from "@latticexyz/store/src/FieldLayout.sol";
|
15
|
+
import { Schema } from "@latticexyz/store/src/Schema.sol";
|
16
|
+
import { EncodedLengths, EncodedLengthsLib } from "@latticexyz/store/src/EncodedLengths.sol";
|
20
17
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
21
18
|
|
22
|
-
FieldLayout constant _fieldLayout = FieldLayout.wrap(
|
23
|
-
0x0000000100000000000000000000000000000000000000000000000000000000
|
24
|
-
);
|
25
|
-
|
26
19
|
library TokenURI {
|
27
|
-
|
28
|
-
|
29
|
-
* @return _fieldLayout The field layout for the table.
|
30
|
-
*/
|
31
|
-
function getFieldLayout() internal pure returns (FieldLayout) {
|
32
|
-
return _fieldLayout;
|
33
|
-
}
|
34
|
-
|
35
|
-
/**
|
36
|
-
* @notice Get the table's key schema.
|
37
|
-
* @return _keySchema The key schema for the table.
|
38
|
-
*/
|
39
|
-
function getKeySchema() internal pure returns (Schema) {
|
40
|
-
SchemaType[] memory _keySchema = new SchemaType[](1);
|
41
|
-
_keySchema[0] = SchemaType.UINT256;
|
42
|
-
|
43
|
-
return SchemaLib.encode(_keySchema);
|
44
|
-
}
|
20
|
+
FieldLayout constant _fieldLayout =
|
21
|
+
FieldLayout.wrap(0x0000000100000000000000000000000000000000000000000000000000000000);
|
45
22
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
function getValueSchema() internal pure returns (Schema) {
|
51
|
-
SchemaType[] memory _valueSchema = new SchemaType[](1);
|
52
|
-
_valueSchema[0] = SchemaType.STRING;
|
53
|
-
|
54
|
-
return SchemaLib.encode(_valueSchema);
|
55
|
-
}
|
23
|
+
// Hex-encoded key schema of (uint256)
|
24
|
+
Schema constant _keySchema = Schema.wrap(0x002001001f000000000000000000000000000000000000000000000000000000);
|
25
|
+
// Hex-encoded value schema of (string)
|
26
|
+
Schema constant _valueSchema = Schema.wrap(0x00000001c5000000000000000000000000000000000000000000000000000000);
|
56
27
|
|
57
28
|
/**
|
58
29
|
* @notice Get the table's key field names.
|
@@ -76,14 +47,14 @@ library TokenURI {
|
|
76
47
|
* @notice Register the table with its config.
|
77
48
|
*/
|
78
49
|
function register(ResourceId _tableId) internal {
|
79
|
-
StoreSwitch.registerTable(_tableId, _fieldLayout,
|
50
|
+
StoreSwitch.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
80
51
|
}
|
81
52
|
|
82
53
|
/**
|
83
54
|
* @notice Register the table with its config.
|
84
55
|
*/
|
85
56
|
function _register(ResourceId _tableId) internal {
|
86
|
-
StoreCore.registerTable(_tableId, _fieldLayout,
|
57
|
+
StoreCore.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
87
58
|
}
|
88
59
|
|
89
60
|
/**
|
@@ -438,10 +409,10 @@ library TokenURI {
|
|
438
409
|
* @notice Tightly pack dynamic data lengths using this table's schema.
|
439
410
|
* @return _encodedLengths The lengths of the dynamic fields (packed into a single bytes32 value).
|
440
411
|
*/
|
441
|
-
function encodeLengths(string memory tokenURI) internal pure returns (
|
412
|
+
function encodeLengths(string memory tokenURI) internal pure returns (EncodedLengths _encodedLengths) {
|
442
413
|
// Lengths are effectively checked during copy by 2**40 bytes exceeding gas limits
|
443
414
|
unchecked {
|
444
|
-
_encodedLengths =
|
415
|
+
_encodedLengths = EncodedLengthsLib.pack(bytes(tokenURI).length);
|
445
416
|
}
|
446
417
|
}
|
447
418
|
|
@@ -459,9 +430,9 @@ library TokenURI {
|
|
459
430
|
* @return The lengths of the dynamic fields (packed into a single bytes32 value).
|
460
431
|
* @return The dynamic (variable length) data, encoded into a sequence of bytes.
|
461
432
|
*/
|
462
|
-
function encode(string memory tokenURI) internal pure returns (bytes memory,
|
433
|
+
function encode(string memory tokenURI) internal pure returns (bytes memory, EncodedLengths, bytes memory) {
|
463
434
|
bytes memory _staticData;
|
464
|
-
|
435
|
+
EncodedLengths _encodedLengths = encodeLengths(tokenURI);
|
465
436
|
bytes memory _dynamicData = encodeDynamic(tokenURI);
|
466
437
|
|
467
438
|
return (_staticData, _encodedLengths, _dynamicData);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
2
2
|
pragma solidity >=0.8.24;
|
3
3
|
|
4
|
-
import {
|
4
|
+
import { EncodedLengths } from "@latticexyz/store/src/EncodedLengths.sol";
|
5
5
|
import { FieldLayout } from "@latticexyz/store/src/FieldLayout.sol";
|
6
6
|
import { StoreHook } from "@latticexyz/store/src/StoreHook.sol";
|
7
7
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
@@ -46,7 +46,7 @@ contract KeysInTableHook is StoreHook {
|
|
46
46
|
ResourceId tableId,
|
47
47
|
bytes32[] memory keyTuple,
|
48
48
|
bytes memory,
|
49
|
-
|
49
|
+
EncodedLengths,
|
50
50
|
bytes memory,
|
51
51
|
FieldLayout
|
52
52
|
) public override {
|
@@ -68,7 +68,7 @@ contract KeysInTableHook is StoreHook {
|
|
68
68
|
uint8,
|
69
69
|
uint40,
|
70
70
|
uint40,
|
71
|
-
|
71
|
+
EncodedLengths,
|
72
72
|
bytes memory
|
73
73
|
) public override {
|
74
74
|
handleSet(tableId, keyTuple);
|
@@ -13,8 +13,8 @@ import { ResourceId, WorldResourceIdInstance } from "@latticexyz/world/src/World
|
|
13
13
|
import { revertWithBytes } from "@latticexyz/world/src/revertWithBytes.sol";
|
14
14
|
|
15
15
|
import { KeysInTableHook } from "./KeysInTableHook.sol";
|
16
|
-
import { KeysInTable
|
17
|
-
import { UsedKeysIndex
|
16
|
+
import { KeysInTable } from "./tables/KeysInTable.sol";
|
17
|
+
import { UsedKeysIndex } from "./tables/UsedKeysIndex.sol";
|
18
18
|
|
19
19
|
/**
|
20
20
|
* This module deploys a hook that is called when a value is set in the `sourceTableId`
|
@@ -47,16 +47,16 @@ contract KeysInTableModule is Module {
|
|
47
47
|
bool success;
|
48
48
|
bytes memory returnData;
|
49
49
|
|
50
|
-
if (!ResourceIds._getExists(
|
50
|
+
if (!ResourceIds._getExists(KeysInTable._tableId)) {
|
51
51
|
// Register the tables
|
52
52
|
(success, returnData) = address(world).delegatecall(
|
53
53
|
abi.encodeCall(
|
54
54
|
world.registerTable,
|
55
55
|
(
|
56
|
-
|
57
|
-
KeysInTable.
|
58
|
-
KeysInTable.
|
59
|
-
KeysInTable.
|
56
|
+
KeysInTable._tableId,
|
57
|
+
KeysInTable._fieldLayout,
|
58
|
+
KeysInTable._keySchema,
|
59
|
+
KeysInTable._valueSchema,
|
60
60
|
KeysInTable.getKeyNames(),
|
61
61
|
KeysInTable.getFieldNames()
|
62
62
|
)
|
@@ -68,10 +68,10 @@ contract KeysInTableModule is Module {
|
|
68
68
|
abi.encodeCall(
|
69
69
|
world.registerTable,
|
70
70
|
(
|
71
|
-
|
72
|
-
UsedKeysIndex.
|
73
|
-
UsedKeysIndex.
|
74
|
-
UsedKeysIndex.
|
71
|
+
UsedKeysIndex._tableId,
|
72
|
+
UsedKeysIndex._fieldLayout,
|
73
|
+
UsedKeysIndex._keySchema,
|
74
|
+
UsedKeysIndex._valueSchema,
|
75
75
|
UsedKeysIndex.getKeyNames(),
|
76
76
|
UsedKeysIndex.getFieldNames()
|
77
77
|
)
|
@@ -81,12 +81,12 @@ contract KeysInTableModule is Module {
|
|
81
81
|
|
82
82
|
// Grant the hook access to the tables
|
83
83
|
(success, returnData) = address(world).delegatecall(
|
84
|
-
abi.encodeCall(world.grantAccess, (
|
84
|
+
abi.encodeCall(world.grantAccess, (KeysInTable._tableId, address(hook)))
|
85
85
|
);
|
86
86
|
if (!success) revertWithBytes(returnData);
|
87
87
|
|
88
88
|
(success, returnData) = address(world).delegatecall(
|
89
|
-
abi.encodeCall(world.grantAccess, (
|
89
|
+
abi.encodeCall(world.grantAccess, (UsedKeysIndex._tableId, address(hook)))
|
90
90
|
);
|
91
91
|
if (!success) revertWithBytes(returnData);
|
92
92
|
}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
pragma solidity >=0.8.24;
|
3
3
|
|
4
4
|
import { IStore } from "@latticexyz/store/src/IStore.sol";
|
5
|
-
import {
|
5
|
+
import { EncodedLengths } from "@latticexyz/store/src/EncodedLengths.sol";
|
6
6
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
7
7
|
|
8
8
|
import { getKeysInTable } from "./getKeysInTable.sol";
|
@@ -50,7 +50,7 @@ function passesQueryFragment(bytes32[] memory keyTuple, QueryFragment memory fra
|
|
50
50
|
return
|
51
51
|
ArrayLib.includes(
|
52
52
|
valuesToTuples(
|
53
|
-
getKeysWithValue(fragment.tableId, fragment.value,
|
53
|
+
getKeysWithValue(fragment.tableId, fragment.value, EncodedLengths.wrap(bytes32(0)), new bytes(0))
|
54
54
|
),
|
55
55
|
keyTuple
|
56
56
|
);
|
@@ -66,7 +66,7 @@ function passesQueryFragment(bytes32[] memory keyTuple, QueryFragment memory fra
|
|
66
66
|
return
|
67
67
|
!ArrayLib.includes(
|
68
68
|
valuesToTuples(
|
69
|
-
getKeysWithValue(fragment.tableId, fragment.value,
|
69
|
+
getKeysWithValue(fragment.tableId, fragment.value, EncodedLengths.wrap(bytes32(0)), new bytes(0))
|
70
70
|
),
|
71
71
|
keyTuple
|
72
72
|
);
|
@@ -95,7 +95,7 @@ function passesQueryFragment(
|
|
95
95
|
return
|
96
96
|
ArrayLib.includes(
|
97
97
|
valuesToTuples(
|
98
|
-
getKeysWithValue(store, fragment.tableId, fragment.value,
|
98
|
+
getKeysWithValue(store, fragment.tableId, fragment.value, EncodedLengths.wrap(bytes32(0)), new bytes(0))
|
99
99
|
),
|
100
100
|
keyTuple
|
101
101
|
);
|
@@ -111,7 +111,7 @@ function passesQueryFragment(
|
|
111
111
|
return
|
112
112
|
!ArrayLib.includes(
|
113
113
|
valuesToTuples(
|
114
|
-
getKeysWithValue(store, fragment.tableId, fragment.value,
|
114
|
+
getKeysWithValue(store, fragment.tableId, fragment.value, EncodedLengths.wrap(bytes32(0)), new bytes(0))
|
115
115
|
),
|
116
116
|
keyTuple
|
117
117
|
);
|
@@ -135,7 +135,7 @@ function query(QueryFragment[] memory fragments) view returns (bytes32[][] memor
|
|
135
135
|
keyTuples = fragments[0].queryType == QueryType.Has
|
136
136
|
? getKeysInTable(fragments[0].tableId)
|
137
137
|
: valuesToTuples(
|
138
|
-
getKeysWithValue(fragments[0].tableId, fragments[0].value,
|
138
|
+
getKeysWithValue(fragments[0].tableId, fragments[0].value, EncodedLengths.wrap(bytes32(0)), new bytes(0))
|
139
139
|
);
|
140
140
|
|
141
141
|
for (uint256 i = 1; i < fragments.length; i++) {
|
@@ -172,7 +172,7 @@ function query(IStore store, QueryFragment[] memory fragments) view returns (byt
|
|
172
172
|
keyTuples = fragments[0].queryType == QueryType.Has
|
173
173
|
? getKeysInTable(store, fragments[0].tableId)
|
174
174
|
: valuesToTuples(
|
175
|
-
getKeysWithValue(store, fragments[0].tableId, fragments[0].value,
|
175
|
+
getKeysWithValue(store, fragments[0].tableId, fragments[0].value, EncodedLengths.wrap(bytes32(0)), new bytes(0))
|
176
176
|
);
|
177
177
|
|
178
178
|
for (uint256 i = 1; i < fragments.length; i++) {
|