@etherisc/gif-next 0.0.2-e6a90b9 → 0.0.2-e875d61-189
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +148 -7
- package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +4 -0
- package/artifacts/contracts/components/{IPool.sol/IPoolComponent.json → BaseComponent.sol/BaseComponent.json} +55 -60
- package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +4 -0
- package/artifacts/contracts/{instance/component/IComponent.sol/IComponentContract.json → components/IBaseComponent.sol/IBaseComponent.json} +54 -59
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +4 -0
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +356 -0
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +4 -0
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +279 -0
- package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/components/Pool.sol/Pool.json +295 -35
- package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/components/Product.sol/Product.json +196 -61
- package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +1 -1
- package/artifacts/contracts/experiment/errors/Require.sol/Require.json +2 -2
- package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +1 -1
- package/artifacts/contracts/experiment/errors/Revert.sol/Revert.json +2 -2
- package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/A.sol/A.json +2 -2
- package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/A.sol/AShared.json +2 -2
- package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +4 -0
- package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +59 -0
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +4 -0
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.json +124 -0
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +4 -0
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.json +74 -0
- package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +4 -0
- package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +124 -0
- package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +4 -0
- package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +207 -0
- package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +1 -1
- package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.json +2 -2
- package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +1 -1
- package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.json +2 -2
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +1255 -278
- package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.dbg.json +4 -0
- package/artifacts/contracts/instance/{component/IComponent.sol → IInstanceLinked.sol}/IInstanceLinked.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +1594 -388
- package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +4 -0
- package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.json +300 -0
- package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +4 -0
- package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +81 -0
- package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +4 -0
- package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.json +560 -0
- package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +4 -0
- package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.json +115 -0
- package/artifacts/contracts/instance/base/IService.sol/IService.dbg.json +4 -0
- package/artifacts/contracts/instance/base/IService.sol/IService.json +300 -0
- package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.dbg.json +4 -0
- package/artifacts/contracts/instance/{component/ComponentModule.sol/ComponentModule.json → base/InstanceBase.sol/InstanceBase.json} +157 -140
- package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +4 -0
- package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +710 -0
- package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +4 -0
- package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +169 -0
- package/artifacts/contracts/instance/base/ModuleBase.sol/ModuleBase.dbg.json +4 -0
- package/artifacts/contracts/instance/base/ModuleBase.sol/ModuleBase.json +10 -0
- package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.dbg.json +4 -0
- package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.json +300 -0
- package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.dbg.json +4 -0
- package/artifacts/contracts/instance/{access → module/access}/Access.sol/AccessModule.json +85 -152
- package/artifacts/contracts/instance/module/access/IAccess.sol/IAccess.dbg.json +4 -0
- package/artifacts/contracts/instance/{access → module/access}/IAccess.sol/IAccess.json +1 -1
- package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.dbg.json +4 -0
- package/artifacts/contracts/instance/{access → module/access}/IAccess.sol/IAccessModule.json +96 -99
- package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.json +265 -0
- package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.dbg.json +4 -0
- package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.json +10 -0
- package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.json +265 -0
- package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.json +10 -0
- package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensation.dbg.json +4 -0
- package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensation.json +10 -0
- package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensationModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensationModule.json +10 -0
- package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.json +136 -0
- package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.dbg.json +4 -0
- package/artifacts/contracts/instance/{component → module/component}/IComponent.sol/IComponent.json +1 -1
- package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.json +136 -0
- package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicy.dbg.json +4 -0
- package/artifacts/contracts/instance/{policy → module/policy}/IPolicy.sol/IPolicy.json +1 -1
- package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.dbg.json +4 -0
- package/artifacts/contracts/instance/{policy → module/policy}/IPolicy.sol/IPolicyModule.json +147 -105
- package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.dbg.json +4 -0
- package/artifacts/contracts/instance/{policy → module/policy}/PolicyModule.sol/PolicyModule.json +147 -105
- package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.dbg.json +4 -0
- package/artifacts/contracts/instance/{pool → module/pool}/IPoolModule.sol/IPool.json +1 -1
- package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.json +144 -0
- package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.json +144 -0
- package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.dbg.json +4 -0
- package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.json +10 -0
- package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.json +10 -0
- package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.json +10 -0
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.dbg.json +4 -0
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.json +10 -0
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.json +531 -0
- package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.dbg.json +4 -0
- package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.json +76 -0
- package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.json +531 -0
- package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +523 -0
- package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.json +364 -0
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +376 -0
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +477 -0
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +471 -0
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +673 -0
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +65 -2
- package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +115 -89
- package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.dbg.json +4 -0
- package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.json +24 -0
- package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.json +244 -77
- package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +4 -0
- package/artifacts/contracts/shared/ERC165.sol/ERC165.json +35 -0
- package/artifacts/contracts/shared/IOwnable.sol/IOwnable.dbg.json +4 -0
- package/artifacts/contracts/{registry/IRegistry.sol → shared/IOwnable.sol}/IOwnable.json +1 -1
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +4 -0
- package/artifacts/contracts/{registry/IRegistry.sol → shared/IRegisterable.sol}/IRegisterable.json +22 -67
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +4 -0
- package/artifacts/contracts/{instance/pool/IPoolModule.sol/IPoolModule.json → shared/IVersionable.sol/IVersionable.json} +75 -60
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +4 -0
- package/artifacts/contracts/{registry/Registry.sol → shared/Registerable.sol}/Registerable.json +23 -68
- package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +4 -0
- package/artifacts/contracts/{instance/pool/PoolModule.sol/PoolModule.json → shared/Versionable.sol/Versionable.json} +72 -70
- package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +4 -0
- package/artifacts/contracts/test/TestFee.sol/TestFee.json +119 -0
- package/artifacts/contracts/test/TestPool.sol/TestPool.dbg.json +4 -0
- package/artifacts/contracts/test/TestPool.sol/TestPool.json +455 -0
- package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +4 -0
- package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +436 -0
- package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +4 -0
- package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +137 -0
- package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +4 -0
- package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +116 -0
- package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +4 -0
- package/artifacts/contracts/test/TestService.sol/TestService.json +379 -0
- package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +4 -0
- package/artifacts/contracts/test/TestToken.sol/TestUsdc.json +338 -0
- package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +4 -0
- package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +218 -0
- package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +4 -0
- package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +206 -0
- package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +4 -0
- package/artifacts/contracts/test/Usdc.sol/USDC.json +338 -0
- package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +4 -0
- package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.json +10 -0
- package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +4 -0
- package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.json +174 -0
- package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/ChainId.sol/ChainIdLib.json +2 -2
- package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +4 -0
- package/artifacts/contracts/types/Fee.sol/FeeLib.json +218 -0
- package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +4 -0
- package/artifacts/contracts/types/Key32.sol/Key32Lib.json +111 -0
- package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/NftId.sol/NftIdLib.json +148 -5
- package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +4 -0
- package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +10 -0
- package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +4 -0
- package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +92 -0
- package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +30 -0
- package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/StateId.sol/StateIdLib.json +92 -0
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +4 -0
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +236 -0
- package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +4 -0
- package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +479 -0
- package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +4 -0
- package/artifacts/contracts/types/Version.sol/VersionLib.json +139 -0
- package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +4 -0
- package/artifacts/contracts/types/Version.sol/VersionPartLib.json +30 -0
- package/contracts/components/BaseComponent.sol +94 -0
- package/contracts/components/IBaseComponent.sol +19 -0
- package/contracts/components/IPoolComponent.sol +57 -0
- package/contracts/components/IProductComponent.sol +19 -0
- package/contracts/components/Pool.sol +178 -16
- package/contracts/components/Product.sol +99 -30
- package/contracts/experiment/errors/Require.sol +10 -5
- package/contracts/experiment/errors/Revert.sol +13 -8
- package/contracts/experiment/inheritance/A.sol +8 -11
- package/contracts/experiment/inheritance/B.sol +10 -5
- package/contracts/experiment/inheritance/C.sol +11 -5
- package/contracts/experiment/inheritance/IA.sol +2 -7
- package/contracts/experiment/inheritance/IB.sol +3 -2
- package/contracts/experiment/inheritance/IC.sol +4 -3
- package/contracts/experiment/statemachine/Dummy.sol +27 -0
- package/contracts/experiment/statemachine/ISM.sol +25 -0
- package/contracts/experiment/statemachine/README.md +112 -0
- package/contracts/experiment/statemachine/SM.sol +57 -0
- package/contracts/experiment/statemachine/SimpleStateMachine.sol +31 -0
- package/contracts/experiment/types/TypeA.sol +14 -9
- package/contracts/experiment/types/TypeB.sol +14 -9
- package/contracts/instance/IInstance.sol +38 -8
- package/contracts/instance/IInstanceLinked.sol +8 -0
- package/contracts/instance/Instance.sol +51 -43
- package/contracts/instance/base/ComponentServiceBase.sol +42 -0
- package/contracts/instance/base/IInstanceBase.sol +19 -0
- package/contracts/instance/base/IKeyValueStore.sol +50 -0
- package/contracts/instance/base/ILifecycle.sol +30 -0
- package/contracts/instance/base/IService.sol +15 -0
- package/contracts/instance/base/InstanceBase.sol +84 -0
- package/contracts/instance/base/KeyValueStore.sol +161 -0
- package/contracts/instance/base/Lifecycle.sol +92 -0
- package/contracts/instance/base/ModuleBase.sol +46 -0
- package/contracts/instance/base/ServiceBase.sol +37 -0
- package/contracts/instance/module/access/Access.sol +149 -0
- package/contracts/instance/module/access/IAccess.sol +53 -0
- package/contracts/instance/module/bundle/BundleModule.sol +135 -0
- package/contracts/instance/module/bundle/IBundle.sol +51 -0
- package/contracts/instance/module/compensation/CompensationModule.sol +17 -0
- package/contracts/instance/module/compensation/ICompensation.sol +10 -0
- package/contracts/instance/module/component/ComponentModule.sol +81 -0
- package/contracts/instance/module/component/IComponent.sol +29 -0
- package/contracts/instance/module/policy/IPolicy.sol +59 -0
- package/contracts/instance/module/policy/PolicyModule.sol +89 -0
- package/contracts/instance/module/pool/IPoolModule.sol +40 -0
- package/contracts/instance/module/pool/PoolModule.sol +90 -0
- package/contracts/instance/module/risk/IRisk.sol +10 -0
- package/contracts/instance/module/risk/RiskModule.sol +17 -0
- package/contracts/instance/module/treasury/ITreasury.sol +96 -0
- package/contracts/instance/module/treasury/TokenHandler.sol +48 -0
- package/contracts/instance/module/treasury/TreasuryModule.sol +171 -0
- package/contracts/instance/service/ComponentOwnerService.sol +155 -0
- package/contracts/instance/service/IComponentOwnerService.sol +22 -0
- package/contracts/instance/service/IPoolService.sol +30 -0
- package/contracts/instance/service/IProductService.sol +58 -0
- package/contracts/instance/service/PoolService.sol +129 -0
- package/contracts/instance/service/ProductService.sol +366 -0
- package/contracts/registry/ChainNft.sol +80 -94
- package/contracts/registry/IChainNft.sol +10 -7
- package/contracts/registry/IRegistry.sol +40 -51
- package/contracts/registry/IRegistryLinked.sol +8 -0
- package/contracts/registry/Registry.sol +312 -107
- package/contracts/shared/ERC165.sol +21 -0
- package/contracts/shared/IOwnable.sol +6 -0
- package/contracts/shared/IRegisterable.sol +24 -0
- package/contracts/shared/IVersionable.sol +52 -0
- package/contracts/shared/Registerable.sol +86 -0
- package/contracts/shared/Versionable.sol +89 -0
- package/contracts/test/TestFee.sol +25 -0
- package/contracts/test/TestPool.sol +24 -0
- package/contracts/test/TestProduct.sol +51 -0
- package/contracts/test/TestRegisterable.sol +19 -0
- package/contracts/test/TestRoleId.sol +14 -0
- package/contracts/test/TestService.sol +32 -0
- package/contracts/test/TestToken.sol +26 -0
- package/contracts/test/TestVersion.sol +44 -0
- package/contracts/test/TestVersionable.sol +17 -0
- package/contracts/test/Usdc.sol +26 -0
- package/contracts/types/AddressSet.sol +58 -0
- package/contracts/types/Blocknumber.sol +118 -0
- package/contracts/types/ChainId.sol +24 -10
- package/contracts/types/Fee.sol +51 -0
- package/contracts/types/Key32.sol +45 -0
- package/contracts/types/NftId.sol +55 -8
- package/contracts/types/NftIdSet.sol +60 -0
- package/contracts/types/ObjectType.sol +123 -0
- package/contracts/types/RoleId.sol +38 -0
- package/contracts/types/StateId.sol +101 -0
- package/contracts/types/Timestamp.sol +123 -0
- package/contracts/types/UFixed.sol +209 -0
- package/contracts/types/Version.sol +95 -0
- package/package.json +19 -5
- package/artifacts/contracts/components/Component.sol/Component.dbg.json +0 -4
- package/artifacts/contracts/components/Component.sol/Component.json +0 -179
- package/artifacts/contracts/components/Component.sol/InstanceLinked.dbg.json +0 -4
- package/artifacts/contracts/components/Component.sol/InstanceLinked.json +0 -35
- package/artifacts/contracts/components/IPool.sol/IPoolComponent.dbg.json +0 -4
- package/artifacts/contracts/components/IProduct.sol/IProductComponent.dbg.json +0 -4
- package/artifacts/contracts/components/IProduct.sol/IProductComponent.json +0 -192
- package/artifacts/contracts/instance/access/Access.sol/AccessModule.dbg.json +0 -4
- package/artifacts/contracts/instance/access/IAccess.sol/IAccess.dbg.json +0 -4
- package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.dbg.json +0 -4
- package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.json +0 -35
- package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.dbg.json +0 -4
- package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.json +0 -50
- package/artifacts/contracts/instance/access/IAccess.sol/IAccessModule.dbg.json +0 -4
- package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.dbg.json +0 -4
- package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.dbg.json +0 -4
- package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.json +0 -105
- package/artifacts/contracts/instance/component/IComponent.sol/IComponent.dbg.json +0 -4
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.dbg.json +0 -4
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.dbg.json +0 -4
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.json +0 -245
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.dbg.json +0 -4
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.json +0 -94
- package/artifacts/contracts/instance/component/IComponent.sol/IInstanceLinked.dbg.json +0 -4
- package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicy.dbg.json +0 -4
- package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.dbg.json +0 -4
- package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.dbg.json +0 -4
- package/artifacts/contracts/instance/pool/IPoolModule.sol/IPool.dbg.json +0 -4
- package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.dbg.json +0 -4
- package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.dbg.json +0 -4
- package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.dbg.json +0 -4
- package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.json +0 -75
- package/artifacts/contracts/instance/product/IProductService.sol/IProductService.dbg.json +0 -4
- package/artifacts/contracts/instance/product/IProductService.sol/IProductService.json +0 -114
- package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.dbg.json +0 -4
- package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.json +0 -75
- package/artifacts/contracts/instance/product/ProductService.sol/ProductService.dbg.json +0 -4
- package/artifacts/contracts/instance/product/ProductService.sol/ProductService.json +0 -125
- package/artifacts/contracts/registry/IRegistry.sol/IOwnable.dbg.json +0 -4
- package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.dbg.json +0 -4
- package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.dbg.json +0 -4
- package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.json +0 -49
- package/artifacts/contracts/registry/Registry.sol/Registerable.dbg.json +0 -4
- package/artifacts/contracts/registry/Registry.sol/RegistryLinked.dbg.json +0 -4
- package/artifacts/contracts/registry/Registry.sol/RegistryLinked.json +0 -60
- package/contracts/components/Component.sol +0 -62
- package/contracts/components/IPool.sol +0 -9
- package/contracts/components/IProduct.sol +0 -11
- package/contracts/instance/access/Access.sol +0 -218
- package/contracts/instance/access/IAccess.sol +0 -83
- package/contracts/instance/component/ComponentModule.sol +0 -246
- package/contracts/instance/component/IComponent.sol +0 -94
- package/contracts/instance/policy/IPolicy.sol +0 -66
- package/contracts/instance/policy/PolicyModule.sol +0 -106
- package/contracts/instance/pool/IPoolModule.sol +0 -40
- package/contracts/instance/pool/PoolModule.sol +0 -83
- package/contracts/instance/product/IProductService.sol +0 -45
- package/contracts/instance/product/ProductService.sol +0 -105
@@ -0,0 +1,209 @@
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
2
|
+
pragma solidity ^0.8.19;
|
3
|
+
|
4
|
+
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
|
5
|
+
|
6
|
+
/// @dev UFixed is a fixed point number with 18 decimals precision.
|
7
|
+
type UFixed is uint256;
|
8
|
+
|
9
|
+
using {
|
10
|
+
addUFixed as +,
|
11
|
+
subUFixed as -,
|
12
|
+
mulUFixed as *,
|
13
|
+
divUFixed as /,
|
14
|
+
gtUFixed as >,
|
15
|
+
gteUFixed as >=,
|
16
|
+
ltUFixed as <,
|
17
|
+
lteUFixed as <=,
|
18
|
+
eqUFixed as ==,
|
19
|
+
UFixedMathLib.toInt
|
20
|
+
} for UFixed global;
|
21
|
+
|
22
|
+
function addUFixed(UFixed a, UFixed b) pure returns (UFixed) {
|
23
|
+
return UFixed.wrap(UFixed.unwrap(a) + UFixed.unwrap(b));
|
24
|
+
}
|
25
|
+
|
26
|
+
function subUFixed(UFixed a, UFixed b) pure returns (UFixed) {
|
27
|
+
require(a >= b, "ERROR:UFM-010:NEGATIVE_RESULT");
|
28
|
+
return UFixed.wrap(UFixed.unwrap(a) - UFixed.unwrap(b));
|
29
|
+
}
|
30
|
+
|
31
|
+
function mulUFixed(UFixed a, UFixed b) pure returns (UFixed) {
|
32
|
+
return
|
33
|
+
UFixed.wrap(Math.mulDiv(UFixed.unwrap(a), UFixed.unwrap(b), 10 ** 18));
|
34
|
+
}
|
35
|
+
|
36
|
+
function divUFixed(UFixed a, UFixed b) pure returns (UFixed) {
|
37
|
+
require(UFixed.unwrap(b) > 0, "ERROR:UFM-020:DIVISOR_ZERO");
|
38
|
+
|
39
|
+
return
|
40
|
+
UFixed.wrap(Math.mulDiv(UFixed.unwrap(a), 10 ** 18, UFixed.unwrap(b)));
|
41
|
+
}
|
42
|
+
|
43
|
+
function gtUFixed(UFixed a, UFixed b) pure returns (bool isGreaterThan) {
|
44
|
+
return UFixed.unwrap(a) > UFixed.unwrap(b);
|
45
|
+
}
|
46
|
+
|
47
|
+
function gteUFixed(UFixed a, UFixed b) pure returns (bool isGreaterThan) {
|
48
|
+
return UFixed.unwrap(a) >= UFixed.unwrap(b);
|
49
|
+
}
|
50
|
+
|
51
|
+
function ltUFixed(UFixed a, UFixed b) pure returns (bool isGreaterThan) {
|
52
|
+
return UFixed.unwrap(a) < UFixed.unwrap(b);
|
53
|
+
}
|
54
|
+
|
55
|
+
function lteUFixed(UFixed a, UFixed b) pure returns (bool isGreaterThan) {
|
56
|
+
return UFixed.unwrap(a) <= UFixed.unwrap(b);
|
57
|
+
}
|
58
|
+
|
59
|
+
function eqUFixed(UFixed a, UFixed b) pure returns (bool isEqual) {
|
60
|
+
return UFixed.unwrap(a) == UFixed.unwrap(b);
|
61
|
+
}
|
62
|
+
|
63
|
+
function gtzUFixed(UFixed a) pure returns (bool isZero) {
|
64
|
+
return UFixed.unwrap(a) > 0;
|
65
|
+
}
|
66
|
+
|
67
|
+
function eqzUFixed(UFixed a) pure returns (bool isZero) {
|
68
|
+
return UFixed.unwrap(a) == 0;
|
69
|
+
}
|
70
|
+
|
71
|
+
function deltaUFixed(UFixed a, UFixed b) pure returns (UFixed) {
|
72
|
+
if (a > b) {
|
73
|
+
return a - b;
|
74
|
+
}
|
75
|
+
|
76
|
+
return b - a;
|
77
|
+
}
|
78
|
+
|
79
|
+
library UFixedMathLib {
|
80
|
+
int8 public constant EXP = 18;
|
81
|
+
uint256 public constant MULTIPLIER = 10 ** uint256(int256(EXP));
|
82
|
+
uint256 public constant MULTIPLIER_HALF = MULTIPLIER / 2;
|
83
|
+
|
84
|
+
/// @dev returns the rounding mode DOWN - 0.4 becomes 0, 0.5 becomes 0, 0.6 becomes 0
|
85
|
+
function ROUNDING_DOWN() public pure returns (uint8) {
|
86
|
+
return uint8(0);
|
87
|
+
}
|
88
|
+
|
89
|
+
/// @dev returns the rounding mode UP - 0.4 becomes 1, 0.5 becomes 1, 0.6 becomes 1
|
90
|
+
function ROUNDING_UP() public pure returns (uint8) {
|
91
|
+
return uint8(1);
|
92
|
+
}
|
93
|
+
|
94
|
+
/// @dev returns the rounding mode HALF_UP - 0.4 becomes 0, 0.5 becomes 1, 0.6 becomes 1
|
95
|
+
function ROUNDING_HALF_UP() public pure returns (uint8) {
|
96
|
+
return uint8(2);
|
97
|
+
}
|
98
|
+
|
99
|
+
/// @dev Converts the uint256 to a UFixed.
|
100
|
+
function toUFixed(uint256 a) public pure returns (UFixed) {
|
101
|
+
return UFixed.wrap(a * MULTIPLIER);
|
102
|
+
}
|
103
|
+
|
104
|
+
/// @dev Converts the uint256 to a UFixed with given exponent.
|
105
|
+
function toUFixed(uint256 a, int8 exp) public pure returns (UFixed) {
|
106
|
+
require(EXP + exp >= 0, "ERROR:FM-010:EXPONENT_TOO_SMALL");
|
107
|
+
require(EXP + exp <= 64, "ERROR:FM-011:EXPONENT_TOO_LARGE");
|
108
|
+
|
109
|
+
return UFixed.wrap(a * 10 ** uint8(EXP + exp));
|
110
|
+
}
|
111
|
+
|
112
|
+
/// @dev returns the decimals precision of the UFixed type
|
113
|
+
function decimals() public pure returns (uint256) {
|
114
|
+
return uint8(EXP);
|
115
|
+
}
|
116
|
+
|
117
|
+
/// @dev Converts a UFixed to a uint256.
|
118
|
+
function toInt(UFixed a) public pure returns (uint256) {
|
119
|
+
return toIntWithRounding(a, ROUNDING_HALF_UP());
|
120
|
+
}
|
121
|
+
|
122
|
+
/// @dev Converts a UFixed to a uint256 with given rounding mode.
|
123
|
+
function toIntWithRounding(UFixed a, uint8 rounding) public pure returns (uint256) {
|
124
|
+
if (rounding == ROUNDING_HALF_UP()) {
|
125
|
+
return
|
126
|
+
Math.mulDiv(
|
127
|
+
UFixed.unwrap(a) + MULTIPLIER_HALF,
|
128
|
+
1,
|
129
|
+
MULTIPLIER,
|
130
|
+
Math.Rounding.Down
|
131
|
+
);
|
132
|
+
} else if (rounding == ROUNDING_DOWN()) {
|
133
|
+
return
|
134
|
+
Math.mulDiv(
|
135
|
+
UFixed.unwrap(a),
|
136
|
+
1,
|
137
|
+
MULTIPLIER,
|
138
|
+
Math.Rounding.Down
|
139
|
+
);
|
140
|
+
} else {
|
141
|
+
return
|
142
|
+
Math.mulDiv(UFixed.unwrap(a), 1, MULTIPLIER, Math.Rounding.Up);
|
143
|
+
}
|
144
|
+
}
|
145
|
+
|
146
|
+
/// @dev adds two UFixed numbers
|
147
|
+
function add(UFixed a, UFixed b) public pure returns (UFixed) {
|
148
|
+
return addUFixed(a, b);
|
149
|
+
}
|
150
|
+
|
151
|
+
/// @dev subtracts two UFixed numbers
|
152
|
+
function sub(UFixed a, UFixed b) public pure returns (UFixed) {
|
153
|
+
return subUFixed(a, b);
|
154
|
+
}
|
155
|
+
|
156
|
+
/// @dev multiplies two UFixed numbers
|
157
|
+
function mul(UFixed a, UFixed b) public pure returns (UFixed) {
|
158
|
+
return mulUFixed(a, b);
|
159
|
+
}
|
160
|
+
|
161
|
+
/// @dev divides two UFixed numbers
|
162
|
+
function div(UFixed a, UFixed b) public pure returns (UFixed) {
|
163
|
+
return divUFixed(a, b);
|
164
|
+
}
|
165
|
+
|
166
|
+
/// @dev return true if UFixed a is greater than UFixed b
|
167
|
+
function gt(UFixed a, UFixed b) public pure returns (bool isGreaterThan) {
|
168
|
+
return gtUFixed(a, b);
|
169
|
+
}
|
170
|
+
|
171
|
+
/// @dev return true if UFixed a is greater than or equal to UFixed b
|
172
|
+
function gte(UFixed a, UFixed b) public pure returns (bool isGreaterThan) {
|
173
|
+
return gteUFixed(a, b);
|
174
|
+
}
|
175
|
+
|
176
|
+
/// @dev return true if UFixed a is less than UFixed b
|
177
|
+
function lt(UFixed a, UFixed b) public pure returns (bool isGreaterThan) {
|
178
|
+
return ltUFixed(a, b);
|
179
|
+
}
|
180
|
+
|
181
|
+
/// @dev return true if UFixed a is less than or equal to UFixed b
|
182
|
+
function lte(UFixed a, UFixed b) public pure returns (bool isGreaterThan) {
|
183
|
+
return lteUFixed(a, b);
|
184
|
+
}
|
185
|
+
|
186
|
+
/// @dev return true if UFixed a is equal to UFixed b
|
187
|
+
function eq(UFixed a, UFixed b) public pure returns (bool isEqual) {
|
188
|
+
return eqUFixed(a, b);
|
189
|
+
}
|
190
|
+
|
191
|
+
/// @dev return true if UFixed a is not zero
|
192
|
+
function gtz(UFixed a) public pure returns (bool isZero) {
|
193
|
+
return gtzUFixed(a);
|
194
|
+
}
|
195
|
+
|
196
|
+
/// @dev return true if UFixed a is zero
|
197
|
+
function eqz(UFixed a) public pure returns (bool isZero) {
|
198
|
+
return eqzUFixed(a);
|
199
|
+
}
|
200
|
+
|
201
|
+
function zero() public pure returns (UFixed) {
|
202
|
+
return UFixed.wrap(0);
|
203
|
+
}
|
204
|
+
|
205
|
+
/// @dev return the absolute delta between two UFixed numbers
|
206
|
+
function delta(UFixed a, UFixed b) public pure returns (UFixed) {
|
207
|
+
return deltaUFixed(a, b);
|
208
|
+
}
|
209
|
+
}
|
@@ -0,0 +1,95 @@
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
2
|
+
pragma solidity ^0.8.19;
|
3
|
+
|
4
|
+
type VersionPart is uint8;
|
5
|
+
|
6
|
+
using {
|
7
|
+
versionPartGt as >,
|
8
|
+
versionPartEq as ==,
|
9
|
+
VersionPartLib.toInt
|
10
|
+
}
|
11
|
+
for VersionPart global;
|
12
|
+
|
13
|
+
function versionPartGt(VersionPart a, VersionPart b) pure returns(bool isGreaterThan) { return VersionPart.unwrap(a) > VersionPart.unwrap(b); }
|
14
|
+
function versionPartEq(VersionPart a, VersionPart b) pure returns(bool isSame) { return VersionPart.unwrap(a) == VersionPart.unwrap(b); }
|
15
|
+
|
16
|
+
library VersionPartLib {
|
17
|
+
function toInt(VersionPart x) external pure returns(uint) { return VersionPart.unwrap(x); }
|
18
|
+
}
|
19
|
+
|
20
|
+
type Version is uint24; // contains major,minor,patch version parts
|
21
|
+
|
22
|
+
using {
|
23
|
+
versionGt as >,
|
24
|
+
versionEq as ==,
|
25
|
+
VersionLib.toInt,
|
26
|
+
VersionLib.toMajorPart,
|
27
|
+
VersionLib.toVersionParts
|
28
|
+
}
|
29
|
+
for Version global;
|
30
|
+
|
31
|
+
function versionGt(Version a, Version b) pure returns(bool isGreaterThan) { return Version.unwrap(a) > Version.unwrap(b); }
|
32
|
+
function versionEq(Version a, Version b) pure returns(bool isSame) { return Version.unwrap(a) == Version.unwrap(b); }
|
33
|
+
|
34
|
+
library VersionLib {
|
35
|
+
function toInt(Version version) external pure returns(uint) { return Version.unwrap(version); }
|
36
|
+
|
37
|
+
function toMajorPart(Version version)
|
38
|
+
external
|
39
|
+
pure
|
40
|
+
returns(VersionPart major)
|
41
|
+
{
|
42
|
+
uint24 versionInt = Version.unwrap(version);
|
43
|
+
uint8 majorInt = uint8(versionInt >> 16);
|
44
|
+
return VersionPart.wrap(majorInt);
|
45
|
+
}
|
46
|
+
|
47
|
+
function toVersionParts(Version version)
|
48
|
+
external
|
49
|
+
pure
|
50
|
+
returns(
|
51
|
+
VersionPart major,
|
52
|
+
VersionPart minor,
|
53
|
+
VersionPart patch
|
54
|
+
)
|
55
|
+
{
|
56
|
+
uint24 versionInt = Version.unwrap(version);
|
57
|
+
uint8 majorInt = uint8(versionInt >> 16);
|
58
|
+
|
59
|
+
versionInt -= majorInt << 16;
|
60
|
+
uint8 minorInt = uint8(versionInt >> 8);
|
61
|
+
uint8 patchInt = uint8(versionInt - (minorInt << 8));
|
62
|
+
|
63
|
+
return (
|
64
|
+
VersionPart.wrap(majorInt),
|
65
|
+
VersionPart.wrap(minorInt),
|
66
|
+
VersionPart.wrap(patchInt)
|
67
|
+
);
|
68
|
+
}
|
69
|
+
|
70
|
+
function toVersionPart(uint256 versionPart) external pure returns(VersionPart) {
|
71
|
+
return VersionPart.wrap(uint8(versionPart));
|
72
|
+
}
|
73
|
+
|
74
|
+
function toVersion(
|
75
|
+
uint256 major,
|
76
|
+
uint256 minor,
|
77
|
+
uint256 patch
|
78
|
+
)
|
79
|
+
external
|
80
|
+
pure
|
81
|
+
returns(Version)
|
82
|
+
{
|
83
|
+
require(
|
84
|
+
major < 256 && minor < 256 && patch < 256,
|
85
|
+
"ERROR:VRS-010:VERSION_PART_TOO_BIG");
|
86
|
+
|
87
|
+
return Version.wrap(
|
88
|
+
uint24(
|
89
|
+
(major << 16) + (minor << 8) + patch));
|
90
|
+
}
|
91
|
+
|
92
|
+
function zeroVersion() external pure returns(Version) {
|
93
|
+
return Version.wrap(0);
|
94
|
+
}
|
95
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@etherisc/gif-next",
|
3
|
-
"version": "0.0.2-
|
3
|
+
"version": "0.0.2-e875d61-189",
|
4
4
|
"description": "This is the repository for the next version of the Generic Insurance Framework (GIF) smart contracts. ",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -8,7 +8,11 @@
|
|
8
8
|
"test": "hh test",
|
9
9
|
"ptest": "hh test --parallel",
|
10
10
|
"test-with-gas": "REPORT_GAS=true hh test",
|
11
|
-
"coverage": "hh coverage"
|
11
|
+
"coverage": "hh coverage",
|
12
|
+
"styleFix": "prettier --write --plugin=prettier-plugin-solidity 'contracts/**/*.sol' 'test_forge/**/*.t.sol'",
|
13
|
+
"styleCheck": "prettier --check --plugin=prettier-plugin-solidity 'contracts/**/*.sol' 'test_forge/**/*.t.sol'",
|
14
|
+
"lint": "solhint 'contracts/**/*.sol' 'test_forge/**/*.t.sol'",
|
15
|
+
"eslint": "eslint ."
|
12
16
|
},
|
13
17
|
"repository": {
|
14
18
|
"type": "git",
|
@@ -25,13 +29,23 @@
|
|
25
29
|
],
|
26
30
|
"homepage": "https://github.com/etherisc/gif-next#readme",
|
27
31
|
"devDependencies": {
|
28
|
-
"@nomicfoundation/hardhat-foundry": "^1.
|
32
|
+
"@nomicfoundation/hardhat-foundry": "^1.1.1",
|
29
33
|
"@nomicfoundation/hardhat-toolbox": "^3.0.0",
|
34
|
+
"@nomicfoundation/hardhat-verify": "^1.1.1",
|
35
|
+
"@typescript-eslint/eslint-plugin": "^6.7.2",
|
36
|
+
"@typescript-eslint/parser": "^6.7.2",
|
30
37
|
"dotenv": "^16.3.1",
|
31
|
-
"
|
38
|
+
"eslint": "^8.50.0",
|
39
|
+
"hardhat": "^2.17.2",
|
40
|
+
"prettier": "^3.0.3",
|
41
|
+
"prettier-plugin-solidity": "^1.1.3",
|
42
|
+
"typescript": "^5"
|
32
43
|
},
|
33
44
|
"dependencies": {
|
34
45
|
"@openzeppelin/contracts": "^4.9.3",
|
35
|
-
"@openzeppelin/contracts-upgradeable": "^4.9.3"
|
46
|
+
"@openzeppelin/contracts-upgradeable": "^4.9.3",
|
47
|
+
"abi-coder": "^5.0.0",
|
48
|
+
"ethers": "^6.7.1",
|
49
|
+
"winston": "^3.10.0"
|
36
50
|
}
|
37
51
|
}
|
@@ -1,179 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"_format": "hh-sol-artifact-1",
|
3
|
-
"contractName": "Component",
|
4
|
-
"sourceName": "contracts/components/Component.sol",
|
5
|
-
"abi": [
|
6
|
-
{
|
7
|
-
"anonymous": false,
|
8
|
-
"inputs": [
|
9
|
-
{
|
10
|
-
"indexed": false,
|
11
|
-
"internalType": "uint256",
|
12
|
-
"name": "idx",
|
13
|
-
"type": "uint256"
|
14
|
-
},
|
15
|
-
{
|
16
|
-
"indexed": false,
|
17
|
-
"internalType": "address",
|
18
|
-
"name": "module",
|
19
|
-
"type": "address"
|
20
|
-
},
|
21
|
-
{
|
22
|
-
"indexed": false,
|
23
|
-
"internalType": "string",
|
24
|
-
"name": "comment",
|
25
|
-
"type": "string"
|
26
|
-
}
|
27
|
-
],
|
28
|
-
"name": "LogDebug",
|
29
|
-
"type": "event"
|
30
|
-
},
|
31
|
-
{
|
32
|
-
"inputs": [],
|
33
|
-
"name": "getData",
|
34
|
-
"outputs": [
|
35
|
-
{
|
36
|
-
"internalType": "bytes",
|
37
|
-
"name": "data",
|
38
|
-
"type": "bytes"
|
39
|
-
}
|
40
|
-
],
|
41
|
-
"stateMutability": "view",
|
42
|
-
"type": "function"
|
43
|
-
},
|
44
|
-
{
|
45
|
-
"inputs": [],
|
46
|
-
"name": "getInitialOwner",
|
47
|
-
"outputs": [
|
48
|
-
{
|
49
|
-
"internalType": "address",
|
50
|
-
"name": "deployer",
|
51
|
-
"type": "address"
|
52
|
-
}
|
53
|
-
],
|
54
|
-
"stateMutability": "view",
|
55
|
-
"type": "function"
|
56
|
-
},
|
57
|
-
{
|
58
|
-
"inputs": [],
|
59
|
-
"name": "getInstance",
|
60
|
-
"outputs": [
|
61
|
-
{
|
62
|
-
"internalType": "contract IInstance",
|
63
|
-
"name": "instance",
|
64
|
-
"type": "address"
|
65
|
-
}
|
66
|
-
],
|
67
|
-
"stateMutability": "view",
|
68
|
-
"type": "function"
|
69
|
-
},
|
70
|
-
{
|
71
|
-
"inputs": [],
|
72
|
-
"name": "getNftId",
|
73
|
-
"outputs": [
|
74
|
-
{
|
75
|
-
"internalType": "uint256",
|
76
|
-
"name": "id",
|
77
|
-
"type": "uint256"
|
78
|
-
}
|
79
|
-
],
|
80
|
-
"stateMutability": "view",
|
81
|
-
"type": "function"
|
82
|
-
},
|
83
|
-
{
|
84
|
-
"inputs": [],
|
85
|
-
"name": "getOwner",
|
86
|
-
"outputs": [
|
87
|
-
{
|
88
|
-
"internalType": "address",
|
89
|
-
"name": "owner",
|
90
|
-
"type": "address"
|
91
|
-
}
|
92
|
-
],
|
93
|
-
"stateMutability": "view",
|
94
|
-
"type": "function"
|
95
|
-
},
|
96
|
-
{
|
97
|
-
"inputs": [],
|
98
|
-
"name": "getParentNftId",
|
99
|
-
"outputs": [
|
100
|
-
{
|
101
|
-
"internalType": "uint256",
|
102
|
-
"name": "",
|
103
|
-
"type": "uint256"
|
104
|
-
}
|
105
|
-
],
|
106
|
-
"stateMutability": "view",
|
107
|
-
"type": "function"
|
108
|
-
},
|
109
|
-
{
|
110
|
-
"inputs": [],
|
111
|
-
"name": "getRegistry",
|
112
|
-
"outputs": [
|
113
|
-
{
|
114
|
-
"internalType": "contract IRegistry",
|
115
|
-
"name": "registry",
|
116
|
-
"type": "address"
|
117
|
-
}
|
118
|
-
],
|
119
|
-
"stateMutability": "view",
|
120
|
-
"type": "function"
|
121
|
-
},
|
122
|
-
{
|
123
|
-
"inputs": [],
|
124
|
-
"name": "getType",
|
125
|
-
"outputs": [
|
126
|
-
{
|
127
|
-
"internalType": "uint256",
|
128
|
-
"name": "objectType",
|
129
|
-
"type": "uint256"
|
130
|
-
}
|
131
|
-
],
|
132
|
-
"stateMutability": "view",
|
133
|
-
"type": "function"
|
134
|
-
},
|
135
|
-
{
|
136
|
-
"inputs": [],
|
137
|
-
"name": "isRegisterable",
|
138
|
-
"outputs": [
|
139
|
-
{
|
140
|
-
"internalType": "bool",
|
141
|
-
"name": "",
|
142
|
-
"type": "bool"
|
143
|
-
}
|
144
|
-
],
|
145
|
-
"stateMutability": "pure",
|
146
|
-
"type": "function"
|
147
|
-
},
|
148
|
-
{
|
149
|
-
"inputs": [],
|
150
|
-
"name": "isRegistered",
|
151
|
-
"outputs": [
|
152
|
-
{
|
153
|
-
"internalType": "bool",
|
154
|
-
"name": "",
|
155
|
-
"type": "bool"
|
156
|
-
}
|
157
|
-
],
|
158
|
-
"stateMutability": "view",
|
159
|
-
"type": "function"
|
160
|
-
},
|
161
|
-
{
|
162
|
-
"inputs": [],
|
163
|
-
"name": "register",
|
164
|
-
"outputs": [
|
165
|
-
{
|
166
|
-
"internalType": "uint256",
|
167
|
-
"name": "componentId",
|
168
|
-
"type": "uint256"
|
169
|
-
}
|
170
|
-
],
|
171
|
-
"stateMutability": "nonpayable",
|
172
|
-
"type": "function"
|
173
|
-
}
|
174
|
-
],
|
175
|
-
"bytecode": "0x",
|
176
|
-
"deployedBytecode": "0x",
|
177
|
-
"linkReferences": {},
|
178
|
-
"deployedLinkReferences": {}
|
179
|
-
}
|
@@ -1,35 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"_format": "hh-sol-artifact-1",
|
3
|
-
"contractName": "InstanceLinked",
|
4
|
-
"sourceName": "contracts/components/Component.sol",
|
5
|
-
"abi": [
|
6
|
-
{
|
7
|
-
"inputs": [
|
8
|
-
{
|
9
|
-
"internalType": "address",
|
10
|
-
"name": "instance",
|
11
|
-
"type": "address"
|
12
|
-
}
|
13
|
-
],
|
14
|
-
"stateMutability": "nonpayable",
|
15
|
-
"type": "constructor"
|
16
|
-
},
|
17
|
-
{
|
18
|
-
"inputs": [],
|
19
|
-
"name": "getInstance",
|
20
|
-
"outputs": [
|
21
|
-
{
|
22
|
-
"internalType": "contract IInstance",
|
23
|
-
"name": "instance",
|
24
|
-
"type": "address"
|
25
|
-
}
|
26
|
-
],
|
27
|
-
"stateMutability": "view",
|
28
|
-
"type": "function"
|
29
|
-
}
|
30
|
-
],
|
31
|
-
"bytecode": "0x608060405234801561001057600080fd5b50604051610249380380610249833981810160405281019061003291906100db565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a88261007d565b9050919050565b6100b88161009d565b81146100c357600080fd5b50565b6000815190506100d5816100af565b92915050565b6000602082840312156100f1576100f0610078565b5b60006100ff848285016100c6565b91505092915050565b610132806101176000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063de7b5d1414602d575b600080fd5b60336047565b604051603e919060e3565b60405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060af60ab60a7846070565b6090565b6070565b9050919050565b600060bf82609a565b9050919050565b600060cf8260b6565b9050919050565b60dd8160c6565b82525050565b600060208201905060f6600083018460d6565b9291505056fea264697066735822122033b7d04f3512cdcbea845e5d7667d7c97228afb240ed66407e488e822ebdbaa664736f6c63430008140033",
|
32
|
-
"deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063de7b5d1414602d575b600080fd5b60336047565b604051603e919060e3565b60405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060af60ab60a7846070565b6090565b6070565b9050919050565b600060bf82609a565b9050919050565b600060cf8260b6565b9050919050565b60dd8160c6565b82525050565b600060208201905060f6600083018460d6565b9291505056fea264697066735822122033b7d04f3512cdcbea845e5d7667d7c97228afb240ed66407e488e822ebdbaa664736f6c63430008140033",
|
33
|
-
"linkReferences": {},
|
34
|
-
"deployedLinkReferences": {}
|
35
|
-
}
|