@etherisc/gif-next 0.0.2-8daf0fe-431 → 0.0.2-8e283ec-993
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 +32 -3
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.json +38 -52
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.json +2 -2
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.json +8 -8
- package/artifacts/contracts/authorization/IAccess.sol/IAccess.dbg.json +1 -1
- package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.dbg.json +1 -1
- package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.json +0 -19
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IModuleAuthorization.sol/IModuleAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.json +19 -0
- package/artifacts/contracts/authorization/ModuleAuthorization.sol/ModuleAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ModuleAuthorization.sol/ModuleAuthorization.json +8 -8
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.json +23 -4
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +85 -248
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +18 -18
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +43 -222
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +228 -217
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +93 -101
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +43 -37
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +120 -31
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.json +1411 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.json +1171 -0
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.json +1545 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.json +1980 -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 +6 -6
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +5 -5
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +17 -106
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +102 -100
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +31 -31
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +467 -127
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +44 -151
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +61 -81
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +255 -240
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.json +2 -2
- package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.json +2 -2
- 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 +1 -1
- package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IComponents.sol/IComponents.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +1 -1
- package/artifacts/contracts/mock/Dip.sol/Dip.dbg.json +1 -1
- package/artifacts/contracts/mock/Dip.sol/Dip.json +2 -2
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.json +59 -235
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +21 -21
- package/artifacts/contracts/oracle/IOracle.sol/IOracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.json +30 -37
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.json +27 -219
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +37 -144
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +60 -80
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.json +79 -280
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.json +19 -19
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +407 -174
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +137 -89
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.json +205 -1
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.json +72 -94
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.json +293 -104
- package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/pool/Pool.sol/Pool.json +69 -276
- package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolService.sol/PoolService.json +396 -253
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +90 -82
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +36 -162
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +57 -89
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +47 -248
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.json +19 -19
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +212 -181
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +92 -100
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.json +5 -0
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.json +120 -6
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.json +266 -119
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +1 -1
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.json +43 -43
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.json +47 -63
- package/artifacts/contracts/product/IRiskService.sol/IRiskService.dbg.json +4 -0
- package/artifacts/contracts/product/{IProductService.sol/IProductService.json → IRiskService.sol/IRiskService.json} +2 -2
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +358 -318
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +97 -101
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +118 -265
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +80 -120
- package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/product/Product.sol/Product.json +47 -248
- package/artifacts/contracts/product/RiskService.sol/RiskService.dbg.json +4 -0
- package/artifacts/contracts/product/RiskService.sol/RiskService.json +588 -0
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +4 -0
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.json +682 -0
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +59 -16
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +276 -9
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +0 -183
- package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.json +495 -67
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +251 -134
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +23 -313
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +52 -72
- 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 +1169 -0
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +26 -7
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +4 -4
- package/artifacts/contracts/shared/Component.sol/Component.dbg.json +1 -1
- package/artifacts/contracts/shared/Component.sol/Component.json +0 -211
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +247 -161
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +105 -95
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.json +5 -112
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.dbg.json +4 -0
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.json +92 -0
- package/artifacts/contracts/shared/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponent.sol/IComponent.json +0 -26
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.json +153 -0
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.json +19 -37
- package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.json +11 -5
- package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.json +0 -5
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.json +15 -47
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
- package/artifacts/contracts/shared/InitializableCustom.sol/InitializableCustom.dbg.json +1 -1
- package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.dbg.json +4 -0
- package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.json +53 -0
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.json +19 -222
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.json +15 -89
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.json +4 -65
- 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 +1 -1
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +6 -57
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +19 -141
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +8 -97
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +2 -15
- package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
- package/artifacts/contracts/shared/Service.sol/Service.json +5 -112
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +330 -11
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.dbg.json +4 -0
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.json +108 -0
- package/artifacts/contracts/staking/IStaking.sol/IStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/IStaking.sol/IStaking.json +27 -27
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.json +85 -105
- package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.json +85 -262
- 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 +1 -1
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +77 -88
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +6 -6
- package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingService.sol/StakingService.json +31 -138
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +56 -76
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +146 -165
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +58 -22
- package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.dbg.json +1 -1
- package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.json +2 -2
- package/artifacts/contracts/type/Amount.sol/AmountLib.dbg.json +1 -1
- package/artifacts/contracts/type/Amount.sol/AmountLib.json +37 -8
- package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
- package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.json +2 -2
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.json +4 -4
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.json +4 -4
- package/artifacts/contracts/type/Fee.sol/FeeLib.dbg.json +1 -1
- package/artifacts/contracts/type/Fee.sol/FeeLib.json +17 -12
- package/artifacts/contracts/type/Key32.sol/Key32Lib.dbg.json +1 -1
- package/artifacts/contracts/type/Key32.sol/Key32Lib.json +2 -2
- package/artifacts/contracts/type/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/NftId.sol/NftIdLib.json +4 -4
- package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
- package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.json +2 -2
- package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.json +2 -2
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.json +19 -19
- package/artifacts/contracts/type/Referral.sol/ReferralLib.dbg.json +1 -1
- package/artifacts/contracts/type/Referral.sol/ReferralLib.json +4 -4
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.json +4 -4
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.json +4 -4
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.json +14 -14
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +1 -1
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.json +50 -2
- package/artifacts/contracts/type/Selector.sol/SelectorLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorLib.json +2 -2
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.json +2 -2
- package/artifacts/contracts/type/StateId.sol/StateIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/StateId.sol/StateIdLib.json +2 -2
- package/artifacts/contracts/type/String.sol/StrLib.dbg.json +1 -1
- package/artifacts/contracts/type/String.sol/StrLib.json +2 -2
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.json +23 -4
- package/artifacts/contracts/type/UFixed.sol/MathLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/MathLib.json +9 -3
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.json +52 -2
- package/artifacts/contracts/type/Version.sol/VersionLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionLib.json +2 -2
- package/artifacts/contracts/type/Version.sol/VersionPartLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionPartLib.json +21 -2
- package/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.dbg.json +4 -0
- package/artifacts/contracts/{shared → upgradeability}/IVersionable.sol/IVersionable.json +1 -1
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.dbg.json +4 -0
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.json +586 -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/{shared → upgradeability}/Versionable.sol/Versionable.json +1 -1
- package/contracts/authorization/AccessAdmin.sol +28 -24
- package/contracts/authorization/Authorization.sol +5 -2
- package/contracts/authorization/IAccessAdmin.sol +0 -1
- package/contracts/authorization/IServiceAuthorization.sol +3 -0
- package/contracts/authorization/ServiceAuthorization.sol +4 -0
- package/contracts/distribution/BasicDistribution.sol +4 -15
- package/contracts/distribution/BasicDistributionAuthorization.sol +5 -1
- package/contracts/distribution/Distribution.sol +23 -11
- package/contracts/distribution/DistributionService.sol +76 -42
- package/contracts/distribution/DistributionServiceManager.sol +8 -11
- package/contracts/distribution/IDistributionComponent.sol +8 -4
- package/contracts/distribution/IDistributionService.sol +18 -2
- package/contracts/examples/unpermissioned/SimpleDistribution.sol +50 -0
- package/contracts/examples/unpermissioned/SimpleOracle.sol +137 -0
- package/contracts/examples/unpermissioned/SimplePool.sol +76 -0
- package/contracts/examples/unpermissioned/SimpleProduct.sol +351 -0
- package/contracts/instance/{BundleManager.sol → BundleSet.sol} +23 -23
- package/contracts/instance/IInstance.sol +11 -34
- package/contracts/instance/IInstanceService.sol +5 -5
- package/contracts/instance/Instance.sol +13 -38
- package/contracts/instance/InstanceAdmin.sol +31 -9
- package/contracts/instance/InstanceAuthorizationV3.sol +16 -14
- package/contracts/instance/InstanceReader.sol +125 -11
- package/contracts/instance/InstanceService.sol +71 -49
- package/contracts/instance/InstanceServiceManager.sol +8 -13
- package/contracts/instance/InstanceStore.sol +18 -4
- package/contracts/instance/base/ObjectLifecycle.sol +111 -0
- package/contracts/instance/base/{ObjectManager.sol → ObjectSet.sol} +5 -5
- package/contracts/instance/module/IBundle.sol +1 -1
- package/contracts/instance/module/IComponents.sol +4 -8
- package/contracts/instance/module/IDistribution.sol +0 -1
- package/contracts/instance/module/IPolicy.sol +24 -24
- package/contracts/mock/Dip.sol +1 -1
- package/contracts/oracle/IOracleComponent.sol +2 -1
- package/contracts/oracle/Oracle.sol +17 -7
- package/contracts/oracle/OracleService.sol +11 -8
- package/contracts/oracle/OracleServiceManager.sol +8 -11
- package/contracts/pool/BasicPool.sol +7 -5
- package/contracts/pool/BasicPoolAuthorization.sol +11 -2
- package/contracts/pool/BundleService.sol +197 -55
- package/contracts/pool/BundleServiceManager.sol +8 -11
- package/contracts/pool/IBundleService.sol +33 -5
- package/contracts/pool/IPoolComponent.sol +24 -8
- package/contracts/pool/IPoolService.sol +55 -34
- package/contracts/pool/Pool.sol +72 -30
- package/contracts/pool/PoolService.sol +223 -127
- package/contracts/pool/PoolServiceManager.sol +6 -9
- package/contracts/product/ApplicationService.sol +62 -65
- package/contracts/product/ApplicationServiceManager.sol +6 -6
- package/contracts/product/BasicProduct.sol +3 -32
- package/contracts/product/BasicProductAuthorization.sol +3 -0
- package/contracts/product/ClaimService.sol +243 -112
- package/contracts/product/ClaimServiceManager.sol +6 -6
- package/contracts/product/IApplicationService.sol +1 -0
- package/contracts/product/IClaimService.sol +29 -6
- package/contracts/product/IPolicyService.sol +31 -32
- package/contracts/product/IPricingService.sol +7 -7
- package/contracts/product/IProductComponent.sol +18 -4
- package/contracts/product/{IProductService.sol → IRiskService.sol} +1 -1
- package/contracts/product/PolicyService.sol +361 -190
- package/contracts/product/PolicyServiceManager.sol +6 -9
- package/contracts/product/PricingService.sol +46 -46
- package/contracts/product/PricingServiceManager.sol +5 -8
- package/contracts/product/Product.sol +90 -50
- package/contracts/product/{ProductService.sol → RiskService.sol} +13 -41
- package/contracts/product/RiskServiceManager.sol +39 -0
- package/contracts/registry/ChainNft.sol +65 -32
- package/contracts/registry/IRegistry.sol +65 -16
- package/contracts/registry/IRegistryService.sol +0 -9
- package/contracts/registry/Registry.sol +340 -211
- package/contracts/registry/RegistryAdmin.sol +172 -71
- package/contracts/registry/RegistryService.sol +59 -66
- package/contracts/registry/RegistryServiceManager.sol +4 -4
- package/contracts/registry/ReleaseLifecycle.sol +27 -0
- package/contracts/registry/{ReleaseManager.sol → ReleaseRegistry.sol} +155 -182
- package/contracts/registry/ServiceAuthorizationV3.sol +7 -8
- package/contracts/registry/TokenRegistry.sol +2 -2
- package/contracts/shared/Component.sol +30 -43
- package/contracts/shared/ComponentService.sol +90 -28
- package/contracts/shared/ComponentServiceManager.sol +10 -7
- package/contracts/shared/ComponentVerifyingService.sol +2 -3
- package/contracts/shared/ContractLib.sol +38 -0
- package/contracts/shared/IComponent.sol +4 -4
- package/contracts/shared/IComponentService.sol +15 -9
- package/contracts/shared/IInstanceLinkedComponent.sol +9 -10
- package/contracts/shared/IKeyValueStore.sol +1 -0
- package/contracts/shared/ILifecycle.sol +1 -2
- package/contracts/shared/IPolicyHolder.sol +12 -22
- package/contracts/shared/IService.sol +1 -1
- package/contracts/shared/{ERC165.sol → InitializableERC165.sol} +3 -3
- package/contracts/shared/InstanceLinkedComponent.sol +26 -6
- package/contracts/shared/KeyValueStore.sol +6 -2
- package/contracts/shared/Lifecycle.sol +16 -69
- package/contracts/shared/{NftIdSetManager.sol → NftIdSet.sol} +1 -1
- package/contracts/shared/NftOwnable.sol +7 -7
- package/contracts/shared/PolicyHolder.sol +17 -57
- package/contracts/shared/Registerable.sol +4 -4
- package/contracts/shared/RegistryLinked.sol +3 -2
- package/contracts/shared/Service.sol +19 -15
- package/contracts/shared/TokenHandler.sol +100 -19
- package/contracts/shared/TokenHandlerDeployerLib.sol +12 -0
- package/contracts/staking/IStaking.sol +3 -3
- package/contracts/staking/IStakingService.sol +12 -5
- package/contracts/staking/StakeManagerLib.sol +18 -25
- package/contracts/staking/Staking.sol +27 -42
- package/contracts/staking/StakingLifecycle.sol +23 -0
- package/contracts/staking/StakingManager.sol +10 -12
- package/contracts/staking/StakingReader.sol +12 -16
- package/contracts/staking/StakingService.sol +10 -14
- package/contracts/staking/StakingServiceManager.sol +4 -4
- package/contracts/staking/StakingStore.sol +15 -23
- package/contracts/staking/TargetManagerLib.sol +7 -3
- package/contracts/type/Amount.sol +12 -5
- package/contracts/type/Blocknumber.sol +7 -1
- package/contracts/type/ObjectType.sol +18 -18
- package/contracts/type/PayoutId.sol +10 -10
- package/contracts/type/Referral.sol +1 -0
- package/contracts/type/Seconds.sol +21 -1
- package/contracts/type/StateId.sol +1 -0
- package/contracts/type/Timestamp.sol +11 -1
- package/contracts/type/UFixed.sol +33 -10
- package/contracts/type/Version.sol +3 -1
- package/contracts/{shared → upgradeability}/ProxyManager.sol +70 -38
- package/contracts/{shared → upgradeability}/UpgradableProxyWithAdmin.sol +1 -3
- package/contracts/{shared → upgradeability}/Versionable.sol +2 -2
- package/package.json +3 -3
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +0 -4
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +0 -703
- package/artifacts/contracts/instance/base/ObjectManager.sol/ObjectManager.dbg.json +0 -4
- package/artifacts/contracts/instance/base/ObjectManager.sol/ObjectManager.json +0 -181
- package/artifacts/contracts/product/IProductService.sol/IProductService.dbg.json +0 -4
- package/artifacts/contracts/product/ProductService.sol/ProductService.dbg.json +0 -4
- package/artifacts/contracts/product/ProductService.sol/ProductService.json +0 -708
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.dbg.json +0 -4
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.json +0 -702
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +0 -4
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +0 -1140
- package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +0 -4
- package/artifacts/contracts/shared/ERC165.sol/ERC165.json +0 -73
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +0 -4
- package/artifacts/contracts/shared/NftIdSetManager.sol/NftIdSetManager.dbg.json +0 -4
- package/artifacts/contracts/shared/NftIdSetManager.sol/NftIdSetManager.json +0 -306
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +0 -4
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +0 -617
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +0 -4
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +0 -129
- package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +0 -4
- package/contracts/product/ProductServiceManager.sol +0 -42
- /package/contracts/{shared → upgradeability}/IVersionable.sol +0 -0
@@ -14,7 +14,7 @@ import {ObjectType, ObjectTypeLib, POOL, RELEASE, REGISTRY, SERVICE, STAKING} fr
|
|
14
14
|
import {Version, VersionLib, VersionPart, VersionPartLib} from "../type/Version.sol";
|
15
15
|
import {Timestamp, TimestampLib, zeroTimestamp, ltTimestamp} from "../type/Timestamp.sol";
|
16
16
|
import {Seconds, SecondsLib} from "../type/Seconds.sol";
|
17
|
-
import {StateId, INITIAL, SCHEDULED, DEPLOYING, ACTIVE} from "../type/StateId.sol";
|
17
|
+
import {StateId, INITIAL, SCHEDULED, DEPLOYING, ACTIVE, PAUSED, CLOSED} from "../type/StateId.sol";
|
18
18
|
import {Version, VersionLib, VersionPart, VersionPartLib} from "../type/Version.sol";
|
19
19
|
|
20
20
|
import {IService} from "../shared/IService.sol";
|
@@ -30,64 +30,62 @@ import {IAccessAdmin} from "../authorization/IAccessAdmin.sol";
|
|
30
30
|
import {RegistryAdmin} from "./RegistryAdmin.sol";
|
31
31
|
import {Registry} from "./Registry.sol";
|
32
32
|
import {TokenRegistry} from "./TokenRegistry.sol";
|
33
|
+
import {ReleaseLifecycle} from "./ReleaseLifecycle.sol";
|
33
34
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
AccessManaged,
|
38
|
-
ILifecycle,
|
35
|
+
contract ReleaseRegistry is
|
36
|
+
AccessManaged,
|
37
|
+
ReleaseLifecycle,
|
39
38
|
IRegistryLinked
|
40
39
|
{
|
41
40
|
using ObjectTypeLib for ObjectType;
|
42
41
|
|
43
42
|
uint256 public constant INITIAL_GIF_VERSION = 3;
|
44
43
|
|
45
|
-
event LogReleaseCreation(VersionPart version, bytes32 salt
|
44
|
+
event LogReleaseCreation(VersionPart version, bytes32 salt);
|
46
45
|
event LogReleaseActivation(VersionPart version);
|
46
|
+
event LogReleaseDisabled(VersionPart version);
|
47
|
+
event LogReleaseEnabled(VersionPart version);
|
47
48
|
|
48
49
|
// constructor
|
49
|
-
error
|
50
|
+
error ErrorReleaseRegistryNotRegistry(Registry registry);
|
50
51
|
|
51
52
|
// createNextRelease
|
52
|
-
error
|
53
|
+
error ErrorReleaseRegistryReleaseCreationDisallowed(VersionPart version, StateId currentStateId);
|
53
54
|
|
54
55
|
// prepareRelease
|
55
|
-
error
|
56
|
-
error
|
57
|
-
error
|
58
|
-
error
|
59
|
-
|
60
|
-
// register staking
|
61
|
-
//error ErrorReleaseManagerStakingAlreadySet(address stakingAddress);
|
56
|
+
error ErrorReleaseRegistryReleasePreparationDisallowed(VersionPart version, StateId currentStateId);
|
57
|
+
error ErrorReleaseRegistryReleaseAlreadyPrepared(VersionPart version, StateId currentStateId);
|
58
|
+
error ErrorReleaseRegistryVersionMismatch(VersionPart expected, VersionPart actual);
|
59
|
+
error ErrorReleaseRegistryNoDomains(VersionPart version);
|
62
60
|
|
63
61
|
// registerService
|
64
|
-
error
|
65
|
-
error
|
66
|
-
error
|
67
|
-
error
|
68
|
-
error
|
62
|
+
error ErrorReleaseRegistryNoServiceRegistrationExpected();
|
63
|
+
error ErrorReleaseRegistryServiceRegistrationDisallowed(StateId currentStateId);
|
64
|
+
error ErrorReleaseRegistryServiceDomainMismatch(ObjectType expectedDomain, ObjectType actualDomain);
|
65
|
+
error ErrorReleaseRegistryNotService(address notService);
|
66
|
+
error ErrorReleaseRegistryServiceAddressMismatch(address expected, address actual);
|
69
67
|
|
70
68
|
// activateNextRelease
|
71
|
-
error
|
72
|
-
error
|
73
|
-
error
|
74
|
-
error
|
69
|
+
error ErrorReleaseRegistryReleaseActivationDisallowed(VersionPart releaseVersion, StateId currentStateId);
|
70
|
+
error ErrorReleaseRegistryReleaseNotCreated(VersionPart releaseVersion);
|
71
|
+
error ErrorReleaseRegistryReleaseRegistrationNotFinished(VersionPart releaseVersion, uint awaitingRegistration);
|
72
|
+
error ErrorReleaseRegistryReleaseAlreadyActivated(VersionPart releaseVersion);
|
75
73
|
|
76
74
|
// disableRelease
|
77
|
-
error
|
78
|
-
error
|
75
|
+
error ErrorReleaseRegistryReleaseNotActivated(VersionPart releaseVersion);
|
76
|
+
error ErrorReleaseRegistryReleaseAlreadyDisabled(VersionPart releaseVersion);
|
79
77
|
|
80
78
|
// _verifyService
|
81
|
-
error
|
82
|
-
error
|
79
|
+
error ErrorReleaseRegistryServiceReleaseAuthorityMismatch(IService service, address serviceAuthority, address releaseAuthority);
|
80
|
+
error ErrorReleaseRegistryServiceReleaseVersionMismatch(IService service, VersionPart serviceVersion, VersionPart releaseVersion);
|
83
81
|
|
84
82
|
// _verifyServiceInfo
|
85
|
-
error
|
86
|
-
error
|
87
|
-
error
|
88
|
-
error
|
89
|
-
error
|
90
|
-
error
|
83
|
+
error ErrorReleaseRegistryServiceInfoAddressInvalid(IService service, address expected);
|
84
|
+
error ErrorReleaseRegistryServiceInfoInterceptorInvalid(IService service, bool isInterceptor);
|
85
|
+
error ErrorReleaseRegistryServiceInfoTypeInvalid(IService service, ObjectType expected, ObjectType found);
|
86
|
+
error ErrorReleaseRegistryServiceInfoOwnerInvalid(IService service, address expected, address found);
|
87
|
+
error ErrorReleaseRegistryServiceSelfRegistration(IService service);
|
88
|
+
error ErrorReleaseRegistryServiceOwnerRegistered(IService service, address owner);
|
91
89
|
|
92
90
|
Seconds public constant MIN_DISABLE_DELAY = Seconds.wrap(60 * 24 * 365); // 1 year
|
93
91
|
|
@@ -102,51 +100,42 @@ contract ReleaseManager is
|
|
102
100
|
// TODO check where/why this is used
|
103
101
|
mapping(address registryService => VersionPart version) _releaseVersionByAddress;
|
104
102
|
|
105
|
-
|
106
|
-
mapping(VersionPart version => address authority) internal _releaseAccessManager;
|
107
|
-
|
108
|
-
|
109
|
-
VersionPart immutable internal _initial;// first active version
|
103
|
+
VersionPart private _initial;// first active version
|
110
104
|
VersionPart internal _latest; // latest active version
|
111
105
|
VersionPart internal _next; // version to create and activate
|
112
|
-
|
106
|
+
mapping(VersionPart verson => StateId releaseState) private _state;
|
113
107
|
|
114
108
|
uint256 internal _registeredServices;
|
115
109
|
uint256 internal _servicesToRegister;
|
116
110
|
|
117
|
-
// deployer of this contract must be gif admin
|
118
111
|
constructor(Registry registry)
|
119
112
|
AccessManaged(msg.sender)
|
120
113
|
{
|
121
114
|
// TODO move this part to RegistryLinked constructor
|
122
115
|
if(!_isRegistry(address(registry))) {
|
123
|
-
revert
|
116
|
+
revert ErrorReleaseRegistryNotRegistry(registry);
|
124
117
|
}
|
125
118
|
|
119
|
+
setAuthority(registry.getAuthority());
|
120
|
+
|
126
121
|
_registry = registry;
|
127
|
-
setAuthority(_registry.getAuthority());
|
128
122
|
_admin = RegistryAdmin(_registry.getRegistryAdminAddress());
|
129
123
|
|
130
124
|
_initial = VersionPartLib.toVersionPart(INITIAL_GIF_VERSION);
|
131
125
|
_next = VersionPartLib.toVersionPart(INITIAL_GIF_VERSION - 1);
|
132
|
-
_state = getInitialState(RELEASE());
|
133
126
|
}
|
134
127
|
|
135
128
|
/// @dev skips previous release if was not activated
|
136
|
-
/// sets release
|
129
|
+
/// sets next release into state SCHEDULED
|
137
130
|
function createNextRelease()
|
138
131
|
external
|
139
132
|
restricted() // GIF_ADMIN_ROLE
|
140
133
|
returns(VersionPart)
|
141
134
|
{
|
142
|
-
if (!isValidTransition(RELEASE(), _state, SCHEDULED())) {
|
143
|
-
revert ErrorReleaseManagerReleaseCreationDisallowed(_state);
|
144
|
-
}
|
145
|
-
|
146
135
|
_next = VersionPartLib.toVersionPart(_next.toInt() + 1);
|
147
136
|
_servicesToRegister = 0;
|
148
137
|
_registeredServices = 0;
|
149
|
-
_state =
|
138
|
+
_state[_next] = getInitialState(RELEASE());
|
150
139
|
|
151
140
|
return _next;
|
152
141
|
}
|
@@ -163,94 +152,104 @@ contract ReleaseManager is
|
|
163
152
|
bytes32 releaseSalt
|
164
153
|
)
|
165
154
|
{
|
166
|
-
|
167
|
-
|
168
|
-
revert ErrorReleaseManagerReleasePreparationDisallowed(_state);
|
169
|
-
}
|
155
|
+
authority = _admin.authority();
|
156
|
+
version = _next;
|
170
157
|
|
171
|
-
//
|
172
|
-
|
173
|
-
|
158
|
+
// ensures unique salt
|
159
|
+
// TODO CreateX have clones capability also
|
160
|
+
// what would releaseSalt look like if used with CreateX in pemissioned mode?
|
161
|
+
releaseSalt = keccak256(
|
162
|
+
bytes.concat(
|
163
|
+
bytes32(version.toInt()),
|
164
|
+
salt));
|
165
|
+
|
166
|
+
// verify release in state SCHEDULED
|
167
|
+
if (!isValidTransition(RELEASE(), _state[version], DEPLOYING())) {
|
168
|
+
revert ErrorReleaseRegistryReleasePreparationDisallowed(version, _state[version]);
|
174
169
|
}
|
175
170
|
|
171
|
+
_state[version] = DEPLOYING();
|
172
|
+
|
176
173
|
// verify authorizaion contract release matches with expected version
|
177
174
|
VersionPart releaseVersion = serviceAuthorization.getRelease();
|
178
|
-
if (releaseVersion !=
|
179
|
-
revert
|
175
|
+
if (releaseVersion != version) {
|
176
|
+
revert ErrorReleaseRegistryVersionMismatch(version, releaseVersion);
|
180
177
|
}
|
181
178
|
|
179
|
+
|
182
180
|
// sanity check to ensure service domain list is not empty
|
183
181
|
uint256 serviceDomainsCount = serviceAuthorization.getServiceDomains().length;
|
184
182
|
if (serviceDomainsCount == 0) {
|
185
|
-
revert
|
183
|
+
revert ErrorReleaseRegistryNoDomains(version);
|
186
184
|
}
|
187
185
|
|
188
|
-
|
189
|
-
_servicesToRegister
|
190
|
-
|
191
|
-
|
192
|
-
authority = _admin.authority();
|
193
|
-
_serviceAuthorization[_next] = serviceAuthorization;
|
194
|
-
// TODO refactor: authority no longer release specific
|
195
|
-
_releaseAccessManager[_next] = authority;
|
186
|
+
// verify prepareNextRelease is only called once per release
|
187
|
+
if(_servicesToRegister > 0) {
|
188
|
+
revert ErrorReleaseRegistryReleaseAlreadyPrepared(version, _state[version]);
|
189
|
+
}
|
196
190
|
|
197
|
-
|
198
|
-
|
199
|
-
bytes.concat(
|
200
|
-
bytes32(version.toInt()),
|
201
|
-
salt));
|
191
|
+
_servicesToRegister = serviceDomainsCount;
|
192
|
+
_serviceAuthorization[version] = serviceAuthorization;
|
202
193
|
|
203
|
-
emit LogReleaseCreation(version, releaseSalt
|
194
|
+
emit LogReleaseCreation(version, releaseSalt);
|
204
195
|
}
|
205
196
|
|
206
|
-
|
207
197
|
function registerService(IService service)
|
208
198
|
external
|
209
199
|
restricted // GIF_MANAGER_ROLE
|
210
200
|
returns(NftId nftId)
|
211
201
|
{
|
212
|
-
|
213
|
-
|
214
|
-
|
202
|
+
VersionPart releaseVersion = _next;
|
203
|
+
StateId state = _state[releaseVersion];
|
204
|
+
|
205
|
+
// verify release in state DEPLOYING
|
206
|
+
if (!isValidTransition(RELEASE(), state, DEPLOYING())) {
|
207
|
+
// TOOD name must represent failed state transition
|
208
|
+
revert ErrorReleaseRegistryServiceRegistrationDisallowed(state);
|
215
209
|
}
|
216
210
|
|
211
|
+
_state[releaseVersion] = DEPLOYING();
|
212
|
+
|
213
|
+
// not all services are registered
|
217
214
|
if (_servicesToRegister == _registeredServices) {
|
218
|
-
revert
|
215
|
+
revert ErrorReleaseRegistryNoServiceRegistrationExpected();
|
219
216
|
}
|
220
217
|
|
218
|
+
// service can work with release manager
|
221
219
|
(
|
222
220
|
IRegistry.ObjectInfo memory info,
|
223
|
-
ObjectType
|
224
|
-
VersionPart
|
221
|
+
ObjectType serviceDomain,
|
222
|
+
VersionPart serviceVersion
|
225
223
|
) = _verifyService(service);
|
226
224
|
|
227
|
-
|
228
|
-
|
229
|
-
|
225
|
+
// service domain matches defined in release config
|
226
|
+
ObjectType expectedDomain = _serviceAuthorization[releaseVersion].getServiceDomain(_registeredServices);
|
227
|
+
if (serviceDomain != expectedDomain) {
|
228
|
+
revert ErrorReleaseRegistryServiceDomainMismatch(expectedDomain, serviceDomain);
|
230
229
|
}
|
231
230
|
|
232
231
|
// register service with registry
|
233
|
-
|
234
|
-
|
235
|
-
|
232
|
+
// !!! TODO MUST call registry at the end of this function
|
233
|
+
nftId = _registry.registerService(info, serviceVersion, serviceDomain);
|
236
234
|
service.linkToRegisteredNftId();
|
235
|
+
_registeredServices++;
|
237
236
|
|
238
237
|
// setup service authorization
|
238
|
+
// !!! TODO service A can call service B while release is not active
|
239
239
|
_admin.authorizeService(
|
240
|
-
_serviceAuthorization[
|
241
|
-
service
|
240
|
+
_serviceAuthorization[releaseVersion],
|
241
|
+
service,
|
242
|
+
serviceDomain,
|
243
|
+
serviceVersion);
|
242
244
|
|
243
|
-
// TODO consider to extend this to REGISTRY
|
244
245
|
// special roles for registry/staking/pool service
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
} else {
|
253
|
-
// TODO end state depends on (_awaitingRegistration == 0)
|
246
|
+
// !!! TODO registry service allowed to call registry while release is not activated (same for staking/pool service and staking)
|
247
|
+
if (
|
248
|
+
serviceDomain == REGISTRY() ||
|
249
|
+
serviceDomain == STAKING() ||
|
250
|
+
serviceDomain == POOL())
|
251
|
+
{
|
252
|
+
_admin.grantServiceRoleForAllVersions(service, serviceDomain);
|
254
253
|
}
|
255
254
|
}
|
256
255
|
|
@@ -259,29 +258,28 @@ contract ReleaseManager is
|
|
259
258
|
external
|
260
259
|
restricted // GIF_ADMIN_ROLE
|
261
260
|
{
|
262
|
-
|
263
|
-
|
261
|
+
VersionPart version = _next;
|
262
|
+
StateId state = _state[version];
|
263
|
+
StateId newState = ACTIVE();
|
264
|
+
|
265
|
+
// verify release in state DEPLOYING
|
266
|
+
if (!isValidTransition(RELEASE(), state, newState)) {
|
267
|
+
revert ErrorReleaseRegistryReleaseActivationDisallowed(version, state);
|
264
268
|
}
|
265
269
|
|
266
270
|
// release fully deployed
|
267
|
-
VersionPart version = _next;
|
268
271
|
if(_registeredServices < _servicesToRegister) {
|
269
|
-
revert
|
272
|
+
revert ErrorReleaseRegistryReleaseRegistrationNotFinished(version, _servicesToRegister - _registeredServices);
|
270
273
|
}
|
271
274
|
|
272
275
|
// release exists, registry service MUST exist
|
273
276
|
address service = _registry.getServiceAddress(REGISTRY(), version);
|
274
277
|
if(service == address(0)) {
|
275
|
-
revert
|
276
|
-
}
|
277
|
-
|
278
|
-
// release is not activated
|
279
|
-
if(_releaseInfo[version].activatedAt.gtz()) {
|
280
|
-
revert ErrorReleaseManagerReleaseAlreadyActivated(version);
|
278
|
+
revert ErrorReleaseRegistryReleaseNotCreated(version);
|
281
279
|
}
|
282
280
|
|
283
281
|
_latest = version;
|
284
|
-
_state =
|
282
|
+
_state[version] = newState;
|
285
283
|
|
286
284
|
_releaseVersionByAddress[service] = version;
|
287
285
|
_releaseInfo[version].activatedAt = TimestampLib.blockTimestamp();
|
@@ -289,43 +287,49 @@ contract ReleaseManager is
|
|
289
287
|
emit LogReleaseActivation(version);
|
290
288
|
}
|
291
289
|
|
292
|
-
|
293
|
-
function
|
290
|
+
/// @dev stop all operations with release services
|
291
|
+
function pauseRelease(VersionPart version)
|
294
292
|
external
|
295
293
|
restricted // GIF_ADMIN_ROLE
|
296
294
|
{
|
297
|
-
|
298
|
-
|
299
|
-
revert ErrorReleaseManagerReleaseNotActivated(version);
|
300
|
-
}
|
295
|
+
StateId state = _state[version];
|
296
|
+
StateId newState = PAUSED();
|
301
297
|
|
302
|
-
// release
|
303
|
-
if(
|
304
|
-
revert
|
298
|
+
// verify release in state ACTIVE
|
299
|
+
if (!isValidTransition(RELEASE(), state, newState)) {
|
300
|
+
revert ErrorReleaseRegistryReleaseActivationDisallowed(version, state);
|
305
301
|
}
|
306
302
|
|
307
|
-
disableDelay = SecondsLib.toSeconds(Math.max(disableDelay.toInt(), MIN_DISABLE_DELAY.toInt()));
|
308
|
-
|
309
303
|
// TODO come up with a substitute
|
310
|
-
//
|
304
|
+
//_releaseAccessManager[version].disable();
|
311
305
|
|
312
|
-
|
306
|
+
_state[version] = newState;
|
307
|
+
_releaseInfo[version].disabledAt = TimestampLib.blockTimestamp();
|
308
|
+
|
309
|
+
emit LogReleaseDisabled(version);
|
313
310
|
}
|
314
|
-
|
315
|
-
|
311
|
+
|
312
|
+
// TODO consider revert if some delay is expired -> becomes disabled automatically
|
313
|
+
/// @dev resume operations with release services
|
314
|
+
function unpauseRelease(VersionPart version)
|
316
315
|
external
|
317
316
|
restricted // GIF_ADMIN_ROLE
|
318
317
|
{
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
//
|
318
|
+
StateId state = _state[version];
|
319
|
+
StateId newState = ACTIVE();
|
320
|
+
|
321
|
+
// verify release in state PAUSED
|
322
|
+
if (!isValidTransition(RELEASE(), state, newState)) {
|
323
|
+
revert ErrorReleaseRegistryReleaseActivationDisallowed(version, state);
|
324
|
+
}
|
323
325
|
|
324
|
-
// reverts if disable delay expired
|
325
326
|
// TODO come up with a substitute
|
326
327
|
// _releaseAccessManager[version].enable();
|
327
328
|
|
329
|
+
_state[version] = newState;
|
328
330
|
_releaseInfo[version].disabledAt = zeroTimestamp();
|
331
|
+
|
332
|
+
emit LogReleaseEnabled(version);
|
329
333
|
}
|
330
334
|
|
331
335
|
//--- view functions ----------------------------------------------------//
|
@@ -344,7 +348,7 @@ contract ReleaseManager is
|
|
344
348
|
}
|
345
349
|
|
346
350
|
function isActiveRelease(VersionPart version) public view returns(bool) {
|
347
|
-
return
|
351
|
+
return _state[version] == ACTIVE();
|
348
352
|
}
|
349
353
|
|
350
354
|
function getReleaseInfo(VersionPart version) external view returns(IRegistry.ReleaseInfo memory) {
|
@@ -363,8 +367,8 @@ contract ReleaseManager is
|
|
363
367
|
return _initial;
|
364
368
|
}
|
365
369
|
|
366
|
-
function getState() external view returns (StateId stateId) {
|
367
|
-
return _state;
|
370
|
+
function getState(VersionPart version) external view returns (StateId stateId) {
|
371
|
+
return _state[version];
|
368
372
|
}
|
369
373
|
|
370
374
|
function getRemainingServicesToRegister() external view returns (uint256 services) {
|
@@ -379,7 +383,6 @@ contract ReleaseManager is
|
|
379
383
|
return _serviceAuthorization[version];
|
380
384
|
}
|
381
385
|
|
382
|
-
// TODO token registry knows nothing about adfmin, only registry
|
383
386
|
function getRegistryAdmin() external view returns (address) {
|
384
387
|
return address(_admin);
|
385
388
|
}
|
@@ -390,37 +393,6 @@ contract ReleaseManager is
|
|
390
393
|
return _registry;
|
391
394
|
}
|
392
395
|
|
393
|
-
//--- ILifecycle -----------------------------------------------------------//
|
394
|
-
|
395
|
-
function hasLifecycle(ObjectType objectType) external pure returns (bool) { return objectType == RELEASE(); }
|
396
|
-
|
397
|
-
function getInitialState(ObjectType objectType) public pure returns (StateId stateId) {
|
398
|
-
if (objectType == RELEASE()) {
|
399
|
-
stateId = INITIAL();
|
400
|
-
}
|
401
|
-
}
|
402
|
-
|
403
|
-
function isValidTransition(
|
404
|
-
ObjectType objectType,
|
405
|
-
StateId fromId,
|
406
|
-
StateId toId
|
407
|
-
)
|
408
|
-
public
|
409
|
-
pure
|
410
|
-
returns (bool isValid)
|
411
|
-
{
|
412
|
-
if (objectType != RELEASE()) { return false; }
|
413
|
-
|
414
|
-
if (fromId == INITIAL() && toId == SCHEDULED()) { return true; }
|
415
|
-
if (fromId == SCHEDULED() && toId == DEPLOYING()) { return true; }
|
416
|
-
if (fromId == DEPLOYING() && toId == SCHEDULED()) { return true; }
|
417
|
-
if (fromId == DEPLOYING() && toId == DEPLOYING()) { return true; }
|
418
|
-
if (fromId == DEPLOYING() && toId == ACTIVE()) { return true; }
|
419
|
-
// TODO active -> scheduled missing, add tests to cover this and more scenarios (#358)
|
420
|
-
|
421
|
-
return false;
|
422
|
-
}
|
423
|
-
|
424
396
|
//--- private functions ----------------------------------------------------//
|
425
397
|
|
426
398
|
function _verifyService(IService service)
|
@@ -433,7 +405,7 @@ contract ReleaseManager is
|
|
433
405
|
)
|
434
406
|
{
|
435
407
|
if(!service.supportsInterface(type(IService).interfaceId)) {
|
436
|
-
revert
|
408
|
+
revert ErrorReleaseRegistryNotService(address(service));
|
437
409
|
}
|
438
410
|
|
439
411
|
address owner = msg.sender;
|
@@ -444,19 +416,19 @@ contract ReleaseManager is
|
|
444
416
|
|
445
417
|
_verifyServiceInfo(service, serviceInfo, owner);
|
446
418
|
|
447
|
-
VersionPart releaseVersion =
|
448
|
-
address
|
419
|
+
VersionPart releaseVersion = _next; // never 0
|
420
|
+
address expectedAuthority = _admin.authority(); // can be zero if registering service when release is not created
|
449
421
|
|
450
422
|
// IMPORTANT: can not guarantee service access is actually controlled by authority
|
451
|
-
if(serviceAuthority !=
|
452
|
-
revert
|
423
|
+
if(serviceAuthority != expectedAuthority) {
|
424
|
+
revert ErrorReleaseRegistryServiceReleaseAuthorityMismatch(
|
453
425
|
service,
|
454
426
|
serviceAuthority,
|
455
|
-
|
427
|
+
expectedAuthority);
|
456
428
|
}
|
457
429
|
|
458
430
|
if(serviceVersion != releaseVersion) {
|
459
|
-
revert
|
431
|
+
revert ErrorReleaseRegistryServiceReleaseVersionMismatch(
|
460
432
|
service,
|
461
433
|
serviceVersion,
|
462
434
|
releaseVersion);
|
@@ -473,29 +445,29 @@ contract ReleaseManager is
|
|
473
445
|
view
|
474
446
|
{
|
475
447
|
if(info.objectAddress != address(service)) {
|
476
|
-
revert
|
448
|
+
revert ErrorReleaseRegistryServiceInfoAddressInvalid(service, address(service));
|
477
449
|
}
|
478
450
|
|
479
451
|
if(info.isInterceptor != false) { // service is never interceptor
|
480
|
-
revert
|
452
|
+
revert ErrorReleaseRegistryServiceInfoInterceptorInvalid(service, info.isInterceptor);
|
481
453
|
}
|
482
454
|
|
483
|
-
if(info.objectType != SERVICE()) {
|
484
|
-
revert
|
455
|
+
if(info.objectType != SERVICE()) {
|
456
|
+
revert ErrorReleaseRegistryServiceInfoTypeInvalid(service, SERVICE(), info.objectType);
|
485
457
|
}
|
486
458
|
|
487
459
|
address owner = info.initialOwner;
|
488
460
|
|
489
461
|
if(owner != expectedOwner) { // registerable owner protection
|
490
|
-
revert
|
462
|
+
revert ErrorReleaseRegistryServiceInfoOwnerInvalid(service, expectedOwner, owner);
|
491
463
|
}
|
492
464
|
|
493
465
|
if(owner == address(service)) {
|
494
|
-
revert
|
466
|
+
revert ErrorReleaseRegistryServiceSelfRegistration(service);
|
495
467
|
}
|
496
468
|
|
497
469
|
if(_registry.isRegistered(owner)) {
|
498
|
-
revert
|
470
|
+
revert ErrorReleaseRegistryServiceOwnerRegistered(service, owner);
|
499
471
|
}
|
500
472
|
}
|
501
473
|
|
@@ -507,12 +479,13 @@ contract ReleaseManager is
|
|
507
479
|
return false;
|
508
480
|
}
|
509
481
|
// TODO try catch and return false in case of revert
|
510
|
-
//
|
482
|
+
// or just panic
|
511
483
|
// check if contract returns a zero nft id for its own address
|
512
|
-
if (IRegistry(registryAddress).
|
484
|
+
if (IRegistry(registryAddress).getNftIdForAddress(registryAddress).eqz()) {
|
513
485
|
return false;
|
514
486
|
}
|
515
487
|
|
516
488
|
return true;
|
517
489
|
}
|
518
490
|
}
|
491
|
+
|
@@ -2,14 +2,12 @@
|
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
4
|
import {
|
5
|
-
ALL, REGISTRY,
|
5
|
+
ALL, REGISTRY, PRODUCT, ORACLE, POOL, INSTANCE, COMPONENT, DISTRIBUTION, DISTRIBUTOR, APPLICATION, POLICY, CLAIM, BUNDLE, STAKING, PRICE
|
6
6
|
} from "../../contracts/type/ObjectType.sol";
|
7
7
|
|
8
|
-
import {ComponentService} from "../shared/ComponentService.sol";
|
9
8
|
import {IAccess} from "../authorization/IAccess.sol";
|
10
9
|
import {IBundleService} from "../pool/IBundleService.sol";
|
11
10
|
import {IDistributionService} from "../distribution/IDistributionService.sol";
|
12
|
-
import {InstanceService} from "../instance/InstanceService.sol";
|
13
11
|
import {IInstanceService} from "../instance/IInstanceService.sol";
|
14
12
|
import {IPoolService} from "../pool/IPoolService.sol";
|
15
13
|
import {IStakingService} from "../staking/IStakingService.sol";
|
@@ -69,14 +67,14 @@ contract ServiceAuthorizationV3
|
|
69
67
|
functions = _authorizeForService(REGISTRY(), APPLICATION());
|
70
68
|
_authorize(functions, IRegistryService.registerPolicy.selector, "registerPolicy");
|
71
69
|
|
72
|
-
functions = _authorizeForService(REGISTRY(), POOL());
|
73
|
-
_authorize(functions, IRegistryService.registerPool.selector, "registerPool");
|
70
|
+
// functions = _authorizeForService(REGISTRY(), POOL());
|
71
|
+
// _authorize(functions, IRegistryService.registerPool.selector, "registerPool");
|
74
72
|
|
75
73
|
functions = _authorizeForService(REGISTRY(), BUNDLE());
|
76
74
|
_authorize(functions, IRegistryService.registerBundle.selector, "registerBundle");
|
77
75
|
|
78
76
|
functions = _authorizeForService(REGISTRY(), DISTRIBUTION());
|
79
|
-
_authorize(functions, IRegistryService.registerDistribution.selector, "registerDistribution");
|
77
|
+
// _authorize(functions, IRegistryService.registerDistribution.selector, "registerDistribution");
|
80
78
|
_authorize(functions, IRegistryService.registerDistributor.selector, "registerDistributor");
|
81
79
|
|
82
80
|
functions = _authorizeForService(REGISTRY(), COMPONENT());
|
@@ -88,8 +86,8 @@ contract ServiceAuthorizationV3
|
|
88
86
|
functions = _authorizeForService(REGISTRY(), STAKING());
|
89
87
|
_authorize(functions, IRegistryService.registerStake.selector, "registerStake");
|
90
88
|
|
91
|
-
functions = _authorizeForService(REGISTRY(), PRODUCT());
|
92
|
-
_authorize(functions, IRegistryService.registerProduct.selector, "registerProduct");
|
89
|
+
// functions = _authorizeForService(REGISTRY(), PRODUCT());
|
90
|
+
// _authorize(functions, IRegistryService.registerProduct.selector, "registerProduct");
|
93
91
|
}
|
94
92
|
|
95
93
|
|
@@ -163,6 +161,7 @@ contract ServiceAuthorizationV3
|
|
163
161
|
|
164
162
|
functions = _authorizeForService(DISTRIBUTION(), POLICY());
|
165
163
|
_authorize(functions, IDistributionService.processSale.selector, "processSale");
|
164
|
+
_authorize(functions, IDistributionService.processReferral.selector, "processReferral");
|
166
165
|
}
|
167
166
|
|
168
167
|
|
@@ -12,7 +12,7 @@ import {IRegisterable} from "../shared/IRegisterable.sol";
|
|
12
12
|
|
13
13
|
import {IRegistry} from "./IRegistry.sol";
|
14
14
|
import {IRegistryLinked} from "../shared/IRegistryLinked.sol";
|
15
|
-
import {
|
15
|
+
import {ReleaseRegistry} from "./ReleaseRegistry.sol";
|
16
16
|
import {RegistryAdmin} from "./RegistryAdmin.sol";
|
17
17
|
|
18
18
|
|
@@ -49,7 +49,7 @@ contract TokenRegistry is
|
|
49
49
|
TokenInfo [] internal _token;
|
50
50
|
|
51
51
|
IRegistry internal _registry;
|
52
|
-
|
52
|
+
ReleaseRegistry internal _releaseRegistry;
|
53
53
|
IERC20Metadata internal _dipToken;
|
54
54
|
|
55
55
|
/// @dev enforces msg.sender is owner of nft (or initial owner of nft ownable)
|