@etherisc/gif-next 0.0.2-ebbe63d → 0.0.2-ef2f083-203
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +390 -2
- package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +4 -0
- package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.json +327 -0
- package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +4 -0
- package/artifacts/contracts/components/Distribution.sol/Distribution.json +670 -0
- package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +4 -0
- package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.json +280 -0
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +4 -0
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +204 -0
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +4 -0
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +249 -0
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +4 -0
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +157 -0
- package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +4 -0
- package/artifacts/contracts/components/Pool.sol/Pool.json +790 -0
- package/artifacts/contracts/components/Product.sol/Product.dbg.json +4 -0
- package/artifacts/contracts/components/Product.sol/Product.json +775 -0
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Cloner.dbg.json +4 -0
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Cloner.json +66 -0
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock1.dbg.json +4 -0
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock1.json +24 -0
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock2.dbg.json +4 -0
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock2.json +42 -0
- package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +4 -0
- package/artifacts/contracts/experiment/errors/Require.sol/Require.json +105 -0
- package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +4 -0
- package/artifacts/contracts/experiment/errors/Revert.sol/Revert.json +105 -0
- package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/A.sol/A.json +128 -0
- package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/A.sol/AShared.json +42 -0
- package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/B.sol/B.json +76 -0
- package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/C.sol/C.json +89 -0
- package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/IA.sol/IA.json +128 -0
- package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.json +37 -0
- package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/IB.sol/IB.json +50 -0
- package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/IC.sol/IC.json +63 -0
- 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 +4 -0
- package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.json +10 -0
- package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +4 -0
- package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.json +10 -0
- package/artifacts/contracts/instance/AccessManagedSimple.sol/AccessManagedSimple.dbg.json +4 -0
- package/artifacts/contracts/instance/AccessManagedSimple.sol/AccessManagedSimple.json +101 -0
- package/artifacts/contracts/instance/AccessManagerSimple.sol/AccessManagerSimple.dbg.json +4 -0
- package/artifacts/contracts/instance/AccessManagerSimple.sol/AccessManagerSimple.json +1132 -0
- package/artifacts/contracts/instance/IAccessManagerSimple.sol/IAccessManagerSimple.dbg.json +4 -0
- package/artifacts/contracts/instance/IAccessManagerSimple.sol/IAccessManagerSimple.json +1082 -0
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +4 -0
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +444 -0
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +4 -0
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +480 -0
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +4 -0
- package/artifacts/contracts/instance/Instance.sol/Instance.json +3516 -0
- package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.dbg.json +4 -0
- package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.json +917 -0
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +4 -0
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +1283 -0
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +4 -0
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +827 -0
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +4 -0
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +468 -0
- 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 +429 -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/KeyValueStore.sol/KeyValueStore.dbg.json +4 -0
- package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +502 -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/module/IAccess.sol/IAccess.dbg.json +4 -0
- package/artifacts/contracts/instance/module/IAccess.sol/IAccess.json +211 -0
- package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +4 -0
- package/artifacts/contracts/instance/module/IBundle.sol/IBundle.json +10 -0
- package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +4 -0
- package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.json +10 -0
- package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +4 -0
- package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.json +10 -0
- package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +4 -0
- package/artifacts/contracts/instance/module/IRisk.sol/IRisk.json +10 -0
- package/artifacts/contracts/instance/module/ISetup.sol/ISetup.dbg.json +4 -0
- package/artifacts/contracts/instance/module/ISetup.sol/ISetup.json +10 -0
- package/artifacts/contracts/instance/module/ITreasury.sol/ITreasury.dbg.json +4 -0
- package/artifacts/contracts/instance/module/ITreasury.sol/ITreasury.json +10 -0
- package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +827 -0
- package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +641 -0
- package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +4 -0
- package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.json +428 -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/registry/ChainNft.sol/ChainNft.dbg.json +4 -0
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +771 -0
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +4 -0
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +753 -0
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +4 -0
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +853 -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 +4 -0
- package/artifacts/contracts/registry/Registry.sol/Registry.json +947 -0
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +4 -0
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +1237 -0
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +4 -0
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +525 -0
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +4 -0
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +410 -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/shared/IRegisterable.sol/IRegisterable.json +201 -0
- package/artifacts/contracts/shared/IService.sol/IService.dbg.json +4 -0
- package/artifacts/contracts/shared/IService.sol/IService.json +421 -0
- 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/RegisterableUpgradable.sol/RegisterableUpgradable.dbg.json +4 -0
- package/artifacts/contracts/shared/RegisterableUpgradable.sol/RegisterableUpgradable.json +442 -0
- package/artifacts/contracts/shared/Service.sol/Service.dbg.json +4 -0
- package/artifacts/contracts/shared/Service.sol/Service.json +468 -0
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +4 -0
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +96 -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/TestFee.sol/TestFee.dbg.json +4 -0
- package/artifacts/contracts/test/TestFee.sol/TestFee.json +119 -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 +600 -0
- package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +4 -0
- package/artifacts/contracts/test/TestToken.sol/TestUsdc.json +376 -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 +286 -0
- package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +4 -0
- package/artifacts/contracts/test/Usdc.sol/USDC.json +376 -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 +4 -0
- package/artifacts/contracts/types/ChainId.sol/ChainIdLib.json +10 -0
- package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.dbg.json +4 -0
- package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.json +104 -0
- 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 +125 -0
- package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/NftId.sol/NftIdLib.json +153 -0
- 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/NumberId.sol/NumberIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/NumberId.sol/NumberIdLib.json +100 -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/Referral.sol/ReferralLib.dbg.json +4 -0
- package/artifacts/contracts/types/Referral.sol/ReferralLib.json +123 -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 +156 -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 +249 -0
- package/artifacts/contracts/types/UFixed.sol/MathLib.dbg.json +4 -0
- package/artifacts/contracts/types/UFixed.sol/MathLib.json +10 -0
- package/artifacts/contracts/types/UFixed.sol/UFixedLib.dbg.json +4 -0
- package/artifacts/contracts/types/UFixed.sol/UFixedLib.json +479 -0
- 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 +49 -0
- package/contracts/components/BaseComponent.sol +91 -0
- package/contracts/components/Distribution.sol +166 -0
- package/contracts/components/IBaseComponent.sol +25 -0
- package/contracts/components/IDistributionComponent.sol +46 -0
- package/contracts/components/IPoolComponent.sol +62 -0
- package/contracts/components/IProductComponent.sol +35 -0
- package/contracts/components/Pool.sol +258 -0
- package/contracts/components/Product.sol +297 -0
- package/contracts/experiment/cloning/Cloner.sol +47 -0
- package/contracts/experiment/errors/Require.sol +38 -0
- package/contracts/experiment/errors/Revert.sol +44 -0
- package/contracts/experiment/inheritance/A.sol +53 -0
- package/contracts/experiment/inheritance/B.sol +28 -0
- package/contracts/experiment/inheritance/C.sol +34 -0
- package/contracts/experiment/inheritance/IA.sol +13 -0
- package/contracts/experiment/inheritance/IB.sol +10 -0
- package/contracts/experiment/inheritance/IC.sol +12 -0
- package/contracts/experiment/statemachine/Dummy.sol +27 -0
- package/contracts/experiment/statemachine/ISM.sol +25 -0
- package/contracts/experiment/statemachine/SM.sol +57 -0
- package/contracts/experiment/statemachine/SimpleStateMachine.sol +31 -0
- package/contracts/experiment/types/TypeA.sol +47 -0
- package/contracts/experiment/types/TypeB.sol +29 -0
- package/contracts/instance/AccessManagedSimple.sol +115 -0
- package/contracts/instance/AccessManagerSimple.sol +692 -0
- package/contracts/instance/IAccessManagerSimple.sol +391 -0
- package/contracts/instance/IInstance.sol +33 -0
- package/contracts/instance/IInstanceService.sol +30 -0
- package/contracts/instance/Instance.sol +443 -0
- package/contracts/instance/InstanceAccessManager.sol +288 -0
- package/contracts/instance/InstanceReader.sol +290 -0
- package/contracts/instance/InstanceService.sol +158 -0
- package/contracts/instance/InstanceServiceManager.sol +56 -0
- package/contracts/instance/base/ComponentServiceBase.sol +39 -0
- package/contracts/instance/base/IInstanceBase.sol +23 -0
- package/contracts/instance/base/IKeyValueStore.sol +49 -0
- package/contracts/instance/base/ILifecycle.sol +30 -0
- package/contracts/instance/base/KeyValueStore.sol +172 -0
- package/contracts/instance/base/Lifecycle.sol +100 -0
- package/contracts/instance/module/IAccess.sol +38 -0
- package/contracts/instance/module/IBundle.sol +19 -0
- package/contracts/instance/module/IDistribution.sol +39 -0
- package/contracts/instance/module/IPolicy.sol +45 -0
- package/contracts/instance/module/IRisk.sol +11 -0
- package/contracts/instance/module/ISetup.sol +43 -0
- package/contracts/instance/module/ITreasury.sol +23 -0
- package/contracts/instance/service/ComponentOwnerService.sol +317 -0
- package/contracts/instance/service/DistributionService.sol +96 -0
- package/contracts/instance/service/DistributionServiceManager.sol +53 -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/registry/ChainNft.sol +202 -0
- package/contracts/registry/IRegistry.sol +94 -0
- package/contracts/registry/IRegistryService.sol +33 -0
- package/contracts/registry/ITransferInterceptor.sol +6 -0
- package/contracts/registry/Registry.sol +489 -0
- package/contracts/registry/RegistryService.sol +399 -0
- package/contracts/registry/RegistryServiceManager.sol +80 -0
- package/contracts/registry/TokenRegistry.sol +111 -0
- package/contracts/shared/ContractDeployerLib.sol +72 -0
- package/contracts/shared/ERC165.sol +25 -0
- package/contracts/shared/INftOwnable.sol +22 -0
- package/contracts/shared/IRegisterable.sol +17 -0
- package/contracts/shared/IService.sol +15 -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 +90 -0
- package/contracts/shared/RegisterableUpgradable.sol +16 -0
- package/contracts/shared/Service.sol +54 -0
- package/contracts/shared/TokenHandler.sol +27 -0
- package/contracts/shared/UpgradableProxyWithAdmin.sol +16 -0
- package/contracts/shared/Versionable.sol +147 -0
- package/contracts/test/TestFee.sol +25 -0
- package/contracts/test/TestRegisterable.sol +18 -0
- package/contracts/test/TestRoleId.sol +14 -0
- package/contracts/test/TestService.sol +24 -0
- package/contracts/{Dip.sol → test/TestToken.sol} +5 -5
- 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 +38 -0
- package/contracts/types/DistributorType.sol +55 -0
- package/contracts/types/Fee.sol +56 -0
- package/contracts/types/Key32.sol +50 -0
- package/contracts/types/NftId.sol +72 -0
- package/contracts/types/NftIdSet.sol +60 -0
- package/contracts/types/NumberId.sol +52 -0
- package/contracts/types/ObjectType.sol +152 -0
- package/contracts/types/Referral.sol +85 -0
- package/contracts/types/RiskId.sol +43 -0
- package/contracts/types/RoleId.sol +88 -0
- package/contracts/types/StateId.sol +105 -0
- package/contracts/types/Timestamp.sol +127 -0
- package/contracts/types/UFixed.sol +325 -0
- package/contracts/types/Version.sol +107 -0
- package/package.json +26 -10
- package/artifacts/contracts/Dip.sol/DIP.dbg.json +0 -4
- package/artifacts/contracts/Dip.sol/DIP.json +0 -338
- package/artifacts/contracts/Lock.sol/Lock.dbg.json +0 -4
- package/artifacts/contracts/Lock.sol/Lock.json +0 -74
- package/contracts/Lock.sol +0 -34
@@ -0,0 +1,37 @@
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
2
|
+
pragma solidity ^0.8.19;
|
3
|
+
|
4
|
+
import {NftId} from "../../types/NftId.sol";
|
5
|
+
import {Fee} from "../../types/Fee.sol";
|
6
|
+
import {IService} from "../../shared/IService.sol";
|
7
|
+
|
8
|
+
interface IPoolService is IService {
|
9
|
+
function setFees(
|
10
|
+
Fee memory poolFee,
|
11
|
+
Fee memory stakingFee,
|
12
|
+
Fee memory performanceFee
|
13
|
+
) external;
|
14
|
+
|
15
|
+
function createBundle(
|
16
|
+
address owner,
|
17
|
+
Fee memory fee,
|
18
|
+
uint256 amount,
|
19
|
+
uint256 lifetime,
|
20
|
+
bytes calldata filter
|
21
|
+
) external returns(NftId bundleNftId);
|
22
|
+
|
23
|
+
function setBundleFee(
|
24
|
+
NftId bundleNftId,
|
25
|
+
Fee memory fee
|
26
|
+
) external;
|
27
|
+
|
28
|
+
// function fundBundle(NftId bundleNftId, uint256 amount) external returns(uint256 netAmount);
|
29
|
+
|
30
|
+
// function defundBundle(NftId bundleNftId, uint256 amount) external returns(uint256 netAmount);
|
31
|
+
|
32
|
+
// function lockBundle(NftId bundleNftId) external;
|
33
|
+
|
34
|
+
// function unlockBundle(NftId bundleNftId) external;
|
35
|
+
|
36
|
+
// function closeBundle(NftId bundleNftId) external;
|
37
|
+
}
|
@@ -0,0 +1,107 @@
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
2
|
+
pragma solidity ^0.8.19;
|
3
|
+
|
4
|
+
import {IRisk} from "../module/IRisk.sol";
|
5
|
+
import {IService} from "../../shared/IService.sol";
|
6
|
+
|
7
|
+
import {NftId} from "../../types/NftId.sol";
|
8
|
+
import {ReferralId} from "../../types/Referral.sol";
|
9
|
+
import {RiskId} from "../../types/RiskId.sol";
|
10
|
+
import {StateId} from "../../types/StateId.sol";
|
11
|
+
import {Timestamp} from "../../types/Timestamp.sol";
|
12
|
+
import {UFixed} from "../../types/UFixed.sol";
|
13
|
+
import {Fee} from "../../types/Fee.sol";
|
14
|
+
|
15
|
+
interface IProductService is IService {
|
16
|
+
function setFees(
|
17
|
+
Fee memory productFee,
|
18
|
+
Fee memory processingFee
|
19
|
+
) external;
|
20
|
+
|
21
|
+
function createRisk(
|
22
|
+
RiskId riskId,
|
23
|
+
bytes memory data
|
24
|
+
) external;
|
25
|
+
|
26
|
+
|
27
|
+
function setRiskInfo(
|
28
|
+
RiskId riskId,
|
29
|
+
IRisk.RiskInfo memory data
|
30
|
+
) external;
|
31
|
+
|
32
|
+
|
33
|
+
function updateRiskState(
|
34
|
+
RiskId riskId,
|
35
|
+
StateId state
|
36
|
+
) external;
|
37
|
+
|
38
|
+
|
39
|
+
function calculatePremium(
|
40
|
+
RiskId riskId,
|
41
|
+
uint256 sumInsuredAmount,
|
42
|
+
uint256 lifetime,
|
43
|
+
bytes memory applicationData,
|
44
|
+
NftId bundleNftId,
|
45
|
+
ReferralId referralId
|
46
|
+
)
|
47
|
+
external
|
48
|
+
view
|
49
|
+
returns (
|
50
|
+
uint256 premiumAmount,
|
51
|
+
uint256 productFeeAmount,
|
52
|
+
uint256 poolFeeAmount,
|
53
|
+
uint256 bundleFeeAmount,
|
54
|
+
uint256 distributionFeeAmount
|
55
|
+
);
|
56
|
+
|
57
|
+
|
58
|
+
function createApplication(
|
59
|
+
address applicationOwner,
|
60
|
+
RiskId riskId,
|
61
|
+
uint256 sumInsuredAmount,
|
62
|
+
uint256 lifetime,
|
63
|
+
bytes memory applicationData,
|
64
|
+
NftId bundleNftId,
|
65
|
+
ReferralId referralId
|
66
|
+
) external returns (NftId nftId);
|
67
|
+
|
68
|
+
/**
|
69
|
+
* @dev revokes the application represented by {policyNftId}.
|
70
|
+
* an application can only be revoked in applied state.
|
71
|
+
* only the application holder may revoke an application.
|
72
|
+
*/
|
73
|
+
function revoke(NftId policyNftId) external;
|
74
|
+
|
75
|
+
/**
|
76
|
+
* @dev underwrites the policy represented by {policyNftId}.
|
77
|
+
* optionally collects premiums and activates the policy.
|
78
|
+
* - premium payment is only attempted if requirePremiumPayment is set to true
|
79
|
+
* - activation is only done if activateAt is a non-zero timestamp
|
80
|
+
*/
|
81
|
+
function underwrite(
|
82
|
+
NftId policyNftId,
|
83
|
+
bool requirePremiumPayment,
|
84
|
+
Timestamp activateAt
|
85
|
+
) external;
|
86
|
+
|
87
|
+
// function decline(uint256 nftId) external;
|
88
|
+
// function expire(uint256 nftId) external;
|
89
|
+
|
90
|
+
function collectPremium(NftId policyNftId, Timestamp activateAt) external;
|
91
|
+
|
92
|
+
function activate(NftId policyNftId, Timestamp activateAt) external;
|
93
|
+
|
94
|
+
|
95
|
+
function close(NftId nftId) external;
|
96
|
+
|
97
|
+
// function createClaim(uint256 nftId, uint256 claimAmount) external;
|
98
|
+
// function confirmClaim(uint256 nftId, uint256 claimId, uint256 claimAmount) external;
|
99
|
+
// function declineClaim(uint256 nftId, uint256 claimId) external;
|
100
|
+
// function closeClaim(uint256 nftId, uint256 claimId) external;
|
101
|
+
|
102
|
+
function calculateRequiredCollateral(
|
103
|
+
UFixed collateralizationLevel,
|
104
|
+
uint256 sumInsuredAmount
|
105
|
+
) external pure returns(uint256 collateralAmount);
|
106
|
+
|
107
|
+
}
|
@@ -0,0 +1,202 @@
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
2
|
+
pragma solidity ^0.8.20;
|
3
|
+
|
4
|
+
import {ERC721, ERC721Enumerable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
|
5
|
+
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
|
6
|
+
|
7
|
+
import {ITransferInterceptor} from "./ITransferInterceptor.sol";
|
8
|
+
|
9
|
+
contract ChainNft is ERC721Enumerable {
|
10
|
+
|
11
|
+
// constants
|
12
|
+
string public constant NAME = "Dezentralized Insurance Protocol NFT";
|
13
|
+
string public constant SYMBOL = "DIPNFT";
|
14
|
+
|
15
|
+
uint256 public constant PROTOCOL_NFT_ID = 1101;
|
16
|
+
uint256 public constant GLOBAL_REGISTRY_ID = 2101;
|
17
|
+
|
18
|
+
// custom errors
|
19
|
+
error CallerNotRegistry(address caller);
|
20
|
+
error RegistryAddressZero();
|
21
|
+
error NftUriEmpty();
|
22
|
+
error NftUriAlreadySet();
|
23
|
+
|
24
|
+
// contract state
|
25
|
+
|
26
|
+
// remember interceptors
|
27
|
+
mapping(uint256 tokenId => address interceptor) private _interceptor;
|
28
|
+
|
29
|
+
// remember token uri
|
30
|
+
mapping(uint256 tokenId => string uri) private _uri;
|
31
|
+
|
32
|
+
// remember registry
|
33
|
+
address private _registry;
|
34
|
+
|
35
|
+
// only used for _getNextTokenId
|
36
|
+
uint256 internal _chainIdInt;
|
37
|
+
uint256 internal _chainIdDigits;
|
38
|
+
uint256 internal _chainIdMultiplier;
|
39
|
+
uint256 internal _idNext;
|
40
|
+
uint256 internal _totalMinted;
|
41
|
+
|
42
|
+
modifier onlyRegistry() {
|
43
|
+
if (msg.sender != _registry) { revert CallerNotRegistry(msg.sender); }
|
44
|
+
_;
|
45
|
+
}
|
46
|
+
|
47
|
+
constructor(address registry) ERC721(NAME, SYMBOL) {
|
48
|
+
if (registry == address(0)) { revert RegistryAddressZero(); }
|
49
|
+
|
50
|
+
_registry = registry;
|
51
|
+
_chainIdInt = block.chainid;
|
52
|
+
_chainIdDigits = 0;
|
53
|
+
|
54
|
+
// count digis
|
55
|
+
uint256 num = _chainIdInt;
|
56
|
+
while (num != 0) {
|
57
|
+
_chainIdDigits++;
|
58
|
+
num /= 10;
|
59
|
+
}
|
60
|
+
|
61
|
+
_chainIdMultiplier = 10 ** _chainIdDigits;
|
62
|
+
_idNext = 4;
|
63
|
+
}
|
64
|
+
|
65
|
+
/**
|
66
|
+
* @dev mints a token for a specified token id
|
67
|
+
* not part of the IRegistry interface only needed for
|
68
|
+
* initial registry setup (protocol and global registry objects)
|
69
|
+
*/
|
70
|
+
function mint(address to, uint256 tokenId) external onlyRegistry {
|
71
|
+
_totalMinted++;
|
72
|
+
_safeMint(to, tokenId);
|
73
|
+
}
|
74
|
+
|
75
|
+
|
76
|
+
/**
|
77
|
+
* @dev mints the next token to register new objects
|
78
|
+
* non-zero transferInterceptors are recorded and called during nft token transfers.
|
79
|
+
* the contract receiving such a notification may decides to revert or record the transfer
|
80
|
+
*/
|
81
|
+
function mint(
|
82
|
+
address to,
|
83
|
+
address interceptor,
|
84
|
+
string memory uri
|
85
|
+
) public onlyRegistry returns (uint256 tokenId) {
|
86
|
+
tokenId = _getNextTokenId();
|
87
|
+
|
88
|
+
if (interceptor != address(0)) {
|
89
|
+
_interceptor[tokenId] = interceptor;
|
90
|
+
}
|
91
|
+
|
92
|
+
if (bytes(uri).length > 0) {
|
93
|
+
_uri[tokenId] = uri;
|
94
|
+
}
|
95
|
+
|
96
|
+
_totalMinted++;
|
97
|
+
_safeMint(to, tokenId);
|
98
|
+
}
|
99
|
+
|
100
|
+
|
101
|
+
/**
|
102
|
+
* @dev amend the open zeppelin transferFrom function by an interceptor call if such an interceptor is defined for the nft token id
|
103
|
+
* this allows distribution, product and pool components to be notified when distributors, policies and bundles are transferred.
|
104
|
+
*/
|
105
|
+
function transferFrom(address from, address to, uint256 tokenId) public override (ERC721, IERC721) {
|
106
|
+
super.transferFrom(from, to, tokenId);
|
107
|
+
|
108
|
+
if (_interceptor[tokenId] != address(0)) {
|
109
|
+
ITransferInterceptor(_interceptor[tokenId]).nftTransferFrom(from, to, tokenId);
|
110
|
+
}
|
111
|
+
}
|
112
|
+
|
113
|
+
|
114
|
+
function burn(uint256 tokenId) external onlyRegistry {
|
115
|
+
_requireOwned(tokenId);
|
116
|
+
_burn(tokenId);
|
117
|
+
delete _uri[tokenId];
|
118
|
+
}
|
119
|
+
|
120
|
+
function setURI(
|
121
|
+
uint256 tokenId,
|
122
|
+
string memory uri
|
123
|
+
) external onlyRegistry {
|
124
|
+
if (bytes(uri).length == 0) { revert NftUriEmpty(); }
|
125
|
+
if (bytes(_uri[tokenId]).length > 0) { revert NftUriAlreadySet(); }
|
126
|
+
|
127
|
+
_requireOwned(tokenId);
|
128
|
+
_uri[tokenId] = uri;
|
129
|
+
}
|
130
|
+
|
131
|
+
function exists(uint256 tokenId) external view returns (bool) {
|
132
|
+
return _ownerOf(tokenId) != address(0);
|
133
|
+
}
|
134
|
+
|
135
|
+
function tokenURI(
|
136
|
+
uint256 tokenId
|
137
|
+
) public view override returns (string memory) {
|
138
|
+
// gif generally does not revert for view functions
|
139
|
+
// this is an exception to keep the openzeppelin nft semantics
|
140
|
+
_requireOwned(tokenId);
|
141
|
+
return _uri[tokenId];
|
142
|
+
}
|
143
|
+
|
144
|
+
function getInterceptor(uint256 tokenId) external view returns (address) {
|
145
|
+
return _interceptor[tokenId];
|
146
|
+
}
|
147
|
+
|
148
|
+
function getRegistryAddress() external view returns (address) {
|
149
|
+
return _registry;
|
150
|
+
}
|
151
|
+
|
152
|
+
function totalMinted() external view returns (uint256) {
|
153
|
+
return _totalMinted;
|
154
|
+
}
|
155
|
+
|
156
|
+
/**
|
157
|
+
* @dev token id calculation based on an index value that is supposed
|
158
|
+
* to increase with every minted token
|
159
|
+
*
|
160
|
+
* requirement: each chain registry produces token ids that
|
161
|
+
* are guaranteed to not collide with any token id genereated
|
162
|
+
* on a different chain
|
163
|
+
*
|
164
|
+
* format concat(counter,chainid,2 digits for len-of-chain-id)
|
165
|
+
* restriction chainid up to 99 digits
|
166
|
+
* decode: from right to left:
|
167
|
+
* - 2 right most digits encode length of chainid
|
168
|
+
* - move number of digits to left as determined above (-> chainid)
|
169
|
+
* - the reminder to the left is the counter
|
170
|
+
*
|
171
|
+
* special cases
|
172
|
+
* 1101 -> decentralized insurance protocol
|
173
|
+
* 2102 -> global registry
|
174
|
+
* 2xxxxx -> chain registry, where xxxxx = <chain-part>
|
175
|
+
*
|
176
|
+
* examples
|
177
|
+
* 1101
|
178
|
+
* ^^ ^
|
179
|
+
* || +- 1-digit chain id
|
180
|
+
* |+-- chain id = 1 (mainnet)
|
181
|
+
* +-- 1st token id on mainnet
|
182
|
+
* (1 * 10 ** 1 + 1) * 100 + 1
|
183
|
+
* 42987654321010
|
184
|
+
* ^ ^ ^
|
185
|
+
* | | +- 10-digit chain id
|
186
|
+
* | +-- chain id = 9876543210 (hypothetical chainid)
|
187
|
+
* +-- 42nd token id on this chain
|
188
|
+
* (42 * 10 ** 10 + 9876543210) * 100 + 10
|
189
|
+
* (index * 10 ** digits + chainid) * 100 + digits (1 < digits < 100)
|
190
|
+
*/
|
191
|
+
function calculateTokenId(uint256 idIndex) public view returns (uint256 id) {
|
192
|
+
id =
|
193
|
+
(idIndex * _chainIdMultiplier + _chainIdInt) *
|
194
|
+
100 +
|
195
|
+
_chainIdDigits;
|
196
|
+
}
|
197
|
+
|
198
|
+
function _getNextTokenId() private returns (uint256 id) {
|
199
|
+
id = calculateTokenId(_idNext);
|
200
|
+
_idNext++;
|
201
|
+
}
|
202
|
+
}
|
@@ -0,0 +1,94 @@
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
2
|
+
pragma solidity ^0.8.20;
|
3
|
+
|
4
|
+
import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
|
5
|
+
|
6
|
+
import {ChainNft} from "./ChainNft.sol";
|
7
|
+
import {NftId} from "../types/NftId.sol";
|
8
|
+
import {ObjectType} from "../types/ObjectType.sol";
|
9
|
+
import {VersionPart} from "../types/Version.sol";
|
10
|
+
|
11
|
+
interface IRegistry is IERC165 {
|
12
|
+
|
13
|
+
event LogInitialMajorVersionSet(VersionPart majorVersion);
|
14
|
+
event LogMajorVersionSet(VersionPart majorVersionMax);
|
15
|
+
event LogRegistration(ObjectInfo info);
|
16
|
+
event LogTokenStateSet(address token, VersionPart majorVersion, bool active);
|
17
|
+
event LogServiceNameRegistration(string serviceName, VersionPart majorVersion);
|
18
|
+
|
19
|
+
// supported versions
|
20
|
+
error MajorVersionMaxIncreaseInvalid(VersionPart newMajorVersionMax, VersionPart existingMaxMajorVersion);
|
21
|
+
|
22
|
+
// token whitelisting
|
23
|
+
error TokenNotRegistered(address token);
|
24
|
+
error NotToken(address token);
|
25
|
+
error TokenMajorVersionInvalid(VersionPart majorVersion);
|
26
|
+
|
27
|
+
// register
|
28
|
+
error NotRegistryService();
|
29
|
+
error ZeroParentAddress();
|
30
|
+
error ContractAlreadyRegistered(address objectAddress);
|
31
|
+
error InvalidServiceVersion(VersionPart majorVersion);
|
32
|
+
error ServiceNameAlreadyRegistered(string name, VersionPart majorVersion);
|
33
|
+
|
34
|
+
// approve
|
35
|
+
error NotOwner(address account);
|
36
|
+
error NotRegisteredContract(NftId registrarNftId);
|
37
|
+
error NotService(NftId registrarNftId);
|
38
|
+
error InvalidTypesCombination(ObjectType objectType, ObjectType parentType);
|
39
|
+
|
40
|
+
|
41
|
+
struct ObjectInfo {
|
42
|
+
NftId nftId;
|
43
|
+
NftId parentNftId;
|
44
|
+
ObjectType objectType;
|
45
|
+
bool isInterceptor;
|
46
|
+
address objectAddress;
|
47
|
+
address initialOwner;
|
48
|
+
bytes data;
|
49
|
+
}// TODO delete nftId and initialOwner(if not used) from struct
|
50
|
+
// TODO strong disagree, keep nftId there (lets keep get object info return object consistent)
|
51
|
+
|
52
|
+
function setMajorVersion(VersionPart newMajorVersionMax) external;
|
53
|
+
|
54
|
+
function register(ObjectInfo memory info) external returns (NftId nftId);
|
55
|
+
|
56
|
+
function setTokenActive(address token, VersionPart majorVersion, bool active) external;
|
57
|
+
|
58
|
+
function getMajorVersionMin() external view returns (VersionPart);
|
59
|
+
|
60
|
+
function getMajorVersionMax() external view returns (VersionPart);
|
61
|
+
|
62
|
+
function getMajorVersion() external view returns (VersionPart);
|
63
|
+
|
64
|
+
function getObjectCount() external view returns (uint256);
|
65
|
+
|
66
|
+
function getNftId() external view returns (NftId nftId);
|
67
|
+
|
68
|
+
function getNftId(address objectAddress) external view returns (NftId nftId);
|
69
|
+
|
70
|
+
function ownerOf(NftId nftId) external view returns (address);
|
71
|
+
|
72
|
+
function ownerOf(address contractAddress) external view returns (address);
|
73
|
+
|
74
|
+
function getObjectInfo(NftId nftId) external view returns (ObjectInfo memory info);
|
75
|
+
|
76
|
+
function getObjectInfo(address object) external view returns (ObjectInfo memory info);
|
77
|
+
|
78
|
+
function isRegistered(NftId nftId) external view returns (bool);
|
79
|
+
|
80
|
+
function isRegistered(address contractAddress) external view returns (bool);
|
81
|
+
|
82
|
+
function isTokenActive(address token, VersionPart majorVersion) external view returns (bool);
|
83
|
+
|
84
|
+
function getServiceName(NftId nftId) external view returns (string memory name);
|
85
|
+
|
86
|
+
function getServiceAddress(
|
87
|
+
string memory serviceName,
|
88
|
+
VersionPart majorVersion
|
89
|
+
) external view returns (address serviceAddress);
|
90
|
+
|
91
|
+
function getChainNft() external view returns (ChainNft);
|
92
|
+
|
93
|
+
function getOwner() external view returns (address);
|
94
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
2
|
+
pragma solidity ^0.8.20;
|
3
|
+
|
4
|
+
import {NftId} from "../types/NftId.sol";
|
5
|
+
import {ObjectType} from "../types/ObjectType.sol";
|
6
|
+
import {RoleId} from "../types/RoleId.sol";
|
7
|
+
import {IService} from "../shared/IService.sol";
|
8
|
+
import {IRegistry} from "./IRegistry.sol";
|
9
|
+
|
10
|
+
import {IRegisterable} from "../shared/IRegisterable.sol";
|
11
|
+
import {IBaseComponent} from "../components/IBaseComponent.sol";
|
12
|
+
|
13
|
+
interface IRegistryService is IService {
|
14
|
+
|
15
|
+
function registerService(IService service) external returns(IRegistry.ObjectInfo memory info, bytes memory data);
|
16
|
+
|
17
|
+
function registerInstance(IRegisterable instance)
|
18
|
+
external returns(IRegistry.ObjectInfo memory info, bytes memory data);
|
19
|
+
|
20
|
+
function registerProduct(IBaseComponent product, address owner)
|
21
|
+
external returns(IRegistry.ObjectInfo memory info, bytes memory data);
|
22
|
+
|
23
|
+
function registerPool(IBaseComponent pool, address owner)
|
24
|
+
external returns(IRegistry.ObjectInfo memory info, bytes memory data);
|
25
|
+
|
26
|
+
function registerDistribution(IBaseComponent distribution, address owner)
|
27
|
+
external returns(IRegistry.ObjectInfo memory info, bytes memory data);
|
28
|
+
|
29
|
+
function registerPolicy(IRegistry.ObjectInfo memory info) external returns(NftId nftId); // -> easy to upgrade
|
30
|
+
|
31
|
+
function registerBundle(IRegistry.ObjectInfo memory info) external returns(NftId nftId);
|
32
|
+
}
|
33
|
+
|