@etherisc/gif-next 0.0.2-eb7397c → 0.0.2-eb7c077-523
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +388 -8
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +4 -0
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.json +1253 -0
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.dbg.json +4 -0
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.json +1206 -0
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.json +358 -0
- package/artifacts/contracts/authorization/IAccess.sol/IAccess.dbg.json +4 -0
- package/artifacts/contracts/{instance/access → authorization}/IAccess.sol/IAccess.json +1 -1
- package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.dbg.json +4 -0
- package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.json +1032 -0
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.json +258 -0
- package/artifacts/contracts/authorization/IModuleAuthorization.sol/IModuleAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/IModuleAuthorization.sol/IModuleAuthorization.json +290 -0
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.json +148 -0
- package/artifacts/contracts/authorization/ModuleAuthorization.sol/ModuleAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/ModuleAuthorization.sol/ModuleAuthorization.json +390 -0
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.json +190 -0
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +4 -0
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +1505 -0
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +4 -0
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +410 -0
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +4 -0
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +1191 -0
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +4 -0
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +1394 -0
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +4 -0
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +826 -0
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +4 -0
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +900 -0
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +4 -0
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +843 -0
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.dbg.json +4 -0
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.json +703 -0
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +289 -529
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +4 -0
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +757 -0
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +446 -609
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +4 -0
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +1626 -0
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +4 -0
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +601 -0
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +4 -0
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +1735 -0
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +4 -0
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +1160 -0
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +4 -0
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +734 -0
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +4 -0
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +3591 -0
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.dbg.json +4 -0
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.json +318 -0
- package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.dbg.json +4 -0
- package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.json +137 -0
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.dbg.json +4 -0
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.json +10 -0
- package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.dbg.json +4 -0
- package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.json +182 -0
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.dbg.json +4 -0
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.json +181 -0
- package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +4 -0
- package/artifacts/contracts/instance/module/IAccess.sol/IAccess.json +129 -0
- package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +4 -0
- package/artifacts/contracts/instance/{pool/IPoolModule.sol/IPool.json → module/IBundle.sol/IBundle.json} +2 -2
- package/artifacts/contracts/instance/module/IComponents.sol/IComponents.dbg.json +4 -0
- package/artifacts/contracts/instance/{component/IComponent.sol/IComponent.json → module/IComponents.sol/IComponents.json} +2 -2
- 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/{policy → module}/IPolicy.sol/IPolicy.json +1 -1
- 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/mock/Dip.sol/Dip.dbg.json +4 -0
- package/artifacts/contracts/mock/Dip.sol/Dip.json +376 -0
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.dbg.json +4 -0
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.json +1155 -0
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +4 -0
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +418 -0
- package/artifacts/contracts/oracle/IOracle.sol/IOracle.dbg.json +4 -0
- package/artifacts/contracts/oracle/IOracle.sol/IOracle.json +52 -0
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.dbg.json +4 -0
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.json +772 -0
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.dbg.json +4 -0
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.json +675 -0
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.dbg.json +4 -0
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.json +1063 -0
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +4 -0
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +1034 -0
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +4 -0
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +730 -0
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +4 -0
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.json +1477 -0
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.dbg.json +4 -0
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.json +410 -0
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +4 -0
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +1134 -0
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +4 -0
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +754 -0
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +4 -0
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.json +703 -0
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +4 -0
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.json +959 -0
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +4 -0
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.json +1078 -0
- package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +4 -0
- package/artifacts/contracts/pool/Pool.sol/Pool.json +1269 -0
- package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +4 -0
- package/artifacts/contracts/pool/PoolService.sol/PoolService.json +1453 -0
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +4 -0
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +742 -0
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +4 -0
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +863 -0
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +4 -0
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +730 -0
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +4 -0
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +1299 -0
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.dbg.json +4 -0
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.json +410 -0
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +4 -0
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +1315 -0
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +4 -0
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +822 -0
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +4 -0
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.json +512 -0
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +4 -0
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.json +772 -0
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +4 -0
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.json +720 -0
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +4 -0
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.json +549 -0
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +4 -0
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.json +966 -0
- package/artifacts/contracts/product/IProductService.sol/IProductService.dbg.json +4 -0
- package/artifacts/contracts/product/IProductService.sol/IProductService.json +400 -0
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +4 -0
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +1183 -0
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +4 -0
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +766 -0
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +4 -0
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +1012 -0
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +4 -0
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +786 -0
- package/artifacts/contracts/product/Product.sol/Product.dbg.json +4 -0
- package/artifacts/contracts/product/Product.sol/Product.json +1257 -0
- package/artifacts/contracts/product/ProductService.sol/ProductService.dbg.json +4 -0
- package/artifacts/contracts/product/ProductService.sol/ProductService.json +708 -0
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.dbg.json +4 -0
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.json +702 -0
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +276 -2
- package/artifacts/contracts/registry/GlobalRegistry.sol/GlobalRegistry.dbg.json +4 -0
- package/artifacts/contracts/registry/GlobalRegistry.sol/GlobalRegistry.json +1503 -0
- package/artifacts/contracts/registry/GlobalRegistryAdmin.sol/GlobalRegistryAdmin.dbg.json +4 -0
- package/artifacts/contracts/registry/GlobalRegistryAdmin.sol/GlobalRegistryAdmin.json +1881 -0
- package/artifacts/contracts/registry/IGlobalRegistry.sol/IGlobalRegistry.dbg.json +4 -0
- package/artifacts/contracts/registry/IGlobalRegistry.sol/IGlobalRegistry.json +974 -0
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +722 -102
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +4 -0
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +940 -0
- package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +4 -0
- package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.json +52 -0
- package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.json +1156 -130
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +4 -0
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +1871 -0
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +4 -0
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +1452 -0
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +4 -0
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +721 -0
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.dbg.json +4 -0
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.json +164 -0
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.dbg.json +4 -0
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.json +1140 -0
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +4 -0
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +214 -0
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +4 -0
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +661 -0
- package/artifacts/contracts/shared/Component.sol/Component.dbg.json +4 -0
- package/artifacts/contracts/shared/Component.sol/Component.json +896 -0
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +4 -0
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +1487 -0
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +4 -0
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +784 -0
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +4 -0
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.json +539 -0
- package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +4 -0
- package/artifacts/contracts/shared/ERC165.sol/ERC165.json +73 -0
- package/artifacts/contracts/shared/IComponent.sol/IComponent.dbg.json +4 -0
- package/artifacts/contracts/shared/IComponent.sol/IComponent.json +631 -0
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +4 -0
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.json +880 -0
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +4 -0
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.json +718 -0
- package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.dbg.json +4 -0
- package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.json +474 -0
- package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.dbg.json +4 -0
- package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.json +110 -0
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +4 -0
- package/artifacts/contracts/{registry/Registry.sol/Registerable.json → shared/INftOwnable.sol/INftOwnable.json} +42 -77
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +4 -0
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.json +207 -0
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +4 -0
- package/artifacts/contracts/{instance/pool/PoolModule.sol/PoolModule.json → shared/IRegisterable.sol/IRegisterable.json} +98 -79
- package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +4 -0
- package/artifacts/contracts/{instance/access/IAccess.sol/IAccessCheckRole.json → shared/IRegistryLinked.sol/IRegistryLinked.json} +11 -11
- package/artifacts/contracts/shared/IService.sol/IService.dbg.json +4 -0
- package/artifacts/contracts/shared/IService.sol/IService.json +346 -0
- package/artifacts/contracts/shared/InitializableCustom.sol/InitializableCustom.dbg.json +4 -0
- package/artifacts/contracts/shared/InitializableCustom.sol/InitializableCustom.json +39 -0
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.dbg.json +4 -0
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.json +996 -0
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.dbg.json +4 -0
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.json +497 -0
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.dbg.json +4 -0
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.json +133 -0
- package/artifacts/contracts/shared/MainnetId.sol/MainnetContract.dbg.json +4 -0
- package/artifacts/contracts/shared/MainnetId.sol/MainnetContract.json +34 -0
- package/artifacts/contracts/shared/MainnetId.sol/MainnetId.dbg.json +4 -0
- package/artifacts/contracts/shared/MainnetId.sol/MainnetId.json +24 -0
- package/artifacts/contracts/shared/MainnetId.sol/SidenetContract.dbg.json +4 -0
- package/artifacts/contracts/shared/MainnetId.sol/SidenetContract.json +34 -0
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.dbg.json +4 -0
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.json +306 -0
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +4 -0
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +244 -0
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +4 -0
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +320 -0
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +4 -0
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +353 -0
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +4 -0
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +71 -0
- package/artifacts/contracts/shared/Service.sol/Service.dbg.json +4 -0
- package/artifacts/contracts/shared/Service.sol/Service.json +507 -0
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +4 -0
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +150 -0
- package/artifacts/contracts/staking/IStaking.sol/IStaking.dbg.json +4 -0
- package/artifacts/contracts/staking/IStaking.sol/IStaking.json +1438 -0
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +4 -0
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.json +1035 -0
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.dbg.json +4 -0
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.json +460 -0
- package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +4 -0
- package/artifacts/contracts/staking/Staking.sol/Staking.json +2005 -0
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.dbg.json +4 -0
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.json +164 -0
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +4 -0
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +761 -0
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +4 -0
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +592 -0
- package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +4 -0
- package/artifacts/contracts/staking/StakingService.sol/StakingService.json +1343 -0
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +4 -0
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +718 -0
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +4 -0
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +2237 -0
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +4 -0
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +571 -0
- package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.dbg.json +4 -0
- package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.json +10 -0
- package/artifacts/contracts/type/Amount.sol/AmountLib.dbg.json +4 -0
- package/artifacts/contracts/type/Amount.sol/AmountLib.json +345 -0
- package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.dbg.json +4 -0
- package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.json +225 -0
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.dbg.json +4 -0
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.json +179 -0
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.dbg.json +4 -0
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.json +104 -0
- package/artifacts/contracts/type/Fee.sol/FeeLib.dbg.json +4 -0
- package/artifacts/contracts/type/Fee.sol/FeeLib.json +312 -0
- package/artifacts/contracts/type/Key32.sol/Key32Lib.dbg.json +4 -0
- package/artifacts/contracts/type/Key32.sol/Key32Lib.json +125 -0
- package/artifacts/contracts/type/NftId.sol/NftIdLib.dbg.json +4 -0
- package/artifacts/contracts/type/NftId.sol/NftIdLib.json +209 -0
- package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.dbg.json +4 -0
- package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.json +33 -0
- package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.dbg.json +4 -0
- package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.json +239 -0
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.dbg.json +4 -0
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.json +209 -0
- package/artifacts/contracts/type/Referral.sol/ReferralLib.dbg.json +4 -0
- package/artifacts/contracts/type/Referral.sol/ReferralLib.json +142 -0
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.dbg.json +4 -0
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.json +204 -0
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +4 -0
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.json +86 -0
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +4 -0
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.json +369 -0
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +4 -0
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.json +198 -0
- package/artifacts/contracts/type/Selector.sol/SelectorLib.dbg.json +4 -0
- package/artifacts/contracts/type/Selector.sol/SelectorLib.json +129 -0
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.dbg.json +4 -0
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.json +10 -0
- package/artifacts/contracts/type/StateId.sol/StateIdLib.dbg.json +4 -0
- package/artifacts/contracts/type/StateId.sol/StateIdLib.json +92 -0
- package/artifacts/contracts/type/String.sol/StrLib.dbg.json +4 -0
- package/artifacts/contracts/type/String.sol/StrLib.json +132 -0
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.dbg.json +4 -0
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.json +293 -0
- package/artifacts/contracts/type/UFixed.sol/MathLib.dbg.json +4 -0
- package/artifacts/contracts/type/UFixed.sol/MathLib.json +10 -0
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.dbg.json +4 -0
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.json +498 -0
- package/artifacts/contracts/type/Version.sol/VersionLib.dbg.json +4 -0
- package/artifacts/contracts/type/Version.sol/VersionLib.json +177 -0
- package/artifacts/contracts/type/Version.sol/VersionPartLib.dbg.json +4 -0
- package/artifacts/contracts/type/Version.sol/VersionPartLib.json +68 -0
- package/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.dbg.json +4 -0
- package/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.json +55 -0
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.dbg.json +4 -0
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.json +617 -0
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +4 -0
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +129 -0
- package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +4 -0
- package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.json +78 -0
- package/contracts/authorization/AccessAdmin.sol +590 -0
- package/contracts/authorization/AccessManagerCloneable.sol +16 -0
- package/contracts/authorization/Authorization.sol +218 -0
- package/contracts/authorization/IAccess.sol +48 -0
- package/contracts/authorization/IAccessAdmin.sol +136 -0
- package/contracts/authorization/IAuthorization.sol +54 -0
- package/contracts/authorization/IModuleAuthorization.sol +21 -0
- package/contracts/authorization/IServiceAuthorization.sol +38 -0
- package/contracts/authorization/ModuleAuthorization.sol +78 -0
- package/contracts/authorization/ServiceAuthorization.sol +90 -0
- package/contracts/distribution/BasicDistribution.sol +149 -0
- package/contracts/distribution/BasicDistributionAuthorization.sol +43 -0
- package/contracts/distribution/Distribution.sol +283 -0
- package/contracts/distribution/DistributionService.sol +288 -0
- package/contracts/distribution/DistributionServiceManager.sol +39 -0
- package/contracts/distribution/IDistributionComponent.sol +48 -0
- package/contracts/distribution/IDistributionService.sol +85 -0
- package/contracts/instance/BundleSet.sol +126 -0
- package/contracts/instance/IInstance.sol +81 -15
- package/contracts/instance/IInstanceService.sol +92 -0
- package/contracts/instance/Instance.sol +235 -45
- package/contracts/instance/InstanceAdmin.sol +266 -0
- package/contracts/instance/InstanceAuthorizationV3.sol +202 -0
- package/contracts/instance/InstanceReader.sol +405 -0
- package/contracts/instance/InstanceService.sol +443 -0
- package/contracts/instance/InstanceServiceManager.sol +40 -0
- package/contracts/instance/InstanceStore.sol +276 -0
- package/contracts/instance/base/BalanceStore.sol +123 -0
- package/contracts/instance/base/Cloneable.sol +28 -0
- package/contracts/instance/base/ObjectCounter.sol +21 -0
- package/contracts/instance/base/ObjectLifecycle.sol +106 -0
- package/contracts/instance/base/ObjectSet.sol +79 -0
- package/contracts/instance/module/IAccess.sol +46 -0
- package/contracts/instance/module/IBundle.sol +20 -0
- package/contracts/instance/module/IComponents.sol +52 -0
- package/contracts/instance/module/IDistribution.sol +42 -0
- package/contracts/instance/module/IPolicy.sol +84 -0
- package/contracts/instance/module/IRisk.sol +11 -0
- package/contracts/mock/Dip.sol +26 -0
- package/contracts/oracle/BasicOracle.sol +48 -0
- package/contracts/oracle/BasicOracleAuthorization.sol +46 -0
- package/contracts/oracle/IOracle.sol +36 -0
- package/contracts/oracle/IOracleComponent.sol +32 -0
- package/contracts/oracle/IOracleService.sol +65 -0
- package/contracts/oracle/Oracle.sol +157 -0
- package/contracts/oracle/OracleService.sol +278 -0
- package/contracts/oracle/OracleServiceManager.sol +39 -0
- package/contracts/pool/BasicPool.sol +164 -0
- package/contracts/pool/BasicPoolAuthorization.sol +49 -0
- package/contracts/pool/BundleService.sol +284 -0
- package/contracts/pool/BundleServiceManager.sol +39 -0
- package/contracts/pool/IBundleService.sol +106 -0
- package/contracts/pool/IPoolComponent.sol +52 -0
- package/contracts/pool/IPoolService.sol +150 -0
- package/contracts/pool/Pool.sol +311 -0
- package/contracts/pool/PoolService.sol +436 -0
- package/contracts/pool/PoolServiceManager.sol +39 -0
- package/contracts/product/ApplicationService.sol +230 -0
- package/contracts/product/ApplicationServiceManager.sol +38 -0
- package/contracts/product/BasicProduct.sol +82 -0
- package/contracts/product/BasicProductAuthorization.sol +40 -0
- package/contracts/product/ClaimService.sol +416 -0
- package/contracts/product/ClaimServiceManager.sol +38 -0
- package/contracts/product/IApplicationService.sol +62 -0
- package/contracts/product/IClaimService.sol +99 -0
- package/contracts/product/IPolicyService.sol +78 -0
- package/contracts/product/IPricingService.sol +39 -0
- package/contracts/product/IProductComponent.sol +39 -0
- package/contracts/product/IProductService.sol +33 -0
- package/contracts/product/PolicyService.sol +475 -0
- package/contracts/product/PolicyServiceManager.sol +39 -0
- package/contracts/product/PricingService.sol +300 -0
- package/contracts/product/PricingServiceManager.sol +39 -0
- package/contracts/product/Product.sol +392 -0
- package/contracts/product/ProductService.sol +99 -0
- package/contracts/product/ProductServiceManager.sol +39 -0
- package/contracts/registry/ChainNft.sol +153 -108
- package/contracts/registry/GlobalRegistry.sol +95 -0
- package/contracts/registry/GlobalRegistryAdmin.sol +38 -0
- package/contracts/registry/IGlobalRegistry.sol +17 -0
- package/contracts/registry/IRegistry.sol +112 -49
- package/contracts/registry/IRegistryService.sol +69 -0
- package/contracts/registry/ITransferInterceptor.sol +7 -0
- package/contracts/registry/Registry.sol +504 -119
- package/contracts/registry/RegistryAdmin.sol +447 -0
- package/contracts/registry/RegistryService.sol +252 -0
- package/contracts/registry/RegistryServiceManager.sol +53 -0
- package/contracts/registry/ReleaseLifecycle.sol +27 -0
- package/contracts/registry/ReleaseRegistry.sol +533 -0
- package/contracts/registry/ServiceAuthorizationV3.sol +200 -0
- package/contracts/registry/TokenRegistry.sol +315 -0
- package/contracts/shared/Component.sol +281 -0
- package/contracts/shared/ComponentService.sol +581 -0
- package/contracts/shared/ComponentServiceManager.sol +35 -0
- package/contracts/shared/ComponentVerifyingService.sol +117 -0
- package/contracts/shared/ERC165.sol +27 -0
- package/contracts/shared/IComponent.sol +70 -0
- package/contracts/shared/IComponentService.sol +102 -0
- package/contracts/shared/IInstanceLinkedComponent.sol +50 -0
- package/contracts/shared/IKeyValueStore.sol +54 -0
- package/contracts/shared/ILifecycle.sol +29 -0
- package/contracts/shared/INftOwnable.sol +23 -0
- package/contracts/shared/IPolicyHolder.sol +45 -0
- package/contracts/shared/IRegisterable.sol +15 -0
- package/contracts/shared/IRegistryLinked.sol +11 -0
- package/contracts/shared/IService.sol +25 -0
- package/contracts/shared/InitializableCustom.sol +177 -0
- package/contracts/shared/InstanceLinkedComponent.sol +151 -0
- package/contracts/shared/KeyValueStore.sol +131 -0
- package/contracts/shared/Lifecycle.sol +77 -0
- package/contracts/shared/MainnetId.sol +29 -0
- package/contracts/shared/NftIdSet.sol +65 -0
- package/contracts/shared/NftOwnable.sol +107 -0
- package/contracts/shared/PolicyHolder.sol +102 -0
- package/contracts/shared/Registerable.sol +75 -0
- package/contracts/shared/RegistryLinked.sol +43 -0
- package/contracts/shared/Service.sol +82 -0
- package/contracts/shared/TokenHandler.sol +58 -0
- package/contracts/staking/IStaking.sol +167 -0
- package/contracts/staking/IStakingService.sol +160 -0
- package/contracts/staking/StakeManagerLib.sol +231 -0
- package/contracts/staking/Staking.sol +510 -0
- package/contracts/staking/StakingLifecycle.sol +23 -0
- package/contracts/staking/StakingManager.sol +50 -0
- package/contracts/staking/StakingReader.sol +183 -0
- package/contracts/staking/StakingService.sol +411 -0
- package/contracts/staking/StakingServiceManager.sol +44 -0
- package/contracts/staking/StakingStore.sol +605 -0
- package/contracts/staking/TargetManagerLib.sol +207 -0
- package/contracts/type/AddressSet.sol +58 -0
- package/contracts/type/Amount.sol +128 -0
- package/contracts/type/Blocknumber.sol +136 -0
- package/contracts/type/ClaimId.sol +75 -0
- package/contracts/type/DistributorType.sol +55 -0
- package/contracts/type/Fee.sol +66 -0
- package/contracts/type/Key32.sol +50 -0
- package/contracts/type/NftId.sol +78 -0
- package/contracts/type/NftIdSet.sol +62 -0
- package/contracts/type/ObjectType.sol +271 -0
- package/contracts/type/PayoutId.sol +82 -0
- package/contracts/type/Referral.sol +89 -0
- package/contracts/type/RequestId.sol +75 -0
- package/contracts/type/RiskId.sol +43 -0
- package/contracts/type/RoleId.sol +174 -0
- package/contracts/type/Seconds.sol +81 -0
- package/contracts/type/Selector.sol +102 -0
- package/contracts/type/StateId.sol +135 -0
- package/contracts/type/String.sol +53 -0
- package/contracts/type/Timestamp.sol +136 -0
- package/contracts/type/UFixed.sol +332 -0
- package/contracts/type/Version.sol +110 -0
- package/contracts/upgradeability/IVersionable.sol +53 -0
- package/contracts/upgradeability/ProxyManager.sol +198 -0
- package/contracts/upgradeability/UpgradableProxyWithAdmin.sol +14 -0
- package/contracts/upgradeability/Versionable.sol +59 -0
- package/package.json +25 -7
- 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/IPool.sol/IPoolComponent.json +0 -179
- package/artifacts/contracts/components/IProduct.sol/IProductComponent.dbg.json +0 -4
- package/artifacts/contracts/components/IProduct.sol/IProductComponent.json +0 -192
- package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +0 -4
- package/artifacts/contracts/components/Pool.sol/Pool.json +0 -213
- package/artifacts/contracts/components/Product.sol/Product.dbg.json +0 -4
- package/artifacts/contracts/components/Product.sol/Product.json +0 -231
- package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +0 -4
- package/artifacts/contracts/experiment/errors/Require.sol/Require.json +0 -105
- package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +0 -4
- package/artifacts/contracts/experiment/errors/Revert.sol/Revert.json +0 -105
- package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +0 -4
- package/artifacts/contracts/experiment/inheritance/A.sol/A.json +0 -128
- package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +0 -4
- package/artifacts/contracts/experiment/inheritance/A.sol/AShared.json +0 -42
- package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +0 -4
- package/artifacts/contracts/experiment/inheritance/B.sol/B.json +0 -76
- package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +0 -4
- package/artifacts/contracts/experiment/inheritance/C.sol/C.json +0 -89
- package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +0 -4
- package/artifacts/contracts/experiment/inheritance/IA.sol/IA.json +0 -128
- package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +0 -4
- package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.json +0 -37
- package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +0 -4
- package/artifacts/contracts/experiment/inheritance/IB.sol/IB.json +0 -50
- package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +0 -4
- package/artifacts/contracts/experiment/inheritance/IC.sol/IC.json +0 -63
- package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +0 -4
- package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.json +0 -10
- package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +0 -4
- package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.json +0 -10
- package/artifacts/contracts/instance/access/Access.sol/AccessModule.dbg.json +0 -4
- package/artifacts/contracts/instance/access/Access.sol/AccessModule.json +0 -400
- 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/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/access/IAccess.sol/IAccessModule.json +0 -336
- package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.dbg.json +0 -4
- package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.json +0 -327
- package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.dbg.json +0 -4
- package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.json +0 -147
- 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 -179
- 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/component/IComponent.sol/IInstanceLinked.json +0 -24
- 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/IPolicy.sol/IPolicyModule.json +0 -231
- package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.dbg.json +0 -4
- package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.json +0 -231
- 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/IPoolModule.sol/IPoolModule.json +0 -149
- 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 -167
- package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +0 -4
- package/artifacts/contracts/registry/IChainNft.sol/IChainNft.json +0 -452
- 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/RegistryLinked.dbg.json +0 -4
- package/artifacts/contracts/registry/Registry.sol/RegistryLinked.json +0 -60
- package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +0 -4
- package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.json +0 -174
- package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +0 -4
- package/artifacts/contracts/types/ChainId.sol/ChainIdLib.json +0 -10
- package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +0 -4
- package/artifacts/contracts/types/NftId.sol/NftIdLib.json +0 -92
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +0 -4
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +0 -174
- package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +0 -4
- package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +0 -440
- package/contracts/components/Component.sol +0 -62
- package/contracts/components/IPool.sol +0 -9
- package/contracts/components/IProduct.sol +0 -12
- package/contracts/components/Pool.sol +0 -29
- package/contracts/components/Product.sol +0 -66
- package/contracts/experiment/errors/Require.sol +0 -33
- package/contracts/experiment/errors/Revert.sol +0 -39
- package/contracts/experiment/inheritance/A.sol +0 -56
- package/contracts/experiment/inheritance/B.sol +0 -23
- package/contracts/experiment/inheritance/C.sol +0 -28
- package/contracts/experiment/inheritance/IA.sol +0 -18
- package/contracts/experiment/inheritance/IB.sol +0 -9
- package/contracts/experiment/inheritance/IC.sol +0 -11
- package/contracts/experiment/types/TypeA.sol +0 -42
- package/contracts/experiment/types/TypeB.sol +0 -24
- package/contracts/instance/access/Access.sol +0 -218
- package/contracts/instance/access/IAccess.sol +0 -83
- package/contracts/instance/component/ComponentModule.sol +0 -248
- package/contracts/instance/component/IComponent.sol +0 -95
- package/contracts/instance/policy/IPolicy.sol +0 -66
- package/contracts/instance/policy/PolicyModule.sol +0 -107
- package/contracts/instance/pool/IPoolModule.sol +0 -41
- package/contracts/instance/pool/PoolModule.sol +0 -86
- package/contracts/instance/product/IProductService.sol +0 -46
- package/contracts/instance/product/ProductService.sol +0 -108
- package/contracts/registry/IChainNft.sol +0 -18
- package/contracts/types/Blocknumber.sol +0 -60
- package/contracts/types/ChainId.sol +0 -30
- package/contracts/types/NftId.sol +0 -35
- package/contracts/types/Timestamp.sol +0 -55
- package/contracts/types/UFixed.sol +0 -207
@@ -1,15 +1,30 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
|
-
pragma solidity ^0.8.
|
2
|
+
pragma solidity ^0.8.20;
|
3
3
|
|
4
4
|
import {ERC721, ERC721Enumerable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
|
5
|
-
import {
|
5
|
+
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
string public constant
|
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; //TODO make dependent of MAINNET_CHAIN_ID constant?
|
17
|
+
|
18
|
+
// custom errors
|
19
|
+
error ErrorChainNftCallerNotRegistry(address caller);
|
20
|
+
error ErrorChainNftRegistryAddressZero();
|
21
|
+
error ErrorChainNftUriEmpty();
|
22
|
+
error ErrorChainNftUriAlreadySet();
|
23
|
+
|
24
|
+
// contract state
|
25
|
+
|
26
|
+
// remember interceptors
|
27
|
+
mapping(uint256 tokenId => address interceptor) private _interceptor;
|
13
28
|
|
14
29
|
// remember token uri
|
15
30
|
mapping(uint256 tokenId => string uri) private _uri;
|
@@ -18,156 +33,186 @@ contract ChainNft is
|
|
18
33
|
address private _registry;
|
19
34
|
|
20
35
|
// only used for _getNextTokenId
|
21
|
-
uint256 internal _chainIdInt;
|
22
|
-
uint256 internal _chainIdDigits;
|
23
|
-
uint256 internal _chainIdMultiplier;
|
24
36
|
uint256 internal _idNext;
|
25
37
|
uint256 internal _totalMinted;
|
26
38
|
|
27
|
-
|
28
39
|
modifier onlyRegistry() {
|
29
|
-
|
40
|
+
if (msg.sender != _registry) { revert ErrorChainNftCallerNotRegistry(msg.sender); }
|
30
41
|
_;
|
31
42
|
}
|
32
43
|
|
33
|
-
|
34
|
-
|
35
|
-
ERC721(NAME, SYMBOL)
|
36
|
-
{
|
37
|
-
require(registry != address(0), "ERROR:NFT-010:REGISTRY_ZERO");
|
44
|
+
constructor(address registry) ERC721(NAME, SYMBOL) {
|
45
|
+
if (registry == address(0)) { revert ErrorChainNftRegistryAddressZero(); }
|
38
46
|
|
39
47
|
_registry = registry;
|
40
48
|
|
41
|
-
|
42
|
-
|
43
|
-
|
49
|
+
// the first object registered through normal registration starts with id 4
|
50
|
+
// 1 -> protocol
|
51
|
+
// 2 -> registry
|
52
|
+
// 3 -> staking
|
53
|
+
// >= 4 -> all other objects
|
54
|
+
_idNext = 4;
|
55
|
+
}
|
44
56
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
57
|
+
/**
|
58
|
+
* @dev mints a token for a specified token id
|
59
|
+
* not part of the IRegistry interface only needed for
|
60
|
+
* initial registry setup (protocol and global registry objects)
|
61
|
+
*/
|
62
|
+
function mint(address to, uint256 tokenId) external onlyRegistry {
|
63
|
+
_totalMinted++;
|
64
|
+
_safeMint(to, tokenId);
|
51
65
|
}
|
52
66
|
|
53
67
|
|
68
|
+
/**
|
69
|
+
* @dev mints the next token to register new objects
|
70
|
+
* non-zero transferInterceptors are recorded and called during nft token transfers.
|
71
|
+
* the contract receiving such a notification may decides to revert or record the transfer
|
72
|
+
*/
|
54
73
|
function mint(
|
55
74
|
address to,
|
75
|
+
address interceptor,
|
56
76
|
string memory uri
|
57
|
-
)
|
58
|
-
external
|
59
|
-
override
|
60
|
-
onlyRegistry
|
61
|
-
returns(uint256 tokenId)
|
62
|
-
{
|
77
|
+
) public onlyRegistry returns (uint256 tokenId) {
|
63
78
|
tokenId = _getNextTokenId();
|
64
|
-
_totalMinted++;
|
65
79
|
|
66
|
-
|
80
|
+
if (interceptor != address(0)) {
|
81
|
+
_interceptor[tokenId] = interceptor;
|
82
|
+
}
|
67
83
|
|
68
|
-
if(bytes(uri).length > 0) {
|
84
|
+
if (bytes(uri).length > 0) {
|
69
85
|
_uri[tokenId] = uri;
|
70
86
|
}
|
87
|
+
|
88
|
+
_totalMinted++;
|
89
|
+
_safeMint(to, tokenId);
|
90
|
+
|
91
|
+
if(interceptor != address(0)) {
|
92
|
+
ITransferInterceptor(interceptor).nftMint(to, tokenId);
|
93
|
+
}
|
71
94
|
}
|
72
95
|
|
73
96
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
{
|
79
|
-
|
97
|
+
/**
|
98
|
+
* @dev amend the open zeppelin transferFrom function by an interceptor call if such an interceptor is defined for the nft token id
|
99
|
+
* this allows distribution, product and pool components to be notified when distributors, policies and bundles are transferred.
|
100
|
+
*/
|
101
|
+
function transferFrom(address from, address to, uint256 tokenId) public override (ERC721, IERC721) {
|
102
|
+
super.transferFrom(from, to, tokenId);
|
103
|
+
|
104
|
+
if (_interceptor[tokenId] != address(0)) {
|
105
|
+
ITransferInterceptor(_interceptor[tokenId]).nftTransferFrom(from, to, tokenId);
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
109
|
+
|
110
|
+
function burn(uint256 tokenId) external onlyRegistry {
|
111
|
+
_requireOwned(tokenId);
|
80
112
|
_burn(tokenId);
|
81
113
|
delete _uri[tokenId];
|
82
114
|
}
|
83
115
|
|
116
|
+
function setURI(
|
117
|
+
uint256 tokenId,
|
118
|
+
string memory uri
|
119
|
+
) external onlyRegistry {
|
120
|
+
if (bytes(uri).length == 0) { revert ErrorChainNftUriEmpty(); }
|
121
|
+
if (bytes(_uri[tokenId]).length > 0) { revert ErrorChainNftUriAlreadySet(); }
|
84
122
|
|
85
|
-
|
86
|
-
external
|
87
|
-
override
|
88
|
-
onlyRegistry
|
89
|
-
{
|
90
|
-
require(bytes(uri).length > 0, "ERROR:CRG-011:URI_EMPTY");
|
91
|
-
|
92
|
-
_requireMinted(tokenId);
|
123
|
+
_requireOwned(tokenId);
|
93
124
|
_uri[tokenId] = uri;
|
94
125
|
}
|
95
126
|
|
96
|
-
|
97
|
-
|
98
|
-
external
|
99
|
-
view
|
100
|
-
override
|
101
|
-
returns(bool)
|
102
|
-
{
|
103
|
-
return _exists(tokenId);
|
127
|
+
function exists(uint256 tokenId) external view returns (bool) {
|
128
|
+
return _ownerOf(tokenId) != address(0);
|
104
129
|
}
|
105
130
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
view
|
110
|
-
|
111
|
-
|
112
|
-
{
|
113
|
-
_requireMinted(tokenId);
|
131
|
+
function tokenURI(
|
132
|
+
uint256 tokenId
|
133
|
+
) public view override returns (string memory) {
|
134
|
+
// gif generally does not revert for view functions
|
135
|
+
// this is an exception to keep the openzeppelin nft semantics
|
136
|
+
_requireOwned(tokenId);
|
114
137
|
return _uri[tokenId];
|
115
138
|
}
|
116
139
|
|
140
|
+
function getInterceptor(uint256 tokenId) external view returns (address) {
|
141
|
+
return _interceptor[tokenId];
|
142
|
+
}
|
117
143
|
|
118
|
-
function getRegistryAddress()
|
119
|
-
external
|
120
|
-
view
|
121
|
-
override
|
122
|
-
returns(address)
|
123
|
-
{
|
144
|
+
function getRegistryAddress() external view returns (address) {
|
124
145
|
return _registry;
|
125
146
|
}
|
126
147
|
|
127
|
-
function totalMinted() external
|
148
|
+
function totalMinted() external view returns (uint256) {
|
128
149
|
return _totalMinted;
|
129
150
|
}
|
130
151
|
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
152
|
+
/**
|
153
|
+
* @dev token id calculation based on an index value that is supposed
|
154
|
+
* to increase with every minted token
|
155
|
+
*
|
156
|
+
* requirement: each chain registry produces token ids that
|
157
|
+
* are guaranteed to not collide with any token id genereated
|
158
|
+
* on a different chain
|
159
|
+
*
|
160
|
+
* format concat(counter,chainid,2 digits for len-of-chain-id)
|
161
|
+
* restriction chainid up to 99 digits
|
162
|
+
* decode: from right to left:
|
163
|
+
* - 2 right most digits encode length of chainid
|
164
|
+
* - move number of digits to left as determined above (-> chainid)
|
165
|
+
* - the reminder to the left is the counter
|
166
|
+
*
|
167
|
+
* special cases
|
168
|
+
* 1101 -> decentralized insurance protocol
|
169
|
+
* 2102 -> global registry
|
170
|
+
* 2xxxxx -> chain registry, where xxxxx = <chain-part>
|
171
|
+
*
|
172
|
+
* examples
|
173
|
+
* 1101
|
174
|
+
* ^^ ^
|
175
|
+
* || +- 1-digit chain id
|
176
|
+
* |+-- chain id = 1 (mainnet)
|
177
|
+
* +-- 1st token id on mainnet
|
178
|
+
* (1 * 10 ** 1 + 1) * 100 + 1
|
179
|
+
* 42987654321010
|
180
|
+
* ^ ^ ^
|
181
|
+
* | | +- 10-digit chain id
|
182
|
+
* | +-- chain id = 9876543210 (hypothetical chainid)
|
183
|
+
* +-- 42nd token id on this chain
|
184
|
+
* (42 * 10 ** 10 + 9876543210) * 100 + 10
|
185
|
+
* (index * 10 ** digits + chainid) * 100 + digits (1 < digits < 100)
|
186
|
+
*/
|
187
|
+
// TODO consider situation when chainId = 2^256
|
188
|
+
function calculateTokenId(uint256 idIndex, uint chainId) public view returns (uint256 id) {
|
189
|
+
uint256 chainIdDigits = _chainIdDigits(chainId);
|
190
|
+
id =
|
191
|
+
(idIndex * (10 ** chainIdDigits) + chainId) *
|
192
|
+
100 +
|
193
|
+
chainIdDigits;
|
194
|
+
}
|
195
|
+
|
196
|
+
function calculateTokenId(uint256 idIndex) public view returns (uint256 id) {
|
197
|
+
id = calculateTokenId(idIndex, block.chainid);
|
159
198
|
}
|
160
199
|
|
200
|
+
function getNextTokenId() external view returns (uint256) {
|
201
|
+
return calculateTokenId(_idNext);
|
202
|
+
}
|
203
|
+
|
204
|
+
function _getNextTokenId() private returns (uint256 id) {
|
205
|
+
id = calculateTokenId(_idNext);
|
206
|
+
_idNext++;
|
207
|
+
}
|
161
208
|
|
162
|
-
function
|
163
|
-
|
164
|
-
|
165
|
-
returns (uint256 count)
|
166
|
-
{
|
167
|
-
count = 0;
|
209
|
+
function _chainIdDigits(uint chainId) internal view returns (uint256) {
|
210
|
+
uint256 num = chainId;
|
211
|
+
uint256 digits = 0;
|
168
212
|
while (num != 0) {
|
169
|
-
|
213
|
+
digits++;
|
170
214
|
num /= 10;
|
171
215
|
}
|
216
|
+
return digits;
|
172
217
|
}
|
173
218
|
}
|
@@ -0,0 +1,95 @@
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
2
|
+
pragma solidity ^0.8.20;
|
3
|
+
|
4
|
+
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
|
5
|
+
|
6
|
+
import {NftId, NftIdLib} from "../type/NftId.sol";
|
7
|
+
import {VersionPart} from "../type/Version.sol";
|
8
|
+
import {ObjectType, REGISTRY} from "../type/ObjectType.sol";
|
9
|
+
|
10
|
+
import {IGlobalRegistry} from "./IGlobalRegistry.sol";
|
11
|
+
import {Registry} from "./Registry.sol";
|
12
|
+
import {RegistryAdmin} from "./RegistryAdmin.sol";
|
13
|
+
import {MainnetContract} from "../shared/MainnetId.sol";
|
14
|
+
|
15
|
+
contract GlobalRegistry is
|
16
|
+
MainnetContract,
|
17
|
+
Registry,
|
18
|
+
IGlobalRegistry
|
19
|
+
{
|
20
|
+
using EnumerableSet for EnumerableSet.AddressSet;
|
21
|
+
|
22
|
+
error ErrorGlobalRegistryDeploymentNotOnMainnet(uint chainId);
|
23
|
+
error ErrorGlobalRegistryChainRegistryAlreadyRegistered(uint chainId, address chainRegistry);
|
24
|
+
error ErrorGlobalRegistryChainRegistryAddressInvalid(uint chainId, address chainRegistry);
|
25
|
+
|
26
|
+
mapping(uint chanId => address registry) _registryAddressByChainId;
|
27
|
+
uint256[] _chainId;
|
28
|
+
|
29
|
+
constructor(RegistryAdmin admin) Registry(admin, address(this))
|
30
|
+
{}
|
31
|
+
|
32
|
+
/// @dev registers a registry contract for a specified chain
|
33
|
+
// only one chain registry per chain
|
34
|
+
// each chain registry have unique address (sort of share same address space)
|
35
|
+
function registerChainRegistry(uint chainId, address chainRegistryAddress)
|
36
|
+
external
|
37
|
+
restricted
|
38
|
+
returns (NftId chainRegistryNftId)
|
39
|
+
{
|
40
|
+
// TODO allow for the same address to be registered on multiple chains
|
41
|
+
if(_nftIdByAddress[chainRegistryAddress] != NftIdLib.zero()) {
|
42
|
+
revert ErrorGlobalRegistryChainRegistryAddressInvalid(chainId, chainRegistryAddress);
|
43
|
+
}
|
44
|
+
// redundant -> chainRegistryId is chainId dependent, chainNft will revert if chainRegistryId is already minted
|
45
|
+
if(_registryAddressByChainId[chainId] != address(0)) {
|
46
|
+
revert ErrorGlobalRegistryChainRegistryAlreadyRegistered(chainId, _registryAddressByChainId[chainId]);
|
47
|
+
}
|
48
|
+
|
49
|
+
// calculate chain registry token id
|
50
|
+
uint chainRegistryId = _chainNft.calculateTokenId(REGISTRY_TOKEN_SEQUENCE_ID, chainId);
|
51
|
+
chainRegistryNftId = NftIdLib.toNftId(chainRegistryId);
|
52
|
+
|
53
|
+
_info[chainRegistryNftId] = ObjectInfo({
|
54
|
+
nftId: chainRegistryNftId,
|
55
|
+
parentNftId: _registryNftId,
|
56
|
+
objectType: REGISTRY(),
|
57
|
+
isInterceptor: false,
|
58
|
+
objectAddress: chainRegistryAddress, // TODO consider "chainId:address" format
|
59
|
+
initialOwner: NFT_LOCK_ADDRESS,
|
60
|
+
data: ""
|
61
|
+
});
|
62
|
+
|
63
|
+
_nftIdByAddress[chainRegistryAddress] = chainRegistryNftId;
|
64
|
+
_registryAddressByChainId[chainId] = chainRegistryAddress;
|
65
|
+
_chainId.push(chainId);
|
66
|
+
|
67
|
+
_chainNft.mint(NFT_LOCK_ADDRESS, chainRegistryId);
|
68
|
+
}
|
69
|
+
|
70
|
+
//------------- public view functions -------------//
|
71
|
+
function getChainRegistryAddress(uint chainId) public view returns (address) {
|
72
|
+
return _registryAddressByChainId[chainId];
|
73
|
+
}
|
74
|
+
|
75
|
+
function getChainId(uint idx) public view returns (uint) {
|
76
|
+
return _chainId[idx];
|
77
|
+
}
|
78
|
+
|
79
|
+
function chainIds() public view returns (uint) {
|
80
|
+
return _chainId.length;
|
81
|
+
}
|
82
|
+
|
83
|
+
// Internals
|
84
|
+
|
85
|
+
/// @dev global registry already registered, register specifics only
|
86
|
+
function _registerRegistry()
|
87
|
+
internal
|
88
|
+
virtual
|
89
|
+
override
|
90
|
+
returns (NftId)
|
91
|
+
{
|
92
|
+
_registryAddressByChainId[MAINNET_CHAIN_ID] = address(this);
|
93
|
+
return _globalRegistryNftId;
|
94
|
+
}
|
95
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
// SPDX-License-Identifier: UNLICENSED
|
2
|
+
pragma solidity ^0.8.20;
|
3
|
+
|
4
|
+
import {GIF_ADMIN_ROLE} from "../type/RoleId.sol";
|
5
|
+
|
6
|
+
import {IGlobalRegistry} from "./IGlobalRegistry.sol";
|
7
|
+
import {RegistryAdmin} from "./RegistryAdmin.sol";
|
8
|
+
import {MainnetContract} from "../shared/MainnetId.sol";
|
9
|
+
|
10
|
+
|
11
|
+
contract GlobalRegistryAdmin is
|
12
|
+
MainnetContract,
|
13
|
+
RegistryAdmin
|
14
|
+
{
|
15
|
+
error ErrorGlobalRegistryAdminDeploymentNotOnMainnet();
|
16
|
+
|
17
|
+
constructor() RegistryAdmin()
|
18
|
+
{
|
19
|
+
if(block.chainid != 1) {
|
20
|
+
revert ErrorGlobalRegistryAdminDeploymentNotOnMainnet();
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
function _setupRegistry()
|
25
|
+
internal
|
26
|
+
override
|
27
|
+
onlyInitializing()
|
28
|
+
{
|
29
|
+
super._setupRegistry();
|
30
|
+
|
31
|
+
// global registry function authorization for gif admin role
|
32
|
+
FunctionInfo[] memory functions;
|
33
|
+
functions = new FunctionInfo[](1);
|
34
|
+
functions[0] = toFunction(IGlobalRegistry.registerChainRegistry.selector, "registerChainRegistry");
|
35
|
+
|
36
|
+
_authorizeTargetFunctions(_registry, GIF_ADMIN_ROLE(), functions);
|
37
|
+
}
|
38
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
2
|
+
pragma solidity ^0.8.20;
|
3
|
+
|
4
|
+
import {NftId} from "../type/NftId.sol";
|
5
|
+
|
6
|
+
import {IRegistry} from "./IRegistry.sol";
|
7
|
+
|
8
|
+
interface IGlobalRegistry is IRegistry {
|
9
|
+
|
10
|
+
function registerChainRegistry(uint chainId, address chainRegistryAddress) external returns (NftId chainRegistryNftId);
|
11
|
+
|
12
|
+
function getChainRegistryAddress(uint chainId) external returns (address);
|
13
|
+
|
14
|
+
function getChainId(uint idx) external view returns (uint);
|
15
|
+
|
16
|
+
function chainIds() external view returns (uint);
|
17
|
+
}
|
@@ -1,70 +1,133 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
|
-
pragma solidity ^0.8.
|
2
|
+
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {
|
4
|
+
import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
}
|
6
|
+
import {NftId} from "../type/NftId.sol";
|
7
|
+
import {ObjectType} from "../type/ObjectType.sol";
|
8
|
+
import {VersionPart} from "../type/Version.sol";
|
9
|
+
import {Timestamp} from "../type/Timestamp.sol";
|
9
10
|
|
10
|
-
|
11
|
+
/// @title Chain Registry interface.
|
12
|
+
/// A chain registry holds all protocol relevant objects with basic metadata.
|
13
|
+
/// Registered objects include services, instances, products, pools, policies, bundles, stakes and more.
|
14
|
+
/// Registered objects are represented by NFTs.
|
15
|
+
interface IRegistry is IERC165 {
|
11
16
|
|
12
|
-
event
|
17
|
+
event LogRegistration(NftId nftId, NftId parentNftId, ObjectType objectType, bool isInterceptor, address objectAddress, address initialOwner);
|
18
|
+
event LogServiceRegistration(VersionPart majorVersion, ObjectType domain);
|
13
19
|
|
14
|
-
|
15
|
-
|
20
|
+
// initialize
|
21
|
+
error ErrorRegistryCallerNotDeployer();
|
16
22
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
23
|
+
// registerService()
|
24
|
+
error ErrorRegistryCallerNotReleaseRegistry();
|
25
|
+
error ErrorRegistryServiceAddressZero();
|
26
|
+
error ErrorRegistryServiceVersionZero();
|
27
|
+
error ErrorRegistryNotService(address service, ObjectType objectType);
|
28
|
+
error ErrorRegistryServiceParentNotRegistry(NftId parentNftId);
|
29
|
+
error ErrorRegistryDomainZero(address service);
|
30
|
+
error ErrorRegistryDomainAlreadyRegistered(address service, VersionPart version, ObjectType domain);
|
21
31
|
|
22
|
-
|
23
|
-
|
24
|
-
function getNftId() external view returns(NftId nftId);
|
25
|
-
function getParentNftId() external view returns(NftId parentNftId);
|
26
|
-
function getType() external view returns(uint256 objectType);
|
27
|
-
function getData() external view returns(bytes memory data);
|
28
|
-
function isRegisterable() external pure returns(bool);
|
29
|
-
function getInitialOwner() external view returns(address initialOwner);
|
32
|
+
// registerWithCustomTypes()
|
33
|
+
error ErrorRegistryCoreTypeRegistration();
|
30
34
|
|
31
|
-
|
32
|
-
|
35
|
+
// _register()
|
36
|
+
error ErrorRegistryParentAddressZero();
|
37
|
+
error ErrorRegistryTypesCombinationInvalid(ObjectType objectType, ObjectType parentType);
|
38
|
+
error ErrorRegistryContractAlreadyRegistered(address objectAddress);
|
33
39
|
|
34
|
-
|
35
|
-
interface IRegistry {
|
36
|
-
|
37
|
-
struct RegistryInfo {
|
40
|
+
struct ObjectInfo {
|
38
41
|
NftId nftId;
|
39
42
|
NftId parentNftId;
|
40
|
-
|
43
|
+
ObjectType objectType;
|
44
|
+
bool isInterceptor;
|
41
45
|
address objectAddress;
|
42
46
|
address initialOwner;
|
47
|
+
bytes data;
|
48
|
+
}
|
49
|
+
|
50
|
+
struct ReleaseInfo {
|
51
|
+
VersionPart version;
|
52
|
+
bytes32 salt;
|
53
|
+
address[] addresses;
|
54
|
+
string[] names;
|
55
|
+
ObjectType[] domains;
|
56
|
+
Timestamp activatedAt;
|
57
|
+
Timestamp disabledAt;
|
43
58
|
}
|
44
59
|
|
45
|
-
|
46
|
-
function
|
47
|
-
|
48
|
-
function
|
49
|
-
|
50
|
-
|
51
|
-
function
|
60
|
+
/// @dev Register an object with a known core type.
|
61
|
+
/// The function returns a newly minted object NFT ID.
|
62
|
+
/// May not be used to register services.
|
63
|
+
function register(ObjectInfo memory info) external returns (NftId nftId);
|
64
|
+
|
65
|
+
/// @dev Register a service with using the provided domain and version.
|
66
|
+
/// The function returns a newly minted service NFT ID.
|
67
|
+
/// May only be used to register services.
|
68
|
+
function registerService(
|
69
|
+
ObjectInfo memory serviceInfo,
|
70
|
+
VersionPart serviceVersion,
|
71
|
+
ObjectType serviceDomain
|
72
|
+
) external returns(NftId nftId);
|
73
|
+
|
74
|
+
/// @dev Register an object with a custom type.
|
75
|
+
/// The function returns a newly minted object NFT ID.
|
76
|
+
/// This function is reserved for GIF releases > 3.
|
77
|
+
/// May not be used to register known core types.
|
78
|
+
function registerWithCustomType(ObjectInfo memory info) external returns (NftId nftId);
|
79
|
+
|
80
|
+
function getInitialVersion() external view returns (VersionPart);
|
81
|
+
|
82
|
+
function getNextVersion() external view returns (VersionPart);
|
83
|
+
|
84
|
+
function getLatestVersion() external view returns (VersionPart);
|
85
|
+
|
86
|
+
function getReleaseInfo(VersionPart version) external view returns (ReleaseInfo memory);
|
87
|
+
|
88
|
+
function getObjectCount() external view returns (uint256);
|
89
|
+
|
90
|
+
function getNftId(address objectAddress) external view returns (NftId nftId);
|
91
|
+
|
92
|
+
function ownerOf(NftId nftId) external view returns (address);
|
93
|
+
|
94
|
+
function ownerOf(address contractAddress) external view returns (address);
|
95
|
+
|
96
|
+
function getObjectInfo(NftId nftId) external view returns (ObjectInfo memory info);
|
97
|
+
|
98
|
+
function getObjectInfo(address object) external view returns (ObjectInfo memory info);
|
99
|
+
|
100
|
+
function isRegistered(NftId nftId) external view returns (bool);
|
101
|
+
|
102
|
+
function isRegistered(address contractAddress) external view returns (bool);
|
103
|
+
|
104
|
+
function isRegisteredService(address contractAddress) external view returns (bool);
|
105
|
+
|
106
|
+
function isRegisteredComponent(address object) external view returns (bool);
|
107
|
+
|
108
|
+
function isActiveRelease(VersionPart version) external view returns (bool);
|
109
|
+
|
110
|
+
function getServiceAddress(
|
111
|
+
ObjectType serviceDomain,
|
112
|
+
VersionPart releaseVersion
|
113
|
+
) external view returns (address serviceAddress);
|
114
|
+
|
115
|
+
function getProtocolNftId() external view returns (NftId protocolNftId);
|
116
|
+
|
117
|
+
function getNftId() external view returns (NftId nftId);
|
118
|
+
|
119
|
+
function getOwner() external view returns (address);
|
120
|
+
|
121
|
+
// TODO refactor the address getters below to contract getters
|
122
|
+
function getChainNftAddress() external view returns (address);
|
52
123
|
|
53
|
-
function
|
54
|
-
function registerObjectForInstance(
|
55
|
-
NftId parentNftid,
|
56
|
-
uint256 objectType,
|
57
|
-
address initialOwner
|
58
|
-
)
|
59
|
-
external returns(NftId nftId);
|
124
|
+
function getReleaseRegistryAddress() external view returns (address);
|
60
125
|
|
61
|
-
function
|
126
|
+
function getStakingAddress() external view returns (address);
|
62
127
|
|
63
|
-
function
|
64
|
-
function getInfo(NftId nftId) external view returns(RegistryInfo memory info);
|
65
|
-
function getOwner(NftId nftId) external view returns(address ownerAddress);
|
128
|
+
function getTokenRegistryAddress() external view returns (address);
|
66
129
|
|
67
|
-
function
|
130
|
+
function getRegistryAdminAddress() external view returns (address);
|
68
131
|
|
69
|
-
function
|
70
|
-
}
|
132
|
+
function getAuthority() external view returns (address);
|
133
|
+
}
|