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