@etherisc/gif-next 0.0.2-7dc3cd3-858 → 0.0.2-7e48d89-379
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 -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 -90
- 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 -64
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +182 -74
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +71 -55
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +43 -26
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +71 -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 +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 +4 -0
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +1626 -0
- 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 +80 -122
- 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 +89 -212
- 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 -77
- 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 -26
- 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 -61
- 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 +54 -125
- 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 +394 -62
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +107 -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 +44 -83
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.json +158 -54
- package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/pool/Pool.sol/Pool.json +44 -121
- package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolService.sol/PoolService.json +226 -90
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +52 -36
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +33 -44
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +32 -40
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +19 -64
- 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 +88 -72
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +54 -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 +16 -0
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.json +188 -108
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +1 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.json +19 -26
- package/artifacts/contracts/product/IProductService.sol/IProductService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +260 -167
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +59 -43
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +63 -58
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +47 -47
- package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/product/Product.sol/Product.json +19 -64
- package/artifacts/contracts/product/ProductService.sol/ProductService.dbg.json +1 -1
- package/artifacts/contracts/product/ProductService.sol/ProductService.json +20 -20
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.json +28 -28
- 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 +50 -2
- 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 +101 -29
- 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 -26
- 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 -64
- 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 +0 -26
- 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 +40 -113
- package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.json +55 -119
- 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 +46 -46
- 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 +27 -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 +26 -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 -10
- package/contracts/authorization/AccessManagerCloneable.sol +16 -0
- package/contracts/authorization/Authorization.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 +22 -10
- package/contracts/distribution/DistributionService.sol +47 -27
- package/contracts/distribution/DistributionServiceManager.sol +2 -5
- package/contracts/distribution/IDistributionComponent.sol +8 -4
- package/contracts/distribution/IDistributionService.sol +10 -0
- package/contracts/instance/{BundleManager.sol → BundleSet.sol} +23 -23
- package/contracts/instance/IInstance.sol +7 -7
- package/contracts/instance/IInstanceService.sol +6 -5
- package/contracts/instance/Instance.sol +8 -8
- package/contracts/instance/{InstanceAdminNew.sol → InstanceAdmin.sol} +33 -9
- package/contracts/instance/InstanceAuthorizationV3.sol +16 -21
- package/contracts/instance/InstanceReader.sol +10 -7
- package/contracts/instance/InstanceService.sol +69 -32
- package/contracts/instance/InstanceServiceManager.sol +2 -6
- package/contracts/instance/InstanceStore.sol +8 -4
- package/contracts/instance/base/ObjectLifecycle.sol +105 -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 +1 -1
- package/contracts/mock/Dip.sol +1 -1
- package/contracts/oracle/IOracleComponent.sol +2 -1
- package/contracts/oracle/Oracle.sol +15 -6
- 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 +181 -41
- 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 +14 -17
- package/contracts/pool/Pool.sol +32 -15
- package/contracts/pool/PoolService.sol +152 -85
- package/contracts/pool/PoolServiceManager.sol +2 -5
- package/contracts/product/ApplicationService.sol +49 -53
- package/contracts/product/ApplicationServiceManager.sol +2 -2
- package/contracts/product/BasicProduct.sol +3 -33
- package/contracts/product/BasicProductAuthorization.sol +3 -0
- package/contracts/product/ClaimService.sol +13 -39
- package/contracts/product/ClaimServiceManager.sol +2 -2
- package/contracts/product/IApplicationService.sol +1 -0
- package/contracts/product/IClaimService.sol +1 -0
- package/contracts/product/IPolicyService.sol +23 -17
- package/contracts/product/IProductComponent.sol +1 -0
- package/contracts/product/IProductService.sol +1 -0
- package/contracts/product/PolicyService.sol +251 -134
- package/contracts/product/PolicyServiceManager.sol +2 -5
- package/contracts/product/PricingService.sol +5 -1
- package/contracts/product/PricingServiceManager.sol +2 -5
- package/contracts/product/Product.sol +27 -6
- package/contracts/product/ProductService.sol +7 -32
- package/contracts/product/ProductServiceManager.sol +2 -5
- package/contracts/registry/IRegistry.sol +26 -13
- package/contracts/registry/IRegistryService.sol +6 -6
- package/contracts/registry/Registry.sol +80 -82
- 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} +145 -178
- package/contracts/registry/ServiceAuthorizationV3.sol +5 -5
- package/contracts/registry/TokenRegistry.sol +2 -2
- package/contracts/shared/Component.sol +24 -37
- package/contracts/shared/ComponentService.sol +83 -21
- package/contracts/shared/ComponentServiceManager.sol +2 -2
- package/contracts/shared/IComponent.sol +4 -4
- package/contracts/shared/IComponentService.sol +15 -9
- package/contracts/shared/IInstanceLinkedComponent.sol +9 -3
- 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 +21 -0
- 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 +2 -2
- 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 +1 -2
- package/contracts/staking/IStakingService.sol +12 -5
- package/contracts/staking/StakeManagerLib.sol +0 -25
- package/contracts/staking/Staking.sol +21 -37
- 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/type/Amount.sol +12 -5
- package/contracts/type/Blocknumber.sol +7 -1
- package/contracts/type/ObjectType.sol +3 -7
- package/contracts/type/Referral.sol +1 -0
- package/contracts/type/Seconds.sol +13 -1
- 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/base/ObjectManager.sol/ObjectManager.dbg.json +0 -4
- package/artifacts/contracts/instance/base/ObjectManager.sol/ObjectManager.json +0 -181
- 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/authorization/InstanceAdmin.sol +0 -108
- /package/contracts/{shared → upgradeability}/IVersionable.sol +0 -0
- /package/contracts/{shared → upgradeability}/Versionable.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,98 @@ 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
|
-
|
197
|
+
// TODO this function can have 0 args -> use stored addresses from prepareNextRelease()
|
207
198
|
function registerService(IService service)
|
208
199
|
external
|
209
200
|
restricted // GIF_MANAGER_ROLE
|
210
201
|
returns(NftId nftId)
|
211
202
|
{
|
212
|
-
|
213
|
-
|
214
|
-
|
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);
|
215
210
|
}
|
216
211
|
|
212
|
+
_state[releaseVersion] = DEPLOYING();
|
213
|
+
|
214
|
+
// not all services are registered
|
217
215
|
if (_servicesToRegister == _registeredServices) {
|
218
|
-
revert
|
216
|
+
revert ErrorReleaseRegistryNoServiceRegistrationExpected();
|
219
217
|
}
|
220
218
|
|
219
|
+
// service can work with release manager
|
221
220
|
(
|
222
221
|
IRegistry.ObjectInfo memory info,
|
223
|
-
ObjectType
|
224
|
-
VersionPart
|
222
|
+
ObjectType serviceDomain,
|
223
|
+
VersionPart serviceVersion
|
225
224
|
) = _verifyService(service);
|
226
225
|
|
227
|
-
|
228
|
-
|
229
|
-
|
226
|
+
// service domain matches defined in release config
|
227
|
+
ObjectType expectedDomain = _serviceAuthorization[releaseVersion].getServiceDomain(_registeredServices);
|
228
|
+
if (serviceDomain != expectedDomain) {
|
229
|
+
revert ErrorReleaseRegistryServiceDomainMismatch(expectedDomain, serviceDomain);
|
230
230
|
}
|
231
231
|
|
232
232
|
// register service with registry
|
233
|
-
nftId = _registry.registerService(info,
|
234
|
-
_registeredServices++;
|
235
|
-
|
233
|
+
nftId = _registry.registerService(info, serviceVersion, serviceDomain);
|
236
234
|
service.linkToRegisteredNftId();
|
235
|
+
_registeredServices++;
|
237
236
|
|
238
237
|
// setup service authorization
|
239
238
|
_admin.authorizeService(
|
240
|
-
_serviceAuthorization[
|
239
|
+
_serviceAuthorization[releaseVersion],
|
241
240
|
service);
|
242
241
|
|
243
242
|
// TODO consider to extend this to REGISTRY
|
244
243
|
// special roles for registry/staking/pool service
|
245
|
-
if (
|
244
|
+
if (serviceDomain == STAKING() || serviceDomain == POOL()) {
|
246
245
|
// TODO rename to grantServiceDomainRole()
|
247
|
-
_admin.grantServiceRoleForAllVersions(service,
|
248
|
-
}
|
249
|
-
|
250
|
-
if (_registeredServices < _servicesToRegister) {
|
251
|
-
_state = DEPLOYING();
|
252
|
-
} else {
|
253
|
-
// TODO end state depends on (_awaitingRegistration == 0)
|
246
|
+
_admin.grantServiceRoleForAllVersions(service, serviceDomain);
|
254
247
|
}
|
255
248
|
}
|
256
249
|
|
@@ -259,29 +252,28 @@ contract ReleaseManager is
|
|
259
252
|
external
|
260
253
|
restricted // GIF_ADMIN_ROLE
|
261
254
|
{
|
262
|
-
|
263
|
-
|
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);
|
264
262
|
}
|
265
263
|
|
266
264
|
// release fully deployed
|
267
|
-
VersionPart version = _next;
|
268
265
|
if(_registeredServices < _servicesToRegister) {
|
269
|
-
revert
|
266
|
+
revert ErrorReleaseRegistryReleaseRegistrationNotFinished(version, _servicesToRegister - _registeredServices);
|
270
267
|
}
|
271
268
|
|
272
269
|
// release exists, registry service MUST exist
|
273
270
|
address service = _registry.getServiceAddress(REGISTRY(), version);
|
274
271
|
if(service == address(0)) {
|
275
|
-
revert
|
276
|
-
}
|
277
|
-
|
278
|
-
// release is not activated
|
279
|
-
if(_releaseInfo[version].activatedAt.gtz()) {
|
280
|
-
revert ErrorReleaseManagerReleaseAlreadyActivated(version);
|
272
|
+
revert ErrorReleaseRegistryReleaseNotCreated(version);
|
281
273
|
}
|
282
274
|
|
283
275
|
_latest = version;
|
284
|
-
_state =
|
276
|
+
_state[version] = newState;
|
285
277
|
|
286
278
|
_releaseVersionByAddress[service] = version;
|
287
279
|
_releaseInfo[version].activatedAt = TimestampLib.blockTimestamp();
|
@@ -289,43 +281,49 @@ contract ReleaseManager is
|
|
289
281
|
emit LogReleaseActivation(version);
|
290
282
|
}
|
291
283
|
|
292
|
-
|
293
|
-
function
|
284
|
+
/// @dev stop all operations with release services
|
285
|
+
function pauseRelease(VersionPart version)
|
294
286
|
external
|
295
287
|
restricted // GIF_ADMIN_ROLE
|
296
288
|
{
|
297
|
-
|
298
|
-
|
299
|
-
revert ErrorReleaseManagerReleaseNotActivated(version);
|
300
|
-
}
|
289
|
+
StateId state = _state[version];
|
290
|
+
StateId newState = PAUSED();
|
301
291
|
|
302
|
-
// release
|
303
|
-
if(
|
304
|
-
revert
|
292
|
+
// verify release in state ACTIVE
|
293
|
+
if (!isValidTransition(RELEASE(), state, newState)) {
|
294
|
+
revert ErrorReleaseRegistryReleaseActivationDisallowed(version, state);
|
305
295
|
}
|
306
296
|
|
307
|
-
disableDelay = SecondsLib.toSeconds(Math.max(disableDelay.toInt(), MIN_DISABLE_DELAY.toInt()));
|
308
|
-
|
309
297
|
// TODO come up with a substitute
|
310
|
-
//
|
298
|
+
//_releaseAccessManager[version].disable();
|
311
299
|
|
312
|
-
|
300
|
+
_state[version] = newState;
|
301
|
+
_releaseInfo[version].disabledAt = TimestampLib.blockTimestamp();
|
302
|
+
|
303
|
+
emit LogReleaseDisabled(version);
|
313
304
|
}
|
314
|
-
|
315
|
-
|
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)
|
316
309
|
external
|
317
310
|
restricted // GIF_ADMIN_ROLE
|
318
311
|
{
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
//
|
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
|
+
}
|
323
319
|
|
324
|
-
// reverts if disable delay expired
|
325
320
|
// TODO come up with a substitute
|
326
321
|
// _releaseAccessManager[version].enable();
|
327
322
|
|
323
|
+
_state[version] = newState;
|
328
324
|
_releaseInfo[version].disabledAt = zeroTimestamp();
|
325
|
+
|
326
|
+
emit LogReleaseEnabled(version);
|
329
327
|
}
|
330
328
|
|
331
329
|
//--- view functions ----------------------------------------------------//
|
@@ -344,7 +342,7 @@ contract ReleaseManager is
|
|
344
342
|
}
|
345
343
|
|
346
344
|
function isActiveRelease(VersionPart version) public view returns(bool) {
|
347
|
-
return
|
345
|
+
return _state[version] == ACTIVE();
|
348
346
|
}
|
349
347
|
|
350
348
|
function getReleaseInfo(VersionPart version) external view returns(IRegistry.ReleaseInfo memory) {
|
@@ -363,8 +361,8 @@ contract ReleaseManager is
|
|
363
361
|
return _initial;
|
364
362
|
}
|
365
363
|
|
366
|
-
function getState() external view returns (StateId stateId) {
|
367
|
-
return _state;
|
364
|
+
function getState(VersionPart version) external view returns (StateId stateId) {
|
365
|
+
return _state[version];
|
368
366
|
}
|
369
367
|
|
370
368
|
function getRemainingServicesToRegister() external view returns (uint256 services) {
|
@@ -379,7 +377,6 @@ contract ReleaseManager is
|
|
379
377
|
return _serviceAuthorization[version];
|
380
378
|
}
|
381
379
|
|
382
|
-
// TODO token registry knows nothing about adfmin, only registry
|
383
380
|
function getRegistryAdmin() external view returns (address) {
|
384
381
|
return address(_admin);
|
385
382
|
}
|
@@ -390,37 +387,6 @@ contract ReleaseManager is
|
|
390
387
|
return _registry;
|
391
388
|
}
|
392
389
|
|
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
390
|
//--- private functions ----------------------------------------------------//
|
425
391
|
|
426
392
|
function _verifyService(IService service)
|
@@ -433,7 +399,7 @@ contract ReleaseManager is
|
|
433
399
|
)
|
434
400
|
{
|
435
401
|
if(!service.supportsInterface(type(IService).interfaceId)) {
|
436
|
-
revert
|
402
|
+
revert ErrorReleaseRegistryNotService(address(service));
|
437
403
|
}
|
438
404
|
|
439
405
|
address owner = msg.sender;
|
@@ -444,19 +410,19 @@ contract ReleaseManager is
|
|
444
410
|
|
445
411
|
_verifyServiceInfo(service, serviceInfo, owner);
|
446
412
|
|
447
|
-
VersionPart releaseVersion =
|
448
|
-
address
|
413
|
+
VersionPart releaseVersion = _next; // never 0
|
414
|
+
address expectedAuthority = _admin.authority(); // can be zero if registering service when release is not created
|
449
415
|
|
450
416
|
// IMPORTANT: can not guarantee service access is actually controlled by authority
|
451
|
-
if(serviceAuthority !=
|
452
|
-
revert
|
417
|
+
if(serviceAuthority != expectedAuthority) {
|
418
|
+
revert ErrorReleaseRegistryServiceReleaseAuthorityMismatch(
|
453
419
|
service,
|
454
420
|
serviceAuthority,
|
455
|
-
|
421
|
+
expectedAuthority);
|
456
422
|
}
|
457
423
|
|
458
424
|
if(serviceVersion != releaseVersion) {
|
459
|
-
revert
|
425
|
+
revert ErrorReleaseRegistryServiceReleaseVersionMismatch(
|
460
426
|
service,
|
461
427
|
serviceVersion,
|
462
428
|
releaseVersion);
|
@@ -473,29 +439,29 @@ contract ReleaseManager is
|
|
473
439
|
view
|
474
440
|
{
|
475
441
|
if(info.objectAddress != address(service)) {
|
476
|
-
revert
|
442
|
+
revert ErrorReleaseRegistryServiceInfoAddressInvalid(service, address(service));
|
477
443
|
}
|
478
444
|
|
479
445
|
if(info.isInterceptor != false) { // service is never interceptor
|
480
|
-
revert
|
446
|
+
revert ErrorReleaseRegistryServiceInfoInterceptorInvalid(service, info.isInterceptor);
|
481
447
|
}
|
482
448
|
|
483
|
-
if(info.objectType != SERVICE()) {
|
484
|
-
revert
|
449
|
+
if(info.objectType != SERVICE()) {
|
450
|
+
revert ErrorReleaseRegistryServiceInfoTypeInvalid(service, SERVICE(), info.objectType);
|
485
451
|
}
|
486
452
|
|
487
453
|
address owner = info.initialOwner;
|
488
454
|
|
489
455
|
if(owner != expectedOwner) { // registerable owner protection
|
490
|
-
revert
|
456
|
+
revert ErrorReleaseRegistryServiceInfoOwnerInvalid(service, expectedOwner, owner);
|
491
457
|
}
|
492
458
|
|
493
459
|
if(owner == address(service)) {
|
494
|
-
revert
|
460
|
+
revert ErrorReleaseRegistryServiceSelfRegistration(service);
|
495
461
|
}
|
496
462
|
|
497
463
|
if(_registry.isRegistered(owner)) {
|
498
|
-
revert
|
464
|
+
revert ErrorReleaseRegistryServiceOwnerRegistered(service, owner);
|
499
465
|
}
|
500
466
|
}
|
501
467
|
|
@@ -507,7 +473,7 @@ contract ReleaseManager is
|
|
507
473
|
return false;
|
508
474
|
}
|
509
475
|
// TODO try catch and return false in case of revert
|
510
|
-
//
|
476
|
+
// or just panic
|
511
477
|
// check if contract returns a zero nft id for its own address
|
512
478
|
if (IRegistry(registryAddress).getNftId(registryAddress).eqz()) {
|
513
479
|
return false;
|
@@ -516,3 +482,4 @@ contract ReleaseManager is
|
|
516
482
|
return true;
|
517
483
|
}
|
518
484
|
}
|
485
|
+
|
@@ -69,14 +69,14 @@ contract ServiceAuthorizationV3
|
|
69
69
|
functions = _authorizeForService(REGISTRY(), APPLICATION());
|
70
70
|
_authorize(functions, IRegistryService.registerPolicy.selector, "registerPolicy");
|
71
71
|
|
72
|
-
functions = _authorizeForService(REGISTRY(), POOL());
|
73
|
-
_authorize(functions, IRegistryService.registerPool.selector, "registerPool");
|
72
|
+
// functions = _authorizeForService(REGISTRY(), POOL());
|
73
|
+
// _authorize(functions, IRegistryService.registerPool.selector, "registerPool");
|
74
74
|
|
75
75
|
functions = _authorizeForService(REGISTRY(), BUNDLE());
|
76
76
|
_authorize(functions, IRegistryService.registerBundle.selector, "registerBundle");
|
77
77
|
|
78
78
|
functions = _authorizeForService(REGISTRY(), DISTRIBUTION());
|
79
|
-
_authorize(functions, IRegistryService.registerDistribution.selector, "registerDistribution");
|
79
|
+
// _authorize(functions, IRegistryService.registerDistribution.selector, "registerDistribution");
|
80
80
|
_authorize(functions, IRegistryService.registerDistributor.selector, "registerDistributor");
|
81
81
|
|
82
82
|
functions = _authorizeForService(REGISTRY(), COMPONENT());
|
@@ -88,8 +88,8 @@ contract ServiceAuthorizationV3
|
|
88
88
|
functions = _authorizeForService(REGISTRY(), STAKING());
|
89
89
|
_authorize(functions, IRegistryService.registerStake.selector, "registerStake");
|
90
90
|
|
91
|
-
functions = _authorizeForService(REGISTRY(), PRODUCT());
|
92
|
-
_authorize(functions, IRegistryService.registerProduct.selector, "registerProduct");
|
91
|
+
// functions = _authorizeForService(REGISTRY(), PRODUCT());
|
92
|
+
// _authorize(functions, IRegistryService.registerProduct.selector, "registerProduct");
|
93
93
|
}
|
94
94
|
|
95
95
|
|
@@ -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)
|