@etherisc/gif-next 0.0.2-e8b06c8-540 → 0.0.2-e8ea5fe-337
Sign up to get free protection for your applications and to get access to all the features.
- 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 -33
- 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 +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/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 -101
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +19 -19
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +43 -75
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +223 -105
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +67 -55
- 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/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 +7 -7
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +10 -5
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +19 -19
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +1208 -290
- 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 +238 -123
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +44 -39
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +35 -35
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +226 -231
- 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 -88
- 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 -72
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +32 -32
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +34 -34
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.json +55 -137
- 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 +402 -62
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +111 -43
- 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 +45 -95
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.json +220 -100
- package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/pool/Pool.sol/Pool.json +45 -133
- package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolService.sol/PoolService.json +264 -136
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +40 -36
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +31 -50
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +31 -43
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +22 -78
- 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 +194 -72
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +58 -54
- 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 +114 -0
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.json +184 -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 +19 -37
- 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 +242 -209
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +55 -55
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +113 -153
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +55 -75
- package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/product/Product.sol/Product.json +22 -78
- package/artifacts/contracts/product/RiskService.sol/RiskService.dbg.json +4 -0
- package/artifacts/contracts/product/RiskService.sol/RiskService.json +695 -0
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +4 -0
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.json +702 -0
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +2 -2
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +51 -47
- 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 +102 -74
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +100 -95
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +18 -18
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +27 -27
- 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 +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 -64
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +255 -62
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +69 -49
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +1 -1
- 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/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 +73 -0
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.json +19 -75
- 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 -6
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +6 -6
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +8 -8
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +2 -2
- package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
- 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 +84 -114
- 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 +47 -43
- 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 +26 -26
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +31 -31
- 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 +4 -4
- 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 +39 -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 +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/{shared → upgradeability}/Versionable.sol/Versionable.json +1 -1
- package/contracts/authorization/AccessAdmin.sol +8 -39
- package/contracts/authorization/AccessManagerCloneable.sol +16 -0
- package/contracts/authorization/Authorization.sol +0 -1
- package/contracts/authorization/IServiceAuthorization.sol +3 -0
- package/contracts/authorization/ModuleAuthorization.sol +0 -125
- 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 +22 -10
- package/contracts/distribution/DistributionService.sol +67 -34
- package/contracts/distribution/DistributionServiceManager.sol +2 -5
- package/contracts/distribution/IDistributionComponent.sol +8 -34
- package/contracts/distribution/IDistributionService.sol +18 -2
- package/contracts/instance/{BundleManager.sol → BundleSet.sol} +23 -23
- package/contracts/instance/IInstance.sol +12 -35
- package/contracts/instance/IInstanceService.sol +6 -5
- package/contracts/instance/Instance.sol +15 -79
- package/contracts/instance/InstanceAdmin.sol +220 -269
- package/contracts/instance/InstanceAuthorizationV3.sol +19 -28
- package/contracts/instance/InstanceReader.sol +32 -12
- package/contracts/instance/InstanceService.sol +73 -122
- package/contracts/instance/InstanceServiceManager.sol +2 -6
- 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 +1 -7
- package/contracts/instance/module/IDistribution.sol +0 -1
- package/contracts/instance/module/IPolicy.sol +22 -22
- package/contracts/mock/Dip.sol +1 -1
- package/contracts/oracle/IOracleComponent.sol +2 -1
- package/contracts/oracle/Oracle.sol +16 -6
- package/contracts/oracle/OracleService.sol +1 -0
- package/contracts/oracle/OracleServiceManager.sol +2 -5
- package/contracts/pool/BasicPool.sol +7 -5
- package/contracts/pool/BasicPoolAuthorization.sol +11 -2
- package/contracts/pool/BundleService.sol +189 -47
- package/contracts/pool/BundleServiceManager.sol +2 -5
- package/contracts/pool/IBundleService.sol +33 -5
- package/contracts/pool/IPoolComponent.sol +6 -0
- package/contracts/pool/IPoolService.sol +36 -26
- package/contracts/pool/Pool.sol +39 -24
- package/contracts/pool/PoolService.sol +161 -104
- package/contracts/pool/PoolServiceManager.sol +2 -5
- package/contracts/product/ApplicationService.sol +51 -57
- package/contracts/product/ApplicationServiceManager.sol +2 -2
- package/contracts/product/BasicProduct.sol +3 -32
- package/contracts/product/BasicProductAuthorization.sol +3 -0
- package/contracts/product/ClaimService.sol +118 -73
- package/contracts/product/ClaimServiceManager.sol +2 -2
- package/contracts/product/IApplicationService.sol +1 -0
- package/contracts/product/IClaimService.sol +28 -5
- package/contracts/product/IPolicyService.sol +27 -32
- package/contracts/product/IPricingService.sol +7 -7
- package/contracts/product/IProductComponent.sol +1 -1
- package/contracts/product/{IProductService.sol → IRiskService.sol} +1 -1
- package/contracts/product/PolicyService.sol +278 -180
- package/contracts/product/PolicyServiceManager.sol +2 -5
- package/contracts/product/PricingService.sol +42 -41
- package/contracts/product/PricingServiceManager.sol +2 -5
- package/contracts/product/Product.sol +67 -34
- package/contracts/product/{ProductService.sol → RiskService.sol} +10 -37
- package/contracts/product/RiskServiceManager.sol +39 -0
- package/contracts/registry/IRegistry.sol +27 -17
- package/contracts/registry/IRegistryService.sol +6 -6
- package/contracts/registry/Registry.sol +81 -87
- package/contracts/registry/RegistryAdmin.sol +34 -23
- package/contracts/registry/RegistryService.sol +4 -18
- package/contracts/registry/RegistryServiceManager.sol +2 -2
- package/contracts/registry/ReleaseLifecycle.sol +27 -0
- package/contracts/registry/{ReleaseManager.sol → ReleaseRegistry.sol} +149 -194
- package/contracts/registry/ServiceAuthorizationV3.sol +7 -10
- package/contracts/registry/TokenRegistry.sol +2 -2
- package/contracts/shared/Component.sol +25 -38
- package/contracts/shared/ComponentService.sol +84 -69
- package/contracts/shared/ComponentServiceManager.sol +2 -2
- package/contracts/shared/ComponentVerifyingService.sol +1 -1
- 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/IService.sol +1 -1
- package/contracts/shared/{ERC165.sol → InitializableERC165.sol} +1 -1
- package/contracts/shared/InstanceLinkedComponent.sol +22 -2
- 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 +3 -3
- package/contracts/shared/PolicyHolder.sol +2 -5
- package/contracts/shared/Service.sol +3 -4
- 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 +24 -39
- package/contracts/staking/StakingLifecycle.sol +23 -0
- package/contracts/staking/StakingManager.sol +2 -6
- package/contracts/staking/StakingReader.sol +12 -16
- package/contracts/staking/StakingService.sol +8 -12
- package/contracts/staking/StakingServiceManager.sol +2 -2
- 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/Referral.sol +1 -0
- package/contracts/type/RoleId.sol +10 -38
- 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 +29 -10
- package/contracts/type/Version.sol +3 -1
- package/contracts/{shared → upgradeability}/ProxyManager.sol +3 -4
- package/contracts/{shared → upgradeability}/UpgradableProxyWithAdmin.sol +1 -3
- package/package.json +3 -3
- package/artifacts/contracts/authorization/InstanceAdmin.sol/InstanceAdmin.dbg.json +0 -4
- package/artifacts/contracts/authorization/InstanceAdmin.sol/InstanceAdmin.json +0 -1385
- 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/InstanceAdminNew.sol/InstanceAdminNew.dbg.json +0 -4
- package/artifacts/contracts/instance/InstanceAdminNew.sol/InstanceAdminNew.json +0 -1616
- package/artifacts/contracts/instance/InstanceAuthorizationsLib.sol/InstanceAuthorizationsLib.dbg.json +0 -4
- package/artifacts/contracts/instance/InstanceAuthorizationsLib.sol/InstanceAuthorizationsLib.json +0 -228
- 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 -1237
- package/artifacts/contracts/shared/AccessManagerCustom.sol/AccessManagerCustom.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerCustom.sol/AccessManagerCustom.json +0 -1193
- package/artifacts/contracts/shared/AccessManagerExtended.sol/AccessManagerExtended.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtended.sol/AccessManagerExtended.json +0 -1747
- package/artifacts/contracts/shared/AccessManagerExtendedInitializeable.sol/AccessManagerExtendedInitializeable.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtendedInitializeable.sol/AccessManagerExtendedInitializeable.json +0 -1760
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisable.sol/AccessManagerExtendedWithDisable.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisable.sol/AccessManagerExtendedWithDisable.json +0 -1838
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol/AccessManagerExtendedWithDisableInitializeable.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol/AccessManagerExtendedWithDisableInitializeable.json +0 -1856
- 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/IAccessManagerExtended.sol/IAccessManagerExtended.dbg.json +0 -4
- package/artifacts/contracts/shared/IAccessManagerExtended.sol/IAccessManagerExtended.json +0 -1562
- package/artifacts/contracts/shared/IAccessManagerExtendedWithDisable.sol/IAccessManagerExtendedWithDisable.dbg.json +0 -4
- package/artifacts/contracts/shared/IAccessManagerExtendedWithDisable.sol/IAccessManagerExtendedWithDisable.json +0 -1600
- 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/authorization/InstanceAdmin.sol +0 -108
- package/contracts/instance/InstanceAdminNew.sol +0 -261
- package/contracts/instance/InstanceAuthorizationsLib.sol +0 -422
- package/contracts/product/ProductServiceManager.sol +0 -42
- package/contracts/shared/AccessManagerCustom.sol +0 -741
- package/contracts/shared/AccessManagerExtended.sol +0 -481
- package/contracts/shared/AccessManagerExtendedInitializeable.sol +0 -13
- package/contracts/shared/AccessManagerExtendedWithDisable.sol +0 -137
- package/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol +0 -14
- package/contracts/shared/IAccessManagerExtended.sol +0 -74
- package/contracts/shared/IAccessManagerExtendedWithDisable.sol +0 -18
- /package/contracts/{shared → upgradeability}/IVersionable.sol +0 -0
- /package/contracts/{shared → upgradeability}/Versionable.sol +0 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
2
|
+
pragma solidity ^0.8.20;
|
3
|
+
|
4
|
+
import {RELEASE} from "../type/ObjectType.sol";
|
5
|
+
import {SCHEDULED, DEPLOYING, ACTIVE, PAUSED, CLOSED/*, FREE*/} from "../type/StateId.sol";
|
6
|
+
import {Lifecycle} from "../shared/Lifecycle.sol";
|
7
|
+
|
8
|
+
contract ReleaseLifecycle is
|
9
|
+
Lifecycle
|
10
|
+
{
|
11
|
+
constructor() {
|
12
|
+
_setupLifecycle();
|
13
|
+
}
|
14
|
+
|
15
|
+
function _setupLifecycle()
|
16
|
+
internal
|
17
|
+
override
|
18
|
+
{
|
19
|
+
setInitialState(RELEASE(), SCHEDULED());
|
20
|
+
|
21
|
+
setStateTransition(RELEASE(), SCHEDULED(), DEPLOYING());
|
22
|
+
setStateTransition(RELEASE(), DEPLOYING(), DEPLOYING());
|
23
|
+
setStateTransition(RELEASE(), DEPLOYING(), ACTIVE());
|
24
|
+
setStateTransition(RELEASE(), ACTIVE(), PAUSED());
|
25
|
+
setStateTransition(RELEASE(), PAUSED(), ACTIVE());
|
26
|
+
}
|
27
|
+
}
|
@@ -14,11 +14,10 @@ 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";
|
21
|
-
import {AccessManagerExtendedWithDisableInitializeable} from "../shared/AccessManagerExtendedWithDisableInitializeable.sol";
|
22
21
|
import {ILifecycle} from "../shared/ILifecycle.sol";
|
23
22
|
import {INftOwnable} from "../shared/INftOwnable.sol";
|
24
23
|
import {IRegisterable} from "../shared/IRegisterable.sol";
|
@@ -31,126 +30,112 @@ import {IAccessAdmin} from "../authorization/IAccessAdmin.sol";
|
|
31
30
|
import {RegistryAdmin} from "./RegistryAdmin.sol";
|
32
31
|
import {Registry} from "./Registry.sol";
|
33
32
|
import {TokenRegistry} from "./TokenRegistry.sol";
|
33
|
+
import {ReleaseLifecycle} from "./ReleaseLifecycle.sol";
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
AccessManaged,
|
39
|
-
ILifecycle,
|
35
|
+
contract ReleaseRegistry is
|
36
|
+
AccessManaged,
|
37
|
+
ReleaseLifecycle,
|
40
38
|
IRegistryLinked
|
41
39
|
{
|
42
40
|
using ObjectTypeLib for ObjectType;
|
43
41
|
|
44
42
|
uint256 public constant INITIAL_GIF_VERSION = 3;
|
45
43
|
|
46
|
-
event LogReleaseCreation(VersionPart version, bytes32 salt
|
44
|
+
event LogReleaseCreation(VersionPart version, bytes32 salt);
|
47
45
|
event LogReleaseActivation(VersionPart version);
|
46
|
+
event LogReleaseDisabled(VersionPart version);
|
47
|
+
event LogReleaseEnabled(VersionPart version);
|
48
48
|
|
49
49
|
// constructor
|
50
|
-
error
|
50
|
+
error ErrorReleaseRegistryNotRegistry(Registry registry);
|
51
51
|
|
52
52
|
// createNextRelease
|
53
|
-
error
|
53
|
+
error ErrorReleaseRegistryReleaseCreationDisallowed(VersionPart version, StateId currentStateId);
|
54
54
|
|
55
55
|
// prepareRelease
|
56
|
-
error
|
57
|
-
error
|
58
|
-
error
|
59
|
-
error
|
60
|
-
|
61
|
-
// register staking
|
62
|
-
//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);
|
63
60
|
|
64
61
|
// registerService
|
65
|
-
error
|
66
|
-
error
|
67
|
-
error
|
68
|
-
error
|
69
|
-
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);
|
70
67
|
|
71
68
|
// activateNextRelease
|
72
|
-
error
|
73
|
-
error
|
74
|
-
error
|
75
|
-
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);
|
76
73
|
|
77
74
|
// disableRelease
|
78
|
-
error
|
79
|
-
error
|
75
|
+
error ErrorReleaseRegistryReleaseNotActivated(VersionPart releaseVersion);
|
76
|
+
error ErrorReleaseRegistryReleaseAlreadyDisabled(VersionPart releaseVersion);
|
80
77
|
|
81
78
|
// _verifyService
|
82
|
-
error
|
83
|
-
error
|
79
|
+
error ErrorReleaseRegistryServiceReleaseAuthorityMismatch(IService service, address serviceAuthority, address releaseAuthority);
|
80
|
+
error ErrorReleaseRegistryServiceReleaseVersionMismatch(IService service, VersionPart serviceVersion, VersionPart releaseVersion);
|
84
81
|
|
85
82
|
// _verifyServiceInfo
|
86
|
-
error
|
87
|
-
error
|
88
|
-
error
|
89
|
-
error
|
90
|
-
error
|
91
|
-
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);
|
92
89
|
|
93
90
|
Seconds public constant MIN_DISABLE_DELAY = Seconds.wrap(60 * 24 * 365); // 1 year
|
94
91
|
|
95
92
|
RegistryAdmin public immutable _admin;
|
96
|
-
address public immutable _releaseAccessManagerCodeAddress;
|
97
93
|
Registry public immutable _registry;
|
98
94
|
IRegisterable private _staking;
|
99
95
|
address private _stakingOwner;
|
100
96
|
|
101
|
-
// TODO remove once it's clear that release authority will always be registry authority
|
102
|
-
mapping(VersionPart version => address authority) internal _releaseAccessManager;
|
103
97
|
mapping(VersionPart version => IRegistry.ReleaseInfo info) internal _releaseInfo;
|
104
|
-
mapping(address registryService => VersionPart version) _releaseVersionByAddress;
|
105
|
-
|
106
98
|
mapping(VersionPart version => IServiceAuthorization authz) internal _serviceAuthorization;
|
107
99
|
|
108
|
-
|
100
|
+
// TODO check where/why this is used
|
101
|
+
mapping(address registryService => VersionPart version) _releaseVersionByAddress;
|
102
|
+
|
103
|
+
VersionPart private _initial;// first active version
|
109
104
|
VersionPart internal _latest; // latest active version
|
110
105
|
VersionPart internal _next; // version to create and activate
|
111
|
-
|
106
|
+
mapping(VersionPart verson => StateId releaseState) private _state;
|
112
107
|
|
113
108
|
uint256 internal _registeredServices;
|
114
109
|
uint256 internal _servicesToRegister;
|
115
110
|
|
116
|
-
// deployer of this contract must be gif admin
|
117
111
|
constructor(Registry registry)
|
118
112
|
AccessManaged(msg.sender)
|
119
113
|
{
|
120
114
|
// TODO move this part to RegistryLinked constructor
|
121
115
|
if(!_isRegistry(address(registry))) {
|
122
|
-
revert
|
116
|
+
revert ErrorReleaseRegistryNotRegistry(registry);
|
123
117
|
}
|
124
118
|
|
119
|
+
setAuthority(registry.getAuthority());
|
120
|
+
|
125
121
|
_registry = registry;
|
126
|
-
setAuthority(_registry.getAuthority());
|
127
122
|
_admin = RegistryAdmin(_registry.getRegistryAdminAddress());
|
128
123
|
|
129
124
|
_initial = VersionPartLib.toVersionPart(INITIAL_GIF_VERSION);
|
130
125
|
_next = VersionPartLib.toVersionPart(INITIAL_GIF_VERSION - 1);
|
131
|
-
_state = getInitialState(RELEASE());
|
132
|
-
|
133
|
-
AccessManagerExtendedWithDisableInitializeable masterReleaseAccessManager = new AccessManagerExtendedWithDisableInitializeable();
|
134
|
-
masterReleaseAccessManager.initialize(_registry.NFT_LOCK_ADDRESS(), VersionLib.toVersionPart(0));
|
135
|
-
//masterReleaseAccessManager.disable();
|
136
|
-
_releaseAccessManagerCodeAddress = address(masterReleaseAccessManager);
|
137
126
|
}
|
138
127
|
|
139
128
|
/// @dev skips previous release if was not activated
|
140
|
-
/// sets release
|
129
|
+
/// sets next release into state SCHEDULED
|
141
130
|
function createNextRelease()
|
142
131
|
external
|
143
132
|
restricted() // GIF_ADMIN_ROLE
|
144
133
|
returns(VersionPart)
|
145
134
|
{
|
146
|
-
if (!isValidTransition(RELEASE(), _state, SCHEDULED())) {
|
147
|
-
revert ErrorReleaseManagerReleaseCreationDisallowed(_state);
|
148
|
-
}
|
149
|
-
|
150
135
|
_next = VersionPartLib.toVersionPart(_next.toInt() + 1);
|
151
136
|
_servicesToRegister = 0;
|
152
137
|
_registeredServices = 0;
|
153
|
-
_state =
|
138
|
+
_state[_next] = getInitialState(RELEASE());
|
154
139
|
|
155
140
|
return _next;
|
156
141
|
}
|
@@ -167,97 +152,98 @@ contract ReleaseManager is
|
|
167
152
|
bytes32 releaseSalt
|
168
153
|
)
|
169
154
|
{
|
170
|
-
|
171
|
-
|
172
|
-
revert ErrorReleaseManagerReleasePreparationDisallowed(_state);
|
173
|
-
}
|
155
|
+
authority = _admin.authority();
|
156
|
+
version = _next;
|
174
157
|
|
175
|
-
//
|
176
|
-
|
177
|
-
|
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]);
|
178
169
|
}
|
179
170
|
|
171
|
+
_state[version] = DEPLOYING();
|
172
|
+
|
180
173
|
// verify authorizaion contract release matches with expected version
|
181
174
|
VersionPart releaseVersion = serviceAuthorization.getRelease();
|
182
|
-
if (releaseVersion !=
|
183
|
-
revert
|
175
|
+
if (releaseVersion != version) {
|
176
|
+
revert ErrorReleaseRegistryVersionMismatch(version, releaseVersion);
|
184
177
|
}
|
185
178
|
|
179
|
+
|
186
180
|
// sanity check to ensure service domain list is not empty
|
187
181
|
uint256 serviceDomainsCount = serviceAuthorization.getServiceDomains().length;
|
188
182
|
if (serviceDomainsCount == 0) {
|
189
|
-
revert
|
183
|
+
revert ErrorReleaseRegistryNoDomains(version);
|
190
184
|
}
|
191
185
|
|
192
|
-
|
193
|
-
_servicesToRegister
|
194
|
-
|
195
|
-
|
196
|
-
authority = _admin.authority();
|
197
|
-
_serviceAuthorization[_next] = serviceAuthorization;
|
198
|
-
// TODO refactor: authority no longer release specific
|
199
|
-
_releaseAccessManager[_next] = authority;
|
186
|
+
// verify prepareNextRelease is only called once per release
|
187
|
+
if(_servicesToRegister > 0) {
|
188
|
+
revert ErrorReleaseRegistryReleaseAlreadyPrepared(version, _state[version]);
|
189
|
+
}
|
200
190
|
|
201
|
-
|
202
|
-
|
203
|
-
bytes.concat(
|
204
|
-
bytes32(version.toInt()),
|
205
|
-
salt));
|
191
|
+
_servicesToRegister = serviceDomainsCount;
|
192
|
+
_serviceAuthorization[version] = serviceAuthorization;
|
206
193
|
|
207
|
-
emit LogReleaseCreation(version, releaseSalt
|
194
|
+
emit LogReleaseCreation(version, releaseSalt);
|
208
195
|
}
|
209
196
|
|
210
|
-
|
197
|
+
// TODO this function can have 0 args -> use stored addresses from prepareNextRelease()
|
211
198
|
function registerService(IService service)
|
212
199
|
external
|
213
200
|
restricted // GIF_MANAGER_ROLE
|
214
201
|
returns(NftId nftId)
|
215
202
|
{
|
216
|
-
|
217
|
-
|
218
|
-
|
203
|
+
VersionPart releaseVersion = _next;
|
204
|
+
StateId state = _state[releaseVersion];
|
205
|
+
|
206
|
+
// verify release in state DEPLOYING
|
207
|
+
if (!isValidTransition(RELEASE(), state, DEPLOYING())) {
|
208
|
+
// TOOD name must represent failed state transition
|
209
|
+
revert ErrorReleaseRegistryServiceRegistrationDisallowed(state);
|
219
210
|
}
|
220
211
|
|
212
|
+
_state[releaseVersion] = DEPLOYING();
|
213
|
+
|
214
|
+
// not all services are registered
|
221
215
|
if (_servicesToRegister == _registeredServices) {
|
222
|
-
revert
|
216
|
+
revert ErrorReleaseRegistryNoServiceRegistrationExpected();
|
223
217
|
}
|
224
218
|
|
219
|
+
// service can work with release manager
|
225
220
|
(
|
226
221
|
IRegistry.ObjectInfo memory info,
|
227
|
-
ObjectType
|
228
|
-
VersionPart
|
222
|
+
ObjectType serviceDomain,
|
223
|
+
VersionPart serviceVersion
|
229
224
|
) = _verifyService(service);
|
230
225
|
|
231
|
-
|
232
|
-
|
233
|
-
|
226
|
+
// service domain matches defined in release config
|
227
|
+
ObjectType expectedDomain = _serviceAuthorization[releaseVersion].getServiceDomain(_registeredServices);
|
228
|
+
if (serviceDomain != expectedDomain) {
|
229
|
+
revert ErrorReleaseRegistryServiceDomainMismatch(expectedDomain, serviceDomain);
|
234
230
|
}
|
235
231
|
|
236
|
-
// checked in registry
|
237
|
-
_releaseInfo[version].domains.push(domain);
|
238
|
-
|
239
232
|
// register service with registry
|
240
|
-
nftId = _registry.registerService(info,
|
241
|
-
_registeredServices++;
|
242
|
-
|
233
|
+
nftId = _registry.registerService(info, serviceVersion, serviceDomain);
|
243
234
|
service.linkToRegisteredNftId();
|
235
|
+
_registeredServices++;
|
244
236
|
|
245
237
|
// setup service authorization
|
246
238
|
_admin.authorizeService(
|
247
|
-
_serviceAuthorization[
|
239
|
+
_serviceAuthorization[releaseVersion],
|
248
240
|
service);
|
249
241
|
|
250
242
|
// TODO consider to extend this to REGISTRY
|
251
243
|
// special roles for registry/staking/pool service
|
252
|
-
if (
|
244
|
+
if (serviceDomain == STAKING() || serviceDomain == POOL()) {
|
253
245
|
// TODO rename to grantServiceDomainRole()
|
254
|
-
_admin.grantServiceRoleForAllVersions(service,
|
255
|
-
}
|
256
|
-
|
257
|
-
if (_registeredServices < _servicesToRegister) {
|
258
|
-
_state = DEPLOYING();
|
259
|
-
} else {
|
260
|
-
// TODO end state depends on (_awaitingRegistration == 0)
|
246
|
+
_admin.grantServiceRoleForAllVersions(service, serviceDomain);
|
261
247
|
}
|
262
248
|
}
|
263
249
|
|
@@ -266,29 +252,28 @@ contract ReleaseManager is
|
|
266
252
|
external
|
267
253
|
restricted // GIF_ADMIN_ROLE
|
268
254
|
{
|
269
|
-
|
270
|
-
|
255
|
+
VersionPart version = _next;
|
256
|
+
StateId state = _state[version];
|
257
|
+
StateId newState = ACTIVE();
|
258
|
+
|
259
|
+
// verify release in state DEPLOYING
|
260
|
+
if (!isValidTransition(RELEASE(), state, newState)) {
|
261
|
+
revert ErrorReleaseRegistryReleaseActivationDisallowed(version, state);
|
271
262
|
}
|
272
263
|
|
273
264
|
// release fully deployed
|
274
|
-
VersionPart version = _next;
|
275
265
|
if(_registeredServices < _servicesToRegister) {
|
276
|
-
revert
|
266
|
+
revert ErrorReleaseRegistryReleaseRegistrationNotFinished(version, _servicesToRegister - _registeredServices);
|
277
267
|
}
|
278
268
|
|
279
269
|
// release exists, registry service MUST exist
|
280
270
|
address service = _registry.getServiceAddress(REGISTRY(), version);
|
281
271
|
if(service == address(0)) {
|
282
|
-
revert
|
283
|
-
}
|
284
|
-
|
285
|
-
// release is not activated
|
286
|
-
if(_releaseInfo[version].activatedAt.gtz()) {
|
287
|
-
revert ErrorReleaseManagerReleaseAlreadyActivated(version);
|
272
|
+
revert ErrorReleaseRegistryReleaseNotCreated(version);
|
288
273
|
}
|
289
274
|
|
290
275
|
_latest = version;
|
291
|
-
_state =
|
276
|
+
_state[version] = newState;
|
292
277
|
|
293
278
|
_releaseVersionByAddress[service] = version;
|
294
279
|
_releaseInfo[version].activatedAt = TimestampLib.blockTimestamp();
|
@@ -296,43 +281,49 @@ contract ReleaseManager is
|
|
296
281
|
emit LogReleaseActivation(version);
|
297
282
|
}
|
298
283
|
|
299
|
-
|
300
|
-
function
|
284
|
+
/// @dev stop all operations with release services
|
285
|
+
function pauseRelease(VersionPart version)
|
301
286
|
external
|
302
287
|
restricted // GIF_ADMIN_ROLE
|
303
288
|
{
|
304
|
-
|
305
|
-
|
306
|
-
revert ErrorReleaseManagerReleaseNotActivated(version);
|
307
|
-
}
|
289
|
+
StateId state = _state[version];
|
290
|
+
StateId newState = PAUSED();
|
308
291
|
|
309
|
-
// release
|
310
|
-
if(
|
311
|
-
revert
|
292
|
+
// verify release in state ACTIVE
|
293
|
+
if (!isValidTransition(RELEASE(), state, newState)) {
|
294
|
+
revert ErrorReleaseRegistryReleaseActivationDisallowed(version, state);
|
312
295
|
}
|
313
296
|
|
314
|
-
disableDelay = SecondsLib.toSeconds(Math.max(disableDelay.toInt(), MIN_DISABLE_DELAY.toInt()));
|
315
|
-
|
316
297
|
// TODO come up with a substitute
|
317
|
-
//
|
298
|
+
//_releaseAccessManager[version].disable();
|
318
299
|
|
319
|
-
|
300
|
+
_state[version] = newState;
|
301
|
+
_releaseInfo[version].disabledAt = TimestampLib.blockTimestamp();
|
302
|
+
|
303
|
+
emit LogReleaseDisabled(version);
|
320
304
|
}
|
321
|
-
|
322
|
-
|
305
|
+
|
306
|
+
// TODO consider revert if some delay is expired -> becomes disabled automatically
|
307
|
+
/// @dev resume operations with release services
|
308
|
+
function unpauseRelease(VersionPart version)
|
323
309
|
external
|
324
310
|
restricted // GIF_ADMIN_ROLE
|
325
311
|
{
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
//
|
312
|
+
StateId state = _state[version];
|
313
|
+
StateId newState = ACTIVE();
|
314
|
+
|
315
|
+
// verify release in state PAUSED
|
316
|
+
if (!isValidTransition(RELEASE(), state, newState)) {
|
317
|
+
revert ErrorReleaseRegistryReleaseActivationDisallowed(version, state);
|
318
|
+
}
|
330
319
|
|
331
|
-
// reverts if disable delay expired
|
332
320
|
// TODO come up with a substitute
|
333
321
|
// _releaseAccessManager[version].enable();
|
334
322
|
|
323
|
+
_state[version] = newState;
|
335
324
|
_releaseInfo[version].disabledAt = zeroTimestamp();
|
325
|
+
|
326
|
+
emit LogReleaseEnabled(version);
|
336
327
|
}
|
337
328
|
|
338
329
|
//--- view functions ----------------------------------------------------//
|
@@ -351,7 +342,7 @@ contract ReleaseManager is
|
|
351
342
|
}
|
352
343
|
|
353
344
|
function isActiveRelease(VersionPart version) public view returns(bool) {
|
354
|
-
return
|
345
|
+
return _state[version] == ACTIVE();
|
355
346
|
}
|
356
347
|
|
357
348
|
function getReleaseInfo(VersionPart version) external view returns(IRegistry.ReleaseInfo memory) {
|
@@ -370,19 +361,14 @@ contract ReleaseManager is
|
|
370
361
|
return _initial;
|
371
362
|
}
|
372
363
|
|
373
|
-
function getState() external view returns (StateId stateId) {
|
374
|
-
return _state;
|
364
|
+
function getState(VersionPart version) external view returns (StateId stateId) {
|
365
|
+
return _state[version];
|
375
366
|
}
|
376
367
|
|
377
368
|
function getRemainingServicesToRegister() external view returns (uint256 services) {
|
378
369
|
return _servicesToRegister - _registeredServices;
|
379
370
|
}
|
380
371
|
|
381
|
-
// TODO cleanup
|
382
|
-
function getReleaseAccessManager(VersionPart version) external view returns(AccessManagerExtendedWithDisableInitializeable) {
|
383
|
-
// return _releaseAccessManager[version];
|
384
|
-
}
|
385
|
-
|
386
372
|
function getServiceAuthorization(VersionPart version)
|
387
373
|
external
|
388
374
|
view
|
@@ -391,7 +377,6 @@ contract ReleaseManager is
|
|
391
377
|
return _serviceAuthorization[version];
|
392
378
|
}
|
393
379
|
|
394
|
-
// TODO token registry knows nothing about adfmin, only registry
|
395
380
|
function getRegistryAdmin() external view returns (address) {
|
396
381
|
return address(_admin);
|
397
382
|
}
|
@@ -402,37 +387,6 @@ contract ReleaseManager is
|
|
402
387
|
return _registry;
|
403
388
|
}
|
404
389
|
|
405
|
-
//--- ILifecycle -----------------------------------------------------------//
|
406
|
-
|
407
|
-
function hasLifecycle(ObjectType objectType) external pure returns (bool) { return objectType == RELEASE(); }
|
408
|
-
|
409
|
-
function getInitialState(ObjectType objectType) public pure returns (StateId stateId) {
|
410
|
-
if (objectType == RELEASE()) {
|
411
|
-
stateId = INITIAL();
|
412
|
-
}
|
413
|
-
}
|
414
|
-
|
415
|
-
function isValidTransition(
|
416
|
-
ObjectType objectType,
|
417
|
-
StateId fromId,
|
418
|
-
StateId toId
|
419
|
-
)
|
420
|
-
public
|
421
|
-
pure
|
422
|
-
returns (bool isValid)
|
423
|
-
{
|
424
|
-
if (objectType != RELEASE()) { return false; }
|
425
|
-
|
426
|
-
if (fromId == INITIAL() && toId == SCHEDULED()) { return true; }
|
427
|
-
if (fromId == SCHEDULED() && toId == DEPLOYING()) { return true; }
|
428
|
-
if (fromId == DEPLOYING() && toId == SCHEDULED()) { return true; }
|
429
|
-
if (fromId == DEPLOYING() && toId == DEPLOYING()) { return true; }
|
430
|
-
if (fromId == DEPLOYING() && toId == ACTIVE()) { return true; }
|
431
|
-
// TODO active -> scheduled missing, add tests to cover this and more scenarios (#358)
|
432
|
-
|
433
|
-
return false;
|
434
|
-
}
|
435
|
-
|
436
390
|
//--- private functions ----------------------------------------------------//
|
437
391
|
|
438
392
|
function _verifyService(IService service)
|
@@ -445,7 +399,7 @@ contract ReleaseManager is
|
|
445
399
|
)
|
446
400
|
{
|
447
401
|
if(!service.supportsInterface(type(IService).interfaceId)) {
|
448
|
-
revert
|
402
|
+
revert ErrorReleaseRegistryNotService(address(service));
|
449
403
|
}
|
450
404
|
|
451
405
|
address owner = msg.sender;
|
@@ -456,19 +410,19 @@ contract ReleaseManager is
|
|
456
410
|
|
457
411
|
_verifyServiceInfo(service, serviceInfo, owner);
|
458
412
|
|
459
|
-
VersionPart releaseVersion =
|
460
|
-
address
|
413
|
+
VersionPart releaseVersion = _next; // never 0
|
414
|
+
address expectedAuthority = _admin.authority(); // can be zero if registering service when release is not created
|
461
415
|
|
462
416
|
// IMPORTANT: can not guarantee service access is actually controlled by authority
|
463
|
-
if(serviceAuthority !=
|
464
|
-
revert
|
417
|
+
if(serviceAuthority != expectedAuthority) {
|
418
|
+
revert ErrorReleaseRegistryServiceReleaseAuthorityMismatch(
|
465
419
|
service,
|
466
420
|
serviceAuthority,
|
467
|
-
|
421
|
+
expectedAuthority);
|
468
422
|
}
|
469
423
|
|
470
424
|
if(serviceVersion != releaseVersion) {
|
471
|
-
revert
|
425
|
+
revert ErrorReleaseRegistryServiceReleaseVersionMismatch(
|
472
426
|
service,
|
473
427
|
serviceVersion,
|
474
428
|
releaseVersion);
|
@@ -485,29 +439,29 @@ contract ReleaseManager is
|
|
485
439
|
view
|
486
440
|
{
|
487
441
|
if(info.objectAddress != address(service)) {
|
488
|
-
revert
|
442
|
+
revert ErrorReleaseRegistryServiceInfoAddressInvalid(service, address(service));
|
489
443
|
}
|
490
444
|
|
491
445
|
if(info.isInterceptor != false) { // service is never interceptor
|
492
|
-
revert
|
446
|
+
revert ErrorReleaseRegistryServiceInfoInterceptorInvalid(service, info.isInterceptor);
|
493
447
|
}
|
494
448
|
|
495
|
-
if(info.objectType != SERVICE()) {
|
496
|
-
revert
|
449
|
+
if(info.objectType != SERVICE()) {
|
450
|
+
revert ErrorReleaseRegistryServiceInfoTypeInvalid(service, SERVICE(), info.objectType);
|
497
451
|
}
|
498
452
|
|
499
453
|
address owner = info.initialOwner;
|
500
454
|
|
501
455
|
if(owner != expectedOwner) { // registerable owner protection
|
502
|
-
revert
|
456
|
+
revert ErrorReleaseRegistryServiceInfoOwnerInvalid(service, expectedOwner, owner);
|
503
457
|
}
|
504
458
|
|
505
459
|
if(owner == address(service)) {
|
506
|
-
revert
|
460
|
+
revert ErrorReleaseRegistryServiceSelfRegistration(service);
|
507
461
|
}
|
508
462
|
|
509
463
|
if(_registry.isRegistered(owner)) {
|
510
|
-
revert
|
464
|
+
revert ErrorReleaseRegistryServiceOwnerRegistered(service, owner);
|
511
465
|
}
|
512
466
|
}
|
513
467
|
|
@@ -519,12 +473,13 @@ contract ReleaseManager is
|
|
519
473
|
return false;
|
520
474
|
}
|
521
475
|
// TODO try catch and return false in case of revert
|
522
|
-
//
|
476
|
+
// or just panic
|
523
477
|
// check if contract returns a zero nft id for its own address
|
524
|
-
if (IRegistry(registryAddress).
|
478
|
+
if (IRegistry(registryAddress).getNftIdForAddress(registryAddress).eqz()) {
|
525
479
|
return false;
|
526
480
|
}
|
527
481
|
|
528
482
|
return true;
|
529
483
|
}
|
530
484
|
}
|
485
|
+
|