@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,296 @@
|
|
|
1
|
+
declare const abi: [
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "IS_TEST",
|
|
5
|
+
"inputs": [],
|
|
6
|
+
"outputs": [
|
|
7
|
+
{
|
|
8
|
+
"name": "",
|
|
9
|
+
"type": "bool",
|
|
10
|
+
"internalType": "bool"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"stateMutability": "view"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"type": "function",
|
|
17
|
+
"name": "failed",
|
|
18
|
+
"inputs": [],
|
|
19
|
+
"outputs": [
|
|
20
|
+
{
|
|
21
|
+
"name": "",
|
|
22
|
+
"type": "bool",
|
|
23
|
+
"internalType": "bool"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"stateMutability": "nonpayable"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "event",
|
|
30
|
+
"name": "log",
|
|
31
|
+
"inputs": [
|
|
32
|
+
{
|
|
33
|
+
"name": "",
|
|
34
|
+
"type": "string",
|
|
35
|
+
"indexed": false,
|
|
36
|
+
"internalType": "string"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"anonymous": false
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "event",
|
|
43
|
+
"name": "log_address",
|
|
44
|
+
"inputs": [
|
|
45
|
+
{
|
|
46
|
+
"name": "",
|
|
47
|
+
"type": "address",
|
|
48
|
+
"indexed": false,
|
|
49
|
+
"internalType": "address"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"anonymous": false
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"type": "event",
|
|
56
|
+
"name": "log_bytes",
|
|
57
|
+
"inputs": [
|
|
58
|
+
{
|
|
59
|
+
"name": "",
|
|
60
|
+
"type": "bytes",
|
|
61
|
+
"indexed": false,
|
|
62
|
+
"internalType": "bytes"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"anonymous": false
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"type": "event",
|
|
69
|
+
"name": "log_bytes32",
|
|
70
|
+
"inputs": [
|
|
71
|
+
{
|
|
72
|
+
"name": "",
|
|
73
|
+
"type": "bytes32",
|
|
74
|
+
"indexed": false,
|
|
75
|
+
"internalType": "bytes32"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"anonymous": false
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"type": "event",
|
|
82
|
+
"name": "log_int",
|
|
83
|
+
"inputs": [
|
|
84
|
+
{
|
|
85
|
+
"name": "",
|
|
86
|
+
"type": "int256",
|
|
87
|
+
"indexed": false,
|
|
88
|
+
"internalType": "int256"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"anonymous": false
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"type": "event",
|
|
95
|
+
"name": "log_named_address",
|
|
96
|
+
"inputs": [
|
|
97
|
+
{
|
|
98
|
+
"name": "key",
|
|
99
|
+
"type": "string",
|
|
100
|
+
"indexed": false,
|
|
101
|
+
"internalType": "string"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"name": "val",
|
|
105
|
+
"type": "address",
|
|
106
|
+
"indexed": false,
|
|
107
|
+
"internalType": "address"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"anonymous": false
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"type": "event",
|
|
114
|
+
"name": "log_named_bytes",
|
|
115
|
+
"inputs": [
|
|
116
|
+
{
|
|
117
|
+
"name": "key",
|
|
118
|
+
"type": "string",
|
|
119
|
+
"indexed": false,
|
|
120
|
+
"internalType": "string"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "val",
|
|
124
|
+
"type": "bytes",
|
|
125
|
+
"indexed": false,
|
|
126
|
+
"internalType": "bytes"
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"anonymous": false
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"type": "event",
|
|
133
|
+
"name": "log_named_bytes32",
|
|
134
|
+
"inputs": [
|
|
135
|
+
{
|
|
136
|
+
"name": "key",
|
|
137
|
+
"type": "string",
|
|
138
|
+
"indexed": false,
|
|
139
|
+
"internalType": "string"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "val",
|
|
143
|
+
"type": "bytes32",
|
|
144
|
+
"indexed": false,
|
|
145
|
+
"internalType": "bytes32"
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
"anonymous": false
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"type": "event",
|
|
152
|
+
"name": "log_named_decimal_int",
|
|
153
|
+
"inputs": [
|
|
154
|
+
{
|
|
155
|
+
"name": "key",
|
|
156
|
+
"type": "string",
|
|
157
|
+
"indexed": false,
|
|
158
|
+
"internalType": "string"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"name": "val",
|
|
162
|
+
"type": "int256",
|
|
163
|
+
"indexed": false,
|
|
164
|
+
"internalType": "int256"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"name": "decimals",
|
|
168
|
+
"type": "uint256",
|
|
169
|
+
"indexed": false,
|
|
170
|
+
"internalType": "uint256"
|
|
171
|
+
}
|
|
172
|
+
],
|
|
173
|
+
"anonymous": false
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"type": "event",
|
|
177
|
+
"name": "log_named_decimal_uint",
|
|
178
|
+
"inputs": [
|
|
179
|
+
{
|
|
180
|
+
"name": "key",
|
|
181
|
+
"type": "string",
|
|
182
|
+
"indexed": false,
|
|
183
|
+
"internalType": "string"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"name": "val",
|
|
187
|
+
"type": "uint256",
|
|
188
|
+
"indexed": false,
|
|
189
|
+
"internalType": "uint256"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"name": "decimals",
|
|
193
|
+
"type": "uint256",
|
|
194
|
+
"indexed": false,
|
|
195
|
+
"internalType": "uint256"
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"anonymous": false
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"type": "event",
|
|
202
|
+
"name": "log_named_int",
|
|
203
|
+
"inputs": [
|
|
204
|
+
{
|
|
205
|
+
"name": "key",
|
|
206
|
+
"type": "string",
|
|
207
|
+
"indexed": false,
|
|
208
|
+
"internalType": "string"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"name": "val",
|
|
212
|
+
"type": "int256",
|
|
213
|
+
"indexed": false,
|
|
214
|
+
"internalType": "int256"
|
|
215
|
+
}
|
|
216
|
+
],
|
|
217
|
+
"anonymous": false
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"type": "event",
|
|
221
|
+
"name": "log_named_string",
|
|
222
|
+
"inputs": [
|
|
223
|
+
{
|
|
224
|
+
"name": "key",
|
|
225
|
+
"type": "string",
|
|
226
|
+
"indexed": false,
|
|
227
|
+
"internalType": "string"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"name": "val",
|
|
231
|
+
"type": "string",
|
|
232
|
+
"indexed": false,
|
|
233
|
+
"internalType": "string"
|
|
234
|
+
}
|
|
235
|
+
],
|
|
236
|
+
"anonymous": false
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"type": "event",
|
|
240
|
+
"name": "log_named_uint",
|
|
241
|
+
"inputs": [
|
|
242
|
+
{
|
|
243
|
+
"name": "key",
|
|
244
|
+
"type": "string",
|
|
245
|
+
"indexed": false,
|
|
246
|
+
"internalType": "string"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"name": "val",
|
|
250
|
+
"type": "uint256",
|
|
251
|
+
"indexed": false,
|
|
252
|
+
"internalType": "uint256"
|
|
253
|
+
}
|
|
254
|
+
],
|
|
255
|
+
"anonymous": false
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"type": "event",
|
|
259
|
+
"name": "log_string",
|
|
260
|
+
"inputs": [
|
|
261
|
+
{
|
|
262
|
+
"name": "",
|
|
263
|
+
"type": "string",
|
|
264
|
+
"indexed": false,
|
|
265
|
+
"internalType": "string"
|
|
266
|
+
}
|
|
267
|
+
],
|
|
268
|
+
"anonymous": false
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"type": "event",
|
|
272
|
+
"name": "log_uint",
|
|
273
|
+
"inputs": [
|
|
274
|
+
{
|
|
275
|
+
"name": "",
|
|
276
|
+
"type": "uint256",
|
|
277
|
+
"indexed": false,
|
|
278
|
+
"internalType": "uint256"
|
|
279
|
+
}
|
|
280
|
+
],
|
|
281
|
+
"anonymous": false
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"type": "event",
|
|
285
|
+
"name": "logs",
|
|
286
|
+
"inputs": [
|
|
287
|
+
{
|
|
288
|
+
"name": "",
|
|
289
|
+
"type": "bytes",
|
|
290
|
+
"indexed": false,
|
|
291
|
+
"internalType": "bytes"
|
|
292
|
+
}
|
|
293
|
+
],
|
|
294
|
+
"anonymous": false
|
|
295
|
+
}
|
|
296
|
+
]; export default abi;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"abi":[{"type":"function","name":"IS_TEST","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"failed","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"log","inputs":[{"name":"","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"type":"event","name":"log_address","inputs":[{"name":"","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"log_bytes","inputs":[{"name":"","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"log_bytes32","inputs":[{"name":"","type":"bytes32","indexed":false,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"log_int","inputs":[{"name":"","type":"int256","indexed":false,"internalType":"int256"}],"anonymous":false},{"type":"event","name":"log_named_address","inputs":[{"name":"key","type":"string","indexed":false,"internalType":"string"},{"name":"val","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"log_named_bytes","inputs":[{"name":"key","type":"string","indexed":false,"internalType":"string"},{"name":"val","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"log_named_bytes32","inputs":[{"name":"key","type":"string","indexed":false,"internalType":"string"},{"name":"val","type":"bytes32","indexed":false,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"log_named_decimal_int","inputs":[{"name":"key","type":"string","indexed":false,"internalType":"string"},{"name":"val","type":"int256","indexed":false,"internalType":"int256"},{"name":"decimals","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"log_named_decimal_uint","inputs":[{"name":"key","type":"string","indexed":false,"internalType":"string"},{"name":"val","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"decimals","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"log_named_int","inputs":[{"name":"key","type":"string","indexed":false,"internalType":"string"},{"name":"val","type":"int256","indexed":false,"internalType":"int256"}],"anonymous":false},{"type":"event","name":"log_named_string","inputs":[{"name":"key","type":"string","indexed":false,"internalType":"string"},{"name":"val","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"type":"event","name":"log_named_uint","inputs":[{"name":"key","type":"string","indexed":false,"internalType":"string"},{"name":"val","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"log_string","inputs":[{"name":"","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"type":"event","name":"log_uint","inputs":[{"name":"","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"logs","inputs":[{"name":"","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false}],"bytecode":{"object":"0x60806040526000805460ff1916600117905534801561001d57600080fd5b506102728061002d6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063ba414fa61461003b578063fa7626d414610057575b600080fd5b610043610064565b604051901515815260200160405180910390f35b6000546100439060ff1681565b60008054610100900460ff16156100845750600054610100900460ff1690565b6000737109709ecfa91a80626ff3989d68f67f5b1dd12d3b156101bf5760408051737109709ecfa91a80626ff3989d68f67f5b1dd12d602082018190527f6661696c6564000000000000000000000000000000000000000000000000000082840152825180830384018152606083019093526000929091610129917f667f9d70ca411d70ead50d8d5c22070dafc36ad75f3dcf5e7237b22ade9aecc4916080016101f4565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261016191610230565b6000604051808303816000865af19150503d806000811461019e576040519150601f19603f3d011682016040523d82523d6000602084013e6101a3565b606091505b50915050808060200190518101906101bb9190610243565b9150505b919050565b6000815160005b818110156101e557602081850181015186830152016101cb565b50600093019283525090919050565b7fffffffff0000000000000000000000000000000000000000000000000000000083168152600061022860048301846101c4565b949350505050565b600061023c82846101c4565b9392505050565b60006020828403121561025557600080fd5b8151801515811461023c57600080fdfea164736f6c6343000818000a","sourceMap":"715:19781:102:-:0;;;1572:26;;;-1:-1:-1;;1572:26:102;1594:4;1572:26;;;715:19781;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063ba414fa61461003b578063fa7626d414610057575b600080fd5b610043610064565b604051901515815260200160405180910390f35b6000546100439060ff1681565b60008054610100900460ff16156100845750600054610100900460ff1690565b6000737109709ecfa91a80626ff3989d68f67f5b1dd12d3b156101bf5760408051737109709ecfa91a80626ff3989d68f67f5b1dd12d602082018190527f6661696c6564000000000000000000000000000000000000000000000000000082840152825180830384018152606083019093526000929091610129917f667f9d70ca411d70ead50d8d5c22070dafc36ad75f3dcf5e7237b22ade9aecc4916080016101f4565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261016191610230565b6000604051808303816000865af19150503d806000811461019e576040519150601f19603f3d011682016040523d82523d6000602084013e6101a3565b606091505b50915050808060200190518101906101bb9190610243565b9150505b919050565b6000815160005b818110156101e557602081850181015186830152016101cb565b50600093019283525090919050565b7fffffffff0000000000000000000000000000000000000000000000000000000083168152600061022860048301846101c4565b949350505050565b600061023c82846101c4565b9392505050565b60006020828403121561025557600080fd5b8151801515811461023c57600080fdfea164736f6c6343000818000a","sourceMap":"715:19781:102:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1819:584;;;:::i;:::-;;;179:14:150;;172:22;154:41;;142:2;127:18;1819:584:102;;;;;;;1572:26;;;;;;;;;1819:584;1853:4;1873:7;;;;;;;1869:528;;;-1:-1:-1;1903:7:102;;;;;;;;1819:584::o;1869:528::-;1941:17;2997:42;2985:55;3066:16;1980:374;;2196:43;;;1671:64;2196:43;;;380:74:150;;;2221:17:102;470:18:150;;;463:34;2196:43:102;;;;;;;;;353:18:150;;;2196:43:102;;;-1:-1:-1;;1671:64:102;;2086:175;;2135:34;;2086:175;;;:::i;:::-;;;;;;;;;;;;;;;2047:232;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2020:259;;;2323:7;2312:27;;;;;;;;;;;;:::i;:::-;2297:42;;2002:352;1980:374;2374:12;1819:584;-1:-1:-1;1819:584:102:o;508:322:150:-;549:3;587:5;581:12;611:1;621:128;635:6;632:1;629:13;621:128;;;732:4;717:13;;;713:24;;707:31;694:11;;;687:52;650:12;621:128;;;-1:-1:-1;804:1:150;768:16;;793:13;;;-1:-1:-1;768:16:150;;508:322;-1:-1:-1;508:322:150:o;835:324::-;1032:66;1024:6;1020:79;1015:3;1008:92;990:3;1116:37;1150:1;1145:3;1141:11;1133:6;1116:37;:::i;:::-;1109:44;835:324;-1:-1:-1;;;;835:324:150:o;1164:189::-;1293:3;1318:29;1343:3;1335:6;1318:29;:::i;:::-;1311:36;1164:189;-1:-1:-1;;;1164:189:150:o;1358:277::-;1425:6;1478:2;1466:9;1457:7;1453:23;1449:32;1446:52;;;1494:1;1491;1484:12;1446:52;1526:9;1520:16;1579:5;1572:13;1565:21;1558:5;1555:32;1545:60;;1601:1;1598;1591:12","linkReferences":{}},"methodIdentifiers":{"IS_TEST()":"fa7626d4","failed()":"ba414fa6"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"log\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"log_address\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"log_bytes\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"log_bytes32\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"name\":\"log_int\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"val\",\"type\":\"address\"}],\"name\":\"log_named_address\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"val\",\"type\":\"bytes\"}],\"name\":\"log_named_bytes\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"val\",\"type\":\"bytes32\"}],\"name\":\"log_named_bytes32\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"val\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"decimals\",\"type\":\"uint256\"}],\"name\":\"log_named_decimal_int\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"val\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"decimals\",\"type\":\"uint256\"}],\"name\":\"log_named_decimal_uint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"val\",\"type\":\"int256\"}],\"name\":\"log_named_int\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"val\",\"type\":\"string\"}],\"name\":\"log_named_string\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"val\",\"type\":\"uint256\"}],\"name\":\"log_named_uint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"log_string\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"log_uint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"logs\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"IS_TEST\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"failed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/ds-test/src/test.sol\":\"DSTest\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":3000},\"remappings\":[\":@latticexyz/=node_modules/@latticexyz/\",\":ds-test/=node_modules/ds-test/src/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"node_modules/ds-test/src/test.sol\":{\"keccak256\":\"0x8758531bbac3972efcf1fa46383dbe1d276406fe527bc7abb2f236486278e83b\",\"license\":\"GPL-3.0-or-later\",\"urls\":[\"bzz-raw://1f64264d61506847acf8761e84aff690cebe830958eac00bac7924d8be569240\",\"dweb:/ipfs/QmSekDJvJ82MZAmr63n7YvfLzQ7gS4NLSHPmHL3GN3rw8k\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.24+commit.e11b9ed9"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"string","name":"","type":"string","indexed":false}],"type":"event","name":"log","anonymous":false},{"inputs":[{"internalType":"address","name":"","type":"address","indexed":false}],"type":"event","name":"log_address","anonymous":false},{"inputs":[{"internalType":"bytes","name":"","type":"bytes","indexed":false}],"type":"event","name":"log_bytes","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32","indexed":false}],"type":"event","name":"log_bytes32","anonymous":false},{"inputs":[{"internalType":"int256","name":"","type":"int256","indexed":false}],"type":"event","name":"log_int","anonymous":false},{"inputs":[{"internalType":"string","name":"key","type":"string","indexed":false},{"internalType":"address","name":"val","type":"address","indexed":false}],"type":"event","name":"log_named_address","anonymous":false},{"inputs":[{"internalType":"string","name":"key","type":"string","indexed":false},{"internalType":"bytes","name":"val","type":"bytes","indexed":false}],"type":"event","name":"log_named_bytes","anonymous":false},{"inputs":[{"internalType":"string","name":"key","type":"string","indexed":false},{"internalType":"bytes32","name":"val","type":"bytes32","indexed":false}],"type":"event","name":"log_named_bytes32","anonymous":false},{"inputs":[{"internalType":"string","name":"key","type":"string","indexed":false},{"internalType":"int256","name":"val","type":"int256","indexed":false},{"internalType":"uint256","name":"decimals","type":"uint256","indexed":false}],"type":"event","name":"log_named_decimal_int","anonymous":false},{"inputs":[{"internalType":"string","name":"key","type":"string","indexed":false},{"internalType":"uint256","name":"val","type":"uint256","indexed":false},{"internalType":"uint256","name":"decimals","type":"uint256","indexed":false}],"type":"event","name":"log_named_decimal_uint","anonymous":false},{"inputs":[{"internalType":"string","name":"key","type":"string","indexed":false},{"internalType":"int256","name":"val","type":"int256","indexed":false}],"type":"event","name":"log_named_int","anonymous":false},{"inputs":[{"internalType":"string","name":"key","type":"string","indexed":false},{"internalType":"string","name":"val","type":"string","indexed":false}],"type":"event","name":"log_named_string","anonymous":false},{"inputs":[{"internalType":"string","name":"key","type":"string","indexed":false},{"internalType":"uint256","name":"val","type":"uint256","indexed":false}],"type":"event","name":"log_named_uint","anonymous":false},{"inputs":[{"internalType":"string","name":"","type":"string","indexed":false}],"type":"event","name":"log_string","anonymous":false},{"inputs":[{"internalType":"uint256","name":"","type":"uint256","indexed":false}],"type":"event","name":"log_uint","anonymous":false},{"inputs":[{"internalType":"bytes","name":"","type":"bytes","indexed":false}],"type":"event","name":"logs","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"IS_TEST","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[],"stateMutability":"nonpayable","type":"function","name":"failed","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@latticexyz/=node_modules/@latticexyz/","ds-test/=node_modules/ds-test/src/","forge-std/=node_modules/forge-std/src/"],"optimizer":{"enabled":true,"runs":3000},"metadata":{"bytecodeHash":"none"},"compilationTarget":{"node_modules/ds-test/src/test.sol":"DSTest"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/ds-test/src/test.sol":{"keccak256":"0x8758531bbac3972efcf1fa46383dbe1d276406fe527bc7abb2f236486278e83b","urls":["bzz-raw://1f64264d61506847acf8761e84aff690cebe830958eac00bac7924d8be569240","dweb:/ipfs/QmSekDJvJ82MZAmr63n7YvfLzQ7gS4NLSHPmHL3GN3rw8k"],"license":"GPL-3.0-or-later"}},"version":1},"id":102}
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@latticexyz/world-module-erc20",
|
|
3
|
+
"version": "2.2.13-main-23e6a6c97d94f85e163378148c51f51c900b3f8a",
|
|
4
|
+
"description": "ERC20 world module",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/latticexyz/mud.git",
|
|
8
|
+
"directory": "packages/world-module-erc20"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"type": "module",
|
|
12
|
+
"exports": {
|
|
13
|
+
"./mud.config": "./dist/mud.config.js",
|
|
14
|
+
".": "./dist/index.js",
|
|
15
|
+
"./out/*": "./out/*"
|
|
16
|
+
},
|
|
17
|
+
"typesVersions": {
|
|
18
|
+
"*": {
|
|
19
|
+
"mud.config": [
|
|
20
|
+
"./dist/mud.config.d.ts"
|
|
21
|
+
],
|
|
22
|
+
"module": [
|
|
23
|
+
"./dist/module.d.ts"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"out",
|
|
30
|
+
"src"
|
|
31
|
+
],
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@latticexyz/schema-type": "2.2.13-main-23e6a6c97d94f85e163378148c51f51c900b3f8a",
|
|
34
|
+
"@latticexyz/store": "2.2.13-main-23e6a6c97d94f85e163378148c51f51c900b3f8a",
|
|
35
|
+
"@latticexyz/world": "2.2.13-main-23e6a6c97d94f85e163378148c51f51c900b3f8a"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/node": "^18.15.11",
|
|
39
|
+
"ds-test": "https://github.com/dapphub/ds-test.git#e282159d5170298eb2455a6c05280ab5a73a4ef0",
|
|
40
|
+
"forge-std": "https://github.com/foundry-rs/forge-std.git#74cfb77e308dd188d2f58864aaf44963ae6b88b1",
|
|
41
|
+
"solhint": "^3.3.7",
|
|
42
|
+
"tsup": "^6.7.0",
|
|
43
|
+
"vitest": "0.34.6",
|
|
44
|
+
"@latticexyz/abi-ts": "2.2.13-main-23e6a6c97d94f85e163378148c51f51c900b3f8a",
|
|
45
|
+
"@latticexyz/cli": "2.2.13-main-23e6a6c97d94f85e163378148c51f51c900b3f8a",
|
|
46
|
+
"@latticexyz/gas-report": "2.2.13-main-23e6a6c97d94f85e163378148c51f51c900b3f8a"
|
|
47
|
+
},
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"build": "pnpm run build:mud && pnpm run build:abi && pnpm run build:abi-ts && pnpm run build:js",
|
|
53
|
+
"build:abi": "forge build",
|
|
54
|
+
"build:abi-ts": "abi-ts",
|
|
55
|
+
"build:js": "tsup",
|
|
56
|
+
"build:mud": "mud tablegen",
|
|
57
|
+
"clean": "pnpm run clean:abi && pnpm run clean:js && pnpm run clean:mud",
|
|
58
|
+
"clean:abi": "forge clean",
|
|
59
|
+
"clean:js": "shx rm -rf dist",
|
|
60
|
+
"clean:mud": "shx rm -rf src/**/codegen",
|
|
61
|
+
"dev": "tsup --watch",
|
|
62
|
+
"gas-report": "gas-report --save gas-report.json",
|
|
63
|
+
"lint": "solhint --config ./.solhint.json 'src/**/*.sol'",
|
|
64
|
+
"test": "forge test",
|
|
65
|
+
"test:ci": "pnpm run test"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity >=0.8.24;
|
|
3
|
+
|
|
4
|
+
import { RESOURCE_TABLE } from "@latticexyz/store/src/storeResourceTypes.sol";
|
|
5
|
+
import { ResourceId, WorldResourceIdLib } from "@latticexyz/world/src/WorldResourceId.sol";
|
|
6
|
+
|
|
7
|
+
library ModuleConstants {
|
|
8
|
+
bytes14 internal constant NAMESPACE = "erc20-module";
|
|
9
|
+
bytes16 internal constant REGISTRY_TABLE_NAME = "ERC20_REGISTRY";
|
|
10
|
+
|
|
11
|
+
function namespaceId() internal pure returns (ResourceId) {
|
|
12
|
+
return WorldResourceIdLib.encodeNamespace(NAMESPACE);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function registryTableId() internal pure returns (ResourceId) {
|
|
16
|
+
return WorldResourceIdLib.encode(RESOURCE_TABLE, NAMESPACE, REGISTRY_TABLE_NAME);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
library ERC20TableNames {
|
|
21
|
+
bytes16 internal constant TOTAL_SUPPLY = "TOTAL_SUPPLY";
|
|
22
|
+
|
|
23
|
+
bytes16 internal constant BALANCES = "BALANCES";
|
|
24
|
+
|
|
25
|
+
bytes16 internal constant ALLOWANCES = "ALLOWANCES";
|
|
26
|
+
|
|
27
|
+
bytes16 internal constant METADATA = "METADATA";
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
library OwnableTableNames {
|
|
31
|
+
bytes16 internal constant OWNER = "OWNER";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
library PausableTableNames {
|
|
35
|
+
bytes16 internal constant PAUSED = "PAUSED";
|
|
36
|
+
}
|
package/src/Context.sol
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity >=0.8.24;
|
|
3
|
+
|
|
4
|
+
// @dev Provides information about the current execution context
|
|
5
|
+
// We only use it in these contracts in case we want to extend it in the future
|
|
6
|
+
abstract contract Context {
|
|
7
|
+
function _msgSender() internal view virtual returns (address) {
|
|
8
|
+
return msg.sender;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// Adapted from OpenZeppelin's [ERC20Burnable extension](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/f989fff93168606c726bc5e831ef50dd6e543f45/contracts/token/ERC20/extensions/ERC20Burnable.sol)
|
|
3
|
+
pragma solidity >=0.8.24;
|
|
4
|
+
|
|
5
|
+
import { MUDERC20 } from "./MUDERC20.sol";
|
|
6
|
+
|
|
7
|
+
abstract contract ERC20Burnable is MUDERC20 {
|
|
8
|
+
function burn(uint256 value) public virtual {
|
|
9
|
+
_burn(_msgSender(), value);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function burnFrom(address account, uint256 value) public virtual {
|
|
13
|
+
_spendAllowance(account, _msgSender(), value);
|
|
14
|
+
_burn(account, value);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity >=0.8.24;
|
|
3
|
+
|
|
4
|
+
import { ResourceIds } from "@latticexyz/store/src/codegen/tables/ResourceIds.sol";
|
|
5
|
+
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
|
6
|
+
|
|
7
|
+
import { Module } from "@latticexyz/world/src/Module.sol";
|
|
8
|
+
import { WorldResourceIdLib } from "@latticexyz/world/src/WorldResourceId.sol";
|
|
9
|
+
import { IBaseWorld } from "@latticexyz/world/src/codegen/interfaces/IBaseWorld.sol";
|
|
10
|
+
import { revertWithBytes } from "@latticexyz/world/src/revertWithBytes.sol";
|
|
11
|
+
|
|
12
|
+
import { ERC20Registry } from "./codegen/tables/ERC20Registry.sol";
|
|
13
|
+
import { ERC20WithWorld } from "./examples/ERC20WithWorld.sol";
|
|
14
|
+
import { ModuleConstants } from "./Constants.sol";
|
|
15
|
+
|
|
16
|
+
contract ERC20Module is Module {
|
|
17
|
+
error ERC20Module_InvalidNamespace(bytes14 namespace);
|
|
18
|
+
error ERC20Module_NamespaceAlreadyExists(bytes14 namespace);
|
|
19
|
+
|
|
20
|
+
ERC20RegistryLib public immutable registryLib = new ERC20RegistryLib();
|
|
21
|
+
|
|
22
|
+
function install(bytes memory encodedArgs) public {
|
|
23
|
+
// TODO: we should probably check just for namespace, not for all args
|
|
24
|
+
requireNotInstalled(__self, encodedArgs);
|
|
25
|
+
|
|
26
|
+
(bytes14 namespace, string memory name, string memory symbol) = abi.decode(encodedArgs, (bytes14, string, string));
|
|
27
|
+
|
|
28
|
+
ResourceId namespaceId = WorldResourceIdLib.encodeNamespace(namespace);
|
|
29
|
+
|
|
30
|
+
// Require the namespace to not be the module's namespace
|
|
31
|
+
if (namespace == ModuleConstants.NAMESPACE) {
|
|
32
|
+
revert ERC20Module_InvalidNamespace(namespace);
|
|
33
|
+
} else if (ResourceIds.getExists(namespaceId)) {
|
|
34
|
+
revert ERC20Module_NamespaceAlreadyExists(namespace);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
IBaseWorld world = IBaseWorld(_world());
|
|
38
|
+
|
|
39
|
+
ERC20WithWorld token = new ERC20WithWorld(world, namespace, name, symbol);
|
|
40
|
+
|
|
41
|
+
// Grant access to the token so it can write to tables after transferring ownership
|
|
42
|
+
world.grantAccess(namespaceId, address(token));
|
|
43
|
+
|
|
44
|
+
// The token should have transferred the namespace ownership to this module in its constructor
|
|
45
|
+
world.transferOwnership(namespaceId, _msgSender());
|
|
46
|
+
|
|
47
|
+
registryLib.delegateRegister(world, namespaceId, address(token));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function installRoot(bytes memory) public pure {
|
|
51
|
+
revert Module_RootInstallNotSupported();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
contract ERC20RegistryLib {
|
|
56
|
+
function register(IBaseWorld world, ResourceId namespaceId, address token) public {
|
|
57
|
+
ResourceId erc20RegistryTableId = ModuleConstants.registryTableId();
|
|
58
|
+
if (!ResourceIds.getExists(erc20RegistryTableId)) {
|
|
59
|
+
world.registerNamespace(ModuleConstants.namespaceId());
|
|
60
|
+
ERC20Registry.register(erc20RegistryTableId);
|
|
61
|
+
}
|
|
62
|
+
// Register the ERC20 in the ERC20Registry
|
|
63
|
+
ERC20Registry.set(erc20RegistryTableId, namespaceId, address(token));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function delegateRegister(ERC20RegistryLib lib, IBaseWorld world, ResourceId namespaceId, address token) {
|
|
68
|
+
(bool success, bytes memory returnData) = address(lib).delegatecall(
|
|
69
|
+
abi.encodeCall(ERC20RegistryLib.register, (world, namespaceId, token))
|
|
70
|
+
);
|
|
71
|
+
if (!success) revertWithBytes(returnData);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
using { delegateRegister } for ERC20RegistryLib;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// Adapted from OpenZeppelin's [ERC20Pausable extenstion](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/f989fff93168606c726bc5e831ef50dd6e543f45/contracts/token/ERC20/extensions/ERC20Pausable.sol)
|
|
3
|
+
pragma solidity >=0.8.24;
|
|
4
|
+
|
|
5
|
+
import { Pausable } from "./Pausable.sol";
|
|
6
|
+
import { MUDERC20 } from "./MUDERC20.sol";
|
|
7
|
+
|
|
8
|
+
abstract contract ERC20Pausable is MUDERC20, Pausable {
|
|
9
|
+
function _update(address from, address to, uint256 value) internal virtual override whenNotPaused {
|
|
10
|
+
super._update(from, to, value);
|
|
11
|
+
}
|
|
12
|
+
}
|