@latticexyz/world-modules 2.0.0-transaction-context-324984c5 → 2.0.1-main-4a6b4598
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 +700 -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,22 +11,14 @@ 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
|
-
// Hex below is the result of `WorldResourceIdLib.encode({ namespace: "", name: "KeysInTable", typeId: RESOURCE_TABLE });`
|
26
|
-
ResourceId constant _tableId = ResourceId.wrap(0x746200000000000000000000000000004b657973496e5461626c650000000000);
|
27
|
-
ResourceId constant KeysInTableTableId = _tableId;
|
28
|
-
|
29
|
-
FieldLayout constant _fieldLayout = FieldLayout.wrap(
|
30
|
-
0x0000000500000000000000000000000000000000000000000000000000000000
|
31
|
-
);
|
32
|
-
|
33
22
|
struct KeysInTableData {
|
34
23
|
bytes32[] keys0;
|
35
24
|
bytes32[] keys1;
|
@@ -39,39 +28,16 @@ struct KeysInTableData {
|
|
39
28
|
}
|
40
29
|
|
41
30
|
library KeysInTable {
|
42
|
-
|
43
|
-
|
44
|
-
* @return _fieldLayout The field layout for the table.
|
45
|
-
*/
|
46
|
-
function getFieldLayout() internal pure returns (FieldLayout) {
|
47
|
-
return _fieldLayout;
|
48
|
-
}
|
31
|
+
// Hex below is the result of `WorldResourceIdLib.encode({ namespace: "", name: "KeysInTable", typeId: RESOURCE_TABLE });`
|
32
|
+
ResourceId constant _tableId = ResourceId.wrap(0x746200000000000000000000000000004b657973496e5461626c650000000000);
|
49
33
|
|
50
|
-
|
51
|
-
|
52
|
-
* @return _keySchema The key schema for the table.
|
53
|
-
*/
|
54
|
-
function getKeySchema() internal pure returns (Schema) {
|
55
|
-
SchemaType[] memory _keySchema = new SchemaType[](1);
|
56
|
-
_keySchema[0] = SchemaType.BYTES32;
|
34
|
+
FieldLayout constant _fieldLayout =
|
35
|
+
FieldLayout.wrap(0x0000000500000000000000000000000000000000000000000000000000000000);
|
57
36
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
* @notice Get the table's value schema.
|
63
|
-
* @return _valueSchema The value schema for the table.
|
64
|
-
*/
|
65
|
-
function getValueSchema() internal pure returns (Schema) {
|
66
|
-
SchemaType[] memory _valueSchema = new SchemaType[](5);
|
67
|
-
_valueSchema[0] = SchemaType.BYTES32_ARRAY;
|
68
|
-
_valueSchema[1] = SchemaType.BYTES32_ARRAY;
|
69
|
-
_valueSchema[2] = SchemaType.BYTES32_ARRAY;
|
70
|
-
_valueSchema[3] = SchemaType.BYTES32_ARRAY;
|
71
|
-
_valueSchema[4] = SchemaType.BYTES32_ARRAY;
|
72
|
-
|
73
|
-
return SchemaLib.encode(_valueSchema);
|
74
|
-
}
|
37
|
+
// Hex-encoded key schema of (bytes32)
|
38
|
+
Schema constant _keySchema = Schema.wrap(0x002001005f000000000000000000000000000000000000000000000000000000);
|
39
|
+
// Hex-encoded value schema of (bytes32[], bytes32[], bytes32[], bytes32[], bytes32[])
|
40
|
+
Schema constant _valueSchema = Schema.wrap(0x00000005c1c1c1c1c10000000000000000000000000000000000000000000000);
|
75
41
|
|
76
42
|
/**
|
77
43
|
* @notice Get the table's key field names.
|
@@ -99,21 +65,21 @@ library KeysInTable {
|
|
99
65
|
* @notice Register the table with its config.
|
100
66
|
*/
|
101
67
|
function register() internal {
|
102
|
-
StoreSwitch.registerTable(_tableId, _fieldLayout,
|
68
|
+
StoreSwitch.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
103
69
|
}
|
104
70
|
|
105
71
|
/**
|
106
72
|
* @notice Register the table with its config.
|
107
73
|
*/
|
108
74
|
function _register() internal {
|
109
|
-
StoreCore.registerTable(_tableId, _fieldLayout,
|
75
|
+
StoreCore.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
110
76
|
}
|
111
77
|
|
112
78
|
/**
|
113
79
|
* @notice Register the table with its config (using the specified store).
|
114
80
|
*/
|
115
81
|
function register(IStore _store) internal {
|
116
|
-
_store.registerTable(_tableId, _fieldLayout,
|
82
|
+
_store.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
117
83
|
}
|
118
84
|
|
119
85
|
/**
|
@@ -1338,7 +1304,7 @@ library KeysInTable {
|
|
1338
1304
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
1339
1305
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
1340
1306
|
|
1341
|
-
(bytes memory _staticData,
|
1307
|
+
(bytes memory _staticData, EncodedLengths _encodedLengths, bytes memory _dynamicData) = StoreSwitch.getRecord(
|
1342
1308
|
_tableId,
|
1343
1309
|
_keyTuple,
|
1344
1310
|
_fieldLayout
|
@@ -1353,7 +1319,7 @@ library KeysInTable {
|
|
1353
1319
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
1354
1320
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
1355
1321
|
|
1356
|
-
(bytes memory _staticData,
|
1322
|
+
(bytes memory _staticData, EncodedLengths _encodedLengths, bytes memory _dynamicData) = StoreCore.getRecord(
|
1357
1323
|
_tableId,
|
1358
1324
|
_keyTuple,
|
1359
1325
|
_fieldLayout
|
@@ -1368,7 +1334,7 @@ library KeysInTable {
|
|
1368
1334
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
1369
1335
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
1370
1336
|
|
1371
|
-
(bytes memory _staticData,
|
1337
|
+
(bytes memory _staticData, EncodedLengths _encodedLengths, bytes memory _dynamicData) = _store.getRecord(
|
1372
1338
|
_tableId,
|
1373
1339
|
_keyTuple,
|
1374
1340
|
_fieldLayout
|
@@ -1388,7 +1354,7 @@ library KeysInTable {
|
|
1388
1354
|
bytes32[] memory keys4
|
1389
1355
|
) internal {
|
1390
1356
|
bytes memory _staticData;
|
1391
|
-
|
1357
|
+
EncodedLengths _encodedLengths = encodeLengths(keys0, keys1, keys2, keys3, keys4);
|
1392
1358
|
bytes memory _dynamicData = encodeDynamic(keys0, keys1, keys2, keys3, keys4);
|
1393
1359
|
|
1394
1360
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -1409,7 +1375,7 @@ library KeysInTable {
|
|
1409
1375
|
bytes32[] memory keys4
|
1410
1376
|
) internal {
|
1411
1377
|
bytes memory _staticData;
|
1412
|
-
|
1378
|
+
EncodedLengths _encodedLengths = encodeLengths(keys0, keys1, keys2, keys3, keys4);
|
1413
1379
|
bytes memory _dynamicData = encodeDynamic(keys0, keys1, keys2, keys3, keys4);
|
1414
1380
|
|
1415
1381
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -1431,7 +1397,7 @@ library KeysInTable {
|
|
1431
1397
|
bytes32[] memory keys4
|
1432
1398
|
) internal {
|
1433
1399
|
bytes memory _staticData;
|
1434
|
-
|
1400
|
+
EncodedLengths _encodedLengths = encodeLengths(keys0, keys1, keys2, keys3, keys4);
|
1435
1401
|
bytes memory _dynamicData = encodeDynamic(keys0, keys1, keys2, keys3, keys4);
|
1436
1402
|
|
1437
1403
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -1445,7 +1411,13 @@ library KeysInTable {
|
|
1445
1411
|
*/
|
1446
1412
|
function set(ResourceId sourceTableId, KeysInTableData memory _table) internal {
|
1447
1413
|
bytes memory _staticData;
|
1448
|
-
|
1414
|
+
EncodedLengths _encodedLengths = encodeLengths(
|
1415
|
+
_table.keys0,
|
1416
|
+
_table.keys1,
|
1417
|
+
_table.keys2,
|
1418
|
+
_table.keys3,
|
1419
|
+
_table.keys4
|
1420
|
+
);
|
1449
1421
|
bytes memory _dynamicData = encodeDynamic(_table.keys0, _table.keys1, _table.keys2, _table.keys3, _table.keys4);
|
1450
1422
|
|
1451
1423
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -1459,7 +1431,13 @@ library KeysInTable {
|
|
1459
1431
|
*/
|
1460
1432
|
function _set(ResourceId sourceTableId, KeysInTableData memory _table) internal {
|
1461
1433
|
bytes memory _staticData;
|
1462
|
-
|
1434
|
+
EncodedLengths _encodedLengths = encodeLengths(
|
1435
|
+
_table.keys0,
|
1436
|
+
_table.keys1,
|
1437
|
+
_table.keys2,
|
1438
|
+
_table.keys3,
|
1439
|
+
_table.keys4
|
1440
|
+
);
|
1463
1441
|
bytes memory _dynamicData = encodeDynamic(_table.keys0, _table.keys1, _table.keys2, _table.keys3, _table.keys4);
|
1464
1442
|
|
1465
1443
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -1473,7 +1451,13 @@ library KeysInTable {
|
|
1473
1451
|
*/
|
1474
1452
|
function set(IStore _store, ResourceId sourceTableId, KeysInTableData memory _table) internal {
|
1475
1453
|
bytes memory _staticData;
|
1476
|
-
|
1454
|
+
EncodedLengths _encodedLengths = encodeLengths(
|
1455
|
+
_table.keys0,
|
1456
|
+
_table.keys1,
|
1457
|
+
_table.keys2,
|
1458
|
+
_table.keys3,
|
1459
|
+
_table.keys4
|
1460
|
+
);
|
1477
1461
|
bytes memory _dynamicData = encodeDynamic(_table.keys0, _table.keys1, _table.keys2, _table.keys3, _table.keys4);
|
1478
1462
|
|
1479
1463
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -1486,7 +1470,7 @@ library KeysInTable {
|
|
1486
1470
|
* @notice Decode the tightly packed blob of dynamic data using the encoded lengths.
|
1487
1471
|
*/
|
1488
1472
|
function decodeDynamic(
|
1489
|
-
|
1473
|
+
EncodedLengths _encodedLengths,
|
1490
1474
|
bytes memory _blob
|
1491
1475
|
)
|
1492
1476
|
internal
|
@@ -1539,7 +1523,7 @@ library KeysInTable {
|
|
1539
1523
|
*/
|
1540
1524
|
function decode(
|
1541
1525
|
bytes memory,
|
1542
|
-
|
1526
|
+
EncodedLengths _encodedLengths,
|
1543
1527
|
bytes memory _dynamicData
|
1544
1528
|
) internal pure returns (KeysInTableData memory _table) {
|
1545
1529
|
(_table.keys0, _table.keys1, _table.keys2, _table.keys3, _table.keys4) = decodeDynamic(
|
@@ -1588,10 +1572,10 @@ library KeysInTable {
|
|
1588
1572
|
bytes32[] memory keys2,
|
1589
1573
|
bytes32[] memory keys3,
|
1590
1574
|
bytes32[] memory keys4
|
1591
|
-
) internal pure returns (
|
1575
|
+
) internal pure returns (EncodedLengths _encodedLengths) {
|
1592
1576
|
// Lengths are effectively checked during copy by 2**40 bytes exceeding gas limits
|
1593
1577
|
unchecked {
|
1594
|
-
_encodedLengths =
|
1578
|
+
_encodedLengths = EncodedLengthsLib.pack(
|
1595
1579
|
keys0.length * 32,
|
1596
1580
|
keys1.length * 32,
|
1597
1581
|
keys2.length * 32,
|
@@ -1634,9 +1618,9 @@ library KeysInTable {
|
|
1634
1618
|
bytes32[] memory keys2,
|
1635
1619
|
bytes32[] memory keys3,
|
1636
1620
|
bytes32[] memory keys4
|
1637
|
-
) internal pure returns (bytes memory,
|
1621
|
+
) internal pure returns (bytes memory, EncodedLengths, bytes memory) {
|
1638
1622
|
bytes memory _staticData;
|
1639
|
-
|
1623
|
+
EncodedLengths _encodedLengths = encodeLengths(keys0, keys1, keys2, keys3, keys4);
|
1640
1624
|
bytes memory _dynamicData = encodeDynamic(keys0, keys1, keys2, keys3, keys4);
|
1641
1625
|
|
1642
1626
|
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,54 +11,25 @@ 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
|
-
// Hex below is the result of `WorldResourceIdLib.encode({ namespace: "", name: "UsedKeysIndex", typeId: RESOURCE_TABLE });`
|
26
|
-
ResourceId constant _tableId = ResourceId.wrap(0x74620000000000000000000000000000557365644b657973496e646578000000);
|
27
|
-
ResourceId constant UsedKeysIndexTableId = _tableId;
|
28
|
-
|
29
|
-
FieldLayout constant _fieldLayout = FieldLayout.wrap(
|
30
|
-
0x0006020001050000000000000000000000000000000000000000000000000000
|
31
|
-
);
|
32
|
-
|
33
22
|
library UsedKeysIndex {
|
34
|
-
|
35
|
-
|
36
|
-
* @return _fieldLayout The field layout for the table.
|
37
|
-
*/
|
38
|
-
function getFieldLayout() internal pure returns (FieldLayout) {
|
39
|
-
return _fieldLayout;
|
40
|
-
}
|
41
|
-
|
42
|
-
/**
|
43
|
-
* @notice Get the table's key schema.
|
44
|
-
* @return _keySchema The key schema for the table.
|
45
|
-
*/
|
46
|
-
function getKeySchema() internal pure returns (Schema) {
|
47
|
-
SchemaType[] memory _keySchema = new SchemaType[](2);
|
48
|
-
_keySchema[0] = SchemaType.BYTES32;
|
49
|
-
_keySchema[1] = SchemaType.BYTES32;
|
23
|
+
// Hex below is the result of `WorldResourceIdLib.encode({ namespace: "", name: "UsedKeysIndex", typeId: RESOURCE_TABLE });`
|
24
|
+
ResourceId constant _tableId = ResourceId.wrap(0x74620000000000000000000000000000557365644b657973496e646578000000);
|
50
25
|
|
51
|
-
|
52
|
-
|
26
|
+
FieldLayout constant _fieldLayout =
|
27
|
+
FieldLayout.wrap(0x0006020001050000000000000000000000000000000000000000000000000000);
|
53
28
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
function getValueSchema() internal pure returns (Schema) {
|
59
|
-
SchemaType[] memory _valueSchema = new SchemaType[](2);
|
60
|
-
_valueSchema[0] = SchemaType.BOOL;
|
61
|
-
_valueSchema[1] = SchemaType.UINT40;
|
62
|
-
|
63
|
-
return SchemaLib.encode(_valueSchema);
|
64
|
-
}
|
29
|
+
// Hex-encoded key schema of (bytes32, bytes32)
|
30
|
+
Schema constant _keySchema = Schema.wrap(0x004002005f5f0000000000000000000000000000000000000000000000000000);
|
31
|
+
// Hex-encoded value schema of (bool, uint40)
|
32
|
+
Schema constant _valueSchema = Schema.wrap(0x0006020060040000000000000000000000000000000000000000000000000000);
|
65
33
|
|
66
34
|
/**
|
67
35
|
* @notice Get the table's key field names.
|
@@ -87,21 +55,21 @@ library UsedKeysIndex {
|
|
87
55
|
* @notice Register the table with its config.
|
88
56
|
*/
|
89
57
|
function register() internal {
|
90
|
-
StoreSwitch.registerTable(_tableId, _fieldLayout,
|
58
|
+
StoreSwitch.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
91
59
|
}
|
92
60
|
|
93
61
|
/**
|
94
62
|
* @notice Register the table with its config.
|
95
63
|
*/
|
96
64
|
function _register() internal {
|
97
|
-
StoreCore.registerTable(_tableId, _fieldLayout,
|
65
|
+
StoreCore.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
98
66
|
}
|
99
67
|
|
100
68
|
/**
|
101
69
|
* @notice Register the table with its config (using the specified store).
|
102
70
|
*/
|
103
71
|
function register(IStore _store) internal {
|
104
|
-
_store.registerTable(_tableId, _fieldLayout,
|
72
|
+
_store.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
105
73
|
}
|
106
74
|
|
107
75
|
/**
|
@@ -250,7 +218,7 @@ library UsedKeysIndex {
|
|
250
218
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
251
219
|
_keyTuple[1] = keysHash;
|
252
220
|
|
253
|
-
(bytes memory _staticData,
|
221
|
+
(bytes memory _staticData, EncodedLengths _encodedLengths, bytes memory _dynamicData) = StoreSwitch.getRecord(
|
254
222
|
_tableId,
|
255
223
|
_keyTuple,
|
256
224
|
_fieldLayout
|
@@ -266,7 +234,7 @@ library UsedKeysIndex {
|
|
266
234
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
267
235
|
_keyTuple[1] = keysHash;
|
268
236
|
|
269
|
-
(bytes memory _staticData,
|
237
|
+
(bytes memory _staticData, EncodedLengths _encodedLengths, bytes memory _dynamicData) = StoreCore.getRecord(
|
270
238
|
_tableId,
|
271
239
|
_keyTuple,
|
272
240
|
_fieldLayout
|
@@ -286,7 +254,7 @@ library UsedKeysIndex {
|
|
286
254
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
287
255
|
_keyTuple[1] = keysHash;
|
288
256
|
|
289
|
-
(bytes memory _staticData,
|
257
|
+
(bytes memory _staticData, EncodedLengths _encodedLengths, bytes memory _dynamicData) = _store.getRecord(
|
290
258
|
_tableId,
|
291
259
|
_keyTuple,
|
292
260
|
_fieldLayout
|
@@ -300,7 +268,7 @@ library UsedKeysIndex {
|
|
300
268
|
function set(ResourceId sourceTableId, bytes32 keysHash, bool has, uint40 index) internal {
|
301
269
|
bytes memory _staticData = encodeStatic(has, index);
|
302
270
|
|
303
|
-
|
271
|
+
EncodedLengths _encodedLengths;
|
304
272
|
bytes memory _dynamicData;
|
305
273
|
|
306
274
|
bytes32[] memory _keyTuple = new bytes32[](2);
|
@@ -316,7 +284,7 @@ library UsedKeysIndex {
|
|
316
284
|
function _set(ResourceId sourceTableId, bytes32 keysHash, bool has, uint40 index) internal {
|
317
285
|
bytes memory _staticData = encodeStatic(has, index);
|
318
286
|
|
319
|
-
|
287
|
+
EncodedLengths _encodedLengths;
|
320
288
|
bytes memory _dynamicData;
|
321
289
|
|
322
290
|
bytes32[] memory _keyTuple = new bytes32[](2);
|
@@ -332,7 +300,7 @@ library UsedKeysIndex {
|
|
332
300
|
function set(IStore _store, ResourceId sourceTableId, bytes32 keysHash, bool has, uint40 index) internal {
|
333
301
|
bytes memory _staticData = encodeStatic(has, index);
|
334
302
|
|
335
|
-
|
303
|
+
EncodedLengths _encodedLengths;
|
336
304
|
bytes memory _dynamicData;
|
337
305
|
|
338
306
|
bytes32[] memory _keyTuple = new bytes32[](2);
|
@@ -346,9 +314,9 @@ library UsedKeysIndex {
|
|
346
314
|
* @notice Decode the tightly packed blob of static data using this table's field layout.
|
347
315
|
*/
|
348
316
|
function decodeStatic(bytes memory _blob) internal pure returns (bool has, uint40 index) {
|
349
|
-
has = (_toBool(uint8(Bytes.
|
317
|
+
has = (_toBool(uint8(Bytes.getBytes1(_blob, 0))));
|
350
318
|
|
351
|
-
index = (uint40(Bytes.
|
319
|
+
index = (uint40(Bytes.getBytes5(_blob, 1)));
|
352
320
|
}
|
353
321
|
|
354
322
|
/**
|
@@ -359,7 +327,7 @@ library UsedKeysIndex {
|
|
359
327
|
*/
|
360
328
|
function decode(
|
361
329
|
bytes memory _staticData,
|
362
|
-
|
330
|
+
EncodedLengths,
|
363
331
|
bytes memory
|
364
332
|
) internal pure returns (bool has, uint40 index) {
|
365
333
|
(has, index) = decodeStatic(_staticData);
|
@@ -412,10 +380,10 @@ library UsedKeysIndex {
|
|
412
380
|
* @return The lengths of the dynamic fields (packed into a single bytes32 value).
|
413
381
|
* @return The dynamic (variable length) data, encoded into a sequence of bytes.
|
414
382
|
*/
|
415
|
-
function encode(bool has, uint40 index) internal pure returns (bytes memory,
|
383
|
+
function encode(bool has, uint40 index) internal pure returns (bytes memory, EncodedLengths, bytes memory) {
|
416
384
|
bytes memory _staticData = encodeStatic(has, index);
|
417
385
|
|
418
|
-
|
386
|
+
EncodedLengths _encodedLengths;
|
419
387
|
bytes memory _dynamicData;
|
420
388
|
|
421
389
|
return (_staticData, _encodedLengths, _dynamicData);
|
@@ -5,7 +5,7 @@ import { StoreHook } from "@latticexyz/store/src/StoreHook.sol";
|
|
5
5
|
import { Bytes } from "@latticexyz/store/src/Bytes.sol";
|
6
6
|
import { FieldLayout } from "@latticexyz/store/src/FieldLayout.sol";
|
7
7
|
import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
|
8
|
-
import {
|
8
|
+
import { EncodedLengths } from "@latticexyz/store/src/EncodedLengths.sol";
|
9
9
|
import { Tables } from "@latticexyz/store/src/codegen/tables/Tables.sol";
|
10
10
|
import { IBaseWorld } from "@latticexyz/world/src/codegen/interfaces/IBaseWorld.sol";
|
11
11
|
|
@@ -35,7 +35,7 @@ contract KeysWithValueHook is StoreHook {
|
|
35
35
|
ResourceId sourceTableId,
|
36
36
|
bytes32[] memory keyTuple,
|
37
37
|
bytes memory staticData,
|
38
|
-
|
38
|
+
EncodedLengths encodedLengths,
|
39
39
|
bytes memory dynamicData,
|
40
40
|
FieldLayout fieldLayout
|
41
41
|
) public override {
|
@@ -89,7 +89,7 @@ contract KeysWithValueHook is StoreHook {
|
|
89
89
|
uint8,
|
90
90
|
uint40,
|
91
91
|
uint40,
|
92
|
-
|
92
|
+
EncodedLengths,
|
93
93
|
bytes memory
|
94
94
|
) public override {
|
95
95
|
// Remove the key from the list of keys with the previous value
|
@@ -105,7 +105,7 @@ contract KeysWithValueHook is StoreHook {
|
|
105
105
|
uint8,
|
106
106
|
uint40,
|
107
107
|
uint40,
|
108
|
-
|
108
|
+
EncodedLengths,
|
109
109
|
bytes memory
|
110
110
|
) public override {
|
111
111
|
// Add the key to the list of keys with the new value
|
@@ -131,7 +131,7 @@ contract KeysWithValueHook is StoreHook {
|
|
131
131
|
bytes32[] memory keyTuple,
|
132
132
|
FieldLayout fieldLayout
|
133
133
|
) internal view returns (bytes32 valueHash) {
|
134
|
-
(bytes memory staticData,
|
134
|
+
(bytes memory staticData, EncodedLengths encodedLengths, bytes memory dynamicData) = _world().getRecord(
|
135
135
|
sourceTableId,
|
136
136
|
keyTuple,
|
137
137
|
fieldLayout
|
@@ -60,9 +60,9 @@ contract KeysWithValueModule is Module {
|
|
60
60
|
world.registerTable,
|
61
61
|
(
|
62
62
|
targetTableId,
|
63
|
-
KeysWithValue.
|
64
|
-
KeysWithValue.
|
65
|
-
KeysWithValue.
|
63
|
+
KeysWithValue._fieldLayout,
|
64
|
+
KeysWithValue._keySchema,
|
65
|
+
KeysWithValue._valueSchema,
|
66
66
|
KeysWithValue.getKeyNames(),
|
67
67
|
KeysWithValue.getFieldNames()
|
68
68
|
)
|
@@ -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 { MODULE_NAMESPACE } from "./constants.sol";
|
@@ -18,7 +18,7 @@ import { getTargetTableId } from "./getTargetTableId.sol";
|
|
18
18
|
function getKeysWithValue(
|
19
19
|
ResourceId tableId,
|
20
20
|
bytes memory staticData,
|
21
|
-
|
21
|
+
EncodedLengths encodedLengths,
|
22
22
|
bytes memory dynamicData
|
23
23
|
) view returns (bytes32[] memory keysWithValue) {
|
24
24
|
// Get the corresponding reverse mapping table
|
@@ -41,7 +41,7 @@ function getKeysWithValue(
|
|
41
41
|
IStore store,
|
42
42
|
ResourceId tableId,
|
43
43
|
bytes memory staticData,
|
44
|
-
|
44
|
+
EncodedLengths encodedLengths,
|
45
45
|
bytes memory dynamicData
|
46
46
|
) view returns (bytes32[] memory keysWithValue) {
|
47
47
|
// Get the corresponding reverse mapping table
|
@@ -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 KeysWithValue {
|
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.BYTES32;
|
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.BYTES32_ARRAY;
|
53
|
-
|
54
|
-
return SchemaLib.encode(_valueSchema);
|
55
|
-
}
|
23
|
+
// Hex-encoded key schema of (bytes32)
|
24
|
+
Schema constant _keySchema = Schema.wrap(0x002001005f000000000000000000000000000000000000000000000000000000);
|
25
|
+
// Hex-encoded value schema of (bytes32[])
|
26
|
+
Schema constant _valueSchema = Schema.wrap(0x00000001c1000000000000000000000000000000000000000000000000000000);
|
56
27
|
|
57
28
|
/**
|
58
29
|
* @notice Get the table's key field names.
|
@@ -76,21 +47,21 @@ library KeysWithValue {
|
|
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
|
/**
|
90
61
|
* @notice Register the table with its config (using the specified store).
|
91
62
|
*/
|
92
63
|
function register(IStore _store, ResourceId _tableId) internal {
|
93
|
-
_store.registerTable(_tableId, _fieldLayout,
|
64
|
+
_store.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
94
65
|
}
|
95
66
|
|
96
67
|
/**
|
@@ -656,10 +627,10 @@ library KeysWithValue {
|
|
656
627
|
* @notice Tightly pack dynamic data lengths using this table's schema.
|
657
628
|
* @return _encodedLengths The lengths of the dynamic fields (packed into a single bytes32 value).
|
658
629
|
*/
|
659
|
-
function encodeLengths(bytes32[] memory keysWithValue) internal pure returns (
|
630
|
+
function encodeLengths(bytes32[] memory keysWithValue) internal pure returns (EncodedLengths _encodedLengths) {
|
660
631
|
// Lengths are effectively checked during copy by 2**40 bytes exceeding gas limits
|
661
632
|
unchecked {
|
662
|
-
_encodedLengths =
|
633
|
+
_encodedLengths = EncodedLengthsLib.pack(keysWithValue.length * 32);
|
663
634
|
}
|
664
635
|
}
|
665
636
|
|
@@ -677,9 +648,9 @@ library KeysWithValue {
|
|
677
648
|
* @return The lengths of the dynamic fields (packed into a single bytes32 value).
|
678
649
|
* @return The dynamic (variable length) data, encoded into a sequence of bytes.
|
679
650
|
*/
|
680
|
-
function encode(bytes32[] memory keysWithValue) internal pure returns (bytes memory,
|
651
|
+
function encode(bytes32[] memory keysWithValue) internal pure returns (bytes memory, EncodedLengths, bytes memory) {
|
681
652
|
bytes memory _staticData;
|
682
|
-
|
653
|
+
EncodedLengths _encodedLengths = encodeLengths(keysWithValue);
|
683
654
|
bytes memory _dynamicData = encodeDynamic(keysWithValue);
|
684
655
|
|
685
656
|
return (_staticData, _encodedLengths, _dynamicData);
|