@etherisc/gif-next 0.0.2-8bdd2eb-413 → 0.0.2-8d9d4d6-542
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 +4 -0
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.json +1502 -0
- package/artifacts/contracts/authorization/IAccess.sol/IAccess.dbg.json +4 -0
- package/artifacts/contracts/authorization/IAccess.sol/IAccess.json +10 -0
- package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.dbg.json +4 -0
- package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.json +1168 -0
- package/artifacts/contracts/authorization/IModuleAuthorization.sol/IModuleAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/IModuleAuthorization.sol/IModuleAuthorization.json +110 -0
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.json +129 -0
- package/artifacts/contracts/authorization/InstanceAdmin.sol/InstanceAdmin.dbg.json +4 -0
- package/artifacts/contracts/authorization/InstanceAdmin.sol/InstanceAdmin.json +1639 -0
- package/artifacts/contracts/authorization/ModuleAuthorization.sol/ModuleAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/ModuleAuthorization.sol/ModuleAuthorization.json +134 -0
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.json +171 -0
- 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 +108 -79
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +48 -40
- 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/distribution/IDistributionService.sol/IDistributionService.json +13 -0
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +1 -1
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +32 -101
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +58 -65
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +120 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +72 -79
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +22 -22
- package/artifacts/contracts/instance/InstanceAdminNew.sol/InstanceAdminNew.dbg.json +4 -0
- package/artifacts/contracts/instance/InstanceAdminNew.sol/InstanceAdminNew.json +1676 -0
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +4 -0
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +289 -0
- package/artifacts/contracts/instance/InstanceAuthorizationsLib.sol/InstanceAuthorizationsLib.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAuthorizationsLib.sol/InstanceAuthorizationsLib.json +70 -46
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +192 -56
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +201 -34
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +41 -17
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +248 -108
- 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/Cloneable.sol/Cloneable.json +0 -53
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.dbg.json +4 -0
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.json +10 -0
- package/artifacts/contracts/instance/base/ObjectManager.sol/ObjectManager.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectManager.sol/ObjectManager.json +2 -71
- 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/IOracle.sol/IOracle.dbg.json +4 -0
- package/artifacts/contracts/oracle/IOracle.sol/IOracle.json +10 -0
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.dbg.json +4 -0
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.json +759 -0
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.dbg.json +4 -0
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.json +675 -0
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.dbg.json +4 -0
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.json +1146 -0
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +4 -0
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +1034 -0
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +4 -0
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +730 -0
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +78 -49
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +33 -25
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.json +13 -0
- 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/IPoolService.sol/IPoolService.json +13 -0
- 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 +62 -41
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +25 -21
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +66 -37
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +27 -19
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +106 -69
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +47 -35
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.json +13 -0
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.json +13 -0
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.json +13 -0
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +1 -1
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.json +13 -0
- 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/IProductService.sol/IProductService.json +13 -0
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +84 -47
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +36 -24
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +92 -63
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +40 -32
- 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 +54 -25
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.json +21 -13
- 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/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +13 -0
- 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 +1678 -153
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +51 -14
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +20 -8
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +99 -154
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +4 -0
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +195 -0
- 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/AccessManagerCustom.sol/AccessManagerCustom.dbg.json +1 -1
- package/artifacts/contracts/shared/AccessManagerExtended.sol/AccessManagerExtended.dbg.json +1 -1
- package/artifacts/contracts/shared/AccessManagerExtended.sol/AccessManagerExtended.json +42 -10
- package/artifacts/contracts/shared/AccessManagerExtendedInitializeable.sol/AccessManagerExtendedInitializeable.dbg.json +1 -1
- package/artifacts/contracts/shared/AccessManagerExtendedInitializeable.sol/AccessManagerExtendedInitializeable.json +42 -10
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisable.sol/AccessManagerExtendedWithDisable.dbg.json +1 -1
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisable.sol/AccessManagerExtendedWithDisable.json +52 -20
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol/AccessManagerExtendedWithDisableInitializeable.dbg.json +1 -1
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol/AccessManagerExtendedWithDisableInitializeable.json +52 -20
- 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 +107 -71
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +44 -36
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.json +13 -0
- package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
- package/artifacts/contracts/shared/IAccessManagerExtended.sol/IAccessManagerExtended.dbg.json +1 -1
- package/artifacts/contracts/shared/IAccessManagerExtendedWithDisable.sol/IAccessManagerExtendedWithDisable.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/IComponentService.sol/IComponentService.json +20 -0
- 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/IService.sol/IService.json +13 -0
- 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 +8 -8
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.json +6 -6
- package/artifacts/contracts/shared/NftIdSetManager.sol/NftIdSetManager.dbg.json +1 -1
- package/artifacts/contracts/shared/NftIdSetManager.sol/NftIdSetManager.json +2 -2
- 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/Service.sol/Service.json +13 -0
- 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/IStakingService.sol/IStakingService.json +49 -7
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.json +44 -28
- package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.json +44 -84
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +23 -39
- 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 +92 -73
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +33 -41
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +186 -114
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +18 -18
- 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/ClaimId.sol/ClaimIdLib.json +2 -2
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.json +2 -2
- 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/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 +2 -2
- 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 +125 -2
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.json +2 -2
- 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 +4 -0
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.json +204 -0
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.json +2 -2
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.json +114 -4
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorLib.dbg.json +4 -0
- package/artifacts/contracts/type/Selector.sol/SelectorLib.json +129 -0
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.dbg.json +4 -0
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.json +10 -0
- 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 +4 -0
- package/artifacts/contracts/type/String.sol/StrLib.json +132 -0
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.json +17 -4
- 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/authorization/AccessAdmin.sol +749 -0
- package/contracts/authorization/IAccess.sol +43 -0
- package/contracts/authorization/IAccessAdmin.sol +130 -0
- package/contracts/authorization/IModuleAuthorization.sol +27 -0
- package/contracts/authorization/IServiceAuthorization.sol +35 -0
- package/contracts/authorization/InstanceAdmin.sol +108 -0
- package/contracts/authorization/ModuleAuthorization.sol +116 -0
- package/contracts/authorization/ServiceAuthorization.sol +86 -0
- package/contracts/distribution/DistributionService.sol +3 -4
- package/contracts/instance/IInstance.sol +14 -6
- package/contracts/instance/IInstanceService.sol +24 -8
- package/contracts/instance/Instance.sol +63 -39
- package/contracts/instance/InstanceAdminNew.sol +74 -0
- package/contracts/instance/InstanceAuthorizationV3.sol +176 -0
- package/contracts/instance/InstanceAuthorizationsLib.sol +31 -3
- package/contracts/instance/InstanceReader.sol +29 -2
- package/contracts/instance/InstanceService.sol +85 -8
- package/contracts/instance/InstanceStore.sol +29 -20
- package/contracts/instance/base/BalanceStore.sol +11 -6
- package/contracts/instance/base/Cloneable.sol +2 -25
- package/contracts/instance/base/ObjectCounter.sol +21 -0
- package/contracts/instance/base/ObjectManager.sol +1 -3
- package/contracts/oracle/IOracle.sol +20 -0
- package/contracts/oracle/IOracleComponent.sol +32 -0
- package/contracts/oracle/IOracleService.sol +65 -0
- package/contracts/oracle/Oracle.sol +145 -0
- package/contracts/oracle/OracleService.sol +278 -0
- package/contracts/oracle/OracleServiceManager.sol +42 -0
- package/contracts/pool/BundleService.sol +19 -19
- package/contracts/pool/PoolService.sol +6 -7
- package/contracts/product/ApplicationService.sol +5 -5
- package/contracts/product/ClaimService.sol +5 -5
- package/contracts/product/IClaimService.sol +6 -0
- package/contracts/product/PolicyService.sol +5 -5
- package/contracts/product/PricingService.sol +5 -6
- package/contracts/product/ProductService.sol +5 -5
- package/contracts/registry/IRegistry.sol +1 -1
- package/contracts/registry/Registry.sol +7 -1
- package/contracts/registry/RegistryAdmin.sol +236 -148
- package/contracts/registry/RegistryService.sol +5 -5
- package/contracts/registry/RegistryServiceManager.sol +0 -5
- package/contracts/registry/ReleaseManager.sol +102 -172
- package/contracts/registry/ServiceAuthorizationV3.sol +200 -0
- package/contracts/shared/AccessManagerCustom.sol +6 -1
- package/contracts/shared/AccessManagerExtended.sol +12 -1
- package/contracts/shared/Component.sol +3 -0
- package/contracts/shared/ComponentService.sol +30 -9
- package/contracts/shared/ComponentVerifyingService.sol +13 -7
- package/contracts/shared/IComponentService.sol +11 -0
- package/contracts/shared/IService.sol +7 -0
- package/contracts/shared/Lifecycle.sol +11 -2
- package/contracts/shared/Service.sol +27 -21
- package/contracts/staking/IStakingService.sol +11 -7
- package/contracts/staking/StakeManagerLib.sol +52 -0
- package/contracts/staking/Staking.sol +58 -96
- package/contracts/staking/StakingService.sol +61 -56
- package/contracts/staking/StakingServiceManager.sol +0 -1
- package/contracts/staking/StakingStore.sol +79 -38
- package/contracts/type/ObjectType.sol +162 -67
- package/contracts/type/RequestId.sol +75 -0
- package/contracts/type/RoleId.sol +77 -19
- package/contracts/type/Selector.sol +102 -0
- package/contracts/type/StateId.sol +12 -0
- package/contracts/type/String.sol +53 -0
- package/contracts/type/Timestamp.sol +6 -2
- package/package.json +3 -3
- package/artifacts/contracts/registry/ServiceAuthorizationsLib.sol/ServiceAuthorizationsLib.dbg.json +0 -4
- package/artifacts/contracts/registry/ServiceAuthorizationsLib.sol/ServiceAuthorizationsLib.json +0 -137
- package/contracts/registry/ServiceAuthorizationsLib.sol +0 -173
@@ -1,18 +1,19 @@
|
|
1
1
|
// SPDX-License-Identifier: UNLICENSED
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import {AuthorityUtils} from "@openzeppelin/contracts/access/manager/AuthorityUtils.sol";
|
7
|
-
|
8
|
-
import {RoleId, RoleIdLib, GIF_MANAGER_ROLE, GIF_ADMIN_ROLE} from "../type/RoleId.sol";
|
9
|
-
|
10
|
-
import {AccessManagerExtendedInitializeable} from "../shared/AccessManagerExtendedInitializeable.sol";
|
11
|
-
import {InitializableCustom} from "../shared/InitializableCustom.sol";
|
12
|
-
|
4
|
+
import {AccessAdmin} from "../authorization/AccessAdmin.sol";
|
5
|
+
import {IAccess} from "../authorization/IAccess.sol";
|
13
6
|
import {IRegistry} from "./IRegistry.sol";
|
7
|
+
import {IService} from "../shared/IService.sol";
|
8
|
+
import {IServiceAuthorization} from "../authorization/IServiceAuthorization.sol";
|
9
|
+
import {IStaking} from "../staking/IStaking.sol";
|
10
|
+
import {ObjectType, ObjectTypeLib, ALL, POOL, RELEASE} from "../type/ObjectType.sol";
|
14
11
|
import {ReleaseManager} from "./ReleaseManager.sol";
|
12
|
+
import {RoleId, RoleIdLib, ADMIN_ROLE, GIF_MANAGER_ROLE, GIF_ADMIN_ROLE, PUBLIC_ROLE} from "../type/RoleId.sol";
|
13
|
+
import {StakingStore} from "../staking/StakingStore.sol";
|
14
|
+
import {STAKING} from "../type/ObjectType.sol";
|
15
15
|
import {TokenRegistry} from "./TokenRegistry.sol";
|
16
|
+
import {VersionPart} from "../type/Version.sol";
|
16
17
|
|
17
18
|
/*
|
18
19
|
1) GIF_MANAGER_ROLE
|
@@ -25,122 +26,163 @@ import {TokenRegistry} from "./TokenRegistry.sol";
|
|
25
26
|
- MUST have 1 member at any time
|
26
27
|
- granted/revoked ONLY in transferAdminRole() -> consider lock out situations!!!
|
27
28
|
- responsible for creation and activation of releases
|
28
|
-
*/
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
// each call will configure access manager for given parameneters
|
35
|
-
// in the end you have fully configured access manager and config object
|
36
|
-
|
37
|
-
// grants GIF_ADMIN_ROLE to registry owner as registryOwner is transaction sender
|
38
|
-
// grants GIF_MANAGER_ROLE to registry owner via contructor argument
|
30
|
+
createServiceTarget(type, release)
|
31
|
+
createServiceRole(type,release)
|
32
|
+
getServiceRole(type, release)
|
33
|
+
*/
|
39
34
|
contract RegistryAdmin is
|
40
|
-
|
41
|
-
InitializableCustom
|
35
|
+
AccessAdmin
|
42
36
|
{
|
43
|
-
error
|
44
|
-
error ErrorRegistryAdminTokenRegistryAuthorityMismatch();
|
45
|
-
error ErrorRegistryAdminStakingAuthorityMismatch();
|
37
|
+
error ErrorRegistryAdminIsAlreadySetUp();
|
46
38
|
|
47
39
|
string public constant GIF_ADMIN_ROLE_NAME = "GifAdminRole";
|
48
40
|
string public constant GIF_MANAGER_ROLE_NAME = "GifManagerRole";
|
41
|
+
string public constant STAKING_SERVICE_ROLE_NAME = "StakingServiceRole";
|
42
|
+
string public constant POOL_SERVICE_ROLE_NAME = "PoolServiceRole";
|
43
|
+
|
44
|
+
string public constant RELEASE_MANAGER_TARGET_NAME = "ReleaseManagerTarget";
|
45
|
+
string public constant TOKEN_REGISTRY_TARGET_NAME = "TokenRegistryTarget";
|
46
|
+
string public constant STAKING_TARGET_NAME = "StakingTarget";
|
47
|
+
string public constant STAKING_STORE_TARGET_NAME = "StakingStoreTarget";
|
48
|
+
|
49
|
+
mapping(address service => VersionPart majorVersion) private _ServiceRelease;
|
49
50
|
|
50
|
-
string public constant RELEASE_MANAGER_TARGET_NAME = "ReleaseManager";
|
51
|
-
string public constant TOKEN_REGISTRY_TARGET_NAME = "TokenRegistry";
|
52
|
-
string public constant STAKING_TARGET_NAME = "Staking";
|
53
|
-
|
54
51
|
address private _releaseManager;
|
55
52
|
address private _tokenRegistry;
|
56
53
|
address private _staking;
|
54
|
+
address private _stakingStore;
|
55
|
+
bool private _setupCompleted;
|
57
56
|
|
58
|
-
constructor()
|
59
|
-
AccessManaged(msg.sender)
|
60
|
-
InitializableCustom()
|
61
|
-
{
|
62
|
-
AccessManagerExtendedInitializeable accessManager = new AccessManagerExtendedInitializeable();
|
63
|
-
accessManager.initialize(address(this));
|
64
|
-
setAuthority(address(accessManager));
|
65
|
-
}
|
57
|
+
constructor() AccessAdmin() { }
|
66
58
|
|
67
|
-
function
|
59
|
+
function completeSetup(
|
68
60
|
IRegistry registry,
|
69
61
|
address gifAdmin,
|
70
62
|
address gifManager
|
71
63
|
)
|
72
64
|
external
|
73
|
-
|
65
|
+
onlyDeployer()
|
74
66
|
{
|
75
|
-
|
76
|
-
|
77
|
-
if(IAccessManaged(releaseManagerAddress).authority() != authority()) {
|
78
|
-
revert ErrorRegistryAdminReleaseManagerAuthorityMismatch();
|
79
|
-
}
|
80
|
-
|
81
|
-
address tokenRegistryAddress = registry.getTokenRegistryAddress();
|
82
|
-
if(IAccessManaged(tokenRegistryAddress).authority() != authority()) {
|
83
|
-
revert ErrorRegistryAdminTokenRegistryAuthorityMismatch();
|
84
|
-
}
|
85
|
-
|
86
|
-
address stakingAddress = registry.getStakingAddress();
|
87
|
-
if(IAccessManaged(stakingAddress).authority() != authority()) {
|
88
|
-
revert ErrorRegistryAdminStakingAuthorityMismatch();
|
89
|
-
}
|
67
|
+
if (_setupCompleted) { revert ErrorRegistryAdminIsAlreadySetUp(); }
|
68
|
+
else { _setupCompleted = true; }
|
90
69
|
|
91
|
-
_releaseManager =
|
92
|
-
_tokenRegistry =
|
93
|
-
_staking =
|
70
|
+
_releaseManager = registry.getReleaseManagerAddress();
|
71
|
+
_tokenRegistry = registry.getTokenRegistryAddress();
|
72
|
+
_staking = registry.getStakingAddress();
|
73
|
+
_stakingStore = address(
|
74
|
+
IStaking(_staking).getStakingStore());
|
94
75
|
|
95
76
|
// at this moment all registry contracts are deployed and fully intialized
|
96
|
-
_createRole(GIF_ADMIN_ROLE(), GIF_ADMIN_ROLE_NAME);
|
97
|
-
_createRole(GIF_MANAGER_ROLE(), GIF_MANAGER_ROLE_NAME);
|
98
|
-
|
99
|
-
_createTarget(_releaseManager, RELEASE_MANAGER_TARGET_NAME);
|
100
77
|
_createTarget(_tokenRegistry, TOKEN_REGISTRY_TARGET_NAME);
|
101
|
-
_createTarget(_staking, STAKING_TARGET_NAME);
|
102
|
-
|
103
|
-
_setGifAdminRole();
|
104
|
-
_setGifManagerRole();
|
105
78
|
|
106
|
-
|
107
|
-
|
79
|
+
_setupGifAdminRole(gifAdmin);
|
80
|
+
_setupGifManagerRole(gifManager);
|
108
81
|
|
109
|
-
|
110
|
-
|
82
|
+
_setupReleaseManager();
|
83
|
+
_setupStaking();
|
111
84
|
}
|
112
85
|
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
86
|
+
|
87
|
+
/// @dev Sets up authorizaion for specified service.
|
88
|
+
/// For all authorized services its authorized functions are enabled.
|
89
|
+
/// Permissioned function: Access is restricted to release manager.
|
90
|
+
function authorizeService(
|
91
|
+
IServiceAuthorization serviceAuthorization,
|
92
|
+
IService service
|
118
93
|
)
|
119
94
|
external
|
120
|
-
restricted()
|
95
|
+
restricted()
|
121
96
|
{
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
functionSelector[1] = TokenRegistry.registerRemoteToken.selector;
|
126
|
-
functionSelector[2] = TokenRegistry.setActive.selector;
|
127
|
-
functionSelector[3] = TokenRegistry.setActiveForVersion.selector;
|
128
|
-
|
129
|
-
// only needed for testing TODO find a better way
|
130
|
-
functionSelector[4] = TokenRegistry.setActiveWithVersionCheck.selector;
|
131
|
-
_setTargetFunctionRole(address(tokenRegistry), functionSelector, GIF_MANAGER_ROLE());
|
132
|
-
}*/
|
97
|
+
_createServiceTargetAndRole(service);
|
98
|
+
_authorizeServiceFunctions(serviceAuthorization, service);
|
99
|
+
}
|
133
100
|
|
134
101
|
|
135
|
-
function
|
136
|
-
address target,
|
137
|
-
bytes4[] memory selector,
|
138
|
-
RoleId roleId
|
139
|
-
)
|
102
|
+
function grantServiceRoleForAllVersions(IService service, ObjectType domain)
|
140
103
|
external
|
141
|
-
restricted
|
104
|
+
restricted()
|
105
|
+
{
|
106
|
+
_grantRoleToAccount(
|
107
|
+
RoleIdLib.roleForTypeAndAllVersions(domain),
|
108
|
+
address(service));
|
109
|
+
}
|
110
|
+
|
111
|
+
|
112
|
+
function _createServiceTargetAndRole(IService service)
|
113
|
+
private
|
142
114
|
{
|
143
|
-
|
115
|
+
ObjectType domain = service.getDomain();
|
116
|
+
string memory baseName = ObjectTypeLib.toName(domain);
|
117
|
+
VersionPart version = service.getVersion().toMajorPart();
|
118
|
+
uint256 versionInt = version.toInt();
|
119
|
+
|
120
|
+
// create service target
|
121
|
+
string memory serviceTargetName = ObjectTypeLib.toVersionedName(
|
122
|
+
baseName, "Service", versionInt);
|
123
|
+
|
124
|
+
_createTarget(
|
125
|
+
address(service),
|
126
|
+
serviceTargetName);
|
127
|
+
|
128
|
+
// create service role
|
129
|
+
RoleId roleId = RoleIdLib.roleForTypeAndVersion(
|
130
|
+
domain, version);
|
131
|
+
string memory serviceRoleName = ObjectTypeLib.toVersionedName(
|
132
|
+
baseName, "ServiceRole", versionInt);
|
133
|
+
bool isCustom = false; // service roles are never custom roles
|
134
|
+
uint256 maxRoleMembers = 1; // service roles must only be given to this unique service
|
135
|
+
bool memberRemovalDisabled = true; // it must not be possible to remove this role once granted
|
136
|
+
|
137
|
+
_createRole(
|
138
|
+
roleId,
|
139
|
+
ADMIN_ROLE(),
|
140
|
+
serviceRoleName,
|
141
|
+
isCustom,
|
142
|
+
maxRoleMembers,
|
143
|
+
memberRemovalDisabled);
|
144
|
+
|
145
|
+
_grantRoleToAccount(
|
146
|
+
roleId,
|
147
|
+
address(service));
|
148
|
+
}
|
149
|
+
|
150
|
+
|
151
|
+
function _authorizeServiceFunctions(
|
152
|
+
IServiceAuthorization serviceAuthorization,
|
153
|
+
IService service
|
154
|
+
)
|
155
|
+
private
|
156
|
+
{
|
157
|
+
ObjectType serviceDomain = service.getDomain();
|
158
|
+
ObjectType authorizedDomain;
|
159
|
+
RoleId authorizedRoleId;
|
160
|
+
|
161
|
+
VersionPart release = service.getVersion().toMajorPart();
|
162
|
+
ObjectType[] memory authorizedDomains = serviceAuthorization.getAuthorizedDomains(serviceDomain);
|
163
|
+
|
164
|
+
for (uint256 i = 0; i < authorizedDomains.length; i++) {
|
165
|
+
authorizedDomain = authorizedDomains[i];
|
166
|
+
|
167
|
+
// derive authorized role from authorized domain
|
168
|
+
if (authorizedDomain == ALL()) {
|
169
|
+
authorizedRoleId = PUBLIC_ROLE();
|
170
|
+
} else {
|
171
|
+
authorizedRoleId = RoleIdLib.roleForTypeAndVersion(
|
172
|
+
authorizedDomain,
|
173
|
+
release);
|
174
|
+
}
|
175
|
+
|
176
|
+
// get authorized functions for authorized domain
|
177
|
+
IAccess.FunctionInfo[] memory authorizatedFunctions = serviceAuthorization.getAuthorizedFunctions(
|
178
|
+
serviceDomain,
|
179
|
+
authorizedDomain);
|
180
|
+
|
181
|
+
_authorizeTargetFunctions(
|
182
|
+
address(service),
|
183
|
+
authorizedRoleId,
|
184
|
+
authorizatedFunctions);
|
185
|
+
}
|
144
186
|
}
|
145
187
|
|
146
188
|
/*function transferAdmin(address to)
|
@@ -153,85 +195,131 @@ contract RegistryAdmin is
|
|
153
195
|
|
154
196
|
//--- view functions ----------------------------------------------------//
|
155
197
|
|
156
|
-
function
|
157
|
-
|
158
|
-
return isMember;
|
198
|
+
function getGifAdminRole() external view returns (RoleId) {
|
199
|
+
return GIF_ADMIN_ROLE();
|
159
200
|
}
|
160
201
|
|
161
|
-
|
162
|
-
|
163
|
-
address account,
|
164
|
-
address target,
|
165
|
-
bytes4 functionSelector
|
166
|
-
)
|
167
|
-
external
|
168
|
-
view
|
169
|
-
returns(bool)
|
170
|
-
{
|
171
|
-
(bool immediate,) = AuthorityUtils.canCallWithDelay(
|
172
|
-
authority(),
|
173
|
-
account,
|
174
|
-
target,
|
175
|
-
functionSelector);
|
176
|
-
|
177
|
-
return immediate;
|
202
|
+
function getGifManagerRole() external view returns (RoleId) {
|
203
|
+
return GIF_MANAGER_ROLE();
|
178
204
|
}
|
179
205
|
|
180
206
|
//--- private functions -------------------------------------------------//
|
181
207
|
|
182
|
-
function
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
functionSelector2[0] = ReleaseManager.createNextRelease.selector;
|
188
|
-
functionSelector2[1] = ReleaseManager.activateNextRelease.selector;
|
208
|
+
function _setupGifAdminRole(address gifAdmin) private {
|
209
|
+
// TODO decide on max member count
|
210
|
+
bool isCustom = false;
|
211
|
+
_createRole(GIF_ADMIN_ROLE(), getAdminRole(), GIF_ADMIN_ROLE_NAME, isCustom, 2, false);
|
212
|
+
_grantRoleToAccount(GIF_ADMIN_ROLE(), gifAdmin);
|
189
213
|
|
190
|
-
|
214
|
+
// for ReleaseManager
|
215
|
+
FunctionInfo[] memory functions;
|
216
|
+
functions = new FunctionInfo[](2);
|
217
|
+
functions[0] = toFunction(ReleaseManager.createNextRelease.selector, "createNextRelease");
|
218
|
+
functions[1] = toFunction(ReleaseManager.activateNextRelease.selector, "activateNextRelease");
|
219
|
+
_authorizeTargetFunctions(_releaseManager, GIF_ADMIN_ROLE(), functions);
|
191
220
|
|
192
221
|
// for Staking
|
193
222
|
}
|
194
223
|
|
195
|
-
function
|
196
|
-
{
|
197
|
-
// for TokenRegistry
|
198
|
-
bytes4[] memory functionSelectorTr = new bytes4[](5);
|
199
|
-
functionSelectorTr[0] = TokenRegistry.registerToken.selector;
|
200
|
-
functionSelectorTr[1] = TokenRegistry.registerRemoteToken.selector;
|
201
|
-
functionSelectorTr[2] = TokenRegistry.setActive.selector;
|
202
|
-
functionSelectorTr[3] = TokenRegistry.setActiveForVersion.selector;
|
224
|
+
function _setupGifManagerRole(address gifManager) private {
|
203
225
|
|
204
|
-
|
205
|
-
|
206
|
-
|
226
|
+
bool isCustom = false;
|
227
|
+
_createRole(GIF_MANAGER_ROLE(), GIF_ADMIN_ROLE(), GIF_MANAGER_ROLE_NAME, isCustom, 1, false);
|
228
|
+
_grantRoleToAccount(GIF_MANAGER_ROLE(), gifManager);
|
229
|
+
|
230
|
+
// for TokenRegistry
|
231
|
+
FunctionInfo[] memory functions;
|
232
|
+
functions = new FunctionInfo[](5);
|
233
|
+
functions[0] = toFunction(TokenRegistry.registerToken.selector, "registerToken");
|
234
|
+
functions[1] = toFunction(TokenRegistry.registerRemoteToken.selector, "registerRemoteToken");
|
235
|
+
functions[2] = toFunction(TokenRegistry.setActive.selector, "setActive");
|
236
|
+
functions[3] = toFunction(TokenRegistry.setActiveForVersion.selector, "setActiveForVersion");
|
237
|
+
// TODO find a better way (only needed for testing)
|
238
|
+
functions[4] = toFunction(TokenRegistry.setActiveWithVersionCheck.selector, "setActiveWithVersionCheck");
|
239
|
+
_authorizeTargetFunctions(_tokenRegistry, GIF_MANAGER_ROLE(), functions);
|
207
240
|
|
208
241
|
// for ReleaseManager
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
242
|
+
functions = new FunctionInfo[](2);
|
243
|
+
functions[0] = toFunction(ReleaseManager.prepareNextRelease.selector, "prepareNextRelease");
|
244
|
+
functions[1] = toFunction(ReleaseManager.registerService.selector, "registerService");
|
245
|
+
_authorizeTargetFunctions(_releaseManager, GIF_MANAGER_ROLE(), functions);
|
213
246
|
|
214
247
|
// for Staking
|
215
248
|
}
|
216
249
|
|
217
250
|
|
218
|
-
function
|
219
|
-
|
220
|
-
}
|
251
|
+
function _setupReleaseManager() private {
|
252
|
+
_createTarget(_releaseManager, RELEASE_MANAGER_TARGET_NAME);
|
221
253
|
|
222
|
-
|
223
|
-
|
224
|
-
|
254
|
+
bool isCustom = false;
|
255
|
+
RoleId releaseManagerRoleId = RoleIdLib.roleForType(RELEASE());
|
256
|
+
_createRole(releaseManagerRoleId, ADMIN_ROLE(), RELEASE_MANAGER_TARGET_NAME, isCustom, 1, true);
|
257
|
+
_grantRoleToAccount(releaseManagerRoleId, _releaseManager);
|
225
258
|
|
226
|
-
|
227
|
-
|
259
|
+
FunctionInfo[] memory functions;
|
260
|
+
functions = new FunctionInfo[](2);
|
261
|
+
functions[0] = toFunction(RegistryAdmin.authorizeService.selector, "authorizeService");
|
262
|
+
functions[1] = toFunction(RegistryAdmin.grantServiceRoleForAllVersions.selector, "grantServiceRoleForAllVersions");
|
263
|
+
_authorizeTargetFunctions(address(this), releaseManagerRoleId, functions);
|
228
264
|
}
|
229
265
|
|
230
|
-
function _createRole(RoleId roleId, string memory roleName) private {
|
231
|
-
AccessManagerExtendedInitializeable(authority()).createRole(roleId.toInt(), roleName);
|
232
|
-
}
|
233
266
|
|
234
|
-
function
|
235
|
-
|
267
|
+
function _setupStaking() private {
|
268
|
+
_createTarget(_staking, STAKING_TARGET_NAME);
|
269
|
+
_createTarget(_stakingStore, STAKING_STORE_TARGET_NAME);
|
270
|
+
|
271
|
+
// staking function authorization for staking service
|
272
|
+
bool isCustom = false;
|
273
|
+
RoleId stakingServiceRoleId = RoleIdLib.roleForTypeAndAllVersions(STAKING());
|
274
|
+
_createRole(stakingServiceRoleId, ADMIN_ROLE(), STAKING_SERVICE_ROLE_NAME, isCustom, 1, true);
|
275
|
+
|
276
|
+
FunctionInfo[] memory functions;
|
277
|
+
functions = new FunctionInfo[](13);
|
278
|
+
functions[0] = toFunction(IStaking.registerTarget.selector, "registerTarget");
|
279
|
+
functions[1] = toFunction(IStaking.setLockingPeriod.selector, "setLockingPeriod");
|
280
|
+
functions[2] = toFunction(IStaking.setRewardRate.selector, "setRewardRate");
|
281
|
+
functions[3] = toFunction(IStaking.refillRewardReserves.selector, "refillRewardReserves");
|
282
|
+
functions[4] = toFunction(IStaking.withdrawRewardReserves.selector, "withdrawRewardReserves");
|
283
|
+
functions[5] = toFunction(IStaking.createStake.selector, "createStake");
|
284
|
+
functions[6] = toFunction(IStaking.stake.selector, "stake");
|
285
|
+
functions[7] = toFunction(IStaking.unstake.selector, "unstake");
|
286
|
+
functions[8] = toFunction(IStaking.restake.selector, "restake");
|
287
|
+
functions[9] = toFunction(IStaking.updateRewards.selector, "updateRewards");
|
288
|
+
functions[10] = toFunction(IStaking.claimRewards.selector, "claimRewards");
|
289
|
+
functions[11] = toFunction(IStaking.collectDipAmount.selector, "collectDipAmount");
|
290
|
+
functions[12] = toFunction(IStaking.transferDipAmount.selector, "transferDipAmount");
|
291
|
+
_authorizeTargetFunctions(_staking, stakingServiceRoleId, functions);
|
292
|
+
|
293
|
+
// staking function authorization for pool service
|
294
|
+
RoleId poolServiceRoleId = RoleIdLib.roleForTypeAndAllVersions(POOL());
|
295
|
+
_createRole(poolServiceRoleId, ADMIN_ROLE(), POOL_SERVICE_ROLE_NAME, isCustom, 1, true);
|
296
|
+
|
297
|
+
// staking function authorizations
|
298
|
+
functions = new FunctionInfo[](2);
|
299
|
+
functions[0] = toFunction(IStaking.increaseTotalValueLocked.selector, "increaseTotalValueLocked");
|
300
|
+
functions[1] = toFunction(IStaking.decreaseTotalValueLocked.selector, "decreaseTotalValueLocked");
|
301
|
+
_authorizeTargetFunctions(_staking, poolServiceRoleId, functions);
|
302
|
+
|
303
|
+
// staking store function authorizations
|
304
|
+
RoleId stakingRoleId = RoleIdLib.roleForType(STAKING());
|
305
|
+
_createRole(stakingRoleId, ADMIN_ROLE(), STAKING_TARGET_NAME, isCustom, 1, true);
|
306
|
+
_grantRoleToAccount(stakingRoleId, _staking);
|
307
|
+
|
308
|
+
functions = new FunctionInfo[](14);
|
309
|
+
functions[0] = toFunction(StakingStore.setStakingRate.selector, "setStakingRate");
|
310
|
+
functions[1] = toFunction(StakingStore.createTarget.selector, "createTarget");
|
311
|
+
functions[2] = toFunction(StakingStore.updateTarget.selector, "updateTarget");
|
312
|
+
functions[3] = toFunction(StakingStore.increaseReserves.selector, "increaseReserves");
|
313
|
+
functions[4] = toFunction(StakingStore.decreaseReserves.selector, "decreaseReserves");
|
314
|
+
functions[5] = toFunction(StakingStore.increaseTotalValueLocked.selector, "increaseTotalValueLocked");
|
315
|
+
functions[6] = toFunction(StakingStore.decreaseTotalValueLocked.selector, "decreaseTotalValueLocked");
|
316
|
+
functions[7] = toFunction(StakingStore.create.selector, "create");
|
317
|
+
functions[8] = toFunction(StakingStore.update.selector, "update");
|
318
|
+
functions[9] = toFunction(StakingStore.increaseStake.selector, "increaseStake");
|
319
|
+
functions[10] = toFunction(StakingStore.restakeRewards.selector, "restakeRewards");
|
320
|
+
functions[11] = toFunction(StakingStore.updateRewards.selector, "updateRewards");
|
321
|
+
functions[12] = toFunction(StakingStore.claimUpTo.selector, "claimUpTo");
|
322
|
+
functions[13] = toFunction(StakingStore.unstakeUpTo.selector, "unstakeUpTo");
|
323
|
+
_authorizeTargetFunctions(_stakingStore, stakingRoleId, functions);
|
236
324
|
}
|
237
325
|
}
|
@@ -37,11 +37,6 @@ contract RegistryService is
|
|
37
37
|
// TODO update to real hash when registry is stable
|
38
38
|
bytes32 public constant REGISTRY_CREATION_CODE_HASH = bytes32(0);
|
39
39
|
|
40
|
-
// From IService
|
41
|
-
function getDomain() public pure override returns(ObjectType serviceDomain) {
|
42
|
-
return REGISTRY();
|
43
|
-
}
|
44
|
-
|
45
40
|
// from Versionable
|
46
41
|
|
47
42
|
/// @dev top level initializer
|
@@ -263,4 +258,9 @@ contract RegistryService is
|
|
263
258
|
revert ErrorRegistryServiceObjectOwnerRegistered(info.objectType, owner);
|
264
259
|
}
|
265
260
|
}
|
261
|
+
|
262
|
+
// From IService
|
263
|
+
function _getDomain() internal override pure returns(ObjectType serviceDomain) {
|
264
|
+
return REGISTRY();
|
265
|
+
}
|
266
266
|
}
|
@@ -1,14 +1,9 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {AccessManager} from "@openzeppelin/contracts/access/manager/AccessManager.sol";
|
5
|
-
|
6
|
-
import {Registry} from "./Registry.sol";
|
7
4
|
import {IVersionable} from "../shared/IVersionable.sol";
|
8
5
|
import {ProxyManager} from "../shared/ProxyManager.sol";
|
9
6
|
import {RegistryService} from "./RegistryService.sol";
|
10
|
-
import {TokenRegistry} from "./TokenRegistry.sol";
|
11
|
-
|
12
7
|
|
13
8
|
contract RegistryServiceManager is
|
14
9
|
ProxyManager
|