@etherisc/gif-next 0.0.2-f74fcad-685 → 0.0.2-f7b8c9f-436
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +160 -6
- package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +4 -0
- package/artifacts/contracts/{instance/component/ComponentModule.sol/ComponentModule.json → components/BaseComponent.sol/BaseComponent.json} +152 -150
- package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +4 -0
- package/artifacts/contracts/components/Distribution.sol/Distribution.json +557 -0
- package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +4 -0
- package/artifacts/contracts/components/{IPool.sol/IPoolComponent.json → IBaseComponent.sol/IBaseComponent.json} +115 -116
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +4 -0
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +177 -0
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +4 -0
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +308 -0
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +4 -0
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +207 -0
- package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/components/Pool.sol/Pool.json +471 -83
- package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/components/Product.sol/Product.json +345 -77
- package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +1 -1
- package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +1 -1
- 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 +1 -1
- package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +2 -2
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +2 -2
- package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +2 -2
- package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +1 -1
- package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +1430 -660
- 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 +1759 -801
- package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +4 -0
- package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.json +481 -0
- package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +4 -0
- package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +113 -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/{lifecycle/ILifecycle.sol/ILifecycleModule.json → base/ILifecycle.sol/ILifecycle.json} +10 -77
- package/artifacts/contracts/instance/base/IService.sol/IService.dbg.json +4 -0
- package/artifacts/contracts/instance/base/IService.sol/IService.json +421 -0
- package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.dbg.json +4 -0
- package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.json +544 -0
- 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 +468 -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 +297 -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 +297 -0
- package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.dbg.json +4 -0
- package/artifacts/contracts/instance/{pool/IPoolModule.sol/IPoolModule.json → module/component/ComponentModule.sol/ComponentModule.json} +49 -61
- 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/{product/IProductService.sol/IProductService.json → module/component/IComponent.sol/IComponentModule.json} +51 -61
- package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.json +10 -0
- package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistribution.dbg.json +4 -0
- package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistribution.json +10 -0
- package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistributionModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistributionModule.json +10 -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 +136 -119
- package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.dbg.json +4 -0
- package/artifacts/contracts/instance/{policy → module/policy}/PolicyModule.sol/PolicyModule.json +137 -120
- 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 +164 -0
- package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.dbg.json +4 -0
- package/artifacts/contracts/instance/{pool → module/pool}/PoolModule.sol/PoolModule.json +66 -57
- 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 +113 -0
- package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.json +131 -0
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.dbg.json +4 -0
- package/artifacts/contracts/instance/{treasury → module/treasury}/ITreasury.sol/ITreasury.json +1 -1
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.json +638 -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 +638 -0
- package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +794 -0
- package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +630 -0
- package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.json +466 -0
- package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +446 -0
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +561 -0
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +751 -0
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +753 -0
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +1068 -0
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +194 -2
- package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/IChainNft.sol/IChainNft.json +5 -0
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +408 -32
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +4 -0
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +745 -0
- package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +4 -0
- package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.json +34 -0
- package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.json +637 -52
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +4 -0
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +997 -0
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +4 -0
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +468 -0
- package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.dbg.json +4 -0
- package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.json +107 -0
- 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/INftOwnable.sol/INftOwnable.dbg.json +4 -0
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.json +127 -0
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +4 -0
- package/artifacts/contracts/{components/Component.sol/Component.json → shared/IRegisterable.sol/IRegisterable.json} +98 -102
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +4 -0
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +205 -0
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +4 -0
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +158 -0
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +4 -0
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +349 -0
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +4 -0
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +274 -0
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +4 -0
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +129 -0
- package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +4 -0
- package/artifacts/contracts/shared/Versionable.sol/Versionable.json +228 -0
- package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.dbg.json +4 -0
- package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.json +557 -0
- 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 +716 -0
- package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +4 -0
- package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +744 -0
- package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +4 -0
- package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +305 -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 +584 -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 +270 -0
- package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +4 -0
- package/artifacts/contracts/{mock → test}/Usdc.sol/USDC.json +3 -3
- 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 +1 -1
- package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +4 -0
- package/artifacts/contracts/types/Fee.sol/FeeLib.json +257 -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 +65 -4
- 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 +1 -1
- package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
- package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.json +99 -0
- package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +86 -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 +1 -1
- package/artifacts/contracts/types/StateId.sol/StateIdLib.json +2 -2
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +64 -2
- package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +1 -1
- package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +58 -58
- package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +4 -0
- package/artifacts/contracts/types/Version.sol/VersionLib.json +177 -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 +79 -0
- package/contracts/components/Distribution.sol +155 -0
- package/contracts/components/IBaseComponent.sol +19 -0
- package/contracts/components/IDistributionComponent.sol +46 -0
- package/contracts/components/IPoolComponent.sol +64 -0
- package/contracts/components/IProductComponent.sol +37 -0
- package/contracts/components/Pool.sol +218 -24
- package/contracts/components/Product.sol +248 -38
- package/contracts/instance/IInstance.sol +40 -11
- package/contracts/instance/IInstanceLinked.sol +8 -0
- package/contracts/instance/Instance.sol +60 -45
- package/contracts/instance/base/ComponentServiceBase.sol +49 -0
- package/contracts/instance/base/IInstanceBase.sol +23 -0
- package/contracts/instance/base/IKeyValueStore.sol +50 -0
- package/contracts/instance/{lifecycle → base}/ILifecycle.sol +4 -21
- package/contracts/instance/base/IService.sol +15 -0
- package/contracts/instance/base/InstanceBase.sol +89 -0
- package/contracts/instance/base/KeyValueStore.sol +161 -0
- package/contracts/instance/base/Lifecycle.sol +100 -0
- package/contracts/instance/base/ModuleBase.sol +57 -0
- package/contracts/instance/base/ServiceBase.sol +44 -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 +134 -0
- package/contracts/instance/module/bundle/IBundle.sol +53 -0
- package/contracts/instance/module/component/ComponentModule.sol +71 -0
- package/contracts/instance/module/component/IComponent.sol +28 -0
- package/contracts/instance/module/distribution/DistributionModule.sol +17 -0
- package/contracts/instance/module/distribution/IDistribution.sol +10 -0
- package/contracts/instance/module/policy/IPolicy.sol +63 -0
- package/contracts/instance/module/policy/PolicyModule.sol +91 -0
- package/contracts/instance/module/pool/IPoolModule.sol +41 -0
- package/contracts/instance/module/pool/PoolModule.sol +95 -0
- package/contracts/instance/module/risk/IRisk.sol +26 -0
- package/contracts/instance/module/risk/RiskModule.sol +62 -0
- package/contracts/instance/module/treasury/ITreasury.sol +84 -0
- package/contracts/instance/module/treasury/TokenHandler.sol +48 -0
- package/contracts/instance/module/treasury/TreasuryModule.sol +131 -0
- package/contracts/instance/service/ComponentOwnerService.sol +275 -0
- package/contracts/instance/service/DistributionService.sol +54 -0
- package/contracts/instance/service/IComponentOwnerService.sol +20 -0
- package/contracts/instance/service/IDistributionService.sol +12 -0
- package/contracts/instance/service/IPoolService.sol +37 -0
- package/contracts/instance/service/IProductService.sol +107 -0
- package/contracts/instance/service/PoolService.sol +149 -0
- package/contracts/instance/service/ProductService.sol +510 -0
- package/contracts/registry/ChainNft.sol +94 -42
- package/contracts/registry/IChainNft.sol +3 -2
- package/contracts/registry/IRegistry.sol +50 -44
- package/contracts/registry/IRegistryService.sol +29 -0
- package/contracts/registry/ITransferInterceptor.sol +6 -0
- package/contracts/registry/Registry.sol +435 -126
- package/contracts/registry/RegistryService.sol +368 -0
- package/contracts/registry/RegistryServiceManager.sol +43 -0
- package/contracts/shared/ContractDeployerLib.sol +72 -0
- package/contracts/shared/ERC165.sol +21 -0
- package/contracts/shared/INftOwnable.sol +22 -0
- package/contracts/shared/IRegisterable.sol +17 -0
- package/contracts/shared/IVersionable.sol +96 -0
- package/contracts/shared/NftOwnable.sol +136 -0
- package/contracts/shared/ProxyManager.sol +94 -0
- package/contracts/shared/Registerable.sol +89 -0
- package/contracts/shared/UpgradableProxyWithAdmin.sol +16 -0
- package/contracts/shared/Versionable.sol +147 -0
- package/contracts/test/TestDistribution.sol +22 -0
- package/contracts/test/TestFee.sol +25 -0
- package/contracts/test/TestPool.sol +27 -0
- package/contracts/test/TestProduct.sol +74 -0
- package/contracts/test/TestRegisterable.sol +18 -0
- package/contracts/test/TestRoleId.sol +14 -0
- package/contracts/test/TestService.sol +26 -0
- package/contracts/{mock/Dip.sol → test/TestToken.sol} +5 -5
- package/contracts/test/TestVersion.sol +44 -0
- package/contracts/test/TestVersionable.sol +17 -0
- package/contracts/{mock → test}/Usdc.sol +1 -1
- package/contracts/types/AddressSet.sol +58 -0
- package/contracts/types/Fee.sol +44 -20
- package/contracts/types/Key32.sol +45 -0
- package/contracts/types/NftId.sol +22 -1
- package/contracts/types/NftIdSet.sol +60 -0
- package/contracts/types/ObjectType.sol +37 -13
- package/contracts/types/ReferralId.sol +48 -0
- package/contracts/types/RiskId.sol +43 -0
- package/contracts/types/RoleId.sol +38 -0
- package/contracts/types/StateId.sol +13 -3
- package/contracts/types/Timestamp.sol +22 -1
- package/contracts/types/UFixed.sol +12 -13
- package/contracts/types/Version.sol +104 -0
- package/package.json +8 -3
- package/artifacts/contracts/components/Component.sol/Component.dbg.json +0 -4
- 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 -74
- 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 -202
- 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/IComponentContract.json +0 -205
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.dbg.json +0 -4
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.json +0 -217
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.dbg.json +0 -4
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.json +0 -141
- package/artifacts/contracts/instance/component/IComponent.sol/IInstanceLinked.dbg.json +0 -4
- package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycle.dbg.json +0 -4
- package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycle.json +0 -134
- package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycleModule.dbg.json +0 -4
- package/artifacts/contracts/instance/lifecycle/LifecycleModule.sol/LifecycleModule.dbg.json +0 -4
- package/artifacts/contracts/instance/lifecycle/LifecycleModule.sol/LifecycleModule.json +0 -221
- 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/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 -196
- package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasury.dbg.json +0 -4
- package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasuryModule.dbg.json +0 -4
- package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasuryModule.json +0 -490
- package/artifacts/contracts/instance/treasury/TokenHandler.sol/TokenHandler.dbg.json +0 -4
- package/artifacts/contracts/instance/treasury/TokenHandler.sol/TokenHandler.json +0 -45
- package/artifacts/contracts/instance/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +0 -4
- package/artifacts/contracts/instance/treasury/TreasuryModule.sol/TreasuryModule.json +0 -490
- package/artifacts/contracts/mock/Dip.sol/DIP.dbg.json +0 -4
- package/artifacts/contracts/mock/Dip.sol/DIP.json +0 -338
- package/artifacts/contracts/mock/TestPool.sol/TestPool.dbg.json +0 -4
- package/artifacts/contracts/mock/TestPool.sol/TestPool.json +0 -294
- package/artifacts/contracts/mock/TestProduct.sol/TestProduct.dbg.json +0 -4
- package/artifacts/contracts/mock/TestProduct.sol/TestProduct.json +0 -384
- package/artifacts/contracts/mock/Usdc.sol/USDC.dbg.json +0 -4
- package/artifacts/contracts/registry/IRegistry.sol/IOwnable.dbg.json +0 -4
- package/artifacts/contracts/registry/IRegistry.sol/IOwnable.json +0 -24
- package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.dbg.json +0 -4
- package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.json +0 -166
- 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/Registerable.json +0 -166
- 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 -77
- package/contracts/components/IPool.sol +0 -15
- package/contracts/components/IProduct.sol +0 -16
- package/contracts/experiment/statemachine/README.md +0 -112
- package/contracts/instance/access/Access.sol +0 -165
- package/contracts/instance/access/IAccess.sol +0 -63
- package/contracts/instance/component/ComponentModule.sol +0 -274
- package/contracts/instance/component/IComponent.sol +0 -74
- package/contracts/instance/lifecycle/LifecycleModule.sol +0 -88
- package/contracts/instance/policy/IPolicy.sol +0 -50
- package/contracts/instance/policy/PolicyModule.sol +0 -114
- package/contracts/instance/pool/IPoolModule.sol +0 -23
- package/contracts/instance/pool/PoolModule.sol +0 -81
- package/contracts/instance/product/IProductService.sol +0 -36
- package/contracts/instance/product/ProductService.sol +0 -136
- package/contracts/instance/treasury/ITreasury.sol +0 -91
- package/contracts/instance/treasury/TokenHandler.sol +0 -24
- package/contracts/instance/treasury/TreasuryModule.sol +0 -168
- package/contracts/mock/TestPool.sol +0 -16
- package/contracts/mock/TestProduct.sol +0 -39
package/README.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# gif-next (Generic Insurance Framework next version)
|
2
2
|
|
3
|
+
## Add OpenZeppelin V5 Dependencies
|
4
|
+
|
5
|
+
```shell
|
6
|
+
forge install openzeppelin-contracts-500=OpenZeppelin/openzeppelin-contracts@v5.0.0
|
7
|
+
cd cd lib/openzeppelin-contracts-500
|
8
|
+
git checkout tags/v5.0.0
|
9
|
+
cd ../..
|
10
|
+
```
|
11
|
+
|
12
|
+
See `remappings.txt` to see how to work with different OpenZeppelin versions in parallel
|
13
|
+
|
14
|
+
```
|
15
|
+
cat remappings.txt
|
16
|
+
@openzeppelin5/contracts/=lib/openzeppelin-contracts-500/contracts/
|
17
|
+
@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/
|
18
|
+
@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/
|
19
|
+
```
|
20
|
+
|
21
|
+
|
3
22
|
## Submodules checkout
|
4
23
|
|
5
24
|
This repository uses submodules. To checkout or update to the latest submodules, run the following command after updating to any revision (or checking out the repository)
|
@@ -23,15 +42,33 @@ npm run coverage
|
|
23
42
|
|
24
43
|
### Deployment
|
25
44
|
|
45
|
+
Install the dependencies before running the script below for the first time.
|
46
|
+
|
47
|
+
```bash
|
48
|
+
npm install
|
26
49
|
```
|
27
|
-
|
50
|
+
|
51
|
+
The deploy script will deploy all required contracts and create a test instance with a test product and a test pool.
|
52
|
+
|
53
|
+
```bash
|
54
|
+
# run deployment on a locally created ganache instance
|
55
|
+
export SKIP_VERIFICATION=true
|
56
|
+
hh run scripts/deploy_all.ts
|
28
57
|
```
|
29
58
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
59
|
+
```bash
|
60
|
+
# set appropriate values vor env variables (see below)
|
61
|
+
|
62
|
+
# run deployment on another network
|
63
|
+
hh run --network <networkname> scripts/deploy_all.ts
|
64
|
+
```
|
65
|
+
|
66
|
+
Environment variables:
|
67
|
+
|
68
|
+
- `SKIP_VERIFICATION` set to `true` to skip etherscan verification (required for ganacht and anvil)
|
69
|
+
- `WEB3_INFURA_PROJECT_ID` set to infura project id (required for mumbai and mainnet)
|
70
|
+
- `WALLET_MNEMONIC` the mnemonic of the wallet to use for deployment (required for mumbai and mainnet)
|
71
|
+
- `ETHERSCAN_API_KEY` `POLYGONSCAN_API_KEY` the api key for etherscan/polygonscan (required for mumbai and mainnet)
|
35
72
|
|
36
73
|
|
37
74
|
### Console
|
@@ -56,6 +93,9 @@ https://hardhat.org/hardhat-runner/docs/guides/compile-contracts
|
|
56
93
|
```shell
|
57
94
|
forge build
|
58
95
|
|
96
|
+
# contract sizes
|
97
|
+
forge build --sizes | grep Instance
|
98
|
+
|
59
99
|
forge test
|
60
100
|
|
61
101
|
# run single test case
|
@@ -127,7 +167,17 @@ uint256 lifetime =365*24*3600;
|
|
127
167
|
uint256 policyNftId = ps.createApplicationForBundle(customer, bundleNftId, sumInsuredAmount, premiumAmount, lifetime);
|
128
168
|
|
129
169
|
```
|
170
|
+
### Library Linking
|
171
|
+
|
172
|
+
https://ethereum.stackexchange.com/questions/153411/does-foundry-support-dynamical-library-linking-in-solidity
|
130
173
|
|
174
|
+
```toml
|
175
|
+
# foundry.toml
|
176
|
+
|
177
|
+
[profile.default]
|
178
|
+
# expected format(example below): libraries = ["<path>:<lib name>:<address>"]
|
179
|
+
libraries = ["src/libraries/MyLibrary.sol:MyLibrary:0x..."]
|
180
|
+
```
|
131
181
|
|
132
182
|
### Documentation
|
133
183
|
|
@@ -158,3 +208,107 @@ To execute formatting run `npm run styleFix`.
|
|
158
208
|
|
159
209
|
We use solhint to lint the code.
|
160
210
|
To execute linting run `npm run lint`.
|
211
|
+
|
212
|
+
|
213
|
+
### Adding Brownie (Legacy)
|
214
|
+
|
215
|
+
python3 is already installed
|
216
|
+
|
217
|
+
```bash
|
218
|
+
npm install -g ganache
|
219
|
+
sudo apt update
|
220
|
+
sudo apt install python3-pip
|
221
|
+
pip install eth-brownie
|
222
|
+
brownie pm install OpenZeppelin/openzeppelin-contracts@4.9.3
|
223
|
+
brownie pm install OpenZeppelin/openzeppelin-contracts@5.0.0
|
224
|
+
```
|
225
|
+
|
226
|
+
```bash
|
227
|
+
brownie compile --all
|
228
|
+
brownie console
|
229
|
+
```
|
230
|
+
|
231
|
+
```python
|
232
|
+
registry_owner = accounts[0]
|
233
|
+
instance_owner = accounts[1]
|
234
|
+
product_owner = accounts[2]
|
235
|
+
|
236
|
+
# deploy libs and helper contracts
|
237
|
+
nft_id_lib = NftIdLib.deploy({'from': registry_owner})
|
238
|
+
ufixed_math_lib = UFixedMathLib.deploy({'from': registry_owner})
|
239
|
+
test_fee = TestFee.deploy({'from': registry_owner})
|
240
|
+
|
241
|
+
# deploy registry and a token
|
242
|
+
registry = Registry.deploy({'from': registry_owner})
|
243
|
+
nft = ChainNft.deploy(registry, {'from': registry_owner})
|
244
|
+
registry.initialize(nft, {'from': registry_owner})
|
245
|
+
token = TestUsdc.deploy({'from': registry_owner})
|
246
|
+
|
247
|
+
# deploy services
|
248
|
+
component_owner_service = ComponentOwnerService.deploy(registry, {'from': registry_owner})
|
249
|
+
product_service = ProductService.deploy(registry, {'from': registry_owner})
|
250
|
+
|
251
|
+
# deploy an instance
|
252
|
+
instance = Instance.deploy(registry, component_owner_service, product_service, {'from': instance_owner})
|
253
|
+
|
254
|
+
# deploy product
|
255
|
+
pool = TestPool.deploy(registry, instance, token, {'from': product_owner})
|
256
|
+
policy_fee = test_fee.createFee(1, -1, 0)
|
257
|
+
product = TestProduct.deploy(registry, instance, token, pool, policy_fee, {'from': product_owner})
|
258
|
+
|
259
|
+
# grant roles
|
260
|
+
pool_owner_role = instance.getRoleForName("PoolOwner")
|
261
|
+
product_owner_role = instance.getRoleForName("ProductOwner")
|
262
|
+
instance.grantRole(pool_owner_role, product_owner, {'from': instance_owner})
|
263
|
+
instance.grantRole(product_owner_role, product_owner, {'from': instance_owner})
|
264
|
+
|
265
|
+
# register objects
|
266
|
+
instance.register()
|
267
|
+
component_owner_service.register(pool, {'from': product_owner})
|
268
|
+
component_owner_service.register(product, {'from': product_owner})
|
269
|
+
|
270
|
+
instance_id = instance.getNftId()
|
271
|
+
pool_id = pool.getNftId()
|
272
|
+
product_id = product.getNftId()
|
273
|
+
```
|
274
|
+
|
275
|
+
## Registry and Services
|
276
|
+
|
277
|
+
### Principles
|
278
|
+
|
279
|
+
- 1 service per object type and major version
|
280
|
+
- registry service guards write access to registry
|
281
|
+
- all other objects registered via registry service
|
282
|
+
- root object for the complete tree is the protocol object
|
283
|
+
- under the root object a single registry object is registered (= global registry/ethereum mainnet)
|
284
|
+
|
285
|
+
|
286
|
+
### Service Responsibilities
|
287
|
+
|
288
|
+
Registry Service
|
289
|
+
|
290
|
+
- deployed and registered during bootstrapping of registry
|
291
|
+
- used to register tokens and other services by registry owner
|
292
|
+
- an object may only be registered by the service designated by the type of the object
|
293
|
+
- to register an object the parent object needs already be registered
|
294
|
+
- the type of the object to be registered needs to match a valid child type/parent type combination
|
295
|
+
|
296
|
+
Instance Service
|
297
|
+
|
298
|
+
- deploys master instance during its own bootstrapping (if allowed by contract size)
|
299
|
+
- registered via registry service by registry owner
|
300
|
+
- registeres master instance during its own registration by regsitry owner
|
301
|
+
- deploys and registeres new instances (= instance factory) by instance owner (instance owner is a permissionless role, anybody may creates a new instance)
|
302
|
+
- provides upgrade functionality to instance owners
|
303
|
+
|
304
|
+
Product Service
|
305
|
+
|
306
|
+
- registered via registry service by registry owner
|
307
|
+
- registers products for registered instances via registry service by product owner (product owner role is permissend by the product's instance)
|
308
|
+
- registers applications/policies for registered products via registry service
|
309
|
+
|
310
|
+
Distribution Service
|
311
|
+
|
312
|
+
- registered via registry service by registry owner
|
313
|
+
- registers distribution components for registered products via registry service by distribution owner (distribution owner role is permissend by the product's instance)
|
314
|
+
- registers distributors for registered distribution components via registry service
|
@@ -1,132 +1,128 @@
|
|
1
1
|
{
|
2
2
|
"_format": "hh-sol-artifact-1",
|
3
|
-
"contractName": "
|
4
|
-
"sourceName": "contracts/
|
3
|
+
"contractName": "BaseComponent",
|
4
|
+
"sourceName": "contracts/components/BaseComponent.sol",
|
5
5
|
"abi": [
|
6
6
|
{
|
7
|
-
"anonymous": false,
|
8
7
|
"inputs": [
|
9
8
|
{
|
10
|
-
"indexed": false,
|
11
|
-
"internalType": "uint256",
|
12
|
-
"name": "idx",
|
13
|
-
"type": "uint256"
|
14
|
-
},
|
15
|
-
{
|
16
|
-
"indexed": false,
|
17
9
|
"internalType": "address",
|
18
|
-
"name": "
|
10
|
+
"name": "registry",
|
19
11
|
"type": "address"
|
20
12
|
},
|
21
13
|
{
|
22
|
-
"
|
23
|
-
"
|
24
|
-
"
|
25
|
-
"type": "string"
|
14
|
+
"internalType": "NftId",
|
15
|
+
"name": "nftId",
|
16
|
+
"type": "uint96"
|
26
17
|
}
|
27
18
|
],
|
28
|
-
"name": "
|
29
|
-
"type": "
|
19
|
+
"name": "ErrorAlreadyLinked",
|
20
|
+
"type": "error"
|
30
21
|
},
|
31
22
|
{
|
32
|
-
"inputs": [
|
33
|
-
"name": "ORACLE_OWNER_ROLE",
|
34
|
-
"outputs": [
|
23
|
+
"inputs": [
|
35
24
|
{
|
36
|
-
"internalType": "
|
37
|
-
"name": "
|
38
|
-
"type": "
|
25
|
+
"internalType": "address",
|
26
|
+
"name": "contractAddress",
|
27
|
+
"type": "address"
|
39
28
|
}
|
40
29
|
],
|
41
|
-
"
|
42
|
-
"type": "
|
30
|
+
"name": "ErrorContractNotRegistered",
|
31
|
+
"type": "error"
|
43
32
|
},
|
44
33
|
{
|
45
|
-
"inputs": [
|
46
|
-
"name": "POOL_OWNER_ROLE",
|
47
|
-
"outputs": [
|
34
|
+
"inputs": [
|
48
35
|
{
|
49
|
-
"internalType": "
|
50
|
-
"name": "
|
51
|
-
"type": "
|
36
|
+
"internalType": "address",
|
37
|
+
"name": "account",
|
38
|
+
"type": "address"
|
52
39
|
}
|
53
40
|
],
|
54
|
-
"
|
55
|
-
"type": "
|
41
|
+
"name": "ErrorNotOwner",
|
42
|
+
"type": "error"
|
56
43
|
},
|
57
44
|
{
|
58
|
-
"inputs": [
|
59
|
-
"name": "PRODUCT_OWNER_ROLE",
|
60
|
-
"outputs": [
|
45
|
+
"inputs": [
|
61
46
|
{
|
62
|
-
"internalType": "
|
63
|
-
"name": "
|
64
|
-
"type": "
|
47
|
+
"internalType": "address",
|
48
|
+
"name": "registryAddress",
|
49
|
+
"type": "address"
|
65
50
|
}
|
66
51
|
],
|
67
|
-
"
|
68
|
-
"type": "
|
52
|
+
"name": "ErrorNotRegistry",
|
53
|
+
"type": "error"
|
69
54
|
},
|
70
55
|
{
|
71
|
-
"inputs": [
|
72
|
-
"name": "components",
|
73
|
-
"outputs": [
|
56
|
+
"inputs": [
|
74
57
|
{
|
75
|
-
"internalType": "
|
76
|
-
"name": "
|
77
|
-
"type": "
|
58
|
+
"internalType": "address",
|
59
|
+
"name": "registryAddress",
|
60
|
+
"type": "address"
|
78
61
|
}
|
79
62
|
],
|
80
|
-
"
|
81
|
-
"type": "
|
63
|
+
"name": "ErrorRegisterableNotRegistry",
|
64
|
+
"type": "error"
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"inputs": [],
|
68
|
+
"name": "ErrorRegistryAddressZero",
|
69
|
+
"type": "error"
|
82
70
|
},
|
83
71
|
{
|
84
72
|
"inputs": [
|
85
73
|
{
|
86
74
|
"internalType": "address",
|
87
|
-
"name": "
|
75
|
+
"name": "registry",
|
88
76
|
"type": "address"
|
89
77
|
}
|
90
78
|
],
|
91
|
-
"name": "
|
92
|
-
"
|
93
|
-
{
|
94
|
-
"internalType": "NftId",
|
95
|
-
"name": "componentNftId",
|
96
|
-
"type": "uint96"
|
97
|
-
}
|
98
|
-
],
|
99
|
-
"stateMutability": "view",
|
100
|
-
"type": "function"
|
79
|
+
"name": "ErrorRegistryAlreadyInitialized",
|
80
|
+
"type": "error"
|
101
81
|
},
|
102
82
|
{
|
83
|
+
"inputs": [],
|
84
|
+
"name": "ErrorRegistryNotInitialized",
|
85
|
+
"type": "error"
|
86
|
+
},
|
87
|
+
{
|
88
|
+
"inputs": [],
|
89
|
+
"name": "InvalidInitialization",
|
90
|
+
"type": "error"
|
91
|
+
},
|
92
|
+
{
|
93
|
+
"inputs": [],
|
94
|
+
"name": "NotInitializing",
|
95
|
+
"type": "error"
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"anonymous": false,
|
103
99
|
"inputs": [
|
104
100
|
{
|
105
|
-
"
|
106
|
-
"
|
107
|
-
"
|
101
|
+
"indexed": false,
|
102
|
+
"internalType": "uint64",
|
103
|
+
"name": "version",
|
104
|
+
"type": "uint64"
|
108
105
|
}
|
109
106
|
],
|
110
|
-
"name": "
|
107
|
+
"name": "Initialized",
|
108
|
+
"type": "event"
|
109
|
+
},
|
110
|
+
{
|
111
|
+
"inputs": [],
|
112
|
+
"name": "REGISTERABLE_LOCATION_V1",
|
111
113
|
"outputs": [
|
112
114
|
{
|
113
|
-
"internalType": "
|
114
|
-
"name": "
|
115
|
-
"type": "
|
115
|
+
"internalType": "bytes32",
|
116
|
+
"name": "",
|
117
|
+
"type": "bytes32"
|
116
118
|
}
|
117
119
|
],
|
118
120
|
"stateMutability": "view",
|
119
121
|
"type": "function"
|
120
122
|
},
|
121
123
|
{
|
122
|
-
"inputs": [
|
123
|
-
|
124
|
-
"internalType": "NftId",
|
125
|
-
"name": "nftId",
|
126
|
-
"type": "uint96"
|
127
|
-
}
|
128
|
-
],
|
129
|
-
"name": "getComponentInfo",
|
124
|
+
"inputs": [],
|
125
|
+
"name": "getInitialInfo",
|
130
126
|
"outputs": [
|
131
127
|
{
|
132
128
|
"components": [
|
@@ -136,19 +132,44 @@
|
|
136
132
|
"type": "uint96"
|
137
133
|
},
|
138
134
|
{
|
139
|
-
"internalType": "
|
140
|
-
"name": "
|
135
|
+
"internalType": "NftId",
|
136
|
+
"name": "parentNftId",
|
137
|
+
"type": "uint96"
|
138
|
+
},
|
139
|
+
{
|
140
|
+
"internalType": "ObjectType",
|
141
|
+
"name": "objectType",
|
141
142
|
"type": "uint8"
|
142
143
|
},
|
143
144
|
{
|
144
|
-
"internalType": "
|
145
|
-
"name": "
|
145
|
+
"internalType": "bool",
|
146
|
+
"name": "isInterceptor",
|
147
|
+
"type": "bool"
|
148
|
+
},
|
149
|
+
{
|
150
|
+
"internalType": "address",
|
151
|
+
"name": "objectAddress",
|
152
|
+
"type": "address"
|
153
|
+
},
|
154
|
+
{
|
155
|
+
"internalType": "address",
|
156
|
+
"name": "initialOwner",
|
146
157
|
"type": "address"
|
158
|
+
},
|
159
|
+
{
|
160
|
+
"internalType": "bytes",
|
161
|
+
"name": "data",
|
162
|
+
"type": "bytes"
|
147
163
|
}
|
148
164
|
],
|
149
|
-
"internalType": "struct
|
165
|
+
"internalType": "struct IRegistry.ObjectInfo",
|
150
166
|
"name": "",
|
151
167
|
"type": "tuple"
|
168
|
+
},
|
169
|
+
{
|
170
|
+
"internalType": "bytes",
|
171
|
+
"name": "data",
|
172
|
+
"type": "bytes"
|
152
173
|
}
|
153
174
|
],
|
154
175
|
"stateMutability": "view",
|
@@ -156,24 +177,37 @@
|
|
156
177
|
},
|
157
178
|
{
|
158
179
|
"inputs": [],
|
159
|
-
"name": "
|
180
|
+
"name": "getInstance",
|
160
181
|
"outputs": [
|
161
182
|
{
|
162
|
-
"internalType": "contract
|
163
|
-
"name": "",
|
183
|
+
"internalType": "contract IInstance",
|
184
|
+
"name": "instance",
|
164
185
|
"type": "address"
|
165
186
|
}
|
166
187
|
],
|
167
188
|
"stateMutability": "view",
|
168
189
|
"type": "function"
|
169
190
|
},
|
191
|
+
{
|
192
|
+
"inputs": [],
|
193
|
+
"name": "getNftId",
|
194
|
+
"outputs": [
|
195
|
+
{
|
196
|
+
"internalType": "NftId",
|
197
|
+
"name": "",
|
198
|
+
"type": "uint96"
|
199
|
+
}
|
200
|
+
],
|
201
|
+
"stateMutability": "view",
|
202
|
+
"type": "function"
|
203
|
+
},
|
170
204
|
{
|
171
205
|
"inputs": [],
|
172
206
|
"name": "getOwner",
|
173
207
|
"outputs": [
|
174
208
|
{
|
175
209
|
"internalType": "address",
|
176
|
-
"name": "
|
210
|
+
"name": "",
|
177
211
|
"type": "address"
|
178
212
|
}
|
179
213
|
],
|
@@ -186,7 +220,7 @@
|
|
186
220
|
"outputs": [
|
187
221
|
{
|
188
222
|
"internalType": "contract IRegistry",
|
189
|
-
"name": "
|
223
|
+
"name": "",
|
190
224
|
"type": "address"
|
191
225
|
}
|
192
226
|
],
|
@@ -194,100 +228,68 @@
|
|
194
228
|
"type": "function"
|
195
229
|
},
|
196
230
|
{
|
197
|
-
"inputs": [
|
198
|
-
|
199
|
-
"internalType": "ObjectType",
|
200
|
-
"name": "cType",
|
201
|
-
"type": "uint8"
|
202
|
-
}
|
203
|
-
],
|
204
|
-
"name": "getRoleForType",
|
231
|
+
"inputs": [],
|
232
|
+
"name": "getToken",
|
205
233
|
"outputs": [
|
206
234
|
{
|
207
|
-
"internalType": "
|
208
|
-
"name": "
|
209
|
-
"type": "
|
235
|
+
"internalType": "contract IERC20Metadata",
|
236
|
+
"name": "token",
|
237
|
+
"type": "address"
|
210
238
|
}
|
211
239
|
],
|
212
240
|
"stateMutability": "view",
|
213
241
|
"type": "function"
|
214
242
|
},
|
215
243
|
{
|
216
|
-
"inputs": [
|
217
|
-
|
218
|
-
|
219
|
-
"name": "role",
|
220
|
-
"type": "bytes32"
|
221
|
-
},
|
244
|
+
"inputs": [],
|
245
|
+
"name": "getWallet",
|
246
|
+
"outputs": [
|
222
247
|
{
|
223
248
|
"internalType": "address",
|
224
|
-
"name": "
|
249
|
+
"name": "walletAddress",
|
225
250
|
"type": "address"
|
226
251
|
}
|
227
252
|
],
|
228
|
-
"name": "hasRole",
|
229
|
-
"outputs": [
|
230
|
-
{
|
231
|
-
"internalType": "bool",
|
232
|
-
"name": "",
|
233
|
-
"type": "bool"
|
234
|
-
}
|
235
|
-
],
|
236
253
|
"stateMutability": "view",
|
237
254
|
"type": "function"
|
238
255
|
},
|
239
256
|
{
|
240
|
-
"inputs": [
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
"
|
248
|
-
"
|
249
|
-
|
250
|
-
"internalType": "NftId",
|
251
|
-
"name": "nftId",
|
252
|
-
"type": "uint96"
|
253
|
-
}
|
254
|
-
],
|
257
|
+
"inputs": [],
|
258
|
+
"name": "linkToRegisteredNftId",
|
259
|
+
"outputs": [],
|
260
|
+
"stateMutability": "nonpayable",
|
261
|
+
"type": "function"
|
262
|
+
},
|
263
|
+
{
|
264
|
+
"inputs": [],
|
265
|
+
"name": "lock",
|
266
|
+
"outputs": [],
|
255
267
|
"stateMutability": "nonpayable",
|
256
268
|
"type": "function"
|
257
269
|
},
|
258
270
|
{
|
259
271
|
"inputs": [
|
260
272
|
{
|
261
|
-
"
|
262
|
-
|
263
|
-
|
264
|
-
"name": "nftId",
|
265
|
-
"type": "uint96"
|
266
|
-
},
|
267
|
-
{
|
268
|
-
"internalType": "StateId",
|
269
|
-
"name": "state",
|
270
|
-
"type": "uint8"
|
271
|
-
},
|
272
|
-
{
|
273
|
-
"internalType": "contract IERC20Metadata",
|
274
|
-
"name": "token",
|
275
|
-
"type": "address"
|
276
|
-
}
|
277
|
-
],
|
278
|
-
"internalType": "struct IComponent.ComponentInfo",
|
279
|
-
"name": "info",
|
280
|
-
"type": "tuple"
|
273
|
+
"internalType": "bytes4",
|
274
|
+
"name": "interfaceId",
|
275
|
+
"type": "bytes4"
|
281
276
|
}
|
282
277
|
],
|
283
|
-
"name": "
|
278
|
+
"name": "supportsInterface",
|
284
279
|
"outputs": [
|
285
280
|
{
|
286
|
-
"internalType": "
|
287
|
-
"name": "
|
288
|
-
"type": "
|
281
|
+
"internalType": "bool",
|
282
|
+
"name": "",
|
283
|
+
"type": "bool"
|
289
284
|
}
|
290
285
|
],
|
286
|
+
"stateMutability": "view",
|
287
|
+
"type": "function"
|
288
|
+
},
|
289
|
+
{
|
290
|
+
"inputs": [],
|
291
|
+
"name": "unlock",
|
292
|
+
"outputs": [],
|
291
293
|
"stateMutability": "nonpayable",
|
292
294
|
"type": "function"
|
293
295
|
}
|