@etherisc/gif-next 0.0.2-9e6b423-414 → 0.0.2-9f51324-299
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/accounting/AccountingService.sol/AccountingService.dbg.json +1 -1
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.json +2 -2
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.json +2 -2
- package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.json +97 -267
- package/artifacts/contracts/authorization/AccessAdmin.sol/IAccessManagedChecker.dbg.json +4 -0
- package/artifacts/contracts/authorization/AccessAdmin.sol/IAccessManagedChecker.json +24 -0
- package/artifacts/contracts/authorization/AccessAdminLib.sol/AccessAdminLib.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessAdminLib.sol/AccessAdminLib.json +36 -652
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.json +2 -2
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.json +47 -222
- 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/IAccessAdmin.sol/IAccessAdmin.json +27 -175
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.json +12 -85
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.json +16 -246
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.json +27 -420
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +3 -3
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +60 -221
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +114 -167
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +60 -72
- 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 +0 -29
- package/artifacts/contracts/examples/fire/DamageLevel.sol/DamageLevelLib.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.json +2 -2
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.json +59 -220
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.json +2 -2
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.json +59 -220
- package/artifacts/contracts/examples/fire/FireUSD.sol/FireUSD.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.json +3 -3
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.json +59 -220
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.json +2 -2
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.json +2 -2
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.json +59 -220
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.json +2 -2
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.json +59 -220
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.dbg.json +1 -1
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.json +2 -2
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +32 -310
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +0 -182
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +72 -322
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +292 -605
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +56 -242
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +290 -478
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +26 -208
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +14 -14
- 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/RiskSet.sol/RiskSet.dbg.json +1 -1
- package/artifacts/contracts/instance/RiskSet.sol/RiskSet.json +2 -2
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.json +2 -2
- package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.json +2 -2
- package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.json +2 -2
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.json +2 -2
- package/artifacts/contracts/instance/base/ObjectSetHelperLib.sol/ObjectSetHelperLib.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectSetHelperLib.sol/ObjectSetHelperLib.json +2 -2
- 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 +56 -234
- 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 +59 -220
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +108 -92
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +55 -31
- 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/PoolLib.sol/PoolLib.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolLib.sol/PoolLib.json +26 -92
- 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 +36 -60
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +19 -15
- 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 +59 -220
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +78 -78
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +40 -40
- 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/IRiskService.sol/IRiskService.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/PolicyServiceLib.sol/PolicyServiceLib.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.json +26 -82
- 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/RiskService.sol/RiskService.dbg.json +1 -1
- package/artifacts/contracts/product/RiskService.sol/RiskService.json +2 -2
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.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/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/IRelease.sol/IRelease.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 +2 -2
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +249 -378
- package/artifacts/contracts/registry/RegistryAuthorization.sol/RegistryAuthorization.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAuthorization.sol/RegistryAuthorization.json +68 -243
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +18 -18
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +10 -10
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.json +186 -384
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.json +2 -2
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.json +76 -128
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +26 -437
- 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 +54 -54
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +28 -28
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +1 -1
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.dbg.json +1 -1
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.json +45 -16
- package/artifacts/contracts/shared/ContractLib.sol/IInstanceAdminHelper.dbg.json +1 -1
- package/artifacts/contracts/shared/ContractLib.sol/ITargetHelper.dbg.json +1 -1
- package/artifacts/contracts/shared/ContractLib.sol/ITokenRegistryHelper.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/InitializableERC165.sol/InitializableERC165.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 +1 -1
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.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/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +2 -2
- package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +2 -2
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.json +2 -2
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.json +2 -2
- 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/Staking.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.json +8 -8
- package/artifacts/contracts/staking/StakingLib.sol/StakingLib.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingLib.sol/StakingLib.json +2 -2
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.json +2 -2
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +5 -5
- 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 +2 -2
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +3 -3
- 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/Key32Set.sol/LibKey32Set.dbg.json +1 -1
- package/artifacts/contracts/type/Key32Set.sol/LibKey32Set.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 +6 -6
- 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 +2 -2
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.json +2 -2
- 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 +218 -39
- 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/String.sol/StrLib.json +2 -50
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.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/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.json +2 -2
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +1 -1
- package/contracts/authorization/AccessAdmin.sol +185 -261
- package/contracts/authorization/AccessAdminLib.sol +7 -220
- package/contracts/authorization/Authorization.sol +229 -38
- package/contracts/authorization/IAccess.sol +4 -14
- package/contracts/authorization/IAccessAdmin.sol +45 -19
- package/contracts/authorization/IAuthorization.sol +56 -3
- package/contracts/authorization/IServiceAuthorization.sol +17 -55
- package/contracts/authorization/ServiceAuthorization.sol +33 -247
- package/contracts/distribution/BasicDistributionAuthorization.sol +4 -11
- package/contracts/distribution/Distribution.sol +1 -2
- package/contracts/distribution/DistributionService.sol +33 -75
- package/contracts/distribution/IDistributionComponent.sol +1 -3
- package/contracts/distribution/IDistributionService.sol +4 -10
- package/contracts/instance/IInstance.sol +4 -43
- package/contracts/instance/IInstanceService.sol +3 -28
- package/contracts/instance/Instance.sol +39 -80
- package/contracts/instance/InstanceAdmin.sol +229 -162
- package/contracts/instance/InstanceAuthorizationV3.sol +28 -58
- package/contracts/instance/InstanceReader.sol +389 -371
- package/contracts/instance/InstanceService.sol +53 -105
- package/contracts/oracle/BasicOracleAuthorization.sol +2 -18
- package/contracts/pool/BasicPoolAuthorization.sol +3 -9
- package/contracts/pool/BundleService.sol +9 -8
- package/contracts/pool/PoolLib.sol +0 -44
- package/contracts/product/ApplicationService.sol +26 -4
- package/contracts/product/BasicProductAuthorization.sol +4 -9
- package/contracts/product/ClaimService.sol +20 -11
- package/contracts/product/PolicyService.sol +2 -2
- package/contracts/product/PolicyServiceLib.sol +0 -20
- package/contracts/registry/RegistryAdmin.sol +97 -27
- package/contracts/registry/RegistryAuthorization.sol +25 -35
- package/contracts/registry/ReleaseAdmin.sol +100 -42
- package/contracts/registry/ReleaseRegistry.sol +9 -12
- package/contracts/registry/ServiceAuthorizationV3.sol +20 -32
- package/contracts/registry/TokenRegistry.sol +4 -2
- package/contracts/shared/ComponentService.sol +5 -22
- package/contracts/shared/ContractLib.sol +45 -9
- package/contracts/shared/IRegisterable.sol +1 -0
- package/contracts/shared/Service.sol +4 -6
- package/contracts/staking/Staking.sol +5 -4
- package/contracts/staking/TargetManagerLib.sol +1 -1
- package/contracts/type/ObjectType.sol +3 -16
- package/contracts/type/RoleId.sol +59 -57
- package/contracts/type/String.sol +0 -12
- package/contracts/upgradeability/ProxyManager.sol +2 -2
- package/contracts/upgradeability/Versionable.sol +1 -4
- package/package.json +1 -1
@@ -2,6 +2,7 @@
|
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
4
|
import {IAuthorization} from "../authorization/IAuthorization.sol";
|
5
|
+
import {IComponent} from "../shared/IComponent.sol";
|
5
6
|
import {IRegistry} from "./IRegistry.sol";
|
6
7
|
import {IService} from "../shared/IService.sol";
|
7
8
|
import {IStaking} from "../staking/IStaking.sol";
|
@@ -9,10 +10,16 @@ import {IStaking} from "../staking/IStaking.sol";
|
|
9
10
|
import {AccessAdmin} from "../authorization/AccessAdmin.sol";
|
10
11
|
import {AccessAdminLib} from "../authorization/AccessAdminLib.sol";
|
11
12
|
import {AccessManagerCloneable} from "../authorization/AccessManagerCloneable.sol";
|
12
|
-
import {
|
13
|
-
import {
|
14
|
-
import {
|
15
|
-
import {
|
13
|
+
import {ContractLib} from "../shared/ContractLib.sol";
|
14
|
+
import {ObjectType, REGISTRY, STAKING, POOL, RELEASE} from "../type/ObjectType.sol";
|
15
|
+
import {ReleaseRegistry} from "./ReleaseRegistry.sol";
|
16
|
+
import {RoleId, RoleIdLib, ADMIN_ROLE, GIF_MANAGER_ROLE, GIF_ADMIN_ROLE, PUBLIC_ROLE} from "../type/RoleId.sol";
|
17
|
+
import {Staking} from "../staking/Staking.sol";
|
18
|
+
import {Str, StrLib} from "../type/String.sol";
|
19
|
+
import {StakingStore} from "../staking/StakingStore.sol";
|
20
|
+
import {TokenHandler} from "../shared/TokenHandler.sol";
|
21
|
+
import {TokenRegistry} from "./TokenRegistry.sol";
|
22
|
+
import {VersionPart, VersionPartLib} from "../type/Version.sol";
|
16
23
|
|
17
24
|
/*
|
18
25
|
1) GIF_MANAGER_ROLE
|
@@ -37,6 +44,14 @@ contract RegistryAdmin is
|
|
37
44
|
/// @dev gif core roles
|
38
45
|
string public constant GIF_ADMIN_ROLE_NAME = "GifAdminRole";
|
39
46
|
string public constant GIF_MANAGER_ROLE_NAME = "GifManagerRole";
|
47
|
+
string public constant RELEASE_REGISTRY_ROLE_NAME = "ReleaseRegistryRole";
|
48
|
+
string public constant STAKING_ROLE_NAME = "StakingRole";
|
49
|
+
|
50
|
+
/// @dev gif roles for external contracts
|
51
|
+
string public constant REGISTRY_SERVICE_ROLE_NAME = "RegistryServiceRole";
|
52
|
+
string public constant COMPONENT_SERVICE_ROLE_NAME = "ComponentServiceRole";
|
53
|
+
string public constant POOL_SERVICE_ROLE_NAME = "PoolServiceRole";
|
54
|
+
string public constant STAKING_SERVICE_ROLE_NAME = "StakingServiceRole";
|
40
55
|
|
41
56
|
/// @dev gif core targets
|
42
57
|
string public constant REGISTRY_ADMIN_TARGET_NAME = "RegistryAdmin";
|
@@ -67,7 +82,6 @@ contract RegistryAdmin is
|
|
67
82
|
function completeSetup(
|
68
83
|
address registry,
|
69
84
|
address authorization,
|
70
|
-
VersionPart release,
|
71
85
|
address gifAdmin,
|
72
86
|
address gifManager
|
73
87
|
)
|
@@ -77,14 +91,15 @@ contract RegistryAdmin is
|
|
77
91
|
onlyDeployer()
|
78
92
|
{
|
79
93
|
// checks
|
80
|
-
|
94
|
+
_checkRegistry(registry);
|
81
95
|
|
96
|
+
VersionPart release = VersionPartLib.toVersionPart(3);
|
82
97
|
AccessManagerCloneable(
|
83
98
|
authority()).completeSetup(
|
84
99
|
registry,
|
85
100
|
release);
|
86
101
|
|
87
|
-
_checkAuthorization(authorization, REGISTRY(), release,
|
102
|
+
_checkAuthorization(authorization, REGISTRY(), release, true);
|
88
103
|
|
89
104
|
_registry = registry;
|
90
105
|
_authorization = IAuthorization(authorization);
|
@@ -99,19 +114,19 @@ contract RegistryAdmin is
|
|
99
114
|
// link nft ownability to registry
|
100
115
|
_linkToNftOwnable(_registry);
|
101
116
|
|
102
|
-
|
103
|
-
_createCoreTargets(_authorization.getMainTargetName());
|
117
|
+
_setupRegistry(_registry);
|
104
118
|
|
105
|
-
// setup
|
119
|
+
// setup authorization for registry and supporting contracts
|
106
120
|
_createRoles(_authorization);
|
107
121
|
_grantRoleToAccount(GIF_ADMIN_ROLE(), gifAdmin);
|
108
122
|
_grantRoleToAccount(GIF_MANAGER_ROLE(), gifManager);
|
109
123
|
|
110
|
-
|
124
|
+
_createTargets(_authorization);
|
111
125
|
_createTargetAuthorizations(_authorization);
|
112
126
|
}
|
113
127
|
|
114
128
|
|
129
|
+
|
115
130
|
function grantServiceRoleForAllVersions(
|
116
131
|
IService service,
|
117
132
|
ObjectType domain
|
@@ -120,53 +135,83 @@ contract RegistryAdmin is
|
|
120
135
|
restricted()
|
121
136
|
{
|
122
137
|
_grantRoleToAccount(
|
123
|
-
RoleIdLib.
|
138
|
+
RoleIdLib.roleForTypeAndAllVersions(domain),
|
124
139
|
address(service));
|
125
140
|
}
|
126
141
|
|
127
142
|
//--- view functions ----------------------------------------------------//
|
128
143
|
|
129
|
-
function getGifAdminRole() external
|
144
|
+
function getGifAdminRole() external view returns (RoleId) {
|
130
145
|
return GIF_ADMIN_ROLE();
|
131
146
|
}
|
132
147
|
|
133
|
-
function getGifManagerRole() external
|
148
|
+
function getGifManagerRole() external view returns (RoleId) {
|
134
149
|
return GIF_MANAGER_ROLE();
|
135
150
|
}
|
136
151
|
|
137
152
|
//--- private initialization functions -------------------------------------------//
|
138
153
|
|
154
|
+
// create registry role and target
|
155
|
+
function _setupRegistry(address registry) internal {
|
156
|
+
|
157
|
+
// create registry role
|
158
|
+
RoleId roleId = _authorization.getTargetRole(
|
159
|
+
_authorization.getMainTarget());
|
160
|
+
|
161
|
+
_createRole(
|
162
|
+
roleId,
|
163
|
+
_authorization.getRoleInfo(roleId));
|
164
|
+
|
165
|
+
// create registry target
|
166
|
+
_createTarget(
|
167
|
+
registry,
|
168
|
+
_authorization.getMainTargetName(),
|
169
|
+
true, // checkAuthority
|
170
|
+
false); // custom
|
171
|
+
|
172
|
+
// assign registry role to registry
|
173
|
+
_grantRoleToAccount(
|
174
|
+
roleId,
|
175
|
+
registry);
|
176
|
+
}
|
177
|
+
|
178
|
+
|
139
179
|
function _createRoles(IAuthorization authorization)
|
140
180
|
internal
|
141
181
|
{
|
142
182
|
RoleId[] memory roles = authorization.getRoles();
|
183
|
+
RoleId mainTargetRoleId = authorization.getTargetRole(
|
184
|
+
authorization.getMainTarget());
|
185
|
+
|
186
|
+
RoleId roleId;
|
187
|
+
RoleInfo memory roleInfo;
|
143
188
|
|
144
189
|
for(uint256 i = 0; i < roles.length; i++) {
|
145
|
-
RoleId roleId = roles[i];
|
146
|
-
RoleInfo memory roleInfo = authorization.getRoleInfo(roleId);
|
147
190
|
|
148
|
-
|
149
|
-
|
191
|
+
roleId = roles[i];
|
192
|
+
|
193
|
+
// skip main target role, create role if not exists
|
194
|
+
if (roleId != mainTargetRoleId && !roleExists(roleId)) {
|
150
195
|
_createRole(
|
151
196
|
roleId,
|
152
|
-
|
197
|
+
authorization.getRoleInfo(roleId));
|
153
198
|
}
|
154
199
|
}
|
155
200
|
}
|
156
201
|
|
157
202
|
|
158
|
-
function
|
203
|
+
function _createTargets(IAuthorization authorization)
|
159
204
|
internal
|
160
205
|
{
|
161
206
|
// registry
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
_createUncheckedTarget(_tokenRegistry, TOKEN_REGISTRY_TARGET_NAME, TargetType.Core);
|
207
|
+
_createTargetWithRole(address(this), REGISTRY_ADMIN_TARGET_NAME, authorization.getTargetRole(StrLib.toStr(REGISTRY_ADMIN_TARGET_NAME)));
|
208
|
+
_createTargetWithRole(_releaseRegistry, RELEASE_REGISTRY_TARGET_NAME, authorization.getTargetRole(StrLib.toStr(RELEASE_REGISTRY_TARGET_NAME)));
|
209
|
+
_createTargetWithRole(_tokenRegistry, TOKEN_REGISTRY_TARGET_NAME, authorization.getTargetRole(StrLib.toStr(TOKEN_REGISTRY_TARGET_NAME)));
|
166
210
|
|
167
211
|
// staking
|
168
|
-
|
169
|
-
|
212
|
+
_createTargetWithRole(_staking, STAKING_TARGET_NAME, authorization.getTargetRole(StrLib.toStr(STAKING_TARGET_NAME)));
|
213
|
+
_createTarget(_stakingStore, STAKING_STORE_TARGET_NAME, true, false);
|
214
|
+
_createTarget(address(IComponent(_staking).getTokenHandler()), STAKING_TH_TARGET_NAME, true, false);
|
170
215
|
}
|
171
216
|
|
172
217
|
|
@@ -179,10 +224,35 @@ contract RegistryAdmin is
|
|
179
224
|
for(uint256 i = 0; i < targets.length; i++) {
|
180
225
|
target = targets[i];
|
181
226
|
RoleId[] memory authorizedRoles = authorization.getAuthorizedRoles(target);
|
227
|
+
RoleId authorizedRole;
|
182
228
|
|
183
229
|
for(uint256 j = 0; j < authorizedRoles.length; j++) {
|
184
|
-
|
230
|
+
authorizedRole = authorizedRoles[j];
|
231
|
+
|
232
|
+
_authorizeTargetFunctions(
|
233
|
+
getTargetForName(target),
|
234
|
+
authorizedRole,
|
235
|
+
authorization.getAuthorizedFunctions(
|
236
|
+
target,
|
237
|
+
authorizedRole));
|
185
238
|
}
|
186
239
|
}
|
187
240
|
}
|
241
|
+
|
242
|
+
|
243
|
+
function _createTargets(address authorization)
|
244
|
+
private
|
245
|
+
onlyInitializing()
|
246
|
+
{
|
247
|
+
IStaking staking = IStaking(_staking);
|
248
|
+
address tokenHandler = address(staking.getTokenHandler());
|
249
|
+
|
250
|
+
_createTarget(address(this), REGISTRY_ADMIN_TARGET_NAME, false, false);
|
251
|
+
_createTarget(_registry, REGISTRY_TARGET_NAME, true, false);
|
252
|
+
_createTarget(_releaseRegistry, RELEASE_REGISTRY_TARGET_NAME, true, false);
|
253
|
+
_createTarget(_staking, STAKING_TARGET_NAME, true, false);
|
254
|
+
_createTarget(_stakingStore, STAKING_STORE_TARGET_NAME, true, false);
|
255
|
+
_createTarget(_tokenRegistry, TOKEN_REGISTRY_TARGET_NAME, true, false);
|
256
|
+
_createTarget(tokenHandler, TOKEN_HANDLER_TARGET_NAME, true, false);
|
257
|
+
}
|
188
258
|
}
|
@@ -14,7 +14,6 @@ import {RoleIdLib, ADMIN_ROLE, GIF_ADMIN_ROLE, GIF_MANAGER_ROLE} from "../type/R
|
|
14
14
|
import {StakingStore} from "../staking/StakingStore.sol";
|
15
15
|
import {TokenHandler} from "../shared/TokenHandler.sol";
|
16
16
|
import {TokenRegistry} from "../registry/TokenRegistry.sol";
|
17
|
-
import {VersionPartLib} from "../type/Version.sol";
|
18
17
|
|
19
18
|
|
20
19
|
contract RegistryAuthorization
|
@@ -40,48 +39,39 @@ contract RegistryAuthorization
|
|
40
39
|
string public constant TOKEN_REGISTRY_TARGET_NAME = "TokenRegistry";
|
41
40
|
|
42
41
|
string public constant STAKING_TARGET_NAME = "Staking";
|
43
|
-
string public constant STAKING_TH_TARGET_NAME = "
|
42
|
+
string public constant STAKING_TH_TARGET_NAME = "StakingTH";
|
44
43
|
string public constant STAKING_STORE_TARGET_NAME = "StakingStore";
|
45
44
|
|
46
|
-
constructor(
|
47
|
-
Authorization(
|
48
|
-
REGISTRY_TARGET_NAME,
|
49
|
-
REGISTRY(),
|
50
|
-
3,
|
51
|
-
commitHash,
|
52
|
-
false, // isComponent
|
53
|
-
false) // includeTokenHandler
|
45
|
+
constructor()
|
46
|
+
Authorization(REGISTRY_TARGET_NAME, REGISTRY(), false, false)
|
54
47
|
{ }
|
55
48
|
|
56
49
|
/// @dev Sets up the GIF admin and manager roles.
|
57
50
|
function _setupRoles() internal override {
|
58
51
|
|
59
|
-
//
|
60
|
-
uint32 maxReleases = uint32(VersionPartLib.releaseMax().toInt());
|
61
|
-
|
62
|
-
// service roles (for all releases)
|
52
|
+
// service roles (for all versions)
|
63
53
|
_addRole(
|
64
|
-
RoleIdLib.
|
54
|
+
RoleIdLib.roleForTypeAndAllVersions(REGISTRY()),
|
65
55
|
_toRoleInfo({
|
66
56
|
adminRoleId: ADMIN_ROLE(),
|
67
|
-
roleType: RoleType.
|
68
|
-
maxMemberCount:
|
57
|
+
roleType: RoleType.Gif,
|
58
|
+
maxMemberCount: 999, // max member count = max
|
69
59
|
name: REGISTRY_SERVICE_ROLE_NAME}));
|
70
60
|
|
71
61
|
_addRole(
|
72
|
-
RoleIdLib.
|
62
|
+
RoleIdLib.roleForTypeAndAllVersions(STAKING()),
|
73
63
|
_toRoleInfo({
|
74
64
|
adminRoleId: ADMIN_ROLE(),
|
75
|
-
roleType: RoleType.
|
76
|
-
maxMemberCount:
|
65
|
+
roleType: RoleType.Gif,
|
66
|
+
maxMemberCount: 999, // max member count = max
|
77
67
|
name: STAKING_SERVICE_ROLE_NAME}));
|
78
68
|
|
79
69
|
_addRole(
|
80
|
-
RoleIdLib.
|
70
|
+
RoleIdLib.roleForTypeAndAllVersions(POOL()),
|
81
71
|
_toRoleInfo({
|
82
72
|
adminRoleId: ADMIN_ROLE(),
|
83
|
-
roleType: RoleType.
|
84
|
-
maxMemberCount:
|
73
|
+
roleType: RoleType.Gif,
|
74
|
+
maxMemberCount: 999, // max member count = max
|
85
75
|
name: POOL_SERVICE_ROLE_NAME}));
|
86
76
|
|
87
77
|
// gif admin role
|
@@ -89,7 +79,7 @@ contract RegistryAuthorization
|
|
89
79
|
GIF_ADMIN_ROLE(),
|
90
80
|
_toRoleInfo({
|
91
81
|
adminRoleId: ADMIN_ROLE(),
|
92
|
-
roleType: RoleType.
|
82
|
+
roleType: RoleType.Gif,
|
93
83
|
maxMemberCount: 2, // TODO decide on max member count
|
94
84
|
name: GIF_ADMIN_ROLE_NAME}));
|
95
85
|
|
@@ -98,7 +88,7 @@ contract RegistryAuthorization
|
|
98
88
|
GIF_MANAGER_ROLE(),
|
99
89
|
_toRoleInfo({
|
100
90
|
adminRoleId: ADMIN_ROLE(),
|
101
|
-
roleType: RoleType.
|
91
|
+
roleType: RoleType.Gif,
|
102
92
|
maxMemberCount: 1, // TODO decide on max member count
|
103
93
|
name: GIF_MANAGER_ROLE_NAME}));
|
104
94
|
|
@@ -106,13 +96,13 @@ contract RegistryAuthorization
|
|
106
96
|
|
107
97
|
/// @dev Sets up the relevant (non-service) targets for the registry.
|
108
98
|
function _setupTargets() internal override {
|
109
|
-
|
110
|
-
|
111
|
-
|
99
|
+
_addGifContractTarget(REGISTRY_ADMIN_TARGET_NAME);
|
100
|
+
_addGifContractTarget(RELEASE_REGISTRY_TARGET_NAME);
|
101
|
+
_addGifContractTarget(TOKEN_REGISTRY_TARGET_NAME);
|
112
102
|
|
113
|
-
|
114
|
-
|
115
|
-
|
103
|
+
_addGifContractTarget(STAKING_TARGET_NAME);
|
104
|
+
_addGifContractTarget(STAKING_TH_TARGET_NAME);
|
105
|
+
_addTarget(STAKING_STORE_TARGET_NAME);
|
116
106
|
}
|
117
107
|
|
118
108
|
|
@@ -144,7 +134,7 @@ contract RegistryAuthorization
|
|
144
134
|
// registry service role
|
145
135
|
functions = _authorizeForTarget(
|
146
136
|
REGISTRY_TARGET_NAME,
|
147
|
-
RoleIdLib.
|
137
|
+
RoleIdLib.roleForTypeAndAllVersions(REGISTRY()));
|
148
138
|
|
149
139
|
_authorize(functions, IRegistry.register.selector, "register");
|
150
140
|
_authorize(functions, IRegistry.registerWithCustomType.selector, "registerWithCustomType");
|
@@ -211,7 +201,7 @@ contract RegistryAuthorization
|
|
211
201
|
// staking service role
|
212
202
|
functions = _authorizeForTarget(
|
213
203
|
STAKING_TARGET_NAME,
|
214
|
-
RoleIdLib.
|
204
|
+
RoleIdLib.roleForTypeAndAllVersions(STAKING()));
|
215
205
|
|
216
206
|
_authorize(functions, IStaking.registerTarget.selector, "registerTarget");
|
217
207
|
_authorize(functions, IStaking.setLockingPeriod.selector, "setLockingPeriod");
|
@@ -229,7 +219,7 @@ contract RegistryAuthorization
|
|
229
219
|
// pool service role
|
230
220
|
functions = _authorizeForTarget(
|
231
221
|
STAKING_TARGET_NAME,
|
232
|
-
RoleIdLib.
|
222
|
+
RoleIdLib.roleForTypeAndAllVersions(POOL()));
|
233
223
|
|
234
224
|
_authorize(functions, IStaking.increaseTotalValueLocked.selector, "increaseTotalValueLocked");
|
235
225
|
_authorize(functions, IStaking.decreaseTotalValueLocked.selector, "decreaseTotalValueLocked");
|
@@ -242,7 +232,7 @@ contract RegistryAuthorization
|
|
242
232
|
// staking service role
|
243
233
|
functions = _authorizeForTarget(
|
244
234
|
STAKING_TH_TARGET_NAME,
|
245
|
-
RoleIdLib.
|
235
|
+
RoleIdLib.roleForTypeAndAllVersions(STAKING()));
|
246
236
|
|
247
237
|
_authorize(functions, TokenHandler.approve.selector, "approve");
|
248
238
|
_authorize(functions, TokenHandler.pullToken.selector, "pullToken");
|
@@ -1,20 +1,16 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {IAccess} from "../authorization/IAccess.sol";
|
5
|
-
import {IAuthorization} from "../authorization/IAuthorization.sol";
|
6
|
-
import {IService} from "../shared/IService.sol";
|
7
|
-
import {IServiceAuthorization} from "../authorization/IServiceAuthorization.sol";
|
8
|
-
|
9
4
|
import {AccessAdmin} from "../authorization/AccessAdmin.sol";
|
10
5
|
import {AccessAdminLib} from "../authorization/AccessAdminLib.sol";
|
11
6
|
import {AccessManagerCloneable} from "../authorization/AccessManagerCloneable.sol";
|
12
|
-
import {
|
13
|
-
import {
|
14
|
-
import {
|
7
|
+
import {IAccess} from "../authorization/IAccess.sol";
|
8
|
+
import {IService} from "../shared/IService.sol";
|
9
|
+
import {IServiceAuthorization} from "../authorization/IServiceAuthorization.sol";
|
10
|
+
import {ObjectType, ObjectTypeLib, ALL} from "../type/ObjectType.sol";
|
11
|
+
import {RoleId, RoleIdLib, ADMIN_ROLE, RELEASE_REGISTRY_ROLE, PUBLIC_ROLE} from "../type/RoleId.sol";
|
15
12
|
import {VersionPart} from "../type/Version.sol";
|
16
13
|
|
17
|
-
|
18
14
|
/// @dev The ReleaseAdmin contract implements the central authorization for the services of a specific release.
|
19
15
|
/// There is one ReleaseAdmin contract per major GIF release.
|
20
16
|
/// Locking/unlocking of all services of a release is implemented in function setReleaseLocked.
|
@@ -29,13 +25,11 @@ contract ReleaseAdmin is
|
|
29
25
|
error ErrorReleaseAdminReleaseLockAlreadySetTo(bool locked);
|
30
26
|
|
31
27
|
/// @dev release core roles
|
32
|
-
string public constant RELEASE_REGISTRY_ROLE_NAME = "
|
28
|
+
string public constant RELEASE_REGISTRY_ROLE_NAME = "ReleaseRegistryRole";
|
33
29
|
|
34
30
|
/// @dev release core targets
|
35
31
|
string public constant RELEASE_ADMIN_TARGET_NAME = "ReleaseAdmin";
|
36
32
|
|
37
|
-
IServiceAuthorization internal _serviceAuthorization;
|
38
|
-
|
39
33
|
|
40
34
|
modifier onlyReleaseRegistry() {
|
41
35
|
(bool isMember, ) = _authority.hasRole(RELEASE_REGISTRY_ROLE().toInt(), msg.sender);
|
@@ -45,7 +39,6 @@ contract ReleaseAdmin is
|
|
45
39
|
_;
|
46
40
|
}
|
47
41
|
|
48
|
-
|
49
42
|
// @dev Only used for master release admin
|
50
43
|
constructor(address accessManager) {
|
51
44
|
initialize(
|
@@ -56,40 +49,32 @@ contract ReleaseAdmin is
|
|
56
49
|
|
57
50
|
function completeSetup(
|
58
51
|
address registry,
|
59
|
-
address
|
60
|
-
VersionPart release
|
61
|
-
address releaseRegistry
|
52
|
+
address releaseRegistry,
|
53
|
+
VersionPart release
|
62
54
|
)
|
63
55
|
external
|
64
56
|
reinitializer(uint64(release.toInt()))
|
65
57
|
{
|
66
58
|
|
67
59
|
// checks
|
68
|
-
|
60
|
+
_checkRegistry(registry);
|
69
61
|
|
70
62
|
AccessManagerCloneable(
|
71
63
|
authority()).completeSetup(
|
72
64
|
registry,
|
73
|
-
release);
|
74
|
-
|
75
|
-
IServiceAuthorization serviceAuthorization = IServiceAuthorization(authorization);
|
76
|
-
_checkAuthorization(address(serviceAuthorization), RELEASE(), release, true, true);
|
77
|
-
_serviceAuthorization = serviceAuthorization;
|
65
|
+
release);
|
78
66
|
|
79
67
|
// link nft ownability to registry
|
80
68
|
_linkToNftOwnable(registry);
|
81
69
|
|
82
|
-
// setup release contract
|
83
70
|
_setupReleaseRegistry(releaseRegistry);
|
84
|
-
|
85
|
-
// relase services will be authorized one by one via authorizeService()
|
86
71
|
}
|
87
72
|
|
88
|
-
|
89
73
|
/// @dev Sets up authorizaion for specified service.
|
90
74
|
/// For all authorized services its authorized functions are enabled.
|
91
75
|
/// Permissioned function: Access is restricted to release registry.
|
92
76
|
function authorizeService(
|
77
|
+
IServiceAuthorization serviceAuthorization,
|
93
78
|
IService service,
|
94
79
|
ObjectType serviceDomain,
|
95
80
|
VersionPart release
|
@@ -98,20 +83,9 @@ contract ReleaseAdmin is
|
|
98
83
|
restricted()
|
99
84
|
{
|
100
85
|
_createServiceTargetAndRole(service, serviceDomain, release);
|
101
|
-
|
102
|
-
// authorize functions of service
|
103
|
-
Str serviceTarget = _serviceAuthorization.getServiceTarget(serviceDomain);
|
104
|
-
RoleId[] memory authorizedRoles = _serviceAuthorization.getAuthorizedRoles(serviceTarget);
|
105
|
-
|
106
|
-
for (uint256 i = 0; i < authorizedRoles.length; i++) {
|
107
|
-
_authorizeFunctions(
|
108
|
-
IAuthorization(address(_serviceAuthorization)),
|
109
|
-
serviceTarget,
|
110
|
-
authorizedRoles[i]);
|
111
|
-
}
|
86
|
+
_authorizeServiceFunctions(serviceAuthorization, service, serviceDomain, release);
|
112
87
|
}
|
113
88
|
|
114
|
-
|
115
89
|
/// @dev Locks/unlocks all release targets.
|
116
90
|
/// For all authorized services of release its authorized functions are disabled/enabled.
|
117
91
|
/// Permissioned function: Access is restricted to release registry.
|
@@ -132,7 +106,6 @@ contract ReleaseAdmin is
|
|
132
106
|
emit LogReleaseAdminReleaseLockChanged(getRelease(), locked);
|
133
107
|
}
|
134
108
|
|
135
|
-
|
136
109
|
/// @dev Lock/unlock specific service of release.
|
137
110
|
/// Permissioned function: Access is restricted to release registry.
|
138
111
|
function setServiceLocked(IService service, bool locked)
|
@@ -150,6 +123,13 @@ contract ReleaseAdmin is
|
|
150
123
|
emit LogReleaseAdminServiceLockChanged(service.getRelease(), address(service), locked);
|
151
124
|
}
|
152
125
|
|
126
|
+
//--- view functions ----------------------------------------------------//
|
127
|
+
|
128
|
+
/*
|
129
|
+
function getReleaseAdminRole() external view returns (RoleId) {
|
130
|
+
return GIF_ADMIN_ROLE();
|
131
|
+
}
|
132
|
+
*/
|
153
133
|
//--- private functions -------------------------------------------------//
|
154
134
|
|
155
135
|
function _createServiceTargetAndRole(
|
@@ -165,7 +145,85 @@ contract ReleaseAdmin is
|
|
165
145
|
string memory serviceTargetName = ObjectTypeLib.toVersionedName(
|
166
146
|
baseName, "Service", release);
|
167
147
|
|
168
|
-
|
148
|
+
_createTarget(
|
149
|
+
address(service),
|
150
|
+
serviceTargetName,
|
151
|
+
true,
|
152
|
+
false);
|
153
|
+
|
154
|
+
// create service role
|
155
|
+
RoleId serviceRoleId = RoleIdLib.roleForTypeAndVersion(
|
156
|
+
serviceDomain,
|
157
|
+
release);
|
158
|
+
|
159
|
+
if(!roleExists(serviceRoleId)) {
|
160
|
+
_createRole(
|
161
|
+
serviceRoleId,
|
162
|
+
AccessAdminLib.toRole({
|
163
|
+
adminRoleId: ADMIN_ROLE(),
|
164
|
+
roleType: RoleType.Contract,
|
165
|
+
maxMemberCount: 1,
|
166
|
+
name: ObjectTypeLib.toVersionedName(
|
167
|
+
baseName,
|
168
|
+
"ServiceRole",
|
169
|
+
release)}));
|
170
|
+
}
|
171
|
+
|
172
|
+
_grantRoleToAccount(
|
173
|
+
serviceRoleId,
|
174
|
+
address(service));
|
175
|
+
}
|
176
|
+
|
177
|
+
|
178
|
+
function _authorizeServiceFunctions(
|
179
|
+
IServiceAuthorization serviceAuthorization,
|
180
|
+
IService service,
|
181
|
+
ObjectType serviceDomain,
|
182
|
+
VersionPart release
|
183
|
+
)
|
184
|
+
private
|
185
|
+
{
|
186
|
+
ObjectType authorizedDomain;
|
187
|
+
RoleId authorizedRoleId;
|
188
|
+
|
189
|
+
ObjectType[] memory authorizedDomains = serviceAuthorization.getAuthorizedDomains(serviceDomain);
|
190
|
+
|
191
|
+
for (uint256 i = 0; i < authorizedDomains.length; i++) {
|
192
|
+
authorizedDomain = authorizedDomains[i];
|
193
|
+
|
194
|
+
// derive authorized role from authorized domain
|
195
|
+
if (authorizedDomain == ALL()) {
|
196
|
+
authorizedRoleId = PUBLIC_ROLE();
|
197
|
+
} else {
|
198
|
+
authorizedRoleId = RoleIdLib.roleForTypeAndVersion(
|
199
|
+
authorizedDomain,
|
200
|
+
release);
|
201
|
+
}
|
202
|
+
|
203
|
+
if(!roleExists(authorizedRoleId)) {
|
204
|
+
// create role for authorized domain
|
205
|
+
_createRole(
|
206
|
+
authorizedRoleId,
|
207
|
+
AccessAdminLib.toRole({
|
208
|
+
adminRoleId: ADMIN_ROLE(),
|
209
|
+
roleType: RoleType.Contract,
|
210
|
+
maxMemberCount: 1,
|
211
|
+
name: ObjectTypeLib.toVersionedName(
|
212
|
+
ObjectTypeLib.toName(authorizedDomain),
|
213
|
+
"Role",
|
214
|
+
release)}));
|
215
|
+
}
|
216
|
+
|
217
|
+
// get authorized functions for authorized domain
|
218
|
+
IAccess.FunctionInfo[] memory authorizatedFunctions = serviceAuthorization.getAuthorizedFunctions(
|
219
|
+
serviceDomain,
|
220
|
+
authorizedDomain);
|
221
|
+
|
222
|
+
_authorizeTargetFunctions(
|
223
|
+
address(service),
|
224
|
+
authorizedRoleId,
|
225
|
+
authorizatedFunctions);
|
226
|
+
}
|
169
227
|
}
|
170
228
|
|
171
229
|
//--- private initialization functions -------------------------------------------//
|
@@ -174,7 +232,7 @@ contract ReleaseAdmin is
|
|
174
232
|
private
|
175
233
|
onlyInitializing()
|
176
234
|
{
|
177
|
-
|
235
|
+
_createTarget(address(this), RELEASE_ADMIN_TARGET_NAME, false, false);
|
178
236
|
|
179
237
|
_createRole(
|
180
238
|
RELEASE_REGISTRY_ROLE(),
|
@@ -188,7 +246,7 @@ contract ReleaseAdmin is
|
|
188
246
|
functions = new FunctionInfo[](2);
|
189
247
|
functions[0] = AccessAdminLib.toFunction(ReleaseAdmin.authorizeService.selector, "authorizeService");
|
190
248
|
functions[1] = AccessAdminLib.toFunction(ReleaseAdmin.setServiceLocked.selector, "setServiceLocked");
|
191
|
-
_authorizeTargetFunctions(address(this), RELEASE_REGISTRY_ROLE(), functions
|
249
|
+
_authorizeTargetFunctions(address(this), RELEASE_REGISTRY_ROLE(), functions);
|
192
250
|
|
193
251
|
_grantRoleToAccount(RELEASE_REGISTRY_ROLE(), releaseRegistry);
|
194
252
|
}
|
@@ -150,7 +150,7 @@ contract ReleaseRegistry is
|
|
150
150
|
uint256 serviceDomainsCount = _verifyServiceAuthorization(serviceAuthorization, releaseVersion, salt);
|
151
151
|
|
152
152
|
// create and initialize release admin
|
153
|
-
releaseAdmin = _cloneNewReleaseAdmin(
|
153
|
+
releaseAdmin = _cloneNewReleaseAdmin(releaseVersion);
|
154
154
|
releaseSalt = salt;
|
155
155
|
|
156
156
|
// ensures unique salt
|
@@ -182,8 +182,8 @@ contract ReleaseRegistry is
|
|
182
182
|
checkTransition(_releaseInfo[releaseVersion].state, RELEASE(), DEPLOYING(), DEPLOYED());
|
183
183
|
|
184
184
|
address releaseAuthority = ReleaseAdmin(_releaseInfo[releaseVersion].releaseAdmin).authority();
|
185
|
-
IServiceAuthorization
|
186
|
-
ObjectType expectedDomain =
|
185
|
+
IServiceAuthorization releaseAuth = _releaseInfo[releaseVersion].auth;
|
186
|
+
ObjectType expectedDomain = releaseAuth.getServiceDomain(_registeredServices);
|
187
187
|
|
188
188
|
// service can work with release registry and release version
|
189
189
|
(
|
@@ -216,6 +216,7 @@ contract ReleaseRegistry is
|
|
216
216
|
ReleaseAdmin releaseAdmin = ReleaseAdmin(_releaseInfo[releaseVersion].releaseAdmin);
|
217
217
|
releaseAdmin.setReleaseLocked(false);
|
218
218
|
releaseAdmin.authorizeService(
|
219
|
+
releaseAuth,
|
219
220
|
service,
|
220
221
|
serviceDomain,
|
221
222
|
releaseVersion);
|
@@ -366,10 +367,7 @@ contract ReleaseRegistry is
|
|
366
367
|
_releaseInfo[release].releaseAdmin).setReleaseLocked(locked);
|
367
368
|
}
|
368
369
|
|
369
|
-
function _cloneNewReleaseAdmin(
|
370
|
-
IServiceAuthorization serviceAuthorization,
|
371
|
-
VersionPart release
|
372
|
-
)
|
370
|
+
function _cloneNewReleaseAdmin(VersionPart release)
|
373
371
|
private
|
374
372
|
returns (ReleaseAdmin clonedAdmin)
|
375
373
|
{
|
@@ -379,7 +377,7 @@ contract ReleaseRegistry is
|
|
379
377
|
|
380
378
|
string memory releaseAdminName = string(
|
381
379
|
abi.encodePacked(
|
382
|
-
"
|
380
|
+
"ReleaseAdmin_v",
|
383
381
|
release.toString()));
|
384
382
|
|
385
383
|
clonedAdmin.initialize(
|
@@ -388,9 +386,8 @@ contract ReleaseRegistry is
|
|
388
386
|
|
389
387
|
clonedAdmin.completeSetup(
|
390
388
|
address(_registry),
|
391
|
-
address(
|
392
|
-
release
|
393
|
-
address(this)); // release registry (this contract)
|
389
|
+
address(this), // release registry (this contract)
|
390
|
+
release);
|
394
391
|
|
395
392
|
// lock release (remains locked until activation)
|
396
393
|
clonedAdmin.setReleaseLocked(true);
|
@@ -415,7 +412,7 @@ contract ReleaseRegistry is
|
|
415
412
|
returns (uint256 serviceDomainsCount)
|
416
413
|
{
|
417
414
|
// authorization contract supports IServiceAuthorization interface
|
418
|
-
if(!
|
415
|
+
if(!serviceAuthorization.supportsInterface(type(IServiceAuthorization).interfaceId)) {
|
419
416
|
revert ErrorReleaseRegistryNotServiceAuth(address(serviceAuthorization));
|
420
417
|
}
|
421
418
|
|