@etherisc/gif-next 0.0.2-a196164-289 → 0.0.2-a221fa7-461
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 +249 -41
- 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/module/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 +1548 -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 +1234 -0
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +4 -0
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +1571 -0
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +4 -0
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +858 -0
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +4 -0
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +943 -0
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +4 -0
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +956 -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 +283 -1679
- 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 +485 -2053
- 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/module/{bundle/IBundle.sol → IBundle.sol}/IBundle.json +1 -1
- package/artifacts/contracts/instance/module/IComponents.sol/IComponents.dbg.json +4 -0
- package/artifacts/contracts/instance/{base/ModuleBase.sol/ModuleBase.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/{distribution/IDistribution.sol → IDistribution.sol}/IDistribution.json +1 -1
- package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +4 -0
- package/artifacts/contracts/instance/module/{policy/IPolicy.sol → IPolicy.sol}/IPolicy.json +1 -1
- package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +4 -0
- package/artifacts/contracts/instance/module/{risk/IRisk.sol → IRisk.sol}/IRisk.json +1 -1
- 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 +1185 -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 +802 -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 +1093 -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 +1496 -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/{instance/service/IProductService.sol/IProductService.json → pool/IBundleService.sol/IBundleService.json} +360 -328
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +4 -0
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.json +978 -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 +1288 -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 +1318 -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/{instance/service/IPoolService.sol/IPoolService.json → product/IApplicationService.sol/IApplicationService.json} +279 -248
- 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 +985 -0
- package/artifacts/contracts/product/IProductService.sol/IProductService.dbg.json +4 -0
- package/artifacts/contracts/{instance/base/ServiceBase.sol/ServiceBase.json → product/IProductService.sol/IProductService.json} +187 -174
- 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 +1276 -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 +199 -12
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +655 -50
- 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 +885 -99
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +4 -0
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +1746 -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 +1159 -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 +1640 -0
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +4 -0
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +812 -0
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +4 -0
- package/artifacts/contracts/{instance/service/IComponentOwnerService.sol/IComponentOwnerService.json → shared/ComponentVerifyingService.sol/ComponentVerifyingService.json} +310 -176
- package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
- package/artifacts/contracts/shared/ERC165.sol/ERC165.json +41 -3
- 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 +977 -0
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +4 -0
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.json +737 -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/{instance/base → shared}/ILifecycle.sol/ILifecycle.json +1 -6
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +4 -0
- package/artifacts/contracts/{instance/module/component/IComponent.sol/IComponentModule.json → shared/INftOwnable.sol/INftOwnable.json} +66 -52
- 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 +1 -1
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +91 -31
- package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +4 -0
- package/artifacts/contracts/{registry → shared}/IRegistryLinked.sol/IRegistryLinked.json +13 -2
- package/artifacts/contracts/shared/IService.sol/IService.dbg.json +4 -0
- package/artifacts/contracts/{instance/base → shared}/IService.sol/IService.json +159 -154
- 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 +1015 -0
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.dbg.json +4 -0
- package/artifacts/contracts/{instance/base/IKeyValueStore.sol/IKeyValueStore.json → shared/KeyValueStore.sol/KeyValueStore.json} +102 -165
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.dbg.json +4 -0
- package/artifacts/contracts/{experiment/statemachine/ISM.sol/ISM.json → shared/Lifecycle.sol/Lifecycle.json} +54 -45
- 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 +1 -1
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +255 -23
- 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/{instance/base/InstanceBase.sol/InstanceBase.json → shared/Service.sol/Service.json} +255 -211
- 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/{types → type}/StateId.sol/StateIdLib.json +3 -3
- 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 +591 -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 +138 -0
- package/contracts/distribution/BasicDistributionAuthorization.sol +47 -0
- package/contracts/distribution/Distribution.sol +295 -0
- package/contracts/distribution/DistributionService.sol +352 -0
- package/contracts/distribution/DistributionServiceManager.sol +39 -0
- package/contracts/distribution/IDistributionComponent.sol +52 -0
- package/contracts/distribution/IDistributionService.sol +98 -0
- package/contracts/instance/BundleSet.sol +126 -0
- package/contracts/instance/IInstance.sol +79 -46
- package/contracts/instance/IInstanceService.sol +92 -0
- package/contracts/instance/Instance.sol +239 -59
- package/contracts/instance/InstanceAdmin.sol +266 -0
- package/contracts/instance/InstanceAuthorizationV3.sol +204 -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 +51 -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/{test/Usdc.sol → mock/Dip.sol} +5 -5
- 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 +33 -0
- package/contracts/oracle/IOracleService.sol +65 -0
- package/contracts/oracle/Oracle.sol +166 -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 +52 -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 +51 -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 +43 -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 +40 -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 +95 -37
- package/contracts/registry/IRegistry.sol +106 -29
- package/contracts/registry/IRegistryService.sol +69 -0
- package/contracts/registry/ITransferInterceptor.sol +7 -0
- package/contracts/registry/Registry.sol +475 -280
- package/contracts/registry/RegistryAdmin.sol +365 -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 +487 -0
- package/contracts/registry/ServiceAuthorizationV3.sol +200 -0
- package/contracts/registry/TokenRegistry.sol +315 -0
- package/contracts/shared/Component.sol +280 -0
- package/contracts/shared/ComponentService.sol +622 -0
- package/contracts/shared/ComponentServiceManager.sol +35 -0
- package/contracts/shared/ComponentVerifyingService.sol +117 -0
- package/contracts/shared/ERC165.sol +15 -9
- package/contracts/shared/IComponent.sol +70 -0
- package/contracts/shared/IComponentService.sol +112 -0
- package/contracts/shared/IInstanceLinkedComponent.sol +56 -0
- package/contracts/shared/IKeyValueStore.sol +54 -0
- package/contracts/{instance/base → shared}/ILifecycle.sol +4 -5
- package/contracts/shared/INftOwnable.sol +23 -0
- package/contracts/shared/IPolicyHolder.sol +45 -0
- package/contracts/shared/IRegisterable.sol +10 -19
- 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 +172 -0
- package/contracts/shared/KeyValueStore.sol +131 -0
- package/contracts/shared/Lifecycle.sol +77 -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 +54 -65
- 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 +514 -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/{types → type}/AddressSet.sol +1 -1
- package/contracts/type/Amount.sol +128 -0
- package/contracts/{types → type}/Blocknumber.sol +21 -3
- package/contracts/type/ClaimId.sol +75 -0
- package/contracts/type/DistributorType.sol +55 -0
- package/contracts/type/Fee.sol +66 -0
- package/contracts/{types → type}/Key32.sol +8 -3
- package/contracts/{types → type}/NftId.sol +21 -15
- 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/{types → type}/RiskId.sol +1 -1
- package/contracts/type/RoleId.sol +174 -0
- package/contracts/type/Seconds.sol +81 -0
- package/contracts/type/Selector.sol +102 -0
- package/contracts/{types → type}/StateId.sol +39 -5
- package/contracts/type/String.sol +53 -0
- package/contracts/{types → type}/Timestamp.sol +27 -14
- package/contracts/type/UFixed.sol +332 -0
- package/contracts/{types → type}/Version.sol +9 -2
- 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 +11 -7
- package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +0 -4
- package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.json +0 -174
- package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +0 -4
- package/artifacts/contracts/components/Distribution.sol/Distribution.json +0 -405
- package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +0 -4
- package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.json +0 -174
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +0 -4
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +0 -340
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +0 -4
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +0 -487
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +0 -4
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +0 -370
- package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +0 -4
- package/artifacts/contracts/components/Pool.sol/Pool.json +0 -578
- package/artifacts/contracts/components/Product.sol/Product.dbg.json +0 -4
- package/artifacts/contracts/components/Product.sol/Product.json +0 -444
- 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/statemachine/Dummy.sol/LifeCycleModule.dbg.json +0 -4
- package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +0 -59
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +0 -4
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +0 -4
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.json +0 -74
- package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +0 -4
- package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +0 -124
- package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +0 -4
- package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +0 -207
- 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/IInstanceLinked.sol/IInstanceLinked.dbg.json +0 -4
- package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.json +0 -24
- package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +0 -4
- package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.json +0 -387
- package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +0 -4
- package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +0 -113
- package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +0 -4
- package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +0 -4
- package/artifacts/contracts/instance/base/IService.sol/IService.dbg.json +0 -4
- package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.dbg.json +0 -4
- package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +0 -4
- package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +0 -710
- package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +0 -4
- package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +0 -169
- package/artifacts/contracts/instance/base/ModuleBase.sol/ModuleBase.dbg.json +0 -4
- package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.dbg.json +0 -4
- package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.json +0 -333
- package/artifacts/contracts/instance/module/access/IAccess.sol/IAccess.dbg.json +0 -4
- package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.json +0 -333
- package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.json +0 -297
- package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.dbg.json +0 -4
- package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.json +0 -297
- package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.json +0 -117
- package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.dbg.json +0 -4
- package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.json +0 -10
- package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.json +0 -10
- package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistribution.dbg.json +0 -4
- package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistributionModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistributionModule.json +0 -10
- package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicy.dbg.json +0 -4
- package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.json +0 -284
- package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.json +0 -284
- package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.dbg.json +0 -4
- package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.json +0 -10
- package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.json +0 -144
- package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.json +0 -144
- package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.dbg.json +0 -4
- package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.json +0 -113
- package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.json +0 -131
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.dbg.json +0 -4
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.json +0 -10
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.json +0 -511
- package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.dbg.json +0 -4
- package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.json +0 -76
- package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.json +0 -511
- package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +0 -4
- package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +0 -618
- package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +0 -4
- package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +0 -507
- package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +0 -4
- package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +0 -4
- package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +0 -366
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +0 -4
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +0 -4
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +0 -4
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +0 -630
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +0 -4
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +0 -945
- 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/IRegistryLinked.sol/IRegistryLinked.dbg.json +0 -4
- package/artifacts/contracts/registry/RegistryUpgradeable.sol/RegistryUpgradeable.dbg.json +0 -4
- package/artifacts/contracts/registry/RegistryUpgradeable.sol/RegistryUpgradeable.json +0 -711
- package/artifacts/contracts/shared/IOwnable.sol/IOwnable.dbg.json +0 -4
- package/artifacts/contracts/shared/IOwnable.sol/IOwnable.json +0 -24
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +0 -4
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +0 -205
- package/artifacts/contracts/shared/Proxy.sol/Proxy.dbg.json +0 -4
- package/artifacts/contracts/shared/Proxy.sol/Proxy.json +0 -235
- package/artifacts/contracts/shared/Proxy.sol/ProxyWithProxyAdminGetter.dbg.json +0 -4
- package/artifacts/contracts/shared/Proxy.sol/ProxyWithProxyAdminGetter.json +0 -129
- package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +0 -4
- package/artifacts/contracts/shared/Versionable.sol/Versionable.json +0 -251
- package/artifacts/contracts/shared/VersionableUpgradeable.sol/VersionableUpgradeable.dbg.json +0 -4
- package/artifacts/contracts/shared/VersionableUpgradeable.sol/VersionableUpgradeable.json +0 -228
- package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.dbg.json +0 -4
- package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.json +0 -405
- package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +0 -4
- package/artifacts/contracts/test/TestFee.sol/TestFee.json +0 -119
- package/artifacts/contracts/test/TestPool.sol/TestPool.dbg.json +0 -4
- package/artifacts/contracts/test/TestPool.sol/TestPool.json +0 -578
- package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +0 -4
- package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +0 -575
- package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +0 -4
- package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +0 -137
- package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +0 -4
- package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +0 -116
- package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +0 -4
- package/artifacts/contracts/test/TestService.sol/TestService.json +0 -466
- package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +0 -4
- package/artifacts/contracts/test/TestToken.sol/TestUsdc.json +0 -338
- package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +0 -4
- package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +0 -218
- package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +0 -4
- package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +0 -293
- package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +0 -4
- package/artifacts/contracts/test/Usdc.sol/USDC.json +0 -338
- package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +0 -4
- package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.json +0 -10
- 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/Fee.sol/FeeLib.dbg.json +0 -4
- package/artifacts/contracts/types/Fee.sol/FeeLib.json +0 -257
- package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +0 -4
- package/artifacts/contracts/types/Key32.sol/Key32Lib.json +0 -111
- package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +0 -4
- package/artifacts/contracts/types/NftId.sol/NftIdLib.json +0 -153
- package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +0 -4
- package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +0 -10
- package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +0 -4
- package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +0 -92
- package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.dbg.json +0 -4
- package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.json +0 -99
- package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +0 -4
- package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +0 -86
- package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +0 -4
- package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +0 -30
- package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +0 -4
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +0 -4
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +0 -236
- package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +0 -4
- package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +0 -479
- package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +0 -4
- package/artifacts/contracts/types/Version.sol/VersionLib.json +0 -177
- package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +0 -4
- package/artifacts/contracts/types/Version.sol/VersionPartLib.json +0 -30
- package/contracts/components/BaseComponent.sol +0 -94
- package/contracts/components/Distribution.sol +0 -132
- package/contracts/components/IBaseComponent.sol +0 -19
- package/contracts/components/IDistributionComponent.sol +0 -47
- package/contracts/components/IPoolComponent.sol +0 -71
- package/contracts/components/IProductComponent.sol +0 -38
- package/contracts/components/Pool.sol +0 -235
- package/contracts/components/Product.sol +0 -227
- package/contracts/experiment/errors/Require.sol +0 -38
- package/contracts/experiment/errors/Revert.sol +0 -44
- package/contracts/experiment/inheritance/A.sol +0 -53
- package/contracts/experiment/inheritance/B.sol +0 -28
- package/contracts/experiment/inheritance/C.sol +0 -34
- package/contracts/experiment/inheritance/IA.sol +0 -13
- package/contracts/experiment/inheritance/IB.sol +0 -10
- package/contracts/experiment/inheritance/IC.sol +0 -12
- package/contracts/experiment/statemachine/Dummy.sol +0 -27
- package/contracts/experiment/statemachine/ISM.sol +0 -25
- package/contracts/experiment/statemachine/README.md +0 -112
- package/contracts/experiment/statemachine/SM.sol +0 -57
- package/contracts/experiment/statemachine/SimpleStateMachine.sol +0 -31
- package/contracts/experiment/types/TypeA.sol +0 -47
- package/contracts/experiment/types/TypeB.sol +0 -29
- package/contracts/instance/IInstanceLinked.sol +0 -8
- package/contracts/instance/base/ComponentServiceBase.sol +0 -42
- package/contracts/instance/base/IInstanceBase.sol +0 -22
- package/contracts/instance/base/IKeyValueStore.sol +0 -50
- package/contracts/instance/base/IService.sol +0 -15
- package/contracts/instance/base/InstanceBase.sol +0 -91
- package/contracts/instance/base/KeyValueStore.sol +0 -161
- package/contracts/instance/base/Lifecycle.sol +0 -100
- package/contracts/instance/base/ModuleBase.sol +0 -57
- package/contracts/instance/base/ServiceBase.sol +0 -37
- package/contracts/instance/module/access/Access.sol +0 -149
- package/contracts/instance/module/access/IAccess.sol +0 -53
- package/contracts/instance/module/bundle/BundleModule.sol +0 -134
- package/contracts/instance/module/bundle/IBundle.sol +0 -53
- package/contracts/instance/module/component/ComponentModule.sol +0 -70
- package/contracts/instance/module/component/IComponent.sol +0 -28
- package/contracts/instance/module/distribution/DistributionModule.sol +0 -17
- package/contracts/instance/module/distribution/IDistribution.sol +0 -10
- package/contracts/instance/module/policy/IPolicy.sol +0 -63
- package/contracts/instance/module/policy/PolicyModule.sol +0 -91
- package/contracts/instance/module/pool/IPoolModule.sol +0 -40
- package/contracts/instance/module/pool/PoolModule.sol +0 -90
- package/contracts/instance/module/risk/IRisk.sol +0 -26
- package/contracts/instance/module/risk/RiskModule.sol +0 -62
- package/contracts/instance/module/treasury/ITreasury.sol +0 -82
- package/contracts/instance/module/treasury/TokenHandler.sol +0 -48
- package/contracts/instance/module/treasury/TreasuryModule.sol +0 -138
- package/contracts/instance/service/ComponentOwnerService.sol +0 -157
- package/contracts/instance/service/DistributionService.sol +0 -59
- package/contracts/instance/service/IComponentOwnerService.sol +0 -22
- package/contracts/instance/service/IDistributionService.sol +0 -12
- package/contracts/instance/service/IPoolService.sol +0 -37
- package/contracts/instance/service/IProductService.sol +0 -107
- package/contracts/instance/service/PoolService.sol +0 -149
- package/contracts/instance/service/ProductService.sol +0 -509
- package/contracts/registry/IChainNft.sol +0 -21
- package/contracts/registry/IRegistryLinked.sol +0 -8
- package/contracts/registry/RegistryUpgradeable.sol +0 -548
- package/contracts/shared/IOwnable.sol +0 -6
- package/contracts/shared/IVersionable.sol +0 -65
- package/contracts/shared/Proxy.sol +0 -89
- package/contracts/shared/Versionable.sol +0 -99
- package/contracts/shared/VersionableUpgradeable.sol +0 -120
- package/contracts/test/TestDistribution.sol +0 -21
- package/contracts/test/TestFee.sol +0 -25
- package/contracts/test/TestPool.sol +0 -25
- package/contracts/test/TestProduct.sol +0 -72
- package/contracts/test/TestRegisterable.sol +0 -19
- package/contracts/test/TestRoleId.sol +0 -14
- package/contracts/test/TestService.sol +0 -32
- package/contracts/test/TestToken.sol +0 -26
- package/contracts/test/TestVersion.sol +0 -44
- package/contracts/test/TestVersionable.sol +0 -17
- package/contracts/types/ChainId.sol +0 -38
- package/contracts/types/Fee.sol +0 -56
- package/contracts/types/NftIdSet.sol +0 -60
- package/contracts/types/ObjectType.sol +0 -131
- package/contracts/types/ReferralId.sol +0 -48
- package/contracts/types/RoleId.sol +0 -38
- package/contracts/types/UFixed.sol +0 -209
@@ -1,548 +0,0 @@
|
|
1
|
-
// SPDX-License-Identifier: Apache-2.0
|
2
|
-
pragma solidity ^0.8.20;
|
3
|
-
|
4
|
-
import {Initializable} from "@openzeppelin5/contracts/proxy/utils/Initializable.sol";
|
5
|
-
|
6
|
-
import {IRegisterable} from "../shared/IRegisterable.sol";
|
7
|
-
import {IService} from "../instance/base/IService.sol";
|
8
|
-
|
9
|
-
import {IChainNft} from "./IChainNft.sol";
|
10
|
-
import {ChainNft} from "./ChainNft.sol";
|
11
|
-
import {IRegistry} from "./IRegistry.sol";
|
12
|
-
import {NftId, toNftId, zeroNftId, NftIdLib} from "../types/NftId.sol";
|
13
|
-
import {Version, VersionPart, VersionLib} from "../types/Version.sol";
|
14
|
-
import {ObjectType, PROTOCOL, REGISTRY, TOKEN, SERVICE, INSTANCE, STAKE, PRODUCT, DISTRIBUTION, ORACLE, POOL, POLICY, BUNDLE} from "../types/ObjectType.sol";
|
15
|
-
|
16
|
-
import {VersionableUpgradeable} from "../shared/VersionableUpgradeable.sol";
|
17
|
-
|
18
|
-
|
19
|
-
/// IMPORTANT
|
20
|
-
// Upgradeable contract MUST:
|
21
|
-
// 1) inherit from Versionable
|
22
|
-
// 2) implement version() function
|
23
|
-
// 3) implement initialize() function with initializer modifier
|
24
|
-
// 4) implement upgrade() function with reinitializer(version().toInt()) modifier
|
25
|
-
// 5) have onlyInitialising modifier for each function callable during deployment and/or upgrade
|
26
|
-
// 6) use default empty constructor -> _disableInitializer() called from Versionable contructor
|
27
|
-
// 7) use namespace storage
|
28
|
-
contract RegistryUpgradeable is
|
29
|
-
VersionableUpgradeable,
|
30
|
-
IRegisterable,
|
31
|
-
IRegistry
|
32
|
-
{
|
33
|
-
//--- constants -----------------------------------------------------------------
|
34
|
-
string public constant EMPTY_URI = "";
|
35
|
-
|
36
|
-
// keccak256(abi.encode(uint256(keccak256("etherisc.storage.Registry")) - 1)) & ~bytes32(uint256(0xff));
|
37
|
-
bytes32 internal constant STORAGE_LOCATION_V1 = 0x6548007c3f4340f82f348c576c0ff69f4f529cadd5ad41f96aae61abceeaa300;
|
38
|
-
|
39
|
-
//--- storage layout -------------------------------------------------------------
|
40
|
-
|
41
|
-
// @custom:storage-location erc7201:etherisc.storage.Registry
|
42
|
-
struct StorageV1 {
|
43
|
-
mapping(NftId nftId => ObjectInfo info) info;
|
44
|
-
mapping(address object => NftId nftId) nftIdByAddress;
|
45
|
-
mapping(ObjectType objectType => bool) isValidType;
|
46
|
-
mapping(ObjectType objectType => mapping(ObjectType objectParentType => bool)) isValidParentType;
|
47
|
-
|
48
|
-
mapping(NftId nftId => string stringValue) name;
|
49
|
-
mapping(bytes32 serviceNameHash => mapping(VersionPart majorVersion => address service)) service;
|
50
|
-
|
51
|
-
NftId nftId;
|
52
|
-
IChainNft chainNft;
|
53
|
-
ChainNft chainNftInternal;
|
54
|
-
address initialOwner;
|
55
|
-
/// @dev will own protocol nft and registry nft(s) minted during initialize
|
56
|
-
address _protocolOwner;
|
57
|
-
}
|
58
|
-
|
59
|
-
//--- state --------------------------------------------------------------------
|
60
|
-
|
61
|
-
//--- external/public state changing functions --------------------------------
|
62
|
-
|
63
|
-
function register(
|
64
|
-
address objectAddress
|
65
|
-
)
|
66
|
-
// TODO add authz (only services may register components etc)
|
67
|
-
// we have to check how we do authz for registring services (just restrict to protocol owner/registry owner)
|
68
|
-
external
|
69
|
-
virtual override
|
70
|
-
returns (NftId nftId)
|
71
|
-
{
|
72
|
-
StorageV1 storage $ = _getStorageV1();
|
73
|
-
|
74
|
-
require(
|
75
|
-
$.nftIdByAddress[objectAddress].eqz(),
|
76
|
-
"ERROR:REG-002:ALREADY_REGISTERED"
|
77
|
-
);
|
78
|
-
|
79
|
-
IRegisterable registerable = IRegisterable(objectAddress);
|
80
|
-
require(
|
81
|
-
registerable.supportsInterface(type(IRegisterable).interfaceId),
|
82
|
-
"ERROR:REG-003:NOT_REGISTERABLE"
|
83
|
-
);
|
84
|
-
|
85
|
-
ObjectType objectType = registerable.getType();
|
86
|
-
require(
|
87
|
-
$.isValidType[objectType],
|
88
|
-
"ERROR:REG-004:TYPE_INVALID"
|
89
|
-
);
|
90
|
-
|
91
|
-
NftId parentNftId = registerable.getParentNftId();
|
92
|
-
require(
|
93
|
-
isRegistered(parentNftId),
|
94
|
-
"ERROR:REG-005:PARENT_NOT_REGISTERED"
|
95
|
-
);
|
96
|
-
|
97
|
-
require(
|
98
|
-
$.isValidParentType[objectType][$.info[parentNftId].objectType],
|
99
|
-
"ERROR:REG-006:PARENT_TYPE_INVALID"
|
100
|
-
);
|
101
|
-
|
102
|
-
// also check that nftId and parentNFtId are on the same chain if applicable
|
103
|
-
|
104
|
-
// nft minting
|
105
|
-
uint256 mintedTokenId = $.chainNft.mint(
|
106
|
-
registerable.getOwner(),
|
107
|
-
EMPTY_URI
|
108
|
-
);
|
109
|
-
|
110
|
-
nftId = toNftId(mintedTokenId);
|
111
|
-
|
112
|
-
// special case services
|
113
|
-
if(registerable.getType() == SERVICE()) {
|
114
|
-
IService service = IService(objectAddress);
|
115
|
-
require(
|
116
|
-
service.supportsInterface(type(IService).interfaceId),
|
117
|
-
"ERROR:REG-007:NOTservice"
|
118
|
-
);
|
119
|
-
|
120
|
-
string memory serviceName = service.getName();
|
121
|
-
VersionPart majorVersion = service.getMajorVersion();
|
122
|
-
bytes32 serviceNameHash = keccak256(abi.encode(serviceName));
|
123
|
-
|
124
|
-
// service specific state
|
125
|
-
$.name[nftId] = serviceName;
|
126
|
-
|
127
|
-
require(
|
128
|
-
$.service[serviceNameHash][majorVersion] == address(0),
|
129
|
-
"ERROR:REG-008:ALREADY_REGISTERED"
|
130
|
-
);
|
131
|
-
$.service[serviceNameHash][majorVersion] = objectAddress;
|
132
|
-
}
|
133
|
-
|
134
|
-
// create object info and link nft id with it
|
135
|
-
_registerObjectInfo(registerable, nftId);
|
136
|
-
}
|
137
|
-
|
138
|
-
|
139
|
-
function registerObjectForInstance(
|
140
|
-
NftId parentNftId,
|
141
|
-
ObjectType objectType,
|
142
|
-
address initialOwner,
|
143
|
-
bytes memory data
|
144
|
-
)
|
145
|
-
external
|
146
|
-
virtual override
|
147
|
-
returns (
|
148
|
-
// TODO add onlyRegisteredInstance
|
149
|
-
NftId nftId
|
150
|
-
)
|
151
|
-
{
|
152
|
-
StorageV1 storage $ = _getStorageV1();
|
153
|
-
|
154
|
-
// TODO add more validation
|
155
|
-
require(
|
156
|
-
objectType == POLICY() || objectType == BUNDLE(),
|
157
|
-
"ERROR:REG-010:TYPE_INVALID"
|
158
|
-
);
|
159
|
-
|
160
|
-
uint256 mintedTokenId = $.chainNft.mint(initialOwner, EMPTY_URI);
|
161
|
-
nftId = toNftId(mintedTokenId);
|
162
|
-
|
163
|
-
ObjectInfo memory info = ObjectInfo(
|
164
|
-
nftId,
|
165
|
-
parentNftId,
|
166
|
-
objectType,
|
167
|
-
address(0),
|
168
|
-
initialOwner,
|
169
|
-
data
|
170
|
-
);
|
171
|
-
|
172
|
-
$.info[nftId] = info;
|
173
|
-
|
174
|
-
// add logging
|
175
|
-
}
|
176
|
-
|
177
|
-
//--- external/public view and pure functions --------------------------------
|
178
|
-
|
179
|
-
function getObjectCount() external view override returns (uint256) {
|
180
|
-
return _getStorageV1().chainNft.totalSupply();
|
181
|
-
}
|
182
|
-
|
183
|
-
function getNftId(
|
184
|
-
address object
|
185
|
-
) external view override returns (NftId id) {
|
186
|
-
return _getStorageV1().nftIdByAddress[object];
|
187
|
-
}
|
188
|
-
|
189
|
-
function isRegistered(
|
190
|
-
NftId nftId
|
191
|
-
) public view override returns (bool) {
|
192
|
-
return _getStorageV1().info[nftId].objectType.gtz();
|
193
|
-
}
|
194
|
-
|
195
|
-
function isRegistered(
|
196
|
-
address object
|
197
|
-
) external view override returns (bool) {
|
198
|
-
return _getStorageV1().nftIdByAddress[object].gtz();
|
199
|
-
}
|
200
|
-
|
201
|
-
function getObjectInfo(
|
202
|
-
NftId nftId
|
203
|
-
) external view override returns (ObjectInfo memory info) {
|
204
|
-
return _getStorageV1().info[nftId];
|
205
|
-
}
|
206
|
-
|
207
|
-
function getName(
|
208
|
-
NftId nftId
|
209
|
-
) external view returns (string memory name) {
|
210
|
-
return _getStorageV1().name[nftId];
|
211
|
-
}
|
212
|
-
|
213
|
-
function getOwner(
|
214
|
-
NftId nftId
|
215
|
-
) external view override returns (address) {
|
216
|
-
return _getStorageV1().chainNft.ownerOf(nftId.toInt());
|
217
|
-
}
|
218
|
-
|
219
|
-
function getChainNft() external view override returns (IChainNft) {
|
220
|
-
return _getStorageV1().chainNft;
|
221
|
-
}
|
222
|
-
|
223
|
-
// special case to retrive a gif service
|
224
|
-
function getServiceAddress(
|
225
|
-
string memory serviceName,
|
226
|
-
VersionPart majorVersion
|
227
|
-
) external view override returns (address serviceAddress) {
|
228
|
-
bytes32 serviceNameHash = keccak256(abi.encode(serviceName));
|
229
|
-
return _getStorageV1().service[serviceNameHash][majorVersion];
|
230
|
-
}
|
231
|
-
|
232
|
-
function getProtocolOwner() external view override returns (address) {
|
233
|
-
return _getStorageV1()._protocolOwner;
|
234
|
-
}
|
235
|
-
|
236
|
-
//--- from Registerable --------------------------------------
|
237
|
-
// TODO
|
238
|
-
// 1) Registerable can not register itself -> otherwise register have to trust owner address provided by registerable
|
239
|
-
// registerable owner MUST call register and provide registerable address
|
240
|
-
// it will work if component was delegate called ??? NO
|
241
|
-
// owner-DELEGATE_CALL->component.register()-CALL->registryService->register()
|
242
|
-
// owner-CALL->proxy-DELEGATE_CALL->compoment.register()-CALL->registryService->register()
|
243
|
-
// 2) Who is msg.sender here???
|
244
|
-
// Registration of Instance or Service (any deployed by GIF contract) msg.sender is done in proxe contructor
|
245
|
-
function register() external pure override returns (NftId nftId) {
|
246
|
-
return zeroNftId();
|
247
|
-
}
|
248
|
-
|
249
|
-
function getType() external pure override returns (ObjectType objectType) {
|
250
|
-
return REGISTRY();
|
251
|
-
}
|
252
|
-
|
253
|
-
function getOwner() public view override returns (address owner) {
|
254
|
-
StorageV1 storage $ = _getStorageV1();
|
255
|
-
return $.nftId.gtz() ? this.getOwner($.nftId) : $.initialOwner;
|
256
|
-
}
|
257
|
-
|
258
|
-
function getNftId() public view override (IRegisterable, IRegistry) returns (NftId nftId) {
|
259
|
-
return _getStorageV1().nftId;
|
260
|
-
}
|
261
|
-
|
262
|
-
function getParentNftId() public view returns (NftId nftId) {
|
263
|
-
StorageV1 storage $ = _getStorageV1();
|
264
|
-
// we're the global registry
|
265
|
-
/*if(block.chainid == 1) {
|
266
|
-
return toNftId($.chainNftInternal.PROTOCOL_NFT_ID());
|
267
|
-
}
|
268
|
-
else {
|
269
|
-
return toNftId($.chainNftInternal.GLOBAL_REGISTRY_ID());
|
270
|
-
}*/
|
271
|
-
nftId = $.info[$.nftId].parentNftId;
|
272
|
-
}
|
273
|
-
|
274
|
-
function getData() public pure returns (bytes memory data) {
|
275
|
-
return "";
|
276
|
-
}
|
277
|
-
|
278
|
-
//--- from IRegistryLinked --------------------------------------
|
279
|
-
|
280
|
-
function getRegistry() external view override returns (IRegistry registry) {
|
281
|
-
return this;
|
282
|
-
}
|
283
|
-
|
284
|
-
//--- from Versionable --------------------------------------
|
285
|
-
|
286
|
-
/// @dev the protocol owner will get ownership of the
|
287
|
-
// protocol nft and the global registry nft minted in this
|
288
|
-
// initializer function
|
289
|
-
function initialize(
|
290
|
-
address implementation,
|
291
|
-
address activatedBy,
|
292
|
-
bytes memory data
|
293
|
-
)
|
294
|
-
public
|
295
|
-
virtual override
|
296
|
-
initializer
|
297
|
-
{
|
298
|
-
_updateVersionHistory(implementation, activatedBy);
|
299
|
-
_initializeV01(data);
|
300
|
-
}
|
301
|
-
|
302
|
-
// can not upgrade to the first version
|
303
|
-
function upgrade(
|
304
|
-
address implementation,
|
305
|
-
address activatedBy,
|
306
|
-
bytes memory data
|
307
|
-
)
|
308
|
-
external
|
309
|
-
virtual
|
310
|
-
{
|
311
|
-
revert();
|
312
|
-
}
|
313
|
-
|
314
|
-
function getVersion() public pure virtual override returns (Version) {
|
315
|
-
return VersionLib.toVersion(1, 0, 0);
|
316
|
-
}
|
317
|
-
|
318
|
-
//--- IERC165 support -----------------------------------
|
319
|
-
|
320
|
-
function supportsInterface(bytes4 interfaceId) external pure override returns (bool) {
|
321
|
-
return interfaceId == type(IRegistry).interfaceId;
|
322
|
-
}
|
323
|
-
|
324
|
-
//--- all intenal and private functions -----------------------------------
|
325
|
-
|
326
|
-
function _initializeV01(bytes memory data)
|
327
|
-
internal
|
328
|
-
onlyInitializing
|
329
|
-
{
|
330
|
-
StorageV1 storage $ = _getStorageV1();
|
331
|
-
|
332
|
-
require(
|
333
|
-
address($.chainNft) == address(0),
|
334
|
-
"ERROR:REG-001:ALREADY_INITIALIZED"
|
335
|
-
);
|
336
|
-
|
337
|
-
address protocolOwner = abi.decode(data, (address));
|
338
|
-
$.initialOwner = msg.sender; // TODO here delegate call from proxy constructor, msg.sender is proxy deployer -> Proxy.sol
|
339
|
-
$._protocolOwner = protocolOwner;
|
340
|
-
|
341
|
-
// deploy NFT
|
342
|
-
$.chainNftInternal = new ChainNft(address(this));// adds 10kb to deployment size
|
343
|
-
$.chainNft = IChainNft($.chainNftInternal);
|
344
|
-
|
345
|
-
// initial registry setup
|
346
|
-
_registerProtocol();
|
347
|
-
$.nftId = _registerRegistry();
|
348
|
-
|
349
|
-
// setup rules for further registrations
|
350
|
-
_setupValidTypes();
|
351
|
-
_setupValidParentTypes();
|
352
|
-
}
|
353
|
-
|
354
|
-
/// @dev defines which types are allowed to register
|
355
|
-
function _setupValidTypes() internal onlyInitializing {
|
356
|
-
StorageV1 storage $ = _getStorageV1();
|
357
|
-
$.isValidType[REGISTRY()] = true; // only for global registry
|
358
|
-
$.isValidType[TOKEN()] = true;
|
359
|
-
$.isValidType[SERVICE()] = true;
|
360
|
-
$.isValidType[INSTANCE()] = true;
|
361
|
-
$.isValidType[STAKE()] = true;
|
362
|
-
$.isValidType[PRODUCT()] = true;
|
363
|
-
$.isValidType[ORACLE()] = true;
|
364
|
-
$.isValidType[POOL()] = true;
|
365
|
-
$.isValidType[DISTRIBUTION()] = true;
|
366
|
-
$.isValidType[POLICY()] = true;
|
367
|
-
$.isValidType[BUNDLE()] = true;
|
368
|
-
}
|
369
|
-
|
370
|
-
/// @dev defines which types - parent type relations are allowed to register
|
371
|
-
function _setupValidParentTypes() internal onlyInitializing {
|
372
|
-
StorageV1 storage $ = _getStorageV1();
|
373
|
-
// registry as parent
|
374
|
-
$.isValidParentType[TOKEN()][REGISTRY()] = true;
|
375
|
-
$.isValidParentType[SERVICE()][REGISTRY()] = true;
|
376
|
-
$.isValidParentType[INSTANCE()][REGISTRY()] = true;
|
377
|
-
|
378
|
-
// instance as parent
|
379
|
-
$.isValidParentType[PRODUCT()][INSTANCE()] = true;
|
380
|
-
$.isValidParentType[DISTRIBUTION()][INSTANCE()] = true;
|
381
|
-
$.isValidParentType[ORACLE()][INSTANCE()] = true;
|
382
|
-
$.isValidParentType[POOL()][INSTANCE()] = true;
|
383
|
-
|
384
|
-
// product as parent
|
385
|
-
$.isValidParentType[POLICY()][PRODUCT()] = true;
|
386
|
-
|
387
|
-
// pool as parent
|
388
|
-
$.isValidParentType[BUNDLE()][POOL()] = true;
|
389
|
-
$.isValidParentType[STAKE()][POOL()] = true;
|
390
|
-
}
|
391
|
-
|
392
|
-
/// @dev protocol registration used to anchor the dip ecosystem relations
|
393
|
-
function _registerProtocol()
|
394
|
-
virtual
|
395
|
-
internal
|
396
|
-
onlyInitializing
|
397
|
-
{
|
398
|
-
StorageV1 storage $ = _getStorageV1();
|
399
|
-
|
400
|
-
uint256 protocolId = $.chainNftInternal.PROTOCOL_NFT_ID();
|
401
|
-
$.chainNftInternal.mint($._protocolOwner, protocolId);
|
402
|
-
|
403
|
-
NftId protocolNftid = toNftId(protocolId);
|
404
|
-
ObjectInfo memory protocolInfo = ObjectInfo(
|
405
|
-
protocolNftid,
|
406
|
-
zeroNftId(), // parent nft id
|
407
|
-
PROTOCOL(),
|
408
|
-
address(0), // contract address
|
409
|
-
$._protocolOwner,
|
410
|
-
"" // data
|
411
|
-
);
|
412
|
-
|
413
|
-
$.info[protocolNftid] = protocolInfo;
|
414
|
-
}
|
415
|
-
|
416
|
-
/// @dev registry registration
|
417
|
-
/// might also register the global registry when not on mainnet
|
418
|
-
function _registerRegistry()
|
419
|
-
virtual
|
420
|
-
internal
|
421
|
-
onlyInitializing
|
422
|
-
returns (NftId registryNftId)
|
423
|
-
{
|
424
|
-
StorageV1 storage $ = _getStorageV1();
|
425
|
-
|
426
|
-
uint256 registryId = $.chainNftInternal.calculateTokenId(2);
|
427
|
-
registryNftId = toNftId(registryId);
|
428
|
-
|
429
|
-
// we're not the global registry
|
430
|
-
if(registryId != $.chainNftInternal.GLOBAL_REGISTRY_ID()) {
|
431
|
-
_registerGlobalRegistry();
|
432
|
-
}
|
433
|
-
|
434
|
-
$.chainNftInternal.mint($._protocolOwner, registryId);
|
435
|
-
|
436
|
-
// TODO error when deploying registry proxy
|
437
|
-
// in that case "this" is proxy address, "msg.sender" is proxy deployer, here in delegate call
|
438
|
-
// _registerObjectInfo() treats "this" as "IRegisterable"
|
439
|
-
// thus registerable.anyFunction() calls proxy...
|
440
|
-
/*_registerObjectInfo(this, registryNftId);*/
|
441
|
-
|
442
|
-
NftId parentNftId;
|
443
|
-
// we're the global registry
|
444
|
-
if(block.chainid == 1) {
|
445
|
-
parentNftId = toNftId($.chainNftInternal.PROTOCOL_NFT_ID());
|
446
|
-
}
|
447
|
-
else {
|
448
|
-
parentNftId = toNftId($.chainNftInternal.GLOBAL_REGISTRY_ID());
|
449
|
-
}
|
450
|
-
ObjectInfo memory registryInfo = ObjectInfo(
|
451
|
-
registryNftId,
|
452
|
-
parentNftId, // registerable is proxy address, when in delegate call
|
453
|
-
REGISTRY(),
|
454
|
-
address(this), // proxy address
|
455
|
-
$._protocolOwner, // registry owner is different from proxy owner
|
456
|
-
""
|
457
|
-
);
|
458
|
-
|
459
|
-
$.info[registryNftId] = registryInfo;
|
460
|
-
$.nftIdByAddress[address(this)] = registryNftId;
|
461
|
-
|
462
|
-
// add logging
|
463
|
-
}
|
464
|
-
|
465
|
-
|
466
|
-
/// @dev global registry registration for non mainnet registries
|
467
|
-
function _registerGlobalRegistry()
|
468
|
-
virtual
|
469
|
-
internal
|
470
|
-
onlyInitializing
|
471
|
-
{
|
472
|
-
StorageV1 storage $ = _getStorageV1();
|
473
|
-
|
474
|
-
uint256 globalRegistryId = $.chainNftInternal.GLOBAL_REGISTRY_ID();
|
475
|
-
$.chainNftInternal.mint($._protocolOwner, globalRegistryId);
|
476
|
-
|
477
|
-
NftId globalRegistryNftId = toNftId(globalRegistryId);
|
478
|
-
ObjectInfo memory globalRegistryInfo = ObjectInfo(
|
479
|
-
globalRegistryNftId,
|
480
|
-
toNftId($.chainNftInternal.PROTOCOL_NFT_ID()),
|
481
|
-
REGISTRY(),
|
482
|
-
address(0), // contract address
|
483
|
-
$._protocolOwner,
|
484
|
-
"" // data
|
485
|
-
);
|
486
|
-
|
487
|
-
$.info[globalRegistryNftId] = globalRegistryInfo;
|
488
|
-
}
|
489
|
-
|
490
|
-
function _registerObjectInfo(
|
491
|
-
IRegisterable registerable,
|
492
|
-
NftId nftId
|
493
|
-
)
|
494
|
-
internal
|
495
|
-
virtual
|
496
|
-
onlyInitializing
|
497
|
-
{
|
498
|
-
address objectAddress = address(registerable);
|
499
|
-
ObjectInfo memory info = ObjectInfo(
|
500
|
-
nftId,
|
501
|
-
registerable.getParentNftId(),
|
502
|
-
registerable.getType(),
|
503
|
-
objectAddress,
|
504
|
-
registerable.getOwner(),
|
505
|
-
registerable.getData()
|
506
|
-
);
|
507
|
-
|
508
|
-
StorageV1 storage $ = _getStorageV1();
|
509
|
-
$.info[nftId] = info;
|
510
|
-
$.nftIdByAddress[objectAddress] = nftId;
|
511
|
-
|
512
|
-
// add logging
|
513
|
-
}
|
514
|
-
|
515
|
-
// TODO: private or internal ?
|
516
|
-
// 1) new version have access only to its own storage slot (if previous versions did not expose theirs)
|
517
|
-
// - have to chain initializers
|
518
|
-
// + simple
|
519
|
-
// - slow/costly, initialization gas usage will grow faster then 1)
|
520
|
-
// - initialization functions count/code likely will grow with each new version
|
521
|
-
// - new functions have access only to a local storage slot
|
522
|
-
// 2) each intializer of each version have access to each "registry storage locations" he knows about ->
|
523
|
-
// + no initializers chaining
|
524
|
-
// + new variables can be added to older versions storage hmmm...redefine storage struct
|
525
|
-
function _getStorageV1()
|
526
|
-
private
|
527
|
-
pure
|
528
|
-
returns (StorageV1 storage s)
|
529
|
-
{
|
530
|
-
// solhint-disable no-inline-assembly
|
531
|
-
assembly {
|
532
|
-
s.slot := STORAGE_LOCATION_V1
|
533
|
-
}
|
534
|
-
}
|
535
|
-
}
|
536
|
-
|
537
|
-
/*
|
538
|
-
**************** New implementation is set from delegate call ******************
|
539
|
-
Implementation controled proxy?
|
540
|
-
1). Proxy allows implV1 to change proxy.implementation variable to a new one (e.g. ImplV2) -> this is called reinitialization
|
541
|
-
2). calls to proxy after reinitialization will point to new implementation -> like switching context -> old implementsations cuts itself from proxy
|
542
|
-
2). Proxy can have:
|
543
|
-
a). safe implementation which it uses after construction by default
|
544
|
-
safe implementation allows one reinitialization to implementation needed (can be done in one call after initialization)
|
545
|
-
b). two impelemtations
|
546
|
-
the first for upgrades (have reinitialize function which changes the address the second one)
|
547
|
-
the second for appication specific stuff
|
548
|
-
*/
|
@@ -1,65 +0,0 @@
|
|
1
|
-
// SPDX-License-Identifier: Apache-2.0
|
2
|
-
pragma solidity ^0.8.19;
|
3
|
-
|
4
|
-
import {Blocknumber, blockNumber} from "../types/Blocknumber.sol";
|
5
|
-
import {Timestamp, blockTimestamp} from "../types/Timestamp.sol";
|
6
|
-
import {Version, VersionPart} from "../types/Version.sol";
|
7
|
-
|
8
|
-
interface IVersionable {
|
9
|
-
|
10
|
-
struct VersionInfo {
|
11
|
-
Version version;
|
12
|
-
address implementation;
|
13
|
-
address activatedBy;
|
14
|
-
Timestamp activatedAt;
|
15
|
-
Blocknumber activatedIn;
|
16
|
-
}
|
17
|
-
|
18
|
-
event LogVersionableInitialized(Version version, address implementation, address activatedBy);
|
19
|
-
|
20
|
-
// TODO uncomment when all implementations are ready
|
21
|
-
/**
|
22
|
-
* @dev IMPORTANT this function MUST be implemented by each new version
|
23
|
-
* any such implementation MUST be guarded by initializer modifier
|
24
|
-
* any such implementation MUST call internal function _activate()
|
25
|
-
* any new version MUST inherit from previous version
|
26
|
-
*/
|
27
|
-
function initialize(address implementation, address activatedBy, bytes memory activationData) external;
|
28
|
-
|
29
|
-
/**
|
30
|
-
* @dev IMPORTANT this function MUST be implemented by each new version
|
31
|
-
* any such implementation MUST be guarded by reinitializer(version().toUint64()) modifier
|
32
|
-
* any such implementation MUST call internal function _activate()
|
33
|
-
* any new version MUST inherit from previous version
|
34
|
-
* the first verion MUST revert
|
35
|
-
*/
|
36
|
-
function upgrade(address implementation, address activatedBy, bytes memory upgradeData) external;
|
37
|
-
|
38
|
-
/**
|
39
|
-
* @dev returns true if the specified version has been activated for the current contract
|
40
|
-
*/
|
41
|
-
function isInitialized(Version version) external view returns(bool);
|
42
|
-
|
43
|
-
/**
|
44
|
-
* @dev returns currently active version of this contract
|
45
|
-
*/
|
46
|
-
function getVersion() external pure returns(Version);
|
47
|
-
|
48
|
-
/**
|
49
|
-
* @dev returns the number of all deployed versions of this contract
|
50
|
-
*/
|
51
|
-
function getVersionCount() external view returns(uint256 numberOfVersions);
|
52
|
-
|
53
|
-
/**
|
54
|
-
* @dev returns the i-th (index) version of this contract
|
55
|
-
*/
|
56
|
-
function getVersion(uint256 index) external view returns(Version version);
|
57
|
-
|
58
|
-
/**
|
59
|
-
* @dev returns the i-th (index) version info of this contract
|
60
|
-
*/
|
61
|
-
function getVersionInfo(Version version) external view returns(VersionInfo memory versionInfo);
|
62
|
-
|
63
|
-
function getInitializedVersion() external view returns(uint64);
|
64
|
-
|
65
|
-
}
|