@etherisc/gif-next 0.0.2-bf51045-496 → 0.0.2-bf9f7e6-880
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +44 -0
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.dbg.json +1 -1
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.json +69 -62
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.json +29 -31
- package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.dbg.json +1 -1
- package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.json +33 -9
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.json +454 -253
- package/artifacts/contracts/authorization/AccessAdmin.sol/IAccessManagedChecker.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessAdminLib.sol/AccessAdminLib.dbg.json +4 -0
- package/artifacts/contracts/authorization/AccessAdminLib.sol/AccessAdminLib.json +673 -0
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.json +202 -5
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.json +227 -26
- 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 +353 -189
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.json +105 -18
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.json +2 -2
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +74 -157
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +212 -38
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +39 -95
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +271 -185
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +66 -60
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +26 -82
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +159 -72
- 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 +92 -88
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.json +193 -51
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.json +248 -237
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.json +212 -38
- 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 +132 -173
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.json +212 -38
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.json +75 -68
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.json +123 -116
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.json +193 -51
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.json +338 -242
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.json +212 -38
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.dbg.json +1 -1
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.json +88 -45
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +158 -29
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +108 -9
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +187 -54
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +677 -325
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +193 -51
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +496 -324
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +121 -85
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +26 -38
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +619 -559
- package/artifacts/contracts/instance/RiskSet.sol/RiskSet.dbg.json +1 -1
- package/artifacts/contracts/instance/RiskSet.sol/RiskSet.json +96 -53
- 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 +16 -5
- package/artifacts/contracts/instance/base/ObjectSetHelperLib.sol/ObjectSetHelperLib.dbg.json +4 -0
- package/artifacts/contracts/instance/base/ObjectSetHelperLib.sol/ObjectSetHelperLib.json +168 -0
- 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 +60 -51
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +194 -40
- package/artifacts/contracts/oracle/IOracle.sol/IOracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.json +30 -21
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.json +27 -3
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.json +44 -35
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +75 -68
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +34 -36
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.json +65 -56
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.json +193 -51
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +108 -207
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +42 -64
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.json +44 -86
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.json +40 -31
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.json +138 -193
- package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/pool/Pool.sol/Pool.json +53 -44
- package/artifacts/contracts/pool/PoolLib.sol/PoolLib.dbg.json +4 -0
- package/artifacts/contracts/pool/PoolLib.sol/PoolLib.json +456 -0
- package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolService.sol/PoolService.json +254 -299
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +70 -56
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +123 -50
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +37 -27
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +176 -152
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.json +212 -38
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +244 -187
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +64 -74
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.json +69 -3
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.json +142 -20
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.json +105 -68
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +1 -1
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.json +48 -3
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.json +157 -133
- package/artifacts/contracts/product/IRiskService.sol/IRiskService.dbg.json +1 -1
- package/artifacts/contracts/product/IRiskService.sol/IRiskService.json +58 -7
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +193 -173
- package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.dbg.json +4 -0
- package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.json +293 -0
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +54 -56
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +96 -108
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +35 -57
- package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/product/Product.sol/Product.json +170 -146
- package/artifacts/contracts/product/RiskService.sol/RiskService.dbg.json +1 -1
- package/artifacts/contracts/product/RiskService.sol/RiskService.json +131 -81
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.json +46 -28
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +36 -12
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +31 -7
- package/artifacts/contracts/registry/IRelease.sol/IRelease.dbg.json +4 -0
- package/artifacts/contracts/registry/IRelease.sol/IRelease.json +24 -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 +74 -50
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +553 -434
- package/artifacts/contracts/registry/RegistryAuthorization.sol/RegistryAuthorization.dbg.json +4 -0
- package/artifacts/contracts/registry/RegistryAuthorization.sol/RegistryAuthorization.json +878 -0
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +51 -44
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +22 -24
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.dbg.json +4 -0
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.json +1954 -0
- 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 +333 -63
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +6 -6
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +4 -4
- package/artifacts/contracts/shared/Component.sol/Component.dbg.json +1 -1
- package/artifacts/contracts/shared/Component.sol/Component.json +43 -34
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +147 -165
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +48 -50
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.json +27 -16
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.dbg.json +1 -1
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.json +113 -4
- 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 +4 -0
- package/artifacts/contracts/shared/ContractLib.sol/ITokenRegistryHelper.json +40 -0
- package/artifacts/contracts/shared/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponent.sol/IComponent.json +30 -21
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.json +71 -72
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.json +30 -21
- 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/IRegisterable.sol/IRegisterable.json +120 -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 +27 -3
- package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.dbg.json +1 -1
- package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.json +2 -2
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.json +43 -34
- 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/Registerable.sol/Registerable.json +118 -62
- 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 +27 -16
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +63 -162
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.json +118 -29
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.json +32 -32
- package/artifacts/contracts/staking/IStaking.sol/IStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/IStaking.sol/IStaking.json +113 -39
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.json +131 -7
- package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.json +169 -97
- package/artifacts/contracts/staking/StakingLib.sol/StakingLib.dbg.json +4 -0
- package/artifacts/contracts/staking/StakingLib.sol/StakingLib.json +469 -0
- 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 +44 -32
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +34 -61
- package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingService.sol/StakingService.json +168 -53
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +31 -29
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +148 -134
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +47 -37
- 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/Amount.sol/AmountLib.json +10 -10
- 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/Fee.sol/FeeLib.json +93 -37
- 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 +33 -31
- 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 +30 -6
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.json +79 -15
- 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/SelectorLib.json +21 -2
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.json +2 -2
- package/artifacts/contracts/type/StateId.sol/StateIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/String.sol/StrLib.dbg.json +1 -1
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.json +2 -2
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.json +60 -36
- package/artifacts/contracts/type/Version.sol/VersionLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionLib.json +2 -21
- package/artifacts/contracts/type/Version.sol/VersionPartLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionPartLib.json +101 -2
- 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 +4 -4
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +1 -1
- package/contracts/accounting/AccountingService.sol +3 -4
- package/contracts/accounting/AccountingServiceManager.sol +1 -1
- package/contracts/accounting/IAccountingService.sol +2 -2
- package/contracts/authorization/AccessAdmin.sol +293 -204
- package/contracts/authorization/AccessAdminLib.sol +183 -0
- package/contracts/authorization/AccessManagerCloneable.sol +146 -4
- package/contracts/authorization/Authorization.sol +307 -231
- package/contracts/authorization/IAccess.sol +13 -5
- package/contracts/authorization/IAccessAdmin.sol +69 -36
- package/contracts/authorization/IAuthorization.sol +21 -1
- package/contracts/distribution/BasicDistribution.sol +13 -11
- package/contracts/distribution/BasicDistributionAuthorization.sol +21 -8
- package/contracts/distribution/Distribution.sol +13 -56
- package/contracts/distribution/DistributionService.sol +83 -55
- package/contracts/distribution/DistributionServiceManager.sol +1 -1
- package/contracts/distribution/IDistributionComponent.sol +0 -9
- package/contracts/distribution/IDistributionService.sol +18 -15
- package/contracts/examples/fire/FirePool.sol +0 -4
- package/contracts/examples/fire/FirePoolAuthorization.sol +1 -1
- package/contracts/examples/fire/FireProduct.sol +4 -7
- package/contracts/examples/fire/FireProductAuthorization.sol +1 -1
- package/contracts/examples/unpermissioned/SimpleDistribution.sol +32 -8
- package/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol +1 -1
- package/contracts/examples/unpermissioned/SimpleOracle.sol +4 -8
- package/contracts/examples/unpermissioned/SimplePool.sol +0 -5
- package/contracts/examples/unpermissioned/SimplePoolAuthorization.sol +1 -1
- package/contracts/examples/unpermissioned/SimpleProduct.sol +29 -8
- package/contracts/examples/unpermissioned/SimpleProductAuthorization.sol +1 -1
- package/contracts/instance/BundleSet.sol +4 -4
- package/contracts/instance/IInstance.sol +51 -16
- package/contracts/instance/IInstanceService.sol +20 -2
- package/contracts/instance/Instance.sol +90 -25
- package/contracts/instance/InstanceAdmin.sol +261 -99
- package/contracts/instance/InstanceAuthorizationV3.sol +49 -36
- package/contracts/instance/InstanceReader.sol +103 -34
- package/contracts/instance/InstanceService.sol +154 -87
- package/contracts/instance/InstanceServiceManager.sol +1 -1
- package/contracts/instance/InstanceStore.sol +13 -2
- package/contracts/instance/RiskSet.sol +11 -12
- package/contracts/instance/base/ObjectLifecycle.sol +4 -2
- package/contracts/instance/base/ObjectSet.sol +7 -8
- package/contracts/instance/base/ObjectSetHelperLib.sol +30 -0
- package/contracts/instance/module/IBundle.sol +6 -5
- package/contracts/instance/module/IComponents.sol +19 -7
- package/contracts/instance/module/IDistribution.sol +21 -8
- package/contracts/instance/module/IPolicy.sol +28 -8
- package/contracts/instance/module/IRisk.sol +4 -0
- package/contracts/oracle/BasicOracle.sol +1 -3
- package/contracts/oracle/BasicOracleAuthorization.sol +3 -12
- package/contracts/oracle/IOracle.sol +9 -4
- package/contracts/oracle/Oracle.sol +1 -3
- package/contracts/oracle/OracleService.sol +16 -15
- package/contracts/oracle/OracleServiceManager.sol +1 -1
- package/contracts/pool/BasicPool.sol +0 -2
- package/contracts/pool/BasicPoolAuthorization.sol +21 -13
- package/contracts/pool/BundleService.sol +28 -58
- package/contracts/pool/BundleServiceManager.sol +1 -1
- package/contracts/pool/IBundleService.sol +13 -19
- package/contracts/pool/IPoolService.sol +50 -38
- package/contracts/pool/Pool.sol +9 -11
- package/contracts/pool/PoolLib.sol +216 -0
- package/contracts/pool/PoolService.sol +294 -154
- package/contracts/pool/PoolServiceManager.sol +1 -1
- package/contracts/product/ApplicationService.sol +24 -9
- package/contracts/product/ApplicationServiceManager.sol +1 -1
- package/contracts/product/BasicProduct.sol +2 -2
- package/contracts/product/BasicProductAuthorization.sol +23 -8
- package/contracts/product/ClaimService.sol +157 -139
- package/contracts/product/ClaimServiceManager.sol +1 -1
- package/contracts/product/IApplicationService.sol +3 -0
- package/contracts/product/IClaimService.sol +14 -2
- package/contracts/product/IPolicyService.sol +11 -6
- package/contracts/product/IPricingService.sol +1 -0
- package/contracts/product/IProductComponent.sol +4 -1
- package/contracts/product/IRiskService.sol +7 -7
- package/contracts/product/PolicyService.sol +86 -158
- package/contracts/product/PolicyServiceLib.sol +65 -0
- package/contracts/product/PolicyServiceManager.sol +1 -1
- package/contracts/product/PricingService.sol +30 -21
- package/contracts/product/PricingServiceManager.sol +3 -3
- package/contracts/product/Product.sol +55 -15
- package/contracts/product/RiskService.sol +76 -29
- package/contracts/product/RiskServiceManager.sol +1 -1
- package/contracts/registry/IRegistry.sol +12 -15
- package/contracts/registry/IRelease.sol +29 -0
- package/contracts/registry/Registry.sol +7 -2
- package/contracts/registry/RegistryAdmin.sol +143 -342
- package/contracts/registry/RegistryAuthorization.sol +267 -0
- package/contracts/registry/RegistryService.sol +3 -3
- package/contracts/registry/RegistryServiceManager.sol +1 -1
- package/contracts/registry/ReleaseAdmin.sol +253 -0
- package/contracts/registry/ReleaseLifecycle.sol +2 -0
- package/contracts/registry/ReleaseRegistry.sol +146 -115
- package/contracts/registry/ServiceAuthorizationV3.sol +126 -2
- package/contracts/registry/TokenRegistry.sol +6 -8
- package/contracts/shared/Component.sol +17 -26
- package/contracts/shared/ComponentService.sol +141 -129
- package/contracts/shared/ComponentServiceManager.sol +1 -1
- package/contracts/shared/ComponentVerifyingService.sol +1 -1
- package/contracts/shared/ContractLib.sol +60 -3
- package/contracts/shared/IComponent.sol +0 -4
- package/contracts/shared/IComponentService.sol +9 -13
- package/contracts/shared/IRegisterable.sol +15 -4
- package/contracts/shared/IService.sol +3 -5
- package/contracts/shared/InitializableERC165.sol +9 -1
- package/contracts/shared/InstanceLinkedComponent.sol +2 -4
- package/contracts/shared/NftOwnable.sol +5 -5
- package/contracts/shared/PolicyHolder.sol +1 -1
- package/contracts/shared/Registerable.sol +42 -19
- package/contracts/shared/RegistryLinked.sol +1 -1
- package/contracts/shared/Service.sol +8 -27
- package/contracts/shared/TokenHandler.sol +45 -92
- package/contracts/staking/IStaking.sol +12 -10
- package/contracts/staking/IStakingService.sol +16 -1
- package/contracts/staking/Staking.sol +59 -28
- package/contracts/staking/{StakeManagerLib.sol → StakingLib.sol} +80 -23
- package/contracts/staking/StakingReader.sol +6 -16
- package/contracts/staking/StakingService.sol +68 -44
- package/contracts/staking/StakingServiceManager.sol +5 -4
- package/contracts/staking/StakingStore.sol +2 -1
- package/contracts/type/Fee.sol +8 -8
- package/contracts/type/ObjectType.sol +47 -39
- package/contracts/type/RiskId.sol +9 -3
- package/contracts/type/RoleId.sol +24 -4
- package/contracts/type/Selector.sol +5 -0
- package/contracts/type/Timestamp.sol +0 -5
- package/contracts/type/UFixed.sol +27 -10
- package/contracts/type/Version.sol +54 -5
- package/contracts/upgradeability/ProxyManager.sol +1 -1
- package/package.json +2 -2
- package/artifacts/contracts/authorization/ReleaseAccessManager.sol/ReleaseAccessManager.dbg.json +0 -4
- package/artifacts/contracts/authorization/ReleaseAccessManager.sol/ReleaseAccessManager.json +0 -1196
- package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +0 -4
- package/artifacts/contracts/instance/module/IAccess.sol/IAccess.json +0 -129
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.dbg.json +0 -4
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.json +0 -440
- package/contracts/authorization/ReleaseAccessManager.sol +0 -38
- package/contracts/instance/module/IAccess.sol +0 -46
@@ -4,36 +4,44 @@ pragma solidity ^0.8.20;
|
|
4
4
|
import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol";
|
5
5
|
import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";
|
6
6
|
|
7
|
-
import {
|
8
|
-
import {
|
9
|
-
import {ObjectType, ObjectTypeLib, POOL, RELEASE, REGISTRY, SERVICE, STAKING} from "../type/ObjectType.sol";
|
10
|
-
import {TimestampLib, zeroTimestamp} from "../type/Timestamp.sol";
|
11
|
-
import {Seconds} from "../type/Seconds.sol";
|
12
|
-
import {StateId, SCHEDULED, DEPLOYING, DEPLOYED, SKIPPED, ACTIVE, PAUSED} from "../type/StateId.sol";
|
13
|
-
import {VersionPart, VersionPartLib} from "../type/Version.sol";
|
14
|
-
|
15
|
-
import {IService} from "../shared/IService.sol";
|
16
|
-
import {IRegisterable} from "../shared/IRegisterable.sol";
|
17
|
-
|
7
|
+
import {IAccessAdmin} from "../authorization/IAccessAdmin.sol";
|
8
|
+
import {AccessManagerCloneable} from "../authorization/AccessManagerCloneable.sol";
|
18
9
|
import {IRegistry} from "./IRegistry.sol";
|
10
|
+
import {IRelease} from "./IRelease.sol";
|
19
11
|
import {IRegistryLinked} from "../shared/IRegistryLinked.sol";
|
12
|
+
import {IService} from "../shared/IService.sol";
|
20
13
|
import {IServiceAuthorization} from "../authorization/IServiceAuthorization.sol";
|
14
|
+
|
15
|
+
import {ContractLib} from "../shared/ContractLib.sol";
|
16
|
+
import {NftId} from "../type/NftId.sol";
|
17
|
+
import {ObjectType, ObjectTypeLib, POOL, RELEASE, REGISTRY, SERVICE, STAKING} from "../type/ObjectType.sol";
|
21
18
|
import {RegistryAdmin} from "./RegistryAdmin.sol";
|
22
19
|
import {Registry} from "./Registry.sol";
|
20
|
+
import {ReleaseAdmin} from "./ReleaseAdmin.sol";
|
23
21
|
import {ReleaseLifecycle} from "./ReleaseLifecycle.sol";
|
22
|
+
import {Seconds} from "../type/Seconds.sol";
|
23
|
+
import {StateId, SCHEDULED, DEPLOYING, DEPLOYED, SKIPPED, ACTIVE, PAUSED} from "../type/StateId.sol";
|
24
|
+
import {TimestampLib, zeroTimestamp} from "../type/Timestamp.sol";
|
25
|
+
import {VersionPart, VersionPartLib} from "../type/Version.sol";
|
24
26
|
|
25
|
-
|
27
|
+
/// @dev The ReleaseRegistry manages the lifecycle of major GIF releases and their services.
|
28
|
+
/// The creation of a new GIF release is a multi-step process:
|
29
|
+
/// 1. The creation of a new GIF release is initiated by the GIF admin.
|
30
|
+
/// 2. A GIF manager then prepares the release by setting up the service authorization contract.
|
31
|
+
/// 3. The GIF manager deploys and registers all related service contracts with the release registry.
|
32
|
+
/// 4. The GIF admin verifies and activates the release.
|
33
|
+
/// 3. The GIF admin may pause and resume a release.
|
26
34
|
contract ReleaseRegistry is
|
27
35
|
AccessManaged,
|
28
36
|
ReleaseLifecycle,
|
29
37
|
IRegistryLinked
|
30
38
|
{
|
31
|
-
uint256 public constant INITIAL_GIF_VERSION = 3;// first active version
|
39
|
+
uint256 public constant INITIAL_GIF_VERSION = 3;// first active release version
|
32
40
|
|
33
|
-
event LogReleaseCreation(VersionPart
|
34
|
-
event LogReleaseActivation(VersionPart
|
35
|
-
event LogReleaseDisabled(VersionPart
|
36
|
-
event LogReleaseEnabled(VersionPart
|
41
|
+
event LogReleaseCreation(IAccessAdmin admin, VersionPart release, bytes32 salt);
|
42
|
+
event LogReleaseActivation(VersionPart release);
|
43
|
+
event LogReleaseDisabled(VersionPart release);
|
44
|
+
event LogReleaseEnabled(VersionPart release);
|
37
45
|
|
38
46
|
// constructor
|
39
47
|
error ErrorReleaseRegistryNotRegistry(Registry registry);
|
@@ -41,7 +49,7 @@ contract ReleaseRegistry is
|
|
41
49
|
// _verifyServiceAuthorization
|
42
50
|
error ErrorReleaseRegistryNotServiceAuth(address notAuth);
|
43
51
|
error ErrorReleaseRegistryServiceAuthVersionMismatch(IServiceAuthorization auth, VersionPart expected, VersionPart actual);
|
44
|
-
error ErrorReleaseRegistryServiceAuthDomainsZero(IServiceAuthorization auth, VersionPart
|
52
|
+
error ErrorReleaseRegistryServiceAuthDomainsZero(IServiceAuthorization auth, VersionPart release);
|
45
53
|
|
46
54
|
// registerService
|
47
55
|
error ErrorReleaseRegistryServiceAddressMismatch(address expected, address actual);
|
@@ -63,18 +71,21 @@ contract ReleaseRegistry is
|
|
63
71
|
error ErrorReleaseRegistryServiceSelfRegistration(IService service);
|
64
72
|
error ErrorReleaseRegistryServiceOwnerRegistered(IService service, address owner);
|
65
73
|
|
66
|
-
RegistryAdmin public immutable
|
74
|
+
RegistryAdmin public immutable _registryAdmin;
|
67
75
|
Registry public immutable _registry;
|
68
76
|
|
69
|
-
mapping(VersionPart
|
70
|
-
VersionPart [] internal _release; // array of all created releases
|
71
|
-
|
72
|
-
|
77
|
+
mapping(VersionPart release => IRelease.ReleaseInfo info) internal _releaseInfo;
|
78
|
+
VersionPart [] internal _release; // array of all created releases
|
79
|
+
ReleaseAdmin internal _masterReleaseAdmin;
|
80
|
+
|
81
|
+
VersionPart internal _latest; // latest active release
|
82
|
+
VersionPart internal _next; // release version to create and activate
|
73
83
|
|
74
84
|
// counters per release
|
75
85
|
uint256 internal _registeredServices = 0;
|
76
86
|
uint256 internal _servicesToRegister = 0;
|
77
87
|
|
88
|
+
// TODO move master relase admin outside constructor (same construction as for registry admin)
|
78
89
|
constructor(Registry registry)
|
79
90
|
AccessManaged(msg.sender)
|
80
91
|
{
|
@@ -85,30 +96,33 @@ contract ReleaseRegistry is
|
|
85
96
|
setAuthority(registry.getAuthority());
|
86
97
|
|
87
98
|
_registry = registry;
|
88
|
-
|
99
|
+
_registryAdmin = RegistryAdmin(_registry.getRegistryAdminAddress());
|
100
|
+
_masterReleaseAdmin = new ReleaseAdmin(
|
101
|
+
_cloneNewAccessManager());
|
89
102
|
|
90
103
|
_next = VersionPartLib.toVersionPart(INITIAL_GIF_VERSION - 1);
|
91
104
|
}
|
92
105
|
|
93
|
-
/// @dev
|
94
|
-
///
|
106
|
+
/// @dev Initiates the creation of a new GIF release by the GIF admin.
|
107
|
+
/// Sets previous release into SKIPPED state if it was created but not activated.
|
108
|
+
/// Sets the new release into state SCHEDULED.
|
95
109
|
function createNextRelease()
|
96
110
|
external
|
97
111
|
restricted() // GIF_ADMIN_ROLE
|
98
112
|
returns(VersionPart)
|
99
113
|
{
|
100
|
-
VersionPart
|
114
|
+
VersionPart release = _next;
|
101
115
|
|
102
|
-
if(isValidTransition(RELEASE(), _releaseInfo[
|
103
|
-
_releaseInfo[
|
116
|
+
if(isValidTransition(RELEASE(), _releaseInfo[release].state, SKIPPED())) {
|
117
|
+
_releaseInfo[release].state = SKIPPED();
|
104
118
|
}
|
105
119
|
|
106
|
-
|
107
|
-
_release.push(
|
120
|
+
release = VersionPartLib.toVersionPart(release.toInt() + 1);
|
121
|
+
_release.push(release);
|
108
122
|
|
109
|
-
_next =
|
110
|
-
_releaseInfo[
|
111
|
-
_releaseInfo[
|
123
|
+
_next = release;
|
124
|
+
_releaseInfo[release].version = release;
|
125
|
+
_releaseInfo[release].state = getInitialState(RELEASE());
|
112
126
|
_servicesToRegister = 0;
|
113
127
|
_registeredServices = 0;
|
114
128
|
|
@@ -122,7 +136,7 @@ contract ReleaseRegistry is
|
|
122
136
|
external
|
123
137
|
restricted() // GIF_MANAGER_ROLE
|
124
138
|
returns(
|
125
|
-
|
139
|
+
ReleaseAdmin releaseAdmin,
|
126
140
|
VersionPart releaseVersion,
|
127
141
|
bytes32 releaseSalt
|
128
142
|
)
|
@@ -132,10 +146,13 @@ contract ReleaseRegistry is
|
|
132
146
|
// release can transition into DEPLOYING state
|
133
147
|
checkTransition(_releaseInfo[releaseVersion].state, RELEASE(), SCHEDULED(), DEPLOYING());
|
134
148
|
|
149
|
+
// verify authorizations
|
135
150
|
uint256 serviceDomainsCount = _verifyServiceAuthorization(serviceAuthorization, releaseVersion, salt);
|
136
151
|
|
137
|
-
|
152
|
+
// create and initialize release admin
|
153
|
+
releaseAdmin = _cloneNewReleaseAdmin(releaseVersion);
|
138
154
|
releaseSalt = salt;
|
155
|
+
|
139
156
|
// ensures unique salt
|
140
157
|
// TODO CreateX have clones capability also
|
141
158
|
// what would releaseSalt look like if used with CreateX in pemissioned mode?
|
@@ -149,9 +166,9 @@ contract ReleaseRegistry is
|
|
149
166
|
_releaseInfo[releaseVersion].salt = releaseSalt;
|
150
167
|
// TODO allow for the same serviceAuthorization address to be used for multiple releases?
|
151
168
|
_releaseInfo[releaseVersion].auth = serviceAuthorization;
|
152
|
-
|
169
|
+
_releaseInfo[releaseVersion].releaseAdmin = address(releaseAdmin);
|
153
170
|
|
154
|
-
emit LogReleaseCreation(releaseVersion, releaseSalt);
|
171
|
+
emit LogReleaseCreation(releaseAdmin, releaseVersion, releaseSalt);
|
155
172
|
}
|
156
173
|
|
157
174
|
function registerService(IService service)
|
@@ -164,9 +181,9 @@ contract ReleaseRegistry is
|
|
164
181
|
// release can transition to DEPLOYED state
|
165
182
|
checkTransition(_releaseInfo[releaseVersion].state, RELEASE(), DEPLOYING(), DEPLOYED());
|
166
183
|
|
167
|
-
address releaseAuthority =
|
168
|
-
IServiceAuthorization
|
169
|
-
ObjectType expectedDomain =
|
184
|
+
address releaseAuthority = ReleaseAdmin(_releaseInfo[releaseVersion].releaseAdmin).authority();
|
185
|
+
IServiceAuthorization releaseAuth = _releaseInfo[releaseVersion].auth;
|
186
|
+
ObjectType expectedDomain = releaseAuth.getServiceDomain(_registeredServices);
|
170
187
|
|
171
188
|
// service can work with release registry and release version
|
172
189
|
(
|
@@ -196,89 +213,82 @@ contract ReleaseRegistry is
|
|
196
213
|
// revert ErrorReleaseRegistryServiceAddressMismatch()
|
197
214
|
|
198
215
|
// setup service authorization
|
199
|
-
|
200
|
-
|
216
|
+
ReleaseAdmin releaseAdmin = ReleaseAdmin(_releaseInfo[releaseVersion].releaseAdmin);
|
217
|
+
releaseAdmin.setReleaseLocked(false);
|
218
|
+
releaseAdmin.authorizeService(
|
219
|
+
releaseAuth,
|
201
220
|
service,
|
202
221
|
serviceDomain,
|
203
222
|
releaseVersion);
|
223
|
+
releaseAdmin.setReleaseLocked(true);
|
204
224
|
|
205
225
|
// register service with registry
|
206
226
|
nftId = _registry.registerService(info, serviceVersion, serviceDomain);
|
207
227
|
service.linkToRegisteredNftId();
|
208
228
|
}
|
229
|
+
|
230
|
+
|
209
231
|
// TODO return activated version
|
210
232
|
function activateNextRelease()
|
211
233
|
external
|
212
234
|
restricted // GIF_ADMIN_ROLE
|
213
235
|
{
|
214
|
-
VersionPart
|
236
|
+
VersionPart release = _next;
|
215
237
|
|
216
238
|
// release can transition to ACTIVE state
|
217
|
-
checkTransition(_releaseInfo[
|
239
|
+
checkTransition(_releaseInfo[release].state, RELEASE(), DEPLOYED(), ACTIVE());
|
218
240
|
|
219
|
-
_latest =
|
220
|
-
_releaseInfo[
|
221
|
-
_releaseInfo[
|
241
|
+
_latest = release;
|
242
|
+
_releaseInfo[release].state = ACTIVE();
|
243
|
+
_releaseInfo[release].activatedAt = TimestampLib.blockTimestamp();
|
244
|
+
_releaseInfo[release].disabledAt = TimestampLib.max();
|
222
245
|
|
223
246
|
// grant special roles for registry/staking/pool services
|
224
247
|
// this will enable access to core contracts functions
|
225
248
|
|
226
249
|
// registry service MUST be registered for each release
|
227
|
-
address service = _registry.getServiceAddress(REGISTRY(),
|
250
|
+
address service = _registry.getServiceAddress(REGISTRY(), release);
|
228
251
|
if(service == address(0)) {
|
229
|
-
revert ErrorReleaseRegistryRegistryServiceMissing(
|
252
|
+
revert ErrorReleaseRegistryRegistryServiceMissing(release);
|
230
253
|
}
|
231
254
|
|
232
|
-
|
255
|
+
_registryAdmin.grantServiceRoleForAllVersions(IService(service), REGISTRY());
|
233
256
|
|
234
|
-
service = _registry.getServiceAddress(STAKING(),
|
257
|
+
service = _registry.getServiceAddress(STAKING(), release);
|
235
258
|
if(service != address(0)) {
|
236
|
-
|
259
|
+
_registryAdmin.grantServiceRoleForAllVersions(IService(service), STAKING());
|
237
260
|
}
|
238
261
|
|
239
|
-
service = _registry.getServiceAddress(POOL(),
|
262
|
+
service = _registry.getServiceAddress(POOL(), release);
|
240
263
|
if(service != address(0)) {
|
241
|
-
|
264
|
+
_registryAdmin.grantServiceRoleForAllVersions(IService(service), POOL());
|
242
265
|
}
|
243
266
|
|
244
|
-
|
245
|
-
// TODO test how many service can be locked in one transaction
|
246
|
-
// -> add to docs + each release must test for this -> add to release version tests (in test call with some gas limit?)
|
247
|
-
_setReleaseLocked(version, false);
|
267
|
+
_setReleaseLocked(release, false);
|
248
268
|
|
249
|
-
emit LogReleaseActivation(
|
269
|
+
emit LogReleaseActivation(release);
|
250
270
|
}
|
251
271
|
|
252
|
-
/// @dev stop
|
253
|
-
function
|
254
|
-
|
255
|
-
restricted
|
256
|
-
{
|
257
|
-
// release can transition to PAUSED state
|
258
|
-
checkTransition(_releaseInfo[version].state, RELEASE(), ACTIVE(), PAUSED());
|
259
|
-
|
260
|
-
_releaseInfo[version].state = PAUSED();
|
261
|
-
_releaseInfo[version].disabledAt = TimestampLib.blockTimestamp();
|
262
|
-
|
263
|
-
_setReleaseLocked(version, true);
|
264
|
-
|
265
|
-
emit LogReleaseDisabled(version);
|
266
|
-
}
|
267
|
-
|
268
|
-
/// @dev resume operations with release services
|
269
|
-
function unpauseRelease(VersionPart version)
|
270
|
-
external
|
271
|
-
restricted // GIF_ADMIN_ROLE
|
272
|
+
/// @dev stop/resume operations with restricted functions
|
273
|
+
function setActive(VersionPart release, bool active)
|
274
|
+
public
|
275
|
+
restricted
|
272
276
|
{
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
277
|
+
StateId state = _releaseInfo[release].state;
|
278
|
+
|
279
|
+
if(active) {
|
280
|
+
checkTransition(state, RELEASE(), PAUSED(), ACTIVE());
|
281
|
+
_releaseInfo[release].state = ACTIVE();
|
282
|
+
_releaseInfo[release].disabledAt = TimestampLib.max();
|
283
|
+
emit LogReleaseEnabled(release);
|
284
|
+
} else {
|
285
|
+
checkTransition(state, RELEASE(), ACTIVE(), PAUSED());
|
286
|
+
_releaseInfo[release].state = PAUSED();
|
287
|
+
_releaseInfo[release].disabledAt = TimestampLib.blockTimestamp();
|
288
|
+
emit LogReleaseDisabled(release);
|
289
|
+
}
|
280
290
|
|
281
|
-
|
291
|
+
_setReleaseLocked(release, !active);
|
282
292
|
}
|
283
293
|
|
284
294
|
//--- view functions ----------------------------------------------------//
|
@@ -291,12 +301,12 @@ contract ReleaseRegistry is
|
|
291
301
|
return Clones.predictDeterministicAddress(implementation, salt, deployer);
|
292
302
|
}
|
293
303
|
|
294
|
-
function isActiveRelease(VersionPart
|
295
|
-
return _releaseInfo[
|
304
|
+
function isActiveRelease(VersionPart release) public view returns(bool) {
|
305
|
+
return _releaseInfo[release].state == ACTIVE();
|
296
306
|
}
|
297
307
|
|
298
|
-
function getReleaseInfo(VersionPart
|
299
|
-
return _releaseInfo[
|
308
|
+
function getReleaseInfo(VersionPart release) external view returns(IRelease.ReleaseInfo memory) {
|
309
|
+
return _releaseInfo[release];
|
300
310
|
}
|
301
311
|
|
302
312
|
/// @dev Returns the number of created releases.
|
@@ -307,7 +317,7 @@ contract ReleaseRegistry is
|
|
307
317
|
|
308
318
|
/// @dev Returns the n-th release version.
|
309
319
|
/// Valid values for idx [0 .. releases() - 1]
|
310
|
-
function getVersion(uint256 idx) external view returns (VersionPart
|
320
|
+
function getVersion(uint256 idx) external view returns (VersionPart release) {
|
311
321
|
// return _releases;
|
312
322
|
return _release[idx];
|
313
323
|
}
|
@@ -322,24 +332,24 @@ contract ReleaseRegistry is
|
|
322
332
|
return _latest;
|
323
333
|
}
|
324
334
|
|
325
|
-
function getState(VersionPart
|
326
|
-
return _releaseInfo[
|
335
|
+
function getState(VersionPart release) external view returns (StateId stateId) {
|
336
|
+
return _releaseInfo[release].state;
|
327
337
|
}
|
328
338
|
|
329
339
|
function getRemainingServicesToRegister() external view returns (uint256 services) {
|
330
340
|
return _servicesToRegister - _registeredServices;
|
331
341
|
}
|
332
342
|
|
333
|
-
function getServiceAuthorization(VersionPart
|
343
|
+
function getServiceAuthorization(VersionPart release)
|
334
344
|
external
|
335
345
|
view
|
336
346
|
returns (IServiceAuthorization serviceAuthorization)
|
337
347
|
{
|
338
|
-
return _releaseInfo[
|
348
|
+
return _releaseInfo[release].auth;
|
339
349
|
}
|
340
350
|
|
341
351
|
function getRegistryAdmin() external view returns (address) {
|
342
|
-
return address(
|
352
|
+
return address(_registryAdmin);
|
343
353
|
}
|
344
354
|
|
345
355
|
//--- IRegistryLinked ------------------------------------------------------//
|
@@ -350,27 +360,48 @@ contract ReleaseRegistry is
|
|
350
360
|
|
351
361
|
//--- private functions ----------------------------------------------------//
|
352
362
|
|
353
|
-
|
354
|
-
function _setReleaseLocked(VersionPart version, bool locked)
|
363
|
+
function _setReleaseLocked(VersionPart release, bool locked)
|
355
364
|
private
|
356
365
|
{
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
366
|
+
ReleaseAdmin(
|
367
|
+
_releaseInfo[release].releaseAdmin).setReleaseLocked(locked);
|
368
|
+
}
|
369
|
+
|
370
|
+
function _cloneNewReleaseAdmin(VersionPart release)
|
371
|
+
private
|
372
|
+
returns (ReleaseAdmin clonedAdmin)
|
373
|
+
{
|
374
|
+
// clone and setup release specific release admin
|
375
|
+
clonedAdmin = ReleaseAdmin(
|
376
|
+
Clones.clone(address(_masterReleaseAdmin)));
|
377
|
+
|
378
|
+
string memory releaseAdminName = string(
|
379
|
+
abi.encodePacked(
|
380
|
+
"ReleaseAdmin_v",
|
381
|
+
release.toString()));
|
382
|
+
|
383
|
+
clonedAdmin.initialize(
|
384
|
+
address(_cloneNewAccessManager()),
|
385
|
+
releaseAdminName);
|
386
|
+
|
387
|
+
clonedAdmin.completeSetup(
|
388
|
+
address(_registry),
|
389
|
+
address(this), // release registry (this contract)
|
390
|
+
release);
|
391
|
+
|
392
|
+
// lock release (remains locked until activation)
|
393
|
+
clonedAdmin.setReleaseLocked(true);
|
394
|
+
}
|
395
|
+
|
370
396
|
|
371
|
-
|
397
|
+
function _cloneNewAccessManager()
|
398
|
+
private
|
399
|
+
returns (address accessManager)
|
400
|
+
{
|
401
|
+
return Clones.clone(address(_registryAdmin.authority()));
|
372
402
|
}
|
373
403
|
|
404
|
+
|
374
405
|
function _verifyServiceAuthorization(
|
375
406
|
IServiceAuthorization serviceAuthorization,
|
376
407
|
VersionPart releaseVersion,
|
@@ -382,7 +413,7 @@ contract ReleaseRegistry is
|
|
382
413
|
{
|
383
414
|
// authorization contract supports IServiceAuthorization interface
|
384
415
|
if(!serviceAuthorization.supportsInterface(type(IServiceAuthorization).interfaceId)) {
|
385
|
-
|
416
|
+
revert ErrorReleaseRegistryNotServiceAuth(address(serviceAuthorization));
|
386
417
|
}
|
387
418
|
|
388
419
|
// authorizaions contract version matches with release version
|
@@ -7,11 +7,18 @@ import {
|
|
7
7
|
|
8
8
|
import {IAccess} from "../authorization/IAccess.sol";
|
9
9
|
import {IAccountingService} from "../accounting/IAccountingService.sol";
|
10
|
+
import {IApplicationService} from "../product/IApplicationService.sol";
|
10
11
|
import {IBundleService} from "../pool/IBundleService.sol";
|
12
|
+
import {IClaimService} from "../product/IClaimService.sol";
|
13
|
+
import {IComponentService} from "../shared/IComponentService.sol";
|
11
14
|
import {IDistributionService} from "../distribution/IDistributionService.sol";
|
15
|
+
import {IInstanceService} from "../instance/IInstanceService.sol";
|
16
|
+
import {IOracleService} from "../oracle/IOracleService.sol";
|
17
|
+
import {IPolicyService} from "../product/IPolicyService.sol";
|
12
18
|
import {IPoolService} from "../pool/IPoolService.sol";
|
13
19
|
import {IStakingService} from "../staking/IStakingService.sol";
|
14
20
|
import {IRegistryService} from "./IRegistryService.sol";
|
21
|
+
import {IRiskService} from "../product/IRiskService.sol";
|
15
22
|
import {ServiceAuthorization} from "../authorization/ServiceAuthorization.sol";
|
16
23
|
|
17
24
|
|
@@ -51,11 +58,17 @@ contract ServiceAuthorizationV3
|
|
51
58
|
_setupIRegistryServiceAuthorization();
|
52
59
|
_setupStakingServiceAuthorization();
|
53
60
|
_setupInstanceServiceAuthorization();
|
61
|
+
_setupInstanceServiceAuthorization();
|
54
62
|
_setupAccountingServiceAuthorization();
|
55
63
|
_setupComponentServiceAuthorization();
|
64
|
+
_setupClaimServiceAuthorization();
|
65
|
+
_setupRiskServiceAuthorization();
|
56
66
|
_setupDistributionServiceAuthorization();
|
57
67
|
_setupPoolServiceAuthorization();
|
58
68
|
_setupBundleServiceAuthorization();
|
69
|
+
_setupOracleServiceAuthorization();
|
70
|
+
_setupApplicationServiceAuthorization();
|
71
|
+
_setupPolicyServiceAuthorization();
|
59
72
|
}
|
60
73
|
|
61
74
|
|
@@ -98,6 +111,7 @@ contract ServiceAuthorizationV3
|
|
98
111
|
_authorize(functions, IStakingService.createInstanceTarget.selector, "createInstanceTarget");
|
99
112
|
_authorize(functions, IStakingService.setInstanceLockingPeriod.selector, "setInstanceLockingPeriod");
|
100
113
|
_authorize(functions, IStakingService.setInstanceRewardRate.selector, "setInstanceRewardRate");
|
114
|
+
_authorize(functions, IStakingService.setInstanceMaxStakedAmount.selector, "setInstanceMaxStakedAmount");
|
101
115
|
_authorize(functions, IStakingService.refillInstanceRewardReserves.selector, "refillInstanceRewardReserves");
|
102
116
|
_authorize(functions, IStakingService.withdrawInstanceRewardReserves.selector, "withdrawInstanceRewardReserves");
|
103
117
|
|
@@ -115,6 +129,20 @@ contract ServiceAuthorizationV3
|
|
115
129
|
function _setupInstanceServiceAuthorization()
|
116
130
|
internal
|
117
131
|
{
|
132
|
+
IAccess.FunctionInfo[] storage functions;
|
133
|
+
functions = _authorizeForService(INSTANCE(), ALL());
|
134
|
+
_authorize(functions, IInstanceService.setInstanceLocked.selector, "setInstanceLocked");
|
135
|
+
_authorize(functions, IInstanceService.setTargetLocked.selector, "setTargetLocked");
|
136
|
+
|
137
|
+
_authorize(functions, IInstanceService.createInstance.selector, "createInstance");
|
138
|
+
_authorize(functions, IInstanceService.upgradeInstanceReader.selector, "upgradeInstanceReader");
|
139
|
+
_authorize(functions, IInstanceService.upgradeMasterInstanceReader.selector, "upgradeMasterInstanceReader");
|
140
|
+
|
141
|
+
_authorize(functions, IInstanceService.setStakingLockingPeriod.selector, "setStakingLockingPeriod");
|
142
|
+
_authorize(functions, IInstanceService.setStakingRewardRate.selector, "setStakingRewardRate");
|
143
|
+
_authorize(functions, IInstanceService.setStakingMaxAmount.selector, "setStakingMaxAmount");
|
144
|
+
_authorize(functions, IInstanceService.refillStakingRewardReserves.selector, "refillStakingRewardReserves");
|
145
|
+
_authorize(functions, IInstanceService.withdrawStakingRewardReserves.selector, "withdrawStakingRewardReserves");
|
118
146
|
}
|
119
147
|
|
120
148
|
/// @dev Accounting service function authorization.
|
@@ -152,17 +180,64 @@ contract ServiceAuthorizationV3
|
|
152
180
|
function _setupComponentServiceAuthorization()
|
153
181
|
internal
|
154
182
|
{
|
183
|
+
IAccess.FunctionInfo[] storage functions;
|
184
|
+
|
185
|
+
functions = _authorizeForService(COMPONENT(), ALL());
|
186
|
+
_authorize(functions, IComponentService.registerComponent.selector, "registerComponent");
|
187
|
+
_authorize(functions, IComponentService.approveTokenHandler.selector, "approveTokenHandler");
|
188
|
+
_authorize(functions, IComponentService.setWallet.selector, "setWallet");
|
189
|
+
_authorize(functions, IComponentService.setLocked.selector, "setLocked");
|
190
|
+
_authorize(functions, IComponentService.withdrawFees.selector, "withdrawFees");
|
191
|
+
_authorize(functions, IComponentService.registerProduct.selector, "registerProduct");
|
192
|
+
_authorize(functions, IComponentService.setProductFees.selector, "setProductFees");
|
193
|
+
_authorize(functions, IComponentService.setDistributionFees.selector, "setDistributionFees");
|
194
|
+
_authorize(functions, IComponentService.setPoolFees.selector, "setPoolFees");
|
195
|
+
|
155
196
|
}
|
156
197
|
|
157
198
|
/// @dev Distribution service function authorization.
|
158
|
-
function
|
199
|
+
function _setupRiskServiceAuthorization()
|
200
|
+
internal
|
201
|
+
{
|
202
|
+
IAccess.FunctionInfo[] storage functions;
|
203
|
+
functions = _authorizeForService(RISK(), ALL());
|
204
|
+
_authorize(functions, IRiskService.createRisk.selector, "createRisk");
|
205
|
+
_authorize(functions, IRiskService.updateRisk.selector, "updateRisk");
|
206
|
+
_authorize(functions, IRiskService.updateRiskState.selector, "updateRiskState");
|
207
|
+
}
|
208
|
+
|
209
|
+
/// @dev Distribution service function authorization.
|
210
|
+
function _setupClaimServiceAuthorization()
|
159
211
|
internal
|
160
212
|
{
|
161
213
|
IAccess.FunctionInfo[] storage functions;
|
214
|
+
functions = _authorizeForService(CLAIM(), ALL());
|
215
|
+
_authorize(functions, IClaimService.submit.selector, "submit");
|
216
|
+
_authorize(functions, IClaimService.confirm.selector, "confirm");
|
217
|
+
_authorize(functions, IClaimService.decline.selector, "decline");
|
218
|
+
_authorize(functions, IClaimService.revoke.selector, "revoke");
|
219
|
+
_authorize(functions, IClaimService.close.selector, "close");
|
220
|
+
_authorize(functions, IClaimService.createPayoutForBeneficiary.selector, "createPayoutForBeneficiary");
|
221
|
+
_authorize(functions, IClaimService.createPayout.selector, "createPayout");
|
222
|
+
_authorize(functions, IClaimService.processPayout.selector, "processPayout");
|
223
|
+
_authorize(functions, IClaimService.cancelPayout.selector, "cancelPayout");
|
224
|
+
}
|
162
225
|
|
226
|
+
/// @dev Distribution service function authorization.
|
227
|
+
function _setupDistributionServiceAuthorization()
|
228
|
+
internal
|
229
|
+
{
|
230
|
+
IAccess.FunctionInfo[] storage functions;
|
163
231
|
functions = _authorizeForService(DISTRIBUTION(), POLICY());
|
164
232
|
_authorize(functions, IDistributionService.processSale.selector, "processSale");
|
165
233
|
_authorize(functions, IDistributionService.processReferral.selector, "processReferral");
|
234
|
+
|
235
|
+
functions = _authorizeForService(DISTRIBUTION(), ALL());
|
236
|
+
_authorize(functions, IDistributionService.createDistributorType.selector, "createDistributorType");
|
237
|
+
_authorize(functions, IDistributionService.createDistributor.selector, "createDistributor");
|
238
|
+
_authorize(functions, IDistributionService.changeDistributorType.selector, "changeDistributorType");
|
239
|
+
_authorize(functions, IDistributionService.createReferral.selector, "createReferral");
|
240
|
+
_authorize(functions, IDistributionService.withdrawCommission.selector, "withdrawCommission");
|
166
241
|
}
|
167
242
|
|
168
243
|
|
@@ -179,6 +254,16 @@ contract ServiceAuthorizationV3
|
|
179
254
|
|
180
255
|
functions = _authorizeForService(POOL(), CLAIM());
|
181
256
|
_authorize(functions, IPoolService.processPayout.selector, "processPayout");
|
257
|
+
|
258
|
+
functions = _authorizeForService(POOL(), ALL());
|
259
|
+
_authorize(functions, IPoolService.setMaxBalanceAmount.selector, "setMaxBalanceAmount");
|
260
|
+
_authorize(functions, IPoolService.closeBundle.selector, "closeBundle");
|
261
|
+
_authorize(functions, IPoolService.processFundedClaim.selector, "processFundedClaim");
|
262
|
+
_authorize(functions, IPoolService.stake.selector, "stake");
|
263
|
+
_authorize(functions, IPoolService.unstake.selector, "unstake");
|
264
|
+
_authorize(functions, IPoolService.fundPoolWallet.selector, "fundPoolWallet");
|
265
|
+
_authorize(functions, IPoolService.defundPoolWallet.selector, "defundPoolWallet");
|
266
|
+
_authorize(functions, IPoolService.withdrawBundleFees.selector, "withdrawBundleFees");
|
182
267
|
}
|
183
268
|
|
184
269
|
|
@@ -201,7 +286,46 @@ contract ServiceAuthorizationV3
|
|
201
286
|
_authorize(functions, IBundleService.lock.selector, "lock");
|
202
287
|
_authorize(functions, IBundleService.unlock.selector, "unlock");
|
203
288
|
_authorize(functions, IBundleService.setFee.selector, "setFee");
|
204
|
-
|
289
|
+
}
|
290
|
+
|
291
|
+
function _setupOracleServiceAuthorization()
|
292
|
+
internal
|
293
|
+
{
|
294
|
+
IAccess.FunctionInfo[] storage functions;
|
295
|
+
|
296
|
+
functions = _authorizeForService(ORACLE(), ALL());
|
297
|
+
_authorize(functions, IOracleService.request.selector, "request");
|
298
|
+
_authorize(functions, IOracleService.respond.selector, "respond");
|
299
|
+
_authorize(functions, IOracleService.resend.selector, "resend");
|
300
|
+
_authorize(functions, IOracleService.cancel.selector, "cancel");
|
301
|
+
}
|
302
|
+
|
303
|
+
function _setupApplicationServiceAuthorization()
|
304
|
+
internal
|
305
|
+
{
|
306
|
+
IAccess.FunctionInfo[] storage functions;
|
307
|
+
|
308
|
+
functions = _authorizeForService(APPLICATION(), ALL());
|
309
|
+
_authorize(functions, IApplicationService.create.selector, "create");
|
310
|
+
_authorize(functions, IApplicationService.renew.selector, "renew");
|
311
|
+
_authorize(functions, IApplicationService.adjust.selector, "adjust");
|
312
|
+
_authorize(functions, IApplicationService.revoke.selector, "revoke");
|
313
|
+
}
|
314
|
+
|
315
|
+
function _setupPolicyServiceAuthorization()
|
316
|
+
internal
|
317
|
+
{
|
318
|
+
IAccess.FunctionInfo[] storage functions;
|
319
|
+
|
320
|
+
functions = _authorizeForService(POLICY(), ALL());
|
321
|
+
_authorize(functions, IPolicyService.decline.selector, "decline");
|
322
|
+
_authorize(functions, IPolicyService.createPolicy.selector, "createPolicy");
|
323
|
+
_authorize(functions, IPolicyService.collectPremium.selector, "collectPremium");
|
324
|
+
_authorize(functions, IPolicyService.activate.selector, "activate");
|
325
|
+
_authorize(functions, IPolicyService.expire.selector, "expire");
|
326
|
+
_authorize(functions, IPolicyService.expirePolicy.selector, "expirePolicy");
|
327
|
+
_authorize(functions, IPolicyService.close.selector, "close");
|
328
|
+
|
205
329
|
}
|
206
330
|
}
|
207
331
|
|