@etherisc/gif-next 0.0.2-6f86ab0-796 → 0.0.2-708facd-459
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/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.dbg.json +1 -1
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.dbg.json +1 -1
- 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/ModuleAuthorization.sol/ModuleAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +2 -2
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +2 -2
- 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 +2 -2
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +2 -2
- 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 +6 -6
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +5 -5
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +9 -9
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +73 -73
- 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 +2 -2
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +15 -15
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +6 -6
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +2 -2
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.dbg.json +1 -1
- 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/ObjectLifecycle.sol/ObjectLifecycle.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.dbg.json +4 -0
- package/artifacts/contracts/instance/base/{ObjectManager.sol/ObjectManager.json → ObjectSet.sol/ObjectSet.json} +6 -6
- 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/oracle/BasicOracle.sol/BasicOracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.json +2 -2
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +2 -2
- 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 +2 -2
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +2 -2
- 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 +2 -2
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +13 -13
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +2 -2
- 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 +2 -2
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +2 -2
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +2 -2
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +2 -2
- 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 +2 -2
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +2 -2
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +2 -2
- 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 +2 -2
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +2 -2
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +2 -2
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +2 -2
- 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 +2 -2
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.json +2 -2
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +2 -2
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- 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 +19 -19
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +88 -88
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +2 -2
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +2 -2
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.dbg.json +1 -1
- 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 +2 -2
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +2 -2
- 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 +2 -2
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +2 -2
- 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/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/ILifecycle.sol/ILifecycle.dbg.json +1 -1
- 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/Lifecycle.sol/Lifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.dbg.json +4 -0
- package/artifacts/contracts/shared/{NftIdSetManager.sol/NftIdSetManager.json → NftIdSet.sol/NftIdSet.json} +4 -4
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +2 -2
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +2 -2
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +2 -2
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +2 -2
- 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/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
- 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 +2 -2
- package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.json +2 -2
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +2 -2
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +2 -2
- package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingService.sol/StakingService.json +2 -2
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +2 -2
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +5 -5
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +2 -2
- package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.dbg.json +1 -1
- package/artifacts/contracts/type/Amount.sol/AmountLib.dbg.json +1 -1
- package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/Fee.sol/FeeLib.dbg.json +1 -1
- package/artifacts/contracts/type/Key32.sol/Key32Lib.dbg.json +1 -1
- package/artifacts/contracts/type/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
- package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/Referral.sol/ReferralLib.dbg.json +1 -1
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.dbg.json +1 -1
- package/artifacts/contracts/type/StateId.sol/StateIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/String.sol/StrLib.dbg.json +1 -1
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/MathLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionPartLib.dbg.json +1 -1
- package/contracts/instance/{BundleManager.sol → BundleSet.sol} +23 -23
- package/contracts/instance/IInstance.sol +5 -5
- package/contracts/instance/IInstanceService.sol +5 -5
- package/contracts/instance/Instance.sol +4 -4
- package/contracts/instance/InstanceAdmin.sol +2 -2
- package/contracts/instance/InstanceAuthorizationV3.sol +11 -11
- package/contracts/instance/InstanceService.sol +10 -10
- 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 +2 -2
- package/contracts/registry/Registry.sol +18 -18
- package/contracts/registry/RegistryAdmin.sol +23 -23
- package/contracts/registry/{ReleaseManager.sol → ReleaseRegistry.sol} +48 -48
- package/contracts/registry/TokenRegistry.sol +2 -2
- 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/StakingManager.sol +0 -1
- package/contracts/staking/StakingReader.sol +6 -7
- package/contracts/staking/StakingStore.sol +7 -7
- package/package.json +1 -1
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +0 -4
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +0 -703
- package/artifacts/contracts/instance/base/ObjectManager.sol/ObjectManager.dbg.json +0 -4
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +0 -4
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +0 -1159
- package/artifacts/contracts/shared/NftIdSetManager.sol/NftIdSetManager.dbg.json +0 -4
@@ -13,7 +13,7 @@ import {ObjectType, PROTOCOL, REGISTRY, TOKEN, SERVICE, INSTANCE, STAKE, STAKING
|
|
13
13
|
import {ChainNft} from "./ChainNft.sol";
|
14
14
|
import {IRegistry} from "./IRegistry.sol";
|
15
15
|
import {IRegisterable} from "../shared/IRegisterable.sol";
|
16
|
-
import {
|
16
|
+
import {ReleaseRegistry} from "./ReleaseRegistry.sol";
|
17
17
|
import {TokenRegistry} from "./TokenRegistry.sol";
|
18
18
|
import {RegistryAdmin} from "./RegistryAdmin.sol";
|
19
19
|
|
@@ -58,25 +58,25 @@ contract Registry is
|
|
58
58
|
|
59
59
|
address public _tokenRegistryAddress;
|
60
60
|
address public _stakingAddress;
|
61
|
-
|
61
|
+
ReleaseRegistry public _releaseRegistry;
|
62
62
|
|
63
63
|
// TODO
|
64
|
-
// 1). Registry and
|
64
|
+
// 1). Registry and ReleaseRegistry must be treated as whole single entity.
|
65
65
|
// But current limitations of EVM does not allow it -> require it to be splitted
|
66
|
-
// 2). Keep
|
66
|
+
// 2). Keep onlyReleaseRegistry modifier
|
67
67
|
// 3). Delete onlyRegistryService in favor of restricted
|
68
68
|
// 4). (For GlobalRegistry ONLY) make registerChainRegistry() restricted to GIF_ADMIN_ROLE
|
69
69
|
modifier onlyRegistryService() {
|
70
|
-
if(!
|
70
|
+
if(!_releaseRegistry.isActiveRegistryService(msg.sender)) {
|
71
71
|
revert ErrorRegistryCallerNotRegistryService();
|
72
72
|
}
|
73
73
|
_;
|
74
74
|
}
|
75
75
|
|
76
76
|
|
77
|
-
modifier
|
78
|
-
if(msg.sender != address(
|
79
|
-
revert
|
77
|
+
modifier onlyReleaseRegistry() {
|
78
|
+
if(msg.sender != address(_releaseRegistry)) {
|
79
|
+
revert ErrorRegistryCallerNotReleaseRegistry();
|
80
80
|
}
|
81
81
|
_;
|
82
82
|
}
|
@@ -101,14 +101,14 @@ contract Registry is
|
|
101
101
|
/// @dev wires release manager and token to registry (this contract).
|
102
102
|
/// MUST be called by release manager.
|
103
103
|
function initialize(
|
104
|
-
address
|
104
|
+
address releaseRegistry,
|
105
105
|
address tokenRegistry,
|
106
106
|
address staking
|
107
107
|
)
|
108
108
|
external
|
109
109
|
initializer()
|
110
110
|
{
|
111
|
-
|
111
|
+
_releaseRegistry = ReleaseRegistry(releaseRegistry);
|
112
112
|
_tokenRegistryAddress = tokenRegistry;
|
113
113
|
_stakingAddress = staking;
|
114
114
|
|
@@ -121,7 +121,7 @@ contract Registry is
|
|
121
121
|
ObjectType domain
|
122
122
|
)
|
123
123
|
external
|
124
|
-
|
124
|
+
onlyReleaseRegistry
|
125
125
|
returns(NftId nftId)
|
126
126
|
{
|
127
127
|
address service = info.objectAddress;
|
@@ -209,21 +209,21 @@ contract Registry is
|
|
209
209
|
|
210
210
|
/// @dev earliest GIF major version
|
211
211
|
function getInitialVersion() external view returns (VersionPart) {
|
212
|
-
return
|
212
|
+
return _releaseRegistry.getInitialVersion();
|
213
213
|
}
|
214
214
|
|
215
215
|
/// @dev next GIF release version to be released
|
216
216
|
function getNextVersion() external view returns (VersionPart) {
|
217
|
-
return
|
217
|
+
return _releaseRegistry.getNextVersion();
|
218
218
|
}
|
219
219
|
|
220
220
|
/// @dev latest active GIF release version
|
221
221
|
function getLatestVersion() external view returns (VersionPart) {
|
222
|
-
return
|
222
|
+
return _releaseRegistry.getLatestVersion();
|
223
223
|
}
|
224
224
|
|
225
225
|
function getReleaseInfo(VersionPart version) external view returns (ReleaseInfo memory) {
|
226
|
-
return
|
226
|
+
return _releaseRegistry.getReleaseInfo(version);
|
227
227
|
}
|
228
228
|
|
229
229
|
function getObjectCount() external view returns (uint256) {
|
@@ -277,7 +277,7 @@ contract Registry is
|
|
277
277
|
|
278
278
|
function isActiveRelease(VersionPart version) external view returns (bool)
|
279
279
|
{
|
280
|
-
return
|
280
|
+
return _releaseRegistry.isActiveRelease(version);
|
281
281
|
}
|
282
282
|
|
283
283
|
function getStakingAddress() external view returns (address staking) {
|
@@ -298,8 +298,8 @@ contract Registry is
|
|
298
298
|
service = _service[releaseVersion][serviceDomain];
|
299
299
|
}
|
300
300
|
|
301
|
-
function
|
302
|
-
return address(
|
301
|
+
function getReleaseRegistryAddress() external view returns (address) {
|
302
|
+
return address(_releaseRegistry);
|
303
303
|
}
|
304
304
|
|
305
305
|
function getChainNftAddress() external view override returns (address) {
|
@@ -8,7 +8,7 @@ import {IService} from "../shared/IService.sol";
|
|
8
8
|
import {IServiceAuthorization} from "../authorization/IServiceAuthorization.sol";
|
9
9
|
import {IStaking} from "../staking/IStaking.sol";
|
10
10
|
import {ObjectType, ObjectTypeLib, ALL, POOL, RELEASE} from "../type/ObjectType.sol";
|
11
|
-
import {
|
11
|
+
import {ReleaseRegistry} from "./ReleaseRegistry.sol";
|
12
12
|
import {RoleId, RoleIdLib, ADMIN_ROLE, GIF_MANAGER_ROLE, GIF_ADMIN_ROLE, PUBLIC_ROLE} from "../type/RoleId.sol";
|
13
13
|
import {StakingStore} from "../staking/StakingStore.sol";
|
14
14
|
import {STAKING} from "../type/ObjectType.sol";
|
@@ -39,11 +39,11 @@ contract RegistryAdmin is
|
|
39
39
|
string public constant GIF_ADMIN_ROLE_NAME = "GifAdminRole";
|
40
40
|
string public constant GIF_MANAGER_ROLE_NAME = "GifManagerRole";
|
41
41
|
string public constant POOL_SERVICE_ROLE_NAME = "PoolServiceRole";
|
42
|
-
string public constant
|
42
|
+
string public constant RELEASE_REGISTRY_ROLE_NAME = "ReleaseRegistryRole";
|
43
43
|
string public constant STAKING_SERVICE_ROLE_NAME = "StakingServiceRole";
|
44
44
|
string public constant STAKING_ROLE_NAME = "StakingRole";
|
45
45
|
|
46
|
-
string public constant
|
46
|
+
string public constant RELEASE_REGISTRY_TARGET_NAME = "ReleaseRegistry";
|
47
47
|
string public constant TOKEN_REGISTRY_TARGET_NAME = "TokenRegistry";
|
48
48
|
string public constant STAKING_TARGET_NAME = "Staking";
|
49
49
|
string public constant STAKING_STORE_TARGET_NAME = "StakingStore";
|
@@ -52,7 +52,7 @@ contract RegistryAdmin is
|
|
52
52
|
|
53
53
|
mapping(address service => VersionPart majorVersion) private _ServiceRelease;
|
54
54
|
|
55
|
-
address private
|
55
|
+
address private _releaseRegistry;
|
56
56
|
address private _tokenRegistry;
|
57
57
|
address private _staking;
|
58
58
|
address private _stakingStore;
|
@@ -71,7 +71,7 @@ contract RegistryAdmin is
|
|
71
71
|
if (_setupCompleted) { revert ErrorRegistryAdminIsAlreadySetUp(); }
|
72
72
|
else { _setupCompleted = true; }
|
73
73
|
|
74
|
-
|
74
|
+
_releaseRegistry = registry.getReleaseRegistryAddress();
|
75
75
|
_tokenRegistry = registry.getTokenRegistryAddress();
|
76
76
|
_staking = registry.getStakingAddress();
|
77
77
|
_stakingStore = address(
|
@@ -83,7 +83,7 @@ contract RegistryAdmin is
|
|
83
83
|
_setupGifAdminRole(gifAdmin);
|
84
84
|
_setupGifManagerRole(gifManager);
|
85
85
|
|
86
|
-
|
86
|
+
_setupReleaseRegistry();
|
87
87
|
_setupStaking();
|
88
88
|
}
|
89
89
|
|
@@ -220,14 +220,14 @@ contract RegistryAdmin is
|
|
220
220
|
maxMemberCount: 2, // TODO decide on max member count
|
221
221
|
name: GIF_ADMIN_ROLE_NAME}));
|
222
222
|
|
223
|
-
// for
|
223
|
+
// for ReleaseRegistry
|
224
224
|
FunctionInfo[] memory functions;
|
225
225
|
functions = new FunctionInfo[](4);
|
226
|
-
functions[0] = toFunction(
|
227
|
-
functions[1] = toFunction(
|
228
|
-
functions[2] = toFunction(
|
229
|
-
functions[3] = toFunction(
|
230
|
-
_authorizeTargetFunctions(
|
226
|
+
functions[0] = toFunction(ReleaseRegistry.createNextRelease.selector, "createNextRelease");
|
227
|
+
functions[1] = toFunction(ReleaseRegistry.activateNextRelease.selector, "activateNextRelease");
|
228
|
+
functions[2] = toFunction(ReleaseRegistry.pauseRelease.selector, "pauseRelease");
|
229
|
+
functions[3] = toFunction(ReleaseRegistry.unpauseRelease.selector, "unpauseRelease");
|
230
|
+
_authorizeTargetFunctions(_releaseRegistry, GIF_ADMIN_ROLE(), functions);
|
231
231
|
|
232
232
|
_grantRoleToAccount(GIF_ADMIN_ROLE(), gifAdmin);
|
233
233
|
}
|
@@ -253,36 +253,36 @@ contract RegistryAdmin is
|
|
253
253
|
functions[4] = toFunction(TokenRegistry.setActiveWithVersionCheck.selector, "setActiveWithVersionCheck");
|
254
254
|
_authorizeTargetFunctions(_tokenRegistry, GIF_MANAGER_ROLE(), functions);
|
255
255
|
|
256
|
-
// for
|
256
|
+
// for ReleaseRegistry
|
257
257
|
functions = new FunctionInfo[](2);
|
258
|
-
functions[0] = toFunction(
|
259
|
-
functions[1] = toFunction(
|
260
|
-
_authorizeTargetFunctions(
|
258
|
+
functions[0] = toFunction(ReleaseRegistry.prepareNextRelease.selector, "prepareNextRelease");
|
259
|
+
functions[1] = toFunction(ReleaseRegistry.registerService.selector, "registerService");
|
260
|
+
_authorizeTargetFunctions(_releaseRegistry, GIF_MANAGER_ROLE(), functions);
|
261
261
|
|
262
262
|
_grantRoleToAccount(GIF_MANAGER_ROLE(), gifManager);
|
263
263
|
}
|
264
264
|
|
265
265
|
|
266
|
-
function
|
266
|
+
function _setupReleaseRegistry() private {
|
267
267
|
|
268
|
-
_createTarget(
|
268
|
+
_createTarget(_releaseRegistry, RELEASE_REGISTRY_TARGET_NAME, true, false);
|
269
269
|
|
270
|
-
RoleId
|
270
|
+
RoleId releaseRegistryRoleId = RoleIdLib.roleForType(RELEASE());
|
271
271
|
_createRole(
|
272
|
-
|
272
|
+
releaseRegistryRoleId,
|
273
273
|
toRole({
|
274
274
|
adminRoleId: ADMIN_ROLE(),
|
275
275
|
roleType: RoleType.Contract,
|
276
276
|
maxMemberCount: 1,
|
277
|
-
name:
|
277
|
+
name: RELEASE_REGISTRY_ROLE_NAME}));
|
278
278
|
|
279
279
|
FunctionInfo[] memory functions;
|
280
280
|
functions = new FunctionInfo[](2);
|
281
281
|
functions[0] = toFunction(RegistryAdmin.authorizeService.selector, "authorizeService");
|
282
282
|
functions[1] = toFunction(RegistryAdmin.grantServiceRoleForAllVersions.selector, "grantServiceRoleForAllVersions");
|
283
|
-
_authorizeTargetFunctions(address(this),
|
283
|
+
_authorizeTargetFunctions(address(this), releaseRegistryRoleId, functions);
|
284
284
|
|
285
|
-
_grantRoleToAccount(
|
285
|
+
_grantRoleToAccount(releaseRegistryRoleId, _releaseRegistry);
|
286
286
|
}
|
287
287
|
|
288
288
|
|
@@ -34,7 +34,7 @@ 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
|
37
|
+
contract ReleaseRegistry is
|
38
38
|
AccessManaged,
|
39
39
|
ReleaseLifecycle,
|
40
40
|
IRegistryLinked
|
@@ -49,45 +49,45 @@ contract ReleaseManager is
|
|
49
49
|
event LogReleaseEnabled(VersionPart version);
|
50
50
|
|
51
51
|
// constructor
|
52
|
-
error
|
52
|
+
error ErrorReleaseRegistryNotRegistry(Registry registry);
|
53
53
|
|
54
54
|
// createNextRelease
|
55
|
-
error
|
55
|
+
error ErrorReleaseRegistryReleaseCreationDisallowed(VersionPart version, StateId currentStateId);
|
56
56
|
|
57
57
|
// prepareRelease
|
58
|
-
error
|
59
|
-
error
|
60
|
-
error
|
61
|
-
error
|
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);
|
62
62
|
|
63
63
|
// registerService
|
64
|
-
error
|
65
|
-
error
|
66
|
-
error
|
67
|
-
error
|
68
|
-
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);
|
69
69
|
|
70
70
|
// activateNextRelease
|
71
|
-
error
|
72
|
-
error
|
73
|
-
error
|
74
|
-
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);
|
75
75
|
|
76
76
|
// disableRelease
|
77
|
-
error
|
78
|
-
error
|
77
|
+
error ErrorReleaseRegistryReleaseNotActivated(VersionPart releaseVersion);
|
78
|
+
error ErrorReleaseRegistryReleaseAlreadyDisabled(VersionPart releaseVersion);
|
79
79
|
|
80
80
|
// _verifyService
|
81
|
-
error
|
82
|
-
error
|
81
|
+
error ErrorReleaseRegistryServiceReleaseAuthorityMismatch(IService service, address serviceAuthority, address releaseAuthority);
|
82
|
+
error ErrorReleaseRegistryServiceReleaseVersionMismatch(IService service, VersionPart serviceVersion, VersionPart releaseVersion);
|
83
83
|
|
84
84
|
// _verifyServiceInfo
|
85
|
-
error
|
86
|
-
error
|
87
|
-
error
|
88
|
-
error
|
89
|
-
error
|
90
|
-
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);
|
91
91
|
|
92
92
|
Seconds public constant MIN_DISABLE_DELAY = Seconds.wrap(60 * 24 * 365); // 1 year
|
93
93
|
|
@@ -115,7 +115,7 @@ contract ReleaseManager is
|
|
115
115
|
{
|
116
116
|
// TODO move this part to RegistryLinked constructor
|
117
117
|
if(!_isRegistry(address(registry))) {
|
118
|
-
revert
|
118
|
+
revert ErrorReleaseRegistryNotRegistry(registry);
|
119
119
|
}
|
120
120
|
|
121
121
|
setAuthority(registry.getAuthority());
|
@@ -167,7 +167,7 @@ contract ReleaseManager is
|
|
167
167
|
|
168
168
|
// verify release in state SCHEDULED
|
169
169
|
if (!isValidTransition(RELEASE(), _state[version], DEPLOYING())) {
|
170
|
-
revert
|
170
|
+
revert ErrorReleaseRegistryReleasePreparationDisallowed(version, _state[version]);
|
171
171
|
}
|
172
172
|
|
173
173
|
_state[version] = DEPLOYING();
|
@@ -175,19 +175,19 @@ contract ReleaseManager is
|
|
175
175
|
// verify authorizaion contract release matches with expected version
|
176
176
|
VersionPart releaseVersion = serviceAuthorization.getRelease();
|
177
177
|
if (releaseVersion != version) {
|
178
|
-
revert
|
178
|
+
revert ErrorReleaseRegistryVersionMismatch(version, releaseVersion);
|
179
179
|
}
|
180
180
|
|
181
181
|
|
182
182
|
// sanity check to ensure service domain list is not empty
|
183
183
|
uint256 serviceDomainsCount = serviceAuthorization.getServiceDomains().length;
|
184
184
|
if (serviceDomainsCount == 0) {
|
185
|
-
revert
|
185
|
+
revert ErrorReleaseRegistryNoDomains(version);
|
186
186
|
}
|
187
187
|
|
188
188
|
// verify prepareNextRelease is only called once per release
|
189
189
|
if(_servicesToRegister > 0) {
|
190
|
-
revert
|
190
|
+
revert ErrorReleaseRegistryReleaseAlreadyPrepared(version, _state[version]);
|
191
191
|
}
|
192
192
|
|
193
193
|
_servicesToRegister = serviceDomainsCount;
|
@@ -208,14 +208,14 @@ contract ReleaseManager is
|
|
208
208
|
// verify release in state DEPLOYING
|
209
209
|
if (!isValidTransition(RELEASE(), state, DEPLOYING())) {
|
210
210
|
// TOOD name must represent failed state transition
|
211
|
-
revert
|
211
|
+
revert ErrorReleaseRegistryServiceRegistrationDisallowed(state);
|
212
212
|
}
|
213
213
|
|
214
214
|
_state[releaseVersion] = DEPLOYING();
|
215
215
|
|
216
216
|
// not all services are registered
|
217
217
|
if (_servicesToRegister == _registeredServices) {
|
218
|
-
revert
|
218
|
+
revert ErrorReleaseRegistryNoServiceRegistrationExpected();
|
219
219
|
}
|
220
220
|
|
221
221
|
// service can work with release manager
|
@@ -228,7 +228,7 @@ contract ReleaseManager is
|
|
228
228
|
// service domain matches defined in release config
|
229
229
|
ObjectType expectedDomain = _serviceAuthorization[releaseVersion].getServiceDomain(_registeredServices);
|
230
230
|
if (serviceDomain != expectedDomain) {
|
231
|
-
revert
|
231
|
+
revert ErrorReleaseRegistryServiceDomainMismatch(expectedDomain, serviceDomain);
|
232
232
|
}
|
233
233
|
|
234
234
|
// register service with registry
|
@@ -260,18 +260,18 @@ contract ReleaseManager is
|
|
260
260
|
|
261
261
|
// verify release in state DEPLOYING
|
262
262
|
if (!isValidTransition(RELEASE(), state, newState)) {
|
263
|
-
revert
|
263
|
+
revert ErrorReleaseRegistryReleaseActivationDisallowed(version, state);
|
264
264
|
}
|
265
265
|
|
266
266
|
// release fully deployed
|
267
267
|
if(_registeredServices < _servicesToRegister) {
|
268
|
-
revert
|
268
|
+
revert ErrorReleaseRegistryReleaseRegistrationNotFinished(version, _servicesToRegister - _registeredServices);
|
269
269
|
}
|
270
270
|
|
271
271
|
// release exists, registry service MUST exist
|
272
272
|
address service = _registry.getServiceAddress(REGISTRY(), version);
|
273
273
|
if(service == address(0)) {
|
274
|
-
revert
|
274
|
+
revert ErrorReleaseRegistryReleaseNotCreated(version);
|
275
275
|
}
|
276
276
|
|
277
277
|
_latest = version;
|
@@ -293,7 +293,7 @@ contract ReleaseManager is
|
|
293
293
|
|
294
294
|
// verify release in state ACTIVE
|
295
295
|
if (!isValidTransition(RELEASE(), state, newState)) {
|
296
|
-
revert
|
296
|
+
revert ErrorReleaseRegistryReleaseActivationDisallowed(version, state);
|
297
297
|
}
|
298
298
|
|
299
299
|
// TODO come up with a substitute
|
@@ -316,7 +316,7 @@ contract ReleaseManager is
|
|
316
316
|
|
317
317
|
// verify release in state PAUSED
|
318
318
|
if (!isValidTransition(RELEASE(), state, newState)) {
|
319
|
-
revert
|
319
|
+
revert ErrorReleaseRegistryReleaseActivationDisallowed(version, state);
|
320
320
|
}
|
321
321
|
|
322
322
|
// TODO come up with a substitute
|
@@ -401,7 +401,7 @@ contract ReleaseManager is
|
|
401
401
|
)
|
402
402
|
{
|
403
403
|
if(!service.supportsInterface(type(IService).interfaceId)) {
|
404
|
-
revert
|
404
|
+
revert ErrorReleaseRegistryNotService(address(service));
|
405
405
|
}
|
406
406
|
|
407
407
|
address owner = msg.sender;
|
@@ -417,14 +417,14 @@ contract ReleaseManager is
|
|
417
417
|
|
418
418
|
// IMPORTANT: can not guarantee service access is actually controlled by authority
|
419
419
|
if(serviceAuthority != expectedAuthority) {
|
420
|
-
revert
|
420
|
+
revert ErrorReleaseRegistryServiceReleaseAuthorityMismatch(
|
421
421
|
service,
|
422
422
|
serviceAuthority,
|
423
423
|
expectedAuthority);
|
424
424
|
}
|
425
425
|
|
426
426
|
if(serviceVersion != releaseVersion) {
|
427
|
-
revert
|
427
|
+
revert ErrorReleaseRegistryServiceReleaseVersionMismatch(
|
428
428
|
service,
|
429
429
|
serviceVersion,
|
430
430
|
releaseVersion);
|
@@ -441,29 +441,29 @@ contract ReleaseManager is
|
|
441
441
|
view
|
442
442
|
{
|
443
443
|
if(info.objectAddress != address(service)) {
|
444
|
-
revert
|
444
|
+
revert ErrorReleaseRegistryServiceInfoAddressInvalid(service, address(service));
|
445
445
|
}
|
446
446
|
|
447
447
|
if(info.isInterceptor != false) { // service is never interceptor
|
448
|
-
revert
|
448
|
+
revert ErrorReleaseRegistryServiceInfoInterceptorInvalid(service, info.isInterceptor);
|
449
449
|
}
|
450
450
|
|
451
451
|
if(info.objectType != SERVICE()) {
|
452
|
-
revert
|
452
|
+
revert ErrorReleaseRegistryServiceInfoTypeInvalid(service, SERVICE(), info.objectType);
|
453
453
|
}
|
454
454
|
|
455
455
|
address owner = info.initialOwner;
|
456
456
|
|
457
457
|
if(owner != expectedOwner) { // registerable owner protection
|
458
|
-
revert
|
458
|
+
revert ErrorReleaseRegistryServiceInfoOwnerInvalid(service, expectedOwner, owner);
|
459
459
|
}
|
460
460
|
|
461
461
|
if(owner == address(service)) {
|
462
|
-
revert
|
462
|
+
revert ErrorReleaseRegistryServiceSelfRegistration(service);
|
463
463
|
}
|
464
464
|
|
465
465
|
if(_registry.isRegistered(owner)) {
|
466
|
-
revert
|
466
|
+
revert ErrorReleaseRegistryServiceOwnerRegistered(service, owner);
|
467
467
|
}
|
468
468
|
}
|
469
469
|
|
@@ -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)
|
@@ -4,7 +4,7 @@ pragma solidity ^0.8.20;
|
|
4
4
|
import {LibNftIdSet} from "../type/NftIdSet.sol";
|
5
5
|
import {NftId} from "../type/NftId.sol";
|
6
6
|
|
7
|
-
contract
|
7
|
+
contract NftIdSet {
|
8
8
|
|
9
9
|
error ErrorNftIdSetManagerNotOwner(address owner, address sender);
|
10
10
|
error ErrorNftIdSetManagerOwnerAlreadySet(address owner);
|
@@ -5,7 +5,6 @@ import {Amount} from "../type/Amount.sol";
|
|
5
5
|
import {IComponent} from "../shared/IComponent.sol";
|
6
6
|
import {IVersionable} from "../shared/IVersionable.sol";
|
7
7
|
import {NftId} from "../type/NftId.sol";
|
8
|
-
import {NftIdSetManager} from "../shared/NftIdSetManager.sol";
|
9
8
|
import {ObjectType} from "../type/ObjectType.sol";
|
10
9
|
import {Seconds} from "../type/Seconds.sol";
|
11
10
|
import {StakingReader} from "./StakingReader.sol";
|
@@ -44,6 +44,13 @@ interface IStakingService is IService
|
|
44
44
|
error ErrorStakingServiceDipBalanceInsufficient(NftId targetNftId, uint256 amount, uint256 balance);
|
45
45
|
error ErrorStakingServiceDipAllowanceInsufficient(NftId targetNftId, address tokenHandler, uint256 amount, uint256 allowance);
|
46
46
|
|
47
|
+
/// @dev Set the protocol reward rate stake locking period to the specified duration.
|
48
|
+
/// Permissioned: only staking owner
|
49
|
+
// TODO implement
|
50
|
+
// function setProtocolRewardRate(UFixed rewardRate) external;
|
51
|
+
// function setProtocolLockingPeriod(Seconds lockingPeriod) external;
|
52
|
+
// TODO also make sure that protocol rewards can be refilled and withdrawn
|
53
|
+
|
47
54
|
/// @dev creates/registers an on-chain instance staking target.
|
48
55
|
/// function granted to instance service
|
49
56
|
function createInstanceTarget(
|
@@ -53,11 +60,11 @@ interface IStakingService is IService
|
|
53
60
|
) external;
|
54
61
|
|
55
62
|
/// @dev Set the instance stake locking period to the specified duration.
|
56
|
-
///
|
63
|
+
/// Permissioned: Only owner of the specified target.
|
57
64
|
function setInstanceLockingPeriod(NftId instanceNftId, Seconds lockingPeriod) external;
|
58
65
|
|
59
|
-
/// @dev Set the instance reward rate to the specified value
|
60
|
-
///
|
66
|
+
/// @dev Set the instance reward rate to the specified value.
|
67
|
+
/// Permissioned: Only owner of the specified target.
|
61
68
|
function setInstanceRewardRate(NftId instanceNftId, UFixed rewardRate) external;
|
62
69
|
|
63
70
|
/// @dev (Re)fills the staking reward reserves for the specified target using the dips provided by the reward provider.
|
@@ -68,8 +75,8 @@ interface IStakingService is IService
|
|
68
75
|
/// unpermissioned: anybody may fill up staking reward reserves
|
69
76
|
function refillRewardReservesBySender(NftId targetNftId, Amount dipAmount) external returns (Amount newBalance);
|
70
77
|
|
71
|
-
/// @dev
|
72
|
-
///
|
78
|
+
/// @dev Defunds the staking reward reserves for the specified target
|
79
|
+
/// Permissioned: only the target owner may call this function
|
73
80
|
function withdrawInstanceRewardReserves(NftId instanceNftId, Amount dipAmount) external returns (Amount newBalance);
|
74
81
|
|
75
82
|
/// @dev create a new stake with amount DIP to the specified target
|
@@ -9,9 +9,7 @@ import {IRegistryService} from "../registry/IRegistryService.sol";
|
|
9
9
|
import {IStaking} from "./IStaking.sol";
|
10
10
|
import {IVersionable} from "../shared/IVersionable.sol";
|
11
11
|
import {Key32} from "../type/Key32.sol";
|
12
|
-
import {LibNftIdSet} from "../type/NftIdSet.sol";
|
13
12
|
import {NftId, NftIdLib} from "../type/NftId.sol";
|
14
|
-
import {NftIdSetManager} from "../shared/NftIdSetManager.sol";
|
15
13
|
import {ObjectType, INSTANCE, PROTOCOL, STAKE, STAKING, TARGET} from "../type/ObjectType.sol";
|
16
14
|
import {Seconds, SecondsLib} from "../type/Seconds.sol";
|
17
15
|
import {StakeManagerLib} from "./StakeManagerLib.sol";
|
@@ -54,7 +52,7 @@ contract Staking is
|
|
54
52
|
|
55
53
|
|
56
54
|
modifier onlyTarget(NftId targetNftId) {
|
57
|
-
if (!_getStakingStorage()._store.
|
55
|
+
if (!_getStakingStorage()._store.getTargetNftIdSet().exists(targetNftId)) {
|
58
56
|
revert ErrorStakingNotTarget(targetNftId);
|
59
57
|
}
|
60
58
|
_;
|
@@ -3,7 +3,6 @@ pragma solidity ^0.8.20;
|
|
3
3
|
|
4
4
|
import {IVersionable} from "../shared/IVersionable.sol";
|
5
5
|
import {ProxyManager} from "../shared/ProxyManager.sol";
|
6
|
-
import {ReleaseManager} from "../registry/ReleaseManager.sol";
|
7
6
|
import {Staking} from "./Staking.sol";
|
8
7
|
import {StakingReader} from "./StakingReader.sol";
|
9
8
|
import {StakingStore} from "./StakingStore.sol";
|
@@ -11,7 +11,6 @@ import {IRegistryLinked} from "../shared/IRegistryLinked.sol";
|
|
11
11
|
import {IStaking} from "../staking/IStaking.sol";
|
12
12
|
import {IVersionable} from "../shared/IVersionable.sol";
|
13
13
|
import {NftId} from "../type/NftId.sol";
|
14
|
-
import {NftIdSetManager} from "../shared/NftIdSetManager.sol";
|
15
14
|
import {ObjectType, STAKE, TARGET} from "../type/ObjectType.sol";
|
16
15
|
import {Seconds} from "../type/Seconds.sol";
|
17
16
|
import {StakingStore} from "./StakingStore.sol";
|
@@ -60,32 +59,32 @@ contract StakingReader is
|
|
60
59
|
|
61
60
|
|
62
61
|
function isTarget(NftId targetNftId) external view returns (bool) {
|
63
|
-
return _store.
|
62
|
+
return _store.getTargetNftIdSet().exists(targetNftId);
|
64
63
|
}
|
65
64
|
|
66
65
|
|
67
66
|
function targets() external view returns (uint256) {
|
68
|
-
return _store.
|
67
|
+
return _store.getTargetNftIdSet().nftIds();
|
69
68
|
}
|
70
69
|
|
71
70
|
|
72
71
|
function getTargetNftId(uint256 idx) external view returns (NftId) {
|
73
|
-
return _store.
|
72
|
+
return _store.getTargetNftIdSet().getNftId(idx);
|
74
73
|
}
|
75
74
|
|
76
75
|
|
77
76
|
function isActive(NftId targetNftId) external view returns (bool) {
|
78
|
-
return _store.
|
77
|
+
return _store.getTargetNftIdSet().isActive(targetNftId);
|
79
78
|
}
|
80
79
|
|
81
80
|
|
82
81
|
function activeTargets() external view returns (uint256) {
|
83
|
-
return _store.
|
82
|
+
return _store.getTargetNftIdSet().activeNftIds();
|
84
83
|
}
|
85
84
|
|
86
85
|
|
87
86
|
function getActiveTargetNftId(uint256 idx) external view returns (NftId) {
|
88
|
-
return _store.
|
87
|
+
return _store.getTargetNftIdSet().getActiveNftId(idx);
|
89
88
|
}
|
90
89
|
|
91
90
|
|