@latticexyz/world-module-erc20 2.2.13-main-23e6a6c97d94f85e163378148c51f51c900b3f8a
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/LICENSE +21 -0
- package/README.md +131 -0
- package/dist/_esm-DCAC27XZ.js +10 -0
- package/dist/_esm-DCAC27XZ.js.map +1 -0
- package/dist/ccip-GJX6Z7AD.js +2 -0
- package/dist/ccip-GJX6Z7AD.js.map +1 -0
- package/dist/chunk-AU25RBDM.js +30 -0
- package/dist/chunk-AU25RBDM.js.map +1 -0
- package/dist/chunk-QBDELX7C.js +7 -0
- package/dist/chunk-QBDELX7C.js.map +1 -0
- package/dist/chunk-SYRP7SJ5.js +2 -0
- package/dist/chunk-SYRP7SJ5.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/mud.config.d.ts +415 -0
- package/dist/mud.config.js +2 -0
- package/dist/mud.config.js.map +1 -0
- package/dist/secp256k1-QYN2SJD6.js +22 -0
- package/dist/secp256k1-QYN2SJD6.js.map +1 -0
- package/out/AccessControl.sol/AccessControl.abi.json +1 -0
- package/out/AccessControl.sol/AccessControl.json +1 -0
- package/out/AccessManagementSystem.sol/AccessManagementSystem.abi.json +256 -0
- package/out/AccessManagementSystem.sol/AccessManagementSystem.abi.json.d.ts +256 -0
- package/out/AccessManagementSystem.sol/AccessManagementSystem.json +1 -0
- package/out/Allowances.sol/Allowances.abi.json +1 -0
- package/out/Allowances.sol/Allowances.json +1 -0
- package/out/BalanceTransferSystem.sol/BalanceTransferSystem.abi.json +361 -0
- package/out/BalanceTransferSystem.sol/BalanceTransferSystem.abi.json.d.ts +361 -0
- package/out/BalanceTransferSystem.sol/BalanceTransferSystem.json +1 -0
- package/out/Balances.sol/Balances.abi.json +1 -0
- package/out/Balances.sol/Balances.json +1 -0
- package/out/Base.sol/CommonBase.abi.json +1 -0
- package/out/Base.sol/CommonBase.json +1 -0
- package/out/Base.sol/ScriptBase.abi.json +1 -0
- package/out/Base.sol/ScriptBase.json +1 -0
- package/out/Base.sol/TestBase.abi.json +1 -0
- package/out/Base.sol/TestBase.json +1 -0
- package/out/BatchCallSystem.sol/BatchCallSystem.abi.json +132 -0
- package/out/BatchCallSystem.sol/BatchCallSystem.abi.json.d.ts +132 -0
- package/out/BatchCallSystem.sol/BatchCallSystem.json +1 -0
- package/out/Bytes.sol/Bytes.abi.json +1 -0
- package/out/Bytes.sol/Bytes.json +1 -0
- package/out/Constants.sol/ERC20TableNames.abi.json +1 -0
- package/out/Constants.sol/ERC20TableNames.json +1 -0
- package/out/Constants.sol/ModuleConstants.abi.json +1 -0
- package/out/Constants.sol/ModuleConstants.json +1 -0
- package/out/Constants.sol/OwnableTableNames.abi.json +1 -0
- package/out/Constants.sol/OwnableTableNames.json +1 -0
- package/out/Constants.sol/PausableTableNames.abi.json +1 -0
- package/out/Constants.sol/PausableTableNames.json +1 -0
- package/out/Context.sol/Context.abi.json +1 -0
- package/out/Context.sol/Context.json +1 -0
- package/out/DecodeSlice.sol/DecodeSlice.abi.json +1 -0
- package/out/DecodeSlice.sol/DecodeSlice.json +1 -0
- package/out/Delegation.sol/Delegation.abi.json +1 -0
- package/out/Delegation.sol/Delegation.json +1 -0
- package/out/ERC165Checker.sol/ERC165Checker.abi.json +1 -0
- package/out/ERC165Checker.sol/ERC165Checker.json +1 -0
- package/out/ERC20BaseTest.sol/ERC20BehaviorTest.abi.json +949 -0
- package/out/ERC20BaseTest.sol/ERC20BehaviorTest.abi.json.d.ts +949 -0
- package/out/ERC20BaseTest.sol/ERC20BehaviorTest.json +1 -0
- package/out/ERC20BaseTest.sol/ERC20WithInternalStoreBehaviorTest.abi.json +949 -0
- package/out/ERC20BaseTest.sol/ERC20WithInternalStoreBehaviorTest.abi.json.d.ts +949 -0
- package/out/ERC20BaseTest.sol/ERC20WithInternalStoreBehaviorTest.json +1 -0
- package/out/ERC20BaseTest.sol/ERC20WithInternalStoreTest.abi.json +949 -0
- package/out/ERC20BaseTest.sol/ERC20WithInternalStoreTest.abi.json.d.ts +949 -0
- package/out/ERC20BaseTest.sol/ERC20WithInternalStoreTest.json +1 -0
- package/out/ERC20BaseTest.sol/ERC20WithWorldBehaviorTest.abi.json +956 -0
- package/out/ERC20BaseTest.sol/ERC20WithWorldBehaviorTest.abi.json.d.ts +956 -0
- package/out/ERC20BaseTest.sol/ERC20WithWorldBehaviorTest.json +1 -0
- package/out/ERC20BaseTest.sol/ERC20WithWorldTest.abi.json +956 -0
- package/out/ERC20BaseTest.sol/ERC20WithWorldTest.abi.json.d.ts +956 -0
- package/out/ERC20BaseTest.sol/ERC20WithWorldTest.json +1 -0
- package/out/ERC20BaseTest.sol/MockERC20Base.abi.json +683 -0
- package/out/ERC20BaseTest.sol/MockERC20Base.abi.json.d.ts +683 -0
- package/out/ERC20BaseTest.sol/MockERC20Base.json +1 -0
- package/out/ERC20BaseTest.sol/MockERC20WithInternalStore.abi.json +683 -0
- package/out/ERC20BaseTest.sol/MockERC20WithInternalStore.abi.json.d.ts +683 -0
- package/out/ERC20BaseTest.sol/MockERC20WithInternalStore.json +1 -0
- package/out/ERC20BaseTest.sol/MockERC20WithWorld.abi.json +719 -0
- package/out/ERC20BaseTest.sol/MockERC20WithWorld.abi.json.d.ts +719 -0
- package/out/ERC20BaseTest.sol/MockERC20WithWorld.json +1 -0
- package/out/ERC20BaseTest.sol/TestConstants.abi.json +1 -0
- package/out/ERC20BaseTest.sol/TestConstants.json +1 -0
- package/out/ERC20Burnable.sol/ERC20Burnable.abi.json +678 -0
- package/out/ERC20Burnable.sol/ERC20Burnable.abi.json.d.ts +678 -0
- package/out/ERC20Burnable.sol/ERC20Burnable.json +1 -0
- package/out/ERC20Burnable.t.sol/ERC20BurnableTest.abi.json +956 -0
- package/out/ERC20Burnable.t.sol/ERC20BurnableTest.abi.json.d.ts +956 -0
- package/out/ERC20Burnable.t.sol/ERC20BurnableTest.json +1 -0
- package/out/ERC20Burnable.t.sol/ERC20BurnableWithInternalStoreTest.abi.json +956 -0
- package/out/ERC20Burnable.t.sol/ERC20BurnableWithInternalStoreTest.abi.json.d.ts +956 -0
- package/out/ERC20Burnable.t.sol/ERC20BurnableWithInternalStoreTest.json +1 -0
- package/out/ERC20Burnable.t.sol/ERC20BurnableWithWorldTest.abi.json +963 -0
- package/out/ERC20Burnable.t.sol/ERC20BurnableWithWorldTest.abi.json.d.ts +963 -0
- package/out/ERC20Burnable.t.sol/ERC20BurnableWithWorldTest.json +1 -0
- package/out/ERC20Burnable.t.sol/MockERC20WithInternalStoreBurnable.abi.json +714 -0
- package/out/ERC20Burnable.t.sol/MockERC20WithInternalStoreBurnable.abi.json.d.ts +714 -0
- package/out/ERC20Burnable.t.sol/MockERC20WithInternalStoreBurnable.json +1 -0
- package/out/ERC20Burnable.t.sol/MockERC20WithWorldBurnable.abi.json +745 -0
- package/out/ERC20Burnable.t.sol/MockERC20WithWorldBurnable.abi.json.d.ts +745 -0
- package/out/ERC20Burnable.t.sol/MockERC20WithWorldBurnable.json +1 -0
- package/out/ERC20Metadata.sol/ERC20Metadata.abi.json +1 -0
- package/out/ERC20Metadata.sol/ERC20Metadata.json +1 -0
- package/out/ERC20Module.sol/ERC20Module.abi.json +147 -0
- package/out/ERC20Module.sol/ERC20Module.abi.json.d.ts +147 -0
- package/out/ERC20Module.sol/ERC20Module.json +1 -0
- package/out/ERC20Module.sol/ERC20RegistryLib.abi.json +349 -0
- package/out/ERC20Module.sol/ERC20RegistryLib.abi.json.d.ts +349 -0
- package/out/ERC20Module.sol/ERC20RegistryLib.json +1 -0
- package/out/ERC20Module.t.sol/ERC20ModuleTest.abi.json +541 -0
- package/out/ERC20Module.t.sol/ERC20ModuleTest.abi.json.d.ts +541 -0
- package/out/ERC20Module.t.sol/ERC20ModuleTest.json +1 -0
- package/out/ERC20Module.t.sol/TestConstants.abi.json +1 -0
- package/out/ERC20Module.t.sol/TestConstants.json +1 -0
- package/out/ERC20Pausable.sol/ERC20Pausable.abi.json +696 -0
- package/out/ERC20Pausable.sol/ERC20Pausable.abi.json.d.ts +696 -0
- package/out/ERC20Pausable.sol/ERC20Pausable.json +1 -0
- package/out/ERC20Pausable.t.sol/ERC20PausableBehaviorTest.abi.json +956 -0
- package/out/ERC20Pausable.t.sol/ERC20PausableBehaviorTest.abi.json.d.ts +956 -0
- package/out/ERC20Pausable.t.sol/ERC20PausableBehaviorTest.json +1 -0
- package/out/ERC20Pausable.t.sol/ERC20PausableWithInternalStoreTest.abi.json +956 -0
- package/out/ERC20Pausable.t.sol/ERC20PausableWithInternalStoreTest.abi.json.d.ts +956 -0
- package/out/ERC20Pausable.t.sol/ERC20PausableWithInternalStoreTest.json +1 -0
- package/out/ERC20Pausable.t.sol/ERC20PausableWithWorldTest.abi.json +963 -0
- package/out/ERC20Pausable.t.sol/ERC20PausableWithWorldTest.abi.json.d.ts +963 -0
- package/out/ERC20Pausable.t.sol/ERC20PausableWithWorldTest.json +1 -0
- package/out/ERC20Pausable.t.sol/MockERC20Pausable.abi.json +710 -0
- package/out/ERC20Pausable.t.sol/MockERC20Pausable.abi.json.d.ts +710 -0
- package/out/ERC20Pausable.t.sol/MockERC20Pausable.json +1 -0
- package/out/ERC20Pausable.t.sol/MockERC20WithInternalStorePausable.abi.json +746 -0
- package/out/ERC20Pausable.t.sol/MockERC20WithInternalStorePausable.abi.json.d.ts +746 -0
- package/out/ERC20Pausable.t.sol/MockERC20WithInternalStorePausable.json +1 -0
- package/out/ERC20Pausable.t.sol/MockERC20WithWorldPausable.abi.json +777 -0
- package/out/ERC20Pausable.t.sol/MockERC20WithWorldPausable.abi.json.d.ts +777 -0
- package/out/ERC20Pausable.t.sol/MockERC20WithWorldPausable.json +1 -0
- package/out/ERC20Registry.sol/ERC20Registry.abi.json +1 -0
- package/out/ERC20Registry.sol/ERC20Registry.json +1 -0
- package/out/ERC20WithInternalStore.sol/ERC20WithInternalStore.abi.json +838 -0
- package/out/ERC20WithInternalStore.sol/ERC20WithInternalStore.abi.json.d.ts +838 -0
- package/out/ERC20WithInternalStore.sol/ERC20WithInternalStore.json +1 -0
- package/out/ERC20WithWorld.sol/ERC20WithWorld.abi.json +816 -0
- package/out/ERC20WithWorld.sol/ERC20WithWorld.abi.json.d.ts +816 -0
- package/out/ERC20WithWorld.sol/ERC20WithWorld.json +1 -0
- package/out/EncodeArray.sol/EncodeArray.abi.json +1 -0
- package/out/EncodeArray.sol/EncodeArray.json +1 -0
- package/out/EncodedLengths.sol/EncodedLengthsInstance.abi.json +1 -0
- package/out/EncodedLengths.sol/EncodedLengthsInstance.json +1 -0
- package/out/EncodedLengths.sol/EncodedLengthsLib.abi.json +1 -0
- package/out/EncodedLengths.sol/EncodedLengthsLib.json +1 -0
- package/out/FieldLayout.sol/FieldLayoutInstance.abi.json +1 -0
- package/out/FieldLayout.sol/FieldLayoutInstance.json +1 -0
- package/out/FieldLayout.sol/FieldLayoutLib.abi.json +1 -0
- package/out/FieldLayout.sol/FieldLayoutLib.json +1 -0
- package/out/FunctionSelectors.sol/FunctionSelectors.abi.json +1 -0
- package/out/FunctionSelectors.sol/FunctionSelectors.json +1 -0
- package/out/FunctionSignatures.sol/FunctionSignatures.abi.json +1 -0
- package/out/FunctionSignatures.sol/FunctionSignatures.json +1 -0
- package/out/GasReporter.sol/GasReporter.abi.json +520 -0
- package/out/GasReporter.sol/GasReporter.abi.json.d.ts +520 -0
- package/out/GasReporter.sol/GasReporter.json +1 -0
- package/out/Hook.sol/HookInstance.abi.json +1 -0
- package/out/Hook.sol/HookInstance.json +1 -0
- package/out/Hook.sol/HookLib.abi.json +1 -0
- package/out/Hook.sol/HookLib.json +1 -0
- package/out/Hooks.sol/Hooks.abi.json +1 -0
- package/out/Hooks.sol/Hooks.json +1 -0
- package/out/IAccessManagementSystem.sol/IAccessManagementSystem.abi.json +69 -0
- package/out/IAccessManagementSystem.sol/IAccessManagementSystem.abi.json.d.ts +69 -0
- package/out/IAccessManagementSystem.sol/IAccessManagementSystem.json +1 -0
- package/out/IBalanceTransferSystem.sol/IBalanceTransferSystem.abi.json +48 -0
- package/out/IBalanceTransferSystem.sol/IBalanceTransferSystem.abi.json.d.ts +48 -0
- package/out/IBalanceTransferSystem.sol/IBalanceTransferSystem.json +1 -0
- package/out/IBaseWorld.sol/IBaseWorld.abi.json +2008 -0
- package/out/IBaseWorld.sol/IBaseWorld.abi.json.d.ts +2008 -0
- package/out/IBaseWorld.sol/IBaseWorld.json +1 -0
- package/out/IBatchCallSystem.sol/IBatchCallSystem.abi.json +69 -0
- package/out/IBatchCallSystem.sol/IBatchCallSystem.abi.json.d.ts +69 -0
- package/out/IBatchCallSystem.sol/IBatchCallSystem.json +1 -0
- package/out/IDelegationControl.sol/IDelegationControl.abi.json +89 -0
- package/out/IDelegationControl.sol/IDelegationControl.abi.json.d.ts +89 -0
- package/out/IDelegationControl.sol/IDelegationControl.json +1 -0
- package/out/IERC165.sol/IERC165.abi.json +21 -0
- package/out/IERC165.sol/IERC165.abi.json.d.ts +21 -0
- package/out/IERC165.sol/IERC165.json +1 -0
- package/out/IERC20.sol/IERC20.abi.json +185 -0
- package/out/IERC20.sol/IERC20.abi.json.d.ts +185 -0
- package/out/IERC20.sol/IERC20.json +1 -0
- package/out/IERC20Errors.sol/IERC20Errors.abi.json +88 -0
- package/out/IERC20Errors.sol/IERC20Errors.abi.json.d.ts +88 -0
- package/out/IERC20Errors.sol/IERC20Errors.json +1 -0
- package/out/IERC20Events.sol/IERC20Events.abi.json +52 -0
- package/out/IERC20Events.sol/IERC20Events.abi.json.d.ts +52 -0
- package/out/IERC20Events.sol/IERC20Events.json +1 -0
- package/out/IERC20Metadata.sol/IERC20Metadata.abi.json +224 -0
- package/out/IERC20Metadata.sol/IERC20Metadata.abi.json.d.ts +224 -0
- package/out/IERC20Metadata.sol/IERC20Metadata.json +1 -0
- package/out/IEncodedLengthsErrors.sol/IEncodedLengthsErrors.abi.json +13 -0
- package/out/IEncodedLengthsErrors.sol/IEncodedLengthsErrors.abi.json.d.ts +13 -0
- package/out/IEncodedLengthsErrors.sol/IEncodedLengthsErrors.json +1 -0
- package/out/IFieldLayoutErrors.sol/IFieldLayoutErrors.abi.json +88 -0
- package/out/IFieldLayoutErrors.sol/IFieldLayoutErrors.abi.json.d.ts +88 -0
- package/out/IFieldLayoutErrors.sol/IFieldLayoutErrors.json +1 -0
- package/out/IModule.sol/IModule.abi.json +73 -0
- package/out/IModule.sol/IModule.abi.json.d.ts +73 -0
- package/out/IModule.sol/IModule.json +1 -0
- 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.abi.json +20 -0
- package/out/IModuleInstallationSystem.sol/IModuleInstallationSystem.abi.json.d.ts +20 -0
- package/out/IModuleInstallationSystem.sol/IModuleInstallationSystem.json +1 -0
- package/out/IMulticall3.sol/IMulticall3.abi.json +440 -0
- package/out/IMulticall3.sol/IMulticall3.abi.json.d.ts +440 -0
- package/out/IMulticall3.sol/IMulticall3.json +1 -0
- package/out/IRegistrationSystem.sol/IRegistrationSystem.abi.json +1 -0
- package/out/IRegistrationSystem.sol/IRegistrationSystem.json +1 -0
- package/out/ISchemaErrors.sol/ISchemaErrors.abi.json +18 -0
- package/out/ISchemaErrors.sol/ISchemaErrors.abi.json.d.ts +18 -0
- package/out/ISchemaErrors.sol/ISchemaErrors.json +1 -0
- package/out/ISliceErrors.sol/ISliceErrors.abi.json +23 -0
- package/out/ISliceErrors.sol/ISliceErrors.abi.json.d.ts +23 -0
- package/out/ISliceErrors.sol/ISliceErrors.json +1 -0
- package/out/IStore.sol/IStore.abi.json +1261 -0
- package/out/IStore.sol/IStore.abi.json.d.ts +1261 -0
- package/out/IStore.sol/IStore.json +1 -0
- package/out/IStoreErrors.sol/IStoreErrors.abi.json +204 -0
- package/out/IStoreErrors.sol/IStoreErrors.abi.json.d.ts +204 -0
- package/out/IStoreErrors.sol/IStoreErrors.json +1 -0
- package/out/IStoreEvents.sol/IStoreEvents.abi.json +151 -0
- package/out/IStoreEvents.sol/IStoreEvents.abi.json.d.ts +151 -0
- package/out/IStoreEvents.sol/IStoreEvents.json +1 -0
- package/out/IStoreHook.sol/IStoreHook.abi.json +290 -0
- package/out/IStoreHook.sol/IStoreHook.abi.json.d.ts +290 -0
- package/out/IStoreHook.sol/IStoreHook.json +1 -0
- package/out/IStoreKernel.sol/IStoreKernel.abi.json +1182 -0
- package/out/IStoreKernel.sol/IStoreKernel.abi.json.d.ts +1182 -0
- package/out/IStoreKernel.sol/IStoreKernel.json +1 -0
- package/out/IStoreRead.sol/IStoreRead.abi.json +389 -0
- package/out/IStoreRead.sol/IStoreRead.abi.json.d.ts +389 -0
- package/out/IStoreRead.sol/IStoreRead.json +1 -0
- package/out/IStoreRegistration.sol/IStoreRegistration.abi.json +81 -0
- package/out/IStoreRegistration.sol/IStoreRegistration.abi.json.d.ts +81 -0
- package/out/IStoreRegistration.sol/IStoreRegistration.json +1 -0
- package/out/IStoreWrite.sol/IStoreWrite.abi.json +446 -0
- package/out/IStoreWrite.sol/IStoreWrite.abi.json.d.ts +446 -0
- package/out/IStoreWrite.sol/IStoreWrite.json +1 -0
- package/out/ISystemHook.sol/ISystemHook.abi.json +67 -0
- package/out/ISystemHook.sol/ISystemHook.abi.json.d.ts +67 -0
- package/out/ISystemHook.sol/ISystemHook.json +1 -0
- package/out/IWorldContextConsumer.sol/IWorldContextConsumer.abi.json +60 -0
- package/out/IWorldContextConsumer.sol/IWorldContextConsumer.abi.json.d.ts +60 -0
- package/out/IWorldContextConsumer.sol/IWorldContextConsumer.json +1 -0
- package/out/IWorldErrors.sol/IWorldErrors.abi.json +200 -0
- package/out/IWorldErrors.sol/IWorldErrors.abi.json.d.ts +200 -0
- package/out/IWorldErrors.sol/IWorldErrors.json +1 -0
- 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.abi.json +55 -0
- package/out/IWorldKernel.sol/IWorldCall.abi.json.d.ts +55 -0
- package/out/IWorldKernel.sol/IWorldCall.json +1 -0
- package/out/IWorldKernel.sol/IWorldKernel.abi.json +349 -0
- package/out/IWorldKernel.sol/IWorldKernel.abi.json.d.ts +349 -0
- package/out/IWorldKernel.sol/IWorldKernel.json +1 -0
- package/out/IWorldKernel.sol/IWorldModuleInstallation.abi.json +20 -0
- package/out/IWorldKernel.sol/IWorldModuleInstallation.abi.json.d.ts +20 -0
- package/out/IWorldKernel.sol/IWorldModuleInstallation.json +1 -0
- package/out/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.abi.json +204 -0
- package/out/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.abi.json.d.ts +204 -0
- package/out/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.json +1 -0
- package/out/InitModule.sol/InitModule.abi.json +462 -0
- package/out/InitModule.sol/InitModule.abi.json.d.ts +462 -0
- package/out/InitModule.sol/InitModule.json +1 -0
- package/out/InitModuleAddress.sol/InitModuleAddress.abi.json +1 -0
- package/out/InitModuleAddress.sol/InitModuleAddress.json +1 -0
- package/out/InstalledModules.sol/InstalledModules.abi.json +1 -0
- package/out/InstalledModules.sol/InstalledModules.json +1 -0
- package/out/LimitedCallContext.sol/LimitedCallContext.abi.json +7 -0
- package/out/LimitedCallContext.sol/LimitedCallContext.abi.json.d.ts +7 -0
- package/out/LimitedCallContext.sol/LimitedCallContext.json +1 -0
- package/out/MUDERC20.sol/MUDERC20.abi.json +647 -0
- package/out/MUDERC20.sol/MUDERC20.abi.json.d.ts +647 -0
- package/out/MUDERC20.sol/MUDERC20.json +1 -0
- package/out/Memory.sol/Memory.abi.json +1 -0
- package/out/Memory.sol/Memory.json +1 -0
- package/out/Module.sol/Module.abi.json +112 -0
- package/out/Module.sol/Module.abi.json.d.ts +112 -0
- package/out/Module.sol/Module.json +1 -0
- package/out/ModuleInstallationSystem.sol/ModuleInstallationSystem.abi.json +151 -0
- package/out/ModuleInstallationSystem.sol/ModuleInstallationSystem.abi.json.d.ts +151 -0
- package/out/ModuleInstallationSystem.sol/ModuleInstallationSystem.json +1 -0
- package/out/NamespaceDelegationControl.sol/NamespaceDelegationControl.abi.json +1 -0
- package/out/NamespaceDelegationControl.sol/NamespaceDelegationControl.json +1 -0
- package/out/NamespaceOwner.sol/NamespaceOwner.abi.json +1 -0
- package/out/NamespaceOwner.sol/NamespaceOwner.json +1 -0
- package/out/Ownable.sol/Ownable.abi.json +413 -0
- package/out/Ownable.sol/Ownable.abi.json.d.ts +413 -0
- package/out/Ownable.sol/Ownable.json +1 -0
- package/out/Owner.sol/Owner.abi.json +1 -0
- package/out/Owner.sol/Owner.json +1 -0
- package/out/Pausable.sol/Pausable.abi.json +388 -0
- package/out/Pausable.sol/Pausable.abi.json.d.ts +388 -0
- package/out/Pausable.sol/Pausable.json +1 -0
- package/out/Paused.sol/Paused.abi.json +1 -0
- package/out/Paused.sol/Paused.json +1 -0
- package/out/RegistrationSystem.sol/RegistrationSystem.abi.json +1018 -0
- package/out/RegistrationSystem.sol/RegistrationSystem.abi.json.d.ts +1018 -0
- package/out/RegistrationSystem.sol/RegistrationSystem.json +1 -0
- package/out/ResourceAccess.sol/ResourceAccess.abi.json +1 -0
- package/out/ResourceAccess.sol/ResourceAccess.json +1 -0
- package/out/ResourceId.sol/ResourceIdInstance.abi.json +1 -0
- package/out/ResourceId.sol/ResourceIdInstance.json +1 -0
- package/out/ResourceId.sol/ResourceIdLib.abi.json +1 -0
- package/out/ResourceId.sol/ResourceIdLib.json +1 -0
- package/out/ResourceIds.sol/ResourceIds.abi.json +1 -0
- package/out/ResourceIds.sol/ResourceIds.json +1 -0
- package/out/Schema.sol/SchemaInstance.abi.json +1 -0
- package/out/Schema.sol/SchemaInstance.json +1 -0
- package/out/Schema.sol/SchemaLib.abi.json +1 -0
- package/out/Schema.sol/SchemaLib.json +1 -0
- package/out/Slice.sol/SliceInstance.abi.json +1 -0
- package/out/Slice.sol/SliceInstance.json +1 -0
- package/out/Slice.sol/SliceLib.abi.json +1 -0
- package/out/Slice.sol/SliceLib.json +1 -0
- package/out/StdAssertions.sol/StdAssertions.abi.json +392 -0
- package/out/StdAssertions.sol/StdAssertions.abi.json.d.ts +392 -0
- package/out/StdAssertions.sol/StdAssertions.json +1 -0
- package/out/StdChains.sol/StdChains.abi.json +1 -0
- package/out/StdChains.sol/StdChains.json +1 -0
- package/out/StdCheats.sol/StdCheats.abi.json +1 -0
- package/out/StdCheats.sol/StdCheats.json +1 -0
- package/out/StdCheats.sol/StdCheatsSafe.abi.json +1 -0
- package/out/StdCheats.sol/StdCheatsSafe.json +1 -0
- package/out/StdError.sol/stdError.abi.json +119 -0
- package/out/StdError.sol/stdError.abi.json.d.ts +119 -0
- package/out/StdError.sol/stdError.json +1 -0
- package/out/StdInvariant.sol/StdInvariant.abi.json +130 -0
- package/out/StdInvariant.sol/StdInvariant.abi.json.d.ts +130 -0
- package/out/StdInvariant.sol/StdInvariant.json +1 -0
- package/out/StdJson.sol/stdJson.abi.json +1 -0
- package/out/StdJson.sol/stdJson.json +1 -0
- package/out/StdMath.sol/stdMath.abi.json +1 -0
- package/out/StdMath.sol/stdMath.json +1 -0
- package/out/StdStorage.sol/stdStorage.abi.json +1 -0
- package/out/StdStorage.sol/stdStorage.json +1 -0
- package/out/StdStorage.sol/stdStorageSafe.abi.json +52 -0
- package/out/StdStorage.sol/stdStorageSafe.abi.json.d.ts +52 -0
- package/out/StdStorage.sol/stdStorageSafe.json +1 -0
- package/out/StdStyle.sol/StdStyle.abi.json +1 -0
- package/out/StdStyle.sol/StdStyle.json +1 -0
- package/out/StdUtils.sol/StdUtils.abi.json +1 -0
- package/out/StdUtils.sol/StdUtils.json +1 -0
- package/out/Storage.sol/Storage.abi.json +1 -0
- package/out/Storage.sol/Storage.json +1 -0
- package/out/Store.sol/Store.abi.json +1261 -0
- package/out/Store.sol/Store.abi.json.d.ts +1261 -0
- package/out/Store.sol/Store.json +1 -0
- package/out/StoreConsumer.sol/StoreConsumer.abi.json +15 -0
- package/out/StoreConsumer.sol/StoreConsumer.abi.json.d.ts +15 -0
- package/out/StoreConsumer.sol/StoreConsumer.json +1 -0
- package/out/StoreConsumer.t.sol/MockStoreConsumer.abi.json +52 -0
- package/out/StoreConsumer.t.sol/MockStoreConsumer.abi.json.d.ts +52 -0
- package/out/StoreConsumer.t.sol/MockStoreConsumer.json +1 -0
- package/out/StoreConsumer.t.sol/MockWithInternalStore.abi.json +376 -0
- package/out/StoreConsumer.t.sol/MockWithInternalStore.abi.json.d.ts +376 -0
- package/out/StoreConsumer.t.sol/MockWithInternalStore.json +1 -0
- package/out/StoreConsumer.t.sol/MockWithStore.abi.json +387 -0
- package/out/StoreConsumer.t.sol/MockWithStore.abi.json.d.ts +387 -0
- package/out/StoreConsumer.t.sol/MockWithStore.json +1 -0
- package/out/StoreConsumer.t.sol/MockWithWorld.abi.json +430 -0
- package/out/StoreConsumer.t.sol/MockWithWorld.abi.json.d.ts +430 -0
- package/out/StoreConsumer.t.sol/MockWithWorld.json +1 -0
- package/out/StoreConsumer.t.sol/StoreConsumerTest.abi.json +548 -0
- package/out/StoreConsumer.t.sol/StoreConsumerTest.abi.json.d.ts +548 -0
- package/out/StoreConsumer.t.sol/StoreConsumerTest.json +1 -0
- package/out/StoreCore.sol/StoreCore.abi.json +1 -0
- package/out/StoreCore.sol/StoreCore.json +1 -0
- package/out/StoreCore.sol/StoreCoreInternal.abi.json +1 -0
- package/out/StoreCore.sol/StoreCoreInternal.json +1 -0
- package/out/StoreHooks.sol/StoreHooks.abi.json +1 -0
- package/out/StoreHooks.sol/StoreHooks.json +1 -0
- package/out/StoreKernel.sol/StoreKernel.abi.json +1182 -0
- package/out/StoreKernel.sol/StoreKernel.abi.json.d.ts +1182 -0
- package/out/StoreKernel.sol/StoreKernel.json +1 -0
- package/out/StoreRead.sol/StoreRead.abi.json +437 -0
- package/out/StoreRead.sol/StoreRead.abi.json.d.ts +437 -0
- package/out/StoreRead.sol/StoreRead.json +1 -0
- package/out/StoreRegistrationSystem.sol/StoreRegistrationSystem.abi.json +779 -0
- package/out/StoreRegistrationSystem.sol/StoreRegistrationSystem.abi.json.d.ts +779 -0
- package/out/StoreRegistrationSystem.sol/StoreRegistrationSystem.json +1 -0
- package/out/StoreSwitch.sol/StoreSwitch.abi.json +1 -0
- package/out/StoreSwitch.sol/StoreSwitch.json +1 -0
- package/out/System.sol/System.abi.json +60 -0
- package/out/System.sol/System.abi.json.d.ts +60 -0
- package/out/System.sol/System.json +1 -0
- package/out/SystemCall.sol/SystemCall.abi.json +1 -0
- package/out/SystemCall.sol/SystemCall.json +1 -0
- package/out/SystemHooks.sol/SystemHooks.abi.json +1 -0
- package/out/SystemHooks.sol/SystemHooks.json +1 -0
- package/out/SystemRegistry.sol/SystemRegistry.abi.json +1 -0
- package/out/SystemRegistry.sol/SystemRegistry.json +1 -0
- package/out/Systems.sol/Systems.abi.json +1 -0
- package/out/Systems.sol/Systems.json +1 -0
- package/out/Tables.sol/Tables.abi.json +1 -0
- package/out/Tables.sol/Tables.json +1 -0
- package/out/Test.sol/Test.abi.json +520 -0
- package/out/Test.sol/Test.abi.json.d.ts +520 -0
- package/out/Test.sol/Test.json +1 -0
- package/out/TightCoder.sol/TightCoder.abi.json +1 -0
- package/out/TightCoder.sol/TightCoder.json +1 -0
- package/out/TotalSupply.sol/TotalSupply.abi.json +1 -0
- package/out/TotalSupply.sol/TotalSupply.json +1 -0
- package/out/UserDelegationControl.sol/UserDelegationControl.abi.json +1 -0
- package/out/UserDelegationControl.sol/UserDelegationControl.json +1 -0
- package/out/Vm.sol/Vm.abi.json +3878 -0
- package/out/Vm.sol/Vm.abi.json.d.ts +3878 -0
- package/out/Vm.sol/Vm.json +1 -0
- package/out/Vm.sol/VmSafe.abi.json +2678 -0
- package/out/Vm.sol/VmSafe.abi.json.d.ts +2678 -0
- package/out/Vm.sol/VmSafe.json +1 -0
- package/out/WithStore.sol/WithStore.abi.json +339 -0
- package/out/WithStore.sol/WithStore.abi.json.d.ts +339 -0
- package/out/WithStore.sol/WithStore.json +1 -0
- package/out/WithWorld.sol/WithWorld.abi.json +370 -0
- package/out/WithWorld.sol/WithWorld.abi.json.d.ts +370 -0
- package/out/WithWorld.sol/WithWorld.json +1 -0
- package/out/World.sol/World.abi.json +1542 -0
- package/out/World.sol/World.abi.json.d.ts +1542 -0
- package/out/World.sol/World.json +1 -0
- package/out/WorldContext.sol/WorldContextConsumer.abi.json +60 -0
- package/out/WorldContext.sol/WorldContextConsumer.abi.json.d.ts +60 -0
- package/out/WorldContext.sol/WorldContextConsumer.json +1 -0
- package/out/WorldContext.sol/WorldContextConsumerLib.abi.json +1 -0
- package/out/WorldContext.sol/WorldContextConsumerLib.json +1 -0
- package/out/WorldContext.sol/WorldContextProviderLib.abi.json +1 -0
- package/out/WorldContext.sol/WorldContextProviderLib.json +1 -0
- package/out/WorldRegistrationSystem.sol/WorldRegistrationSystem.abi.json +691 -0
- package/out/WorldRegistrationSystem.sol/WorldRegistrationSystem.abi.json.d.ts +691 -0
- package/out/WorldRegistrationSystem.sol/WorldRegistrationSystem.json +1 -0
- package/out/WorldResourceId.sol/WorldResourceIdInstance.abi.json +1 -0
- package/out/WorldResourceId.sol/WorldResourceIdInstance.json +1 -0
- package/out/WorldResourceId.sol/WorldResourceIdLib.abi.json +1 -0
- package/out/WorldResourceId.sol/WorldResourceIdLib.json +1 -0
- package/out/build-info/bc3a1525415111591c1321f8462fa438.json +1 -0
- package/out/console.sol/console.abi.json +1 -0
- package/out/console.sol/console.json +1 -0
- package/out/console2.sol/console2.abi.json +1 -0
- package/out/console2.sol/console2.json +1 -0
- package/out/constants.sol/LayoutOffsets.abi.json +1 -0
- package/out/constants.sol/LayoutOffsets.json +1 -0
- package/out/safeconsole.sol/safeconsole.abi.json +1 -0
- package/out/safeconsole.sol/safeconsole.json +1 -0
- package/out/src/IERC165.sol/IERC165.abi.json +21 -0
- package/out/src/IERC165.sol/IERC165.abi.json.d.ts +21 -0
- package/out/src/IERC165.sol/IERC165.json +1 -0
- package/out/tables/Balances.sol/Balances.abi.json +1 -0
- package/out/tables/Balances.sol/Balances.json +1 -0
- package/out/test.sol/DSTest.abi.json +296 -0
- package/out/test.sol/DSTest.abi.json.d.ts +296 -0
- package/out/test.sol/DSTest.json +1 -0
- package/package.json +67 -0
- package/src/Constants.sol +36 -0
- package/src/Context.sol +10 -0
- package/src/ERC20Burnable.sol +16 -0
- package/src/ERC20Module.sol +74 -0
- package/src/ERC20Pausable.sol +12 -0
- package/src/MUDERC20.sol +326 -0
- package/src/Ownable.sol +110 -0
- package/src/Pausable.sol +125 -0
- package/src/StoreConsumer.sol +24 -0
- package/src/WithStore.sol +22 -0
- package/src/WithWorld.sol +40 -0
- package/src/codegen/index.sol +12 -0
- package/src/codegen/tables/Allowances.sol +208 -0
- package/src/codegen/tables/Balances.sol +196 -0
- package/src/codegen/tables/ERC20Metadata.sol +604 -0
- package/src/codegen/tables/ERC20Registry.sol +199 -0
- package/src/codegen/tables/Owner.sol +184 -0
- package/src/codegen/tables/Paused.sol +196 -0
- package/src/codegen/tables/TotalSupply.sol +184 -0
- package/src/examples/ERC20WithInternalStore.sol +32 -0
- package/src/examples/ERC20WithWorld.sol +40 -0
- package/src/interfaces/IERC20.sol +67 -0
- package/src/interfaces/IERC20Errors.sol +49 -0
- package/src/interfaces/IERC20Events.sol +18 -0
- package/src/interfaces/IERC20Metadata.sol +26 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity >=0.8.24;
|
|
3
|
+
|
|
4
|
+
/* Autogenerated file. Do not edit manually. */
|
|
5
|
+
|
|
6
|
+
// Import store internals
|
|
7
|
+
import { IStore } from "@latticexyz/store/src/IStore.sol";
|
|
8
|
+
import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
|
|
9
|
+
import { StoreCore } from "@latticexyz/store/src/StoreCore.sol";
|
|
10
|
+
import { Bytes } from "@latticexyz/store/src/Bytes.sol";
|
|
11
|
+
import { Memory } from "@latticexyz/store/src/Memory.sol";
|
|
12
|
+
import { SliceLib } from "@latticexyz/store/src/Slice.sol";
|
|
13
|
+
import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol";
|
|
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";
|
|
17
|
+
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
|
18
|
+
|
|
19
|
+
// Import user types
|
|
20
|
+
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
|
21
|
+
|
|
22
|
+
library ERC20Registry {
|
|
23
|
+
FieldLayout constant _fieldLayout =
|
|
24
|
+
FieldLayout.wrap(0x0014010014000000000000000000000000000000000000000000000000000000);
|
|
25
|
+
|
|
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);
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @notice Get the table's key field names.
|
|
33
|
+
* @return keyNames An array of strings with the names of key fields.
|
|
34
|
+
*/
|
|
35
|
+
function getKeyNames() internal pure returns (string[] memory keyNames) {
|
|
36
|
+
keyNames = new string[](1);
|
|
37
|
+
keyNames[0] = "namespaceId";
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @notice Get the table's value field names.
|
|
42
|
+
* @return fieldNames An array of strings with the names of value fields.
|
|
43
|
+
*/
|
|
44
|
+
function getFieldNames() internal pure returns (string[] memory fieldNames) {
|
|
45
|
+
fieldNames = new string[](1);
|
|
46
|
+
fieldNames[0] = "tokenAddress";
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @notice Register the table with its config.
|
|
51
|
+
*/
|
|
52
|
+
function register(ResourceId _tableId) internal {
|
|
53
|
+
StoreSwitch.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @notice Register the table with its config.
|
|
58
|
+
*/
|
|
59
|
+
function _register(ResourceId _tableId) internal {
|
|
60
|
+
StoreCore.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @notice Get tokenAddress.
|
|
65
|
+
*/
|
|
66
|
+
function getTokenAddress(ResourceId _tableId, ResourceId namespaceId) internal view returns (address tokenAddress) {
|
|
67
|
+
bytes32[] memory _keyTuple = new bytes32[](1);
|
|
68
|
+
_keyTuple[0] = ResourceId.unwrap(namespaceId);
|
|
69
|
+
|
|
70
|
+
bytes32 _blob = StoreSwitch.getStaticField(_tableId, _keyTuple, 0, _fieldLayout);
|
|
71
|
+
return (address(bytes20(_blob)));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @notice Get tokenAddress.
|
|
76
|
+
*/
|
|
77
|
+
function _getTokenAddress(ResourceId _tableId, ResourceId namespaceId) internal view returns (address tokenAddress) {
|
|
78
|
+
bytes32[] memory _keyTuple = new bytes32[](1);
|
|
79
|
+
_keyTuple[0] = ResourceId.unwrap(namespaceId);
|
|
80
|
+
|
|
81
|
+
bytes32 _blob = StoreCore.getStaticField(_tableId, _keyTuple, 0, _fieldLayout);
|
|
82
|
+
return (address(bytes20(_blob)));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @notice Get tokenAddress.
|
|
87
|
+
*/
|
|
88
|
+
function get(ResourceId _tableId, ResourceId namespaceId) internal view returns (address tokenAddress) {
|
|
89
|
+
bytes32[] memory _keyTuple = new bytes32[](1);
|
|
90
|
+
_keyTuple[0] = ResourceId.unwrap(namespaceId);
|
|
91
|
+
|
|
92
|
+
bytes32 _blob = StoreSwitch.getStaticField(_tableId, _keyTuple, 0, _fieldLayout);
|
|
93
|
+
return (address(bytes20(_blob)));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @notice Get tokenAddress.
|
|
98
|
+
*/
|
|
99
|
+
function _get(ResourceId _tableId, ResourceId namespaceId) internal view returns (address tokenAddress) {
|
|
100
|
+
bytes32[] memory _keyTuple = new bytes32[](1);
|
|
101
|
+
_keyTuple[0] = ResourceId.unwrap(namespaceId);
|
|
102
|
+
|
|
103
|
+
bytes32 _blob = StoreCore.getStaticField(_tableId, _keyTuple, 0, _fieldLayout);
|
|
104
|
+
return (address(bytes20(_blob)));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* @notice Set tokenAddress.
|
|
109
|
+
*/
|
|
110
|
+
function setTokenAddress(ResourceId _tableId, ResourceId namespaceId, address tokenAddress) internal {
|
|
111
|
+
bytes32[] memory _keyTuple = new bytes32[](1);
|
|
112
|
+
_keyTuple[0] = ResourceId.unwrap(namespaceId);
|
|
113
|
+
|
|
114
|
+
StoreSwitch.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((tokenAddress)), _fieldLayout);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @notice Set tokenAddress.
|
|
119
|
+
*/
|
|
120
|
+
function _setTokenAddress(ResourceId _tableId, ResourceId namespaceId, address tokenAddress) internal {
|
|
121
|
+
bytes32[] memory _keyTuple = new bytes32[](1);
|
|
122
|
+
_keyTuple[0] = ResourceId.unwrap(namespaceId);
|
|
123
|
+
|
|
124
|
+
StoreCore.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((tokenAddress)), _fieldLayout);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* @notice Set tokenAddress.
|
|
129
|
+
*/
|
|
130
|
+
function set(ResourceId _tableId, ResourceId namespaceId, address tokenAddress) internal {
|
|
131
|
+
bytes32[] memory _keyTuple = new bytes32[](1);
|
|
132
|
+
_keyTuple[0] = ResourceId.unwrap(namespaceId);
|
|
133
|
+
|
|
134
|
+
StoreSwitch.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((tokenAddress)), _fieldLayout);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @notice Set tokenAddress.
|
|
139
|
+
*/
|
|
140
|
+
function _set(ResourceId _tableId, ResourceId namespaceId, address tokenAddress) internal {
|
|
141
|
+
bytes32[] memory _keyTuple = new bytes32[](1);
|
|
142
|
+
_keyTuple[0] = ResourceId.unwrap(namespaceId);
|
|
143
|
+
|
|
144
|
+
StoreCore.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((tokenAddress)), _fieldLayout);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* @notice Delete all data for given keys.
|
|
149
|
+
*/
|
|
150
|
+
function deleteRecord(ResourceId _tableId, ResourceId namespaceId) internal {
|
|
151
|
+
bytes32[] memory _keyTuple = new bytes32[](1);
|
|
152
|
+
_keyTuple[0] = ResourceId.unwrap(namespaceId);
|
|
153
|
+
|
|
154
|
+
StoreSwitch.deleteRecord(_tableId, _keyTuple);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* @notice Delete all data for given keys.
|
|
159
|
+
*/
|
|
160
|
+
function _deleteRecord(ResourceId _tableId, ResourceId namespaceId) internal {
|
|
161
|
+
bytes32[] memory _keyTuple = new bytes32[](1);
|
|
162
|
+
_keyTuple[0] = ResourceId.unwrap(namespaceId);
|
|
163
|
+
|
|
164
|
+
StoreCore.deleteRecord(_tableId, _keyTuple, _fieldLayout);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* @notice Tightly pack static (fixed length) data using this table's schema.
|
|
169
|
+
* @return The static data, encoded into a sequence of bytes.
|
|
170
|
+
*/
|
|
171
|
+
function encodeStatic(address tokenAddress) internal pure returns (bytes memory) {
|
|
172
|
+
return abi.encodePacked(tokenAddress);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* @notice Encode all of a record's fields.
|
|
177
|
+
* @return The static (fixed length) data, encoded into a sequence of bytes.
|
|
178
|
+
* @return The lengths of the dynamic fields (packed into a single bytes32 value).
|
|
179
|
+
* @return The dynamic (variable length) data, encoded into a sequence of bytes.
|
|
180
|
+
*/
|
|
181
|
+
function encode(address tokenAddress) internal pure returns (bytes memory, EncodedLengths, bytes memory) {
|
|
182
|
+
bytes memory _staticData = encodeStatic(tokenAddress);
|
|
183
|
+
|
|
184
|
+
EncodedLengths _encodedLengths;
|
|
185
|
+
bytes memory _dynamicData;
|
|
186
|
+
|
|
187
|
+
return (_staticData, _encodedLengths, _dynamicData);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* @notice Encode keys as a bytes32 array using this table's field layout.
|
|
192
|
+
*/
|
|
193
|
+
function encodeKeyTuple(ResourceId namespaceId) internal pure returns (bytes32[] memory) {
|
|
194
|
+
bytes32[] memory _keyTuple = new bytes32[](1);
|
|
195
|
+
_keyTuple[0] = ResourceId.unwrap(namespaceId);
|
|
196
|
+
|
|
197
|
+
return _keyTuple;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity >=0.8.24;
|
|
3
|
+
|
|
4
|
+
/* Autogenerated file. Do not edit manually. */
|
|
5
|
+
|
|
6
|
+
// Import store internals
|
|
7
|
+
import { IStore } from "@latticexyz/store/src/IStore.sol";
|
|
8
|
+
import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
|
|
9
|
+
import { StoreCore } from "@latticexyz/store/src/StoreCore.sol";
|
|
10
|
+
import { Bytes } from "@latticexyz/store/src/Bytes.sol";
|
|
11
|
+
import { Memory } from "@latticexyz/store/src/Memory.sol";
|
|
12
|
+
import { SliceLib } from "@latticexyz/store/src/Slice.sol";
|
|
13
|
+
import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol";
|
|
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";
|
|
17
|
+
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
|
18
|
+
|
|
19
|
+
library Owner {
|
|
20
|
+
FieldLayout constant _fieldLayout =
|
|
21
|
+
FieldLayout.wrap(0x0014010014000000000000000000000000000000000000000000000000000000);
|
|
22
|
+
|
|
23
|
+
// Hex-encoded key schema of ()
|
|
24
|
+
Schema constant _keySchema = Schema.wrap(0x0000000000000000000000000000000000000000000000000000000000000000);
|
|
25
|
+
// Hex-encoded value schema of (address)
|
|
26
|
+
Schema constant _valueSchema = Schema.wrap(0x0014010061000000000000000000000000000000000000000000000000000000);
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @notice Get the table's key field names.
|
|
30
|
+
* @return keyNames An array of strings with the names of key fields.
|
|
31
|
+
*/
|
|
32
|
+
function getKeyNames() internal pure returns (string[] memory keyNames) {
|
|
33
|
+
keyNames = new string[](0);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @notice Get the table's value field names.
|
|
38
|
+
* @return fieldNames An array of strings with the names of value fields.
|
|
39
|
+
*/
|
|
40
|
+
function getFieldNames() internal pure returns (string[] memory fieldNames) {
|
|
41
|
+
fieldNames = new string[](1);
|
|
42
|
+
fieldNames[0] = "value";
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @notice Register the table with its config.
|
|
47
|
+
*/
|
|
48
|
+
function register(ResourceId _tableId) internal {
|
|
49
|
+
StoreSwitch.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @notice Register the table with its config.
|
|
54
|
+
*/
|
|
55
|
+
function _register(ResourceId _tableId) internal {
|
|
56
|
+
StoreCore.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @notice Get value.
|
|
61
|
+
*/
|
|
62
|
+
function getValue(ResourceId _tableId) internal view returns (address value) {
|
|
63
|
+
bytes32[] memory _keyTuple = new bytes32[](0);
|
|
64
|
+
|
|
65
|
+
bytes32 _blob = StoreSwitch.getStaticField(_tableId, _keyTuple, 0, _fieldLayout);
|
|
66
|
+
return (address(bytes20(_blob)));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @notice Get value.
|
|
71
|
+
*/
|
|
72
|
+
function _getValue(ResourceId _tableId) internal view returns (address value) {
|
|
73
|
+
bytes32[] memory _keyTuple = new bytes32[](0);
|
|
74
|
+
|
|
75
|
+
bytes32 _blob = StoreCore.getStaticField(_tableId, _keyTuple, 0, _fieldLayout);
|
|
76
|
+
return (address(bytes20(_blob)));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @notice Get value.
|
|
81
|
+
*/
|
|
82
|
+
function get(ResourceId _tableId) internal view returns (address value) {
|
|
83
|
+
bytes32[] memory _keyTuple = new bytes32[](0);
|
|
84
|
+
|
|
85
|
+
bytes32 _blob = StoreSwitch.getStaticField(_tableId, _keyTuple, 0, _fieldLayout);
|
|
86
|
+
return (address(bytes20(_blob)));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @notice Get value.
|
|
91
|
+
*/
|
|
92
|
+
function _get(ResourceId _tableId) internal view returns (address value) {
|
|
93
|
+
bytes32[] memory _keyTuple = new bytes32[](0);
|
|
94
|
+
|
|
95
|
+
bytes32 _blob = StoreCore.getStaticField(_tableId, _keyTuple, 0, _fieldLayout);
|
|
96
|
+
return (address(bytes20(_blob)));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @notice Set value.
|
|
101
|
+
*/
|
|
102
|
+
function setValue(ResourceId _tableId, address value) internal {
|
|
103
|
+
bytes32[] memory _keyTuple = new bytes32[](0);
|
|
104
|
+
|
|
105
|
+
StoreSwitch.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((value)), _fieldLayout);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @notice Set value.
|
|
110
|
+
*/
|
|
111
|
+
function _setValue(ResourceId _tableId, address value) internal {
|
|
112
|
+
bytes32[] memory _keyTuple = new bytes32[](0);
|
|
113
|
+
|
|
114
|
+
StoreCore.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((value)), _fieldLayout);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @notice Set value.
|
|
119
|
+
*/
|
|
120
|
+
function set(ResourceId _tableId, address value) internal {
|
|
121
|
+
bytes32[] memory _keyTuple = new bytes32[](0);
|
|
122
|
+
|
|
123
|
+
StoreSwitch.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((value)), _fieldLayout);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @notice Set value.
|
|
128
|
+
*/
|
|
129
|
+
function _set(ResourceId _tableId, address value) internal {
|
|
130
|
+
bytes32[] memory _keyTuple = new bytes32[](0);
|
|
131
|
+
|
|
132
|
+
StoreCore.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((value)), _fieldLayout);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* @notice Delete all data for given keys.
|
|
137
|
+
*/
|
|
138
|
+
function deleteRecord(ResourceId _tableId) internal {
|
|
139
|
+
bytes32[] memory _keyTuple = new bytes32[](0);
|
|
140
|
+
|
|
141
|
+
StoreSwitch.deleteRecord(_tableId, _keyTuple);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @notice Delete all data for given keys.
|
|
146
|
+
*/
|
|
147
|
+
function _deleteRecord(ResourceId _tableId) internal {
|
|
148
|
+
bytes32[] memory _keyTuple = new bytes32[](0);
|
|
149
|
+
|
|
150
|
+
StoreCore.deleteRecord(_tableId, _keyTuple, _fieldLayout);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @notice Tightly pack static (fixed length) data using this table's schema.
|
|
155
|
+
* @return The static data, encoded into a sequence of bytes.
|
|
156
|
+
*/
|
|
157
|
+
function encodeStatic(address value) internal pure returns (bytes memory) {
|
|
158
|
+
return abi.encodePacked(value);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* @notice Encode all of a record's fields.
|
|
163
|
+
* @return The static (fixed length) data, encoded into a sequence of bytes.
|
|
164
|
+
* @return The lengths of the dynamic fields (packed into a single bytes32 value).
|
|
165
|
+
* @return The dynamic (variable length) data, encoded into a sequence of bytes.
|
|
166
|
+
*/
|
|
167
|
+
function encode(address value) internal pure returns (bytes memory, EncodedLengths, bytes memory) {
|
|
168
|
+
bytes memory _staticData = encodeStatic(value);
|
|
169
|
+
|
|
170
|
+
EncodedLengths _encodedLengths;
|
|
171
|
+
bytes memory _dynamicData;
|
|
172
|
+
|
|
173
|
+
return (_staticData, _encodedLengths, _dynamicData);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* @notice Encode keys as a bytes32 array using this table's field layout.
|
|
178
|
+
*/
|
|
179
|
+
function encodeKeyTuple() internal pure returns (bytes32[] memory) {
|
|
180
|
+
bytes32[] memory _keyTuple = new bytes32[](0);
|
|
181
|
+
|
|
182
|
+
return _keyTuple;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity >=0.8.24;
|
|
3
|
+
|
|
4
|
+
/* Autogenerated file. Do not edit manually. */
|
|
5
|
+
|
|
6
|
+
// Import store internals
|
|
7
|
+
import { IStore } from "@latticexyz/store/src/IStore.sol";
|
|
8
|
+
import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
|
|
9
|
+
import { StoreCore } from "@latticexyz/store/src/StoreCore.sol";
|
|
10
|
+
import { Bytes } from "@latticexyz/store/src/Bytes.sol";
|
|
11
|
+
import { Memory } from "@latticexyz/store/src/Memory.sol";
|
|
12
|
+
import { SliceLib } from "@latticexyz/store/src/Slice.sol";
|
|
13
|
+
import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol";
|
|
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";
|
|
17
|
+
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
|
18
|
+
|
|
19
|
+
library Paused {
|
|
20
|
+
FieldLayout constant _fieldLayout =
|
|
21
|
+
FieldLayout.wrap(0x0001010001000000000000000000000000000000000000000000000000000000);
|
|
22
|
+
|
|
23
|
+
// Hex-encoded key schema of ()
|
|
24
|
+
Schema constant _keySchema = Schema.wrap(0x0000000000000000000000000000000000000000000000000000000000000000);
|
|
25
|
+
// Hex-encoded value schema of (bool)
|
|
26
|
+
Schema constant _valueSchema = Schema.wrap(0x0001010060000000000000000000000000000000000000000000000000000000);
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @notice Get the table's key field names.
|
|
30
|
+
* @return keyNames An array of strings with the names of key fields.
|
|
31
|
+
*/
|
|
32
|
+
function getKeyNames() internal pure returns (string[] memory keyNames) {
|
|
33
|
+
keyNames = new string[](0);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @notice Get the table's value field names.
|
|
38
|
+
* @return fieldNames An array of strings with the names of value fields.
|
|
39
|
+
*/
|
|
40
|
+
function getFieldNames() internal pure returns (string[] memory fieldNames) {
|
|
41
|
+
fieldNames = new string[](1);
|
|
42
|
+
fieldNames[0] = "paused";
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @notice Register the table with its config.
|
|
47
|
+
*/
|
|
48
|
+
function register(ResourceId _tableId) internal {
|
|
49
|
+
StoreSwitch.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @notice Register the table with its config.
|
|
54
|
+
*/
|
|
55
|
+
function _register(ResourceId _tableId) internal {
|
|
56
|
+
StoreCore.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @notice Get paused.
|
|
61
|
+
*/
|
|
62
|
+
function getPaused(ResourceId _tableId) internal view returns (bool paused) {
|
|
63
|
+
bytes32[] memory _keyTuple = new bytes32[](0);
|
|
64
|
+
|
|
65
|
+
bytes32 _blob = StoreSwitch.getStaticField(_tableId, _keyTuple, 0, _fieldLayout);
|
|
66
|
+
return (_toBool(uint8(bytes1(_blob))));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @notice Get paused.
|
|
71
|
+
*/
|
|
72
|
+
function _getPaused(ResourceId _tableId) internal view returns (bool paused) {
|
|
73
|
+
bytes32[] memory _keyTuple = new bytes32[](0);
|
|
74
|
+
|
|
75
|
+
bytes32 _blob = StoreCore.getStaticField(_tableId, _keyTuple, 0, _fieldLayout);
|
|
76
|
+
return (_toBool(uint8(bytes1(_blob))));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @notice Get paused.
|
|
81
|
+
*/
|
|
82
|
+
function get(ResourceId _tableId) internal view returns (bool paused) {
|
|
83
|
+
bytes32[] memory _keyTuple = new bytes32[](0);
|
|
84
|
+
|
|
85
|
+
bytes32 _blob = StoreSwitch.getStaticField(_tableId, _keyTuple, 0, _fieldLayout);
|
|
86
|
+
return (_toBool(uint8(bytes1(_blob))));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @notice Get paused.
|
|
91
|
+
*/
|
|
92
|
+
function _get(ResourceId _tableId) internal view returns (bool paused) {
|
|
93
|
+
bytes32[] memory _keyTuple = new bytes32[](0);
|
|
94
|
+
|
|
95
|
+
bytes32 _blob = StoreCore.getStaticField(_tableId, _keyTuple, 0, _fieldLayout);
|
|
96
|
+
return (_toBool(uint8(bytes1(_blob))));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @notice Set paused.
|
|
101
|
+
*/
|
|
102
|
+
function setPaused(ResourceId _tableId, bool paused) internal {
|
|
103
|
+
bytes32[] memory _keyTuple = new bytes32[](0);
|
|
104
|
+
|
|
105
|
+
StoreSwitch.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((paused)), _fieldLayout);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @notice Set paused.
|
|
110
|
+
*/
|
|
111
|
+
function _setPaused(ResourceId _tableId, bool paused) internal {
|
|
112
|
+
bytes32[] memory _keyTuple = new bytes32[](0);
|
|
113
|
+
|
|
114
|
+
StoreCore.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((paused)), _fieldLayout);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @notice Set paused.
|
|
119
|
+
*/
|
|
120
|
+
function set(ResourceId _tableId, bool paused) internal {
|
|
121
|
+
bytes32[] memory _keyTuple = new bytes32[](0);
|
|
122
|
+
|
|
123
|
+
StoreSwitch.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((paused)), _fieldLayout);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @notice Set paused.
|
|
128
|
+
*/
|
|
129
|
+
function _set(ResourceId _tableId, bool paused) internal {
|
|
130
|
+
bytes32[] memory _keyTuple = new bytes32[](0);
|
|
131
|
+
|
|
132
|
+
StoreCore.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((paused)), _fieldLayout);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* @notice Delete all data for given keys.
|
|
137
|
+
*/
|
|
138
|
+
function deleteRecord(ResourceId _tableId) internal {
|
|
139
|
+
bytes32[] memory _keyTuple = new bytes32[](0);
|
|
140
|
+
|
|
141
|
+
StoreSwitch.deleteRecord(_tableId, _keyTuple);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @notice Delete all data for given keys.
|
|
146
|
+
*/
|
|
147
|
+
function _deleteRecord(ResourceId _tableId) internal {
|
|
148
|
+
bytes32[] memory _keyTuple = new bytes32[](0);
|
|
149
|
+
|
|
150
|
+
StoreCore.deleteRecord(_tableId, _keyTuple, _fieldLayout);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @notice Tightly pack static (fixed length) data using this table's schema.
|
|
155
|
+
* @return The static data, encoded into a sequence of bytes.
|
|
156
|
+
*/
|
|
157
|
+
function encodeStatic(bool paused) internal pure returns (bytes memory) {
|
|
158
|
+
return abi.encodePacked(paused);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* @notice Encode all of a record's fields.
|
|
163
|
+
* @return The static (fixed length) data, encoded into a sequence of bytes.
|
|
164
|
+
* @return The lengths of the dynamic fields (packed into a single bytes32 value).
|
|
165
|
+
* @return The dynamic (variable length) data, encoded into a sequence of bytes.
|
|
166
|
+
*/
|
|
167
|
+
function encode(bool paused) internal pure returns (bytes memory, EncodedLengths, bytes memory) {
|
|
168
|
+
bytes memory _staticData = encodeStatic(paused);
|
|
169
|
+
|
|
170
|
+
EncodedLengths _encodedLengths;
|
|
171
|
+
bytes memory _dynamicData;
|
|
172
|
+
|
|
173
|
+
return (_staticData, _encodedLengths, _dynamicData);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* @notice Encode keys as a bytes32 array using this table's field layout.
|
|
178
|
+
*/
|
|
179
|
+
function encodeKeyTuple() internal pure returns (bytes32[] memory) {
|
|
180
|
+
bytes32[] memory _keyTuple = new bytes32[](0);
|
|
181
|
+
|
|
182
|
+
return _keyTuple;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* @notice Cast a value to a bool.
|
|
188
|
+
* @dev Boolean values are encoded as uint8 (1 = true, 0 = false), but Solidity doesn't allow casting between uint8 and bool.
|
|
189
|
+
* @param value The uint8 value to convert.
|
|
190
|
+
* @return result The boolean value.
|
|
191
|
+
*/
|
|
192
|
+
function _toBool(uint8 value) pure returns (bool result) {
|
|
193
|
+
assembly {
|
|
194
|
+
result := value
|
|
195
|
+
}
|
|
196
|
+
}
|