@etherisc/gif-next 0.0.2-ffa91a6-022 → 3.0.0-06d5e8b-738
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +124 -332
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.dbg.json +1 -1
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.json +106 -38
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.json +111 -45
- package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.dbg.json +1 -1
- package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.json +58 -6
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.json +370 -141
- package/artifacts/contracts/authorization/AccessAdminLib.sol/AccessAdminLib.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessAdminLib.sol/AccessAdminLib.json +1582 -202
- 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 +266 -64
- 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 +263 -87
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.json +102 -19
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.json +256 -16
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.json +426 -27
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +63 -38
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +269 -69
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +21 -12
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +376 -147
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +160 -78
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +20 -11
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +232 -19
- 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 +108 -79
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.json +268 -68
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.json +136 -95
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.json +268 -68
- package/artifacts/contracts/examples/fire/FireUSD.sol/FireUSD.dbg.json +1 -1
- package/artifacts/contracts/examples/flight/FlightLib.sol/FlightLib.dbg.json +4 -0
- package/artifacts/contracts/examples/flight/FlightLib.sol/FlightLib.json +728 -0
- package/artifacts/contracts/examples/flight/FlightMessageVerifier.sol/FlightMessageVerifier.dbg.json +4 -0
- package/artifacts/contracts/examples/flight/FlightMessageVerifier.sol/FlightMessageVerifier.json +229 -0
- package/artifacts/contracts/examples/flight/FlightOracle.sol/FlightOracle.dbg.json +4 -0
- package/artifacts/contracts/examples/flight/FlightOracle.sol/FlightOracle.json +1234 -0
- package/artifacts/contracts/examples/flight/FlightOracleAuthorization.sol/FlightOracleAuthorization.dbg.json +4 -0
- package/artifacts/contracts/examples/flight/FlightOracleAuthorization.sol/FlightOracleAuthorization.json +896 -0
- package/artifacts/contracts/examples/flight/FlightPool.sol/FlightPool.dbg.json +4 -0
- package/artifacts/contracts/examples/flight/FlightPool.sol/FlightPool.json +1466 -0
- package/artifacts/contracts/examples/flight/FlightPoolAuthorization.sol/FlightPoolAuthorization.dbg.json +4 -0
- package/artifacts/contracts/examples/flight/FlightPoolAuthorization.sol/FlightPoolAuthorization.json +844 -0
- package/artifacts/contracts/examples/flight/FlightProduct.sol/FlightProduct.dbg.json +4 -0
- package/artifacts/contracts/examples/flight/FlightProduct.sol/FlightProduct.json +2497 -0
- package/artifacts/contracts/examples/flight/FlightProductAuthorization.sol/FlightProductAuthorization.dbg.json +4 -0
- package/artifacts/contracts/examples/flight/FlightProductAuthorization.sol/FlightProductAuthorization.json +891 -0
- package/artifacts/contracts/examples/flight/FlightUSD.sol/FlightUSD.dbg.json +4 -0
- package/artifacts/contracts/examples/flight/FlightUSD.sol/FlightUSD.json +586 -0
- package/artifacts/contracts/examples/flight/originalV1.sol/FlightDelayChainlink.dbg.json +4 -0
- package/artifacts/contracts/examples/flight/originalV1.sol/FlightDelayChainlink.json +901 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.json +86 -45
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.json +268 -68
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.json +35 -26
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.json +130 -105
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.json +268 -68
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.json +333 -147
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.json +268 -68
- package/artifacts/contracts/instance/BaseStore.sol/BaseStore.dbg.json +4 -0
- package/artifacts/contracts/{shared/IKeyValueStore.sol/IKeyValueStore.json → instance/BaseStore.sol/BaseStore.json} +51 -229
- 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/IBaseStore.sol/IBaseStore.dbg.json +4 -0
- package/artifacts/contracts/instance/IBaseStore.sol/IBaseStore.json +304 -0
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +374 -35
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +305 -5
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +425 -97
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +753 -401
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +236 -80
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +747 -553
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +331 -31
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +100 -42
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +1323 -2012
- package/artifacts/contracts/instance/ProductStore.sol/ProductStore.dbg.json +4 -0
- package/artifacts/contracts/instance/ProductStore.sol/ProductStore.json +3427 -0
- package/artifacts/contracts/instance/RiskSet.sol/RiskSet.dbg.json +1 -1
- package/artifacts/contracts/instance/RiskSet.sol/RiskSet.json +101 -88
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.json +8 -8
- 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 +20 -20
- 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 +25 -16
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +282 -65
- 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 +19 -10
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.json +29 -0
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.json +19 -10
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +83 -38
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +116 -50
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.json +59 -58
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.json +268 -68
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +300 -123
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +144 -58
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.json +186 -33
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.json +29 -20
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.json +238 -19
- package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/pool/Pool.sol/Pool.json +29 -20
- package/artifacts/contracts/pool/PoolLib.sol/PoolLib.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolLib.sol/PoolLib.json +100 -34
- package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolService.sol/PoolService.json +338 -79
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +141 -63
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +216 -59
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +113 -43
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +46 -37
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.json +268 -68
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +142 -102
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +128 -70
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.json +166 -1
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.json +50 -10
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.json +55 -0
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +1 -1
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.json +29 -0
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.json +40 -31
- package/artifacts/contracts/product/IRiskService.sol/IRiskService.dbg.json +1 -1
- package/artifacts/contracts/product/IRiskService.sol/IRiskService.json +203 -18
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +157 -86
- package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.json +511 -21
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +138 -72
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +93 -112
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +115 -65
- package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/product/Product.sol/Product.json +40 -31
- package/artifacts/contracts/product/RiskService.sol/RiskService.dbg.json +1 -1
- package/artifacts/contracts/product/RiskService.sol/RiskService.json +231 -46
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.json +101 -43
- 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 +33 -22
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +29 -0
- 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 +71 -60
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +539 -314
- package/artifacts/contracts/registry/RegistryAuthorization.sol/RegistryAuthorization.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAuthorization.sol/RegistryAuthorization.json +335 -76
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +41 -12
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +96 -38
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.json +551 -246
- 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 +169 -111
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +459 -26
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +119 -59
- package/artifacts/contracts/shared/Component.sol/Component.dbg.json +1 -1
- package/artifacts/contracts/shared/Component.sol/Component.json +19 -10
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +196 -201
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +130 -64
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.dbg.json +1 -1
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.json +76 -41
- 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/ContractLib.sol/ITokenRegistryHelper.json +2 -2
- package/artifacts/contracts/shared/IAuthorizedComponent.sol/IAuthorizedComponent.dbg.json +4 -0
- package/artifacts/contracts/shared/{ComponentVerifyingService.sol/ComponentVerifyingService.json → IAuthorizedComponent.sol/IAuthorizedComponent.json} +238 -90
- package/artifacts/contracts/shared/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponent.sol/IComponent.json +19 -10
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.json +111 -132
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.json +19 -10
- 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/INftOwnable.sol/INftOwnable.json +19 -0
- 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 +19 -0
- 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 +29 -0
- 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/InstanceLinkedComponent.sol/InstanceLinkedComponent.json +19 -10
- 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 +21 -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 +19 -0
- 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 +29 -0
- 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/IStaking.sol/IStaking.json +1390 -134
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.json +97 -117
- package/artifacts/contracts/staking/ITargetLimitHandler.sol/ITargetLimitHandler.dbg.json +4 -0
- package/artifacts/contracts/staking/ITargetLimitHandler.sol/ITargetLimitHandler.json +50 -0
- package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.json +1479 -192
- package/artifacts/contracts/staking/StakingLib.sol/StakingLib.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingLib.sol/StakingLib.json +77 -76
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +139 -64
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +296 -152
- package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingService.sol/StakingService.json +131 -167
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +96 -46
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +1615 -815
- package/artifacts/contracts/staking/TargetHandler.sol/TargetHandler.dbg.json +4 -0
- package/artifacts/contracts/staking/TargetHandler.sol/TargetHandler.json +309 -0
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +153 -91
- 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/Blocknumber.sol/BlocknumberLib.json +64 -19
- package/artifacts/contracts/type/ChainId.sol/ChainIdLib.dbg.json +4 -0
- package/artifacts/contracts/type/ChainId.sol/ChainIdLib.json +193 -0
- 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 +22 -25
- 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 +23 -4
- 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/RequestIdSet.sol/LibRequestIdSet.dbg.json +4 -0
- package/artifacts/contracts/type/RequestIdSet.sol/LibRequestIdSet.json +33 -0
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.json +2 -2
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.json +39 -218
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +1 -1
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.json +64 -2
- 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 +69 -2
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.json +37 -5
- 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/VersionPartLib.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.json +10 -0
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.json +81 -27
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +15 -2
- package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.json +10 -0
- package/contracts/accounting/AccountingService.sol +15 -3
- package/contracts/accounting/IAccountingService.sol +4 -2
- package/contracts/authorization/AccessAdmin.sol +303 -326
- package/contracts/authorization/AccessAdminLib.sol +535 -23
- package/contracts/authorization/AccessManagerCloneable.sol +0 -18
- package/contracts/authorization/Authorization.sol +64 -239
- package/contracts/authorization/IAccess.sol +29 -12
- package/contracts/authorization/IAccessAdmin.sol +25 -53
- package/contracts/authorization/IAuthorization.sol +3 -57
- package/contracts/authorization/IServiceAuthorization.sol +55 -17
- package/contracts/authorization/ServiceAuthorization.sol +228 -34
- package/contracts/distribution/BasicDistribution.sol +3 -4
- package/contracts/distribution/BasicDistributionAuthorization.sol +11 -4
- package/contracts/distribution/Distribution.sol +9 -8
- package/contracts/distribution/DistributionService.sol +125 -62
- package/contracts/distribution/IDistributionComponent.sol +3 -1
- package/contracts/distribution/IDistributionService.sol +20 -8
- package/contracts/examples/fire/FireProduct.sol +6 -6
- package/contracts/examples/flight/FlightLib.sol +300 -0
- package/contracts/examples/flight/FlightMessageVerifier.sol +128 -0
- package/contracts/examples/flight/FlightOracle.sol +171 -0
- package/contracts/examples/flight/FlightOracleAuthorization.sol +53 -0
- package/contracts/examples/flight/FlightPool.sol +89 -0
- package/contracts/examples/flight/FlightPoolAuthorization.sol +37 -0
- package/contracts/examples/flight/FlightProduct.sol +685 -0
- package/contracts/examples/flight/FlightProductAuthorization.sol +69 -0
- package/contracts/examples/flight/FlightUSD.sol +28 -0
- package/contracts/examples/flight/originalV1.sol +396 -0
- package/contracts/examples/unpermissioned/SimpleProduct.sol +83 -19
- package/contracts/instance/BaseStore.sol +93 -0
- package/contracts/instance/IBaseStore.sol +37 -0
- package/contracts/instance/IInstance.sol +57 -6
- package/contracts/instance/IInstanceService.sol +42 -7
- package/contracts/instance/Instance.sol +111 -56
- package/contracts/instance/InstanceAdmin.sol +150 -294
- package/contracts/instance/InstanceAuthorizationV3.sol +106 -66
- package/contracts/instance/InstanceReader.sol +376 -392
- package/contracts/instance/InstanceService.sol +186 -134
- package/contracts/instance/InstanceStore.sol +153 -128
- package/contracts/instance/ProductStore.sol +290 -0
- package/contracts/instance/RiskSet.sol +10 -2
- package/contracts/instance/TargetNames.sol +10 -0
- package/contracts/instance/base/BalanceStore.sol +4 -6
- package/contracts/instance/base/ObjectLifecycle.sol +2 -6
- package/contracts/instance/module/IBundle.sol +6 -5
- package/contracts/instance/module/IComponents.sol +15 -5
- package/contracts/instance/module/IDistribution.sol +17 -7
- package/contracts/instance/module/IPolicy.sol +28 -8
- package/contracts/instance/module/IRisk.sol +2 -0
- package/contracts/oracle/BasicOracle.sol +2 -3
- package/contracts/oracle/BasicOracleAuthorization.sol +18 -2
- package/contracts/oracle/IOracle.sol +9 -4
- package/contracts/oracle/IOracleService.sol +12 -12
- package/contracts/oracle/Oracle.sol +4 -6
- package/contracts/oracle/OracleService.sol +8 -8
- package/contracts/pool/BasicPool.sol +4 -16
- package/contracts/pool/BasicPoolAuthorization.sol +10 -5
- package/contracts/pool/BundleService.sol +34 -43
- package/contracts/pool/IBundleService.sol +14 -13
- package/contracts/pool/IPoolService.sol +7 -2
- package/contracts/pool/Pool.sol +6 -18
- package/contracts/pool/PoolLib.sol +127 -2
- package/contracts/pool/PoolService.sol +40 -181
- package/contracts/product/ApplicationService.sol +64 -11
- package/contracts/product/BasicProduct.sol +2 -3
- package/contracts/product/BasicProductAuthorization.sol +13 -5
- package/contracts/product/ClaimService.sol +99 -105
- package/contracts/product/IApplicationService.sol +21 -2
- package/contracts/product/IClaimService.sol +5 -4
- package/contracts/product/IPolicyService.sol +9 -2
- package/contracts/product/IRiskService.sol +18 -3
- package/contracts/product/PolicyService.sol +40 -59
- package/contracts/product/PolicyServiceLib.sol +79 -5
- package/contracts/product/PricingService.sol +28 -31
- package/contracts/product/Product.sol +40 -16
- package/contracts/product/RiskService.sol +50 -15
- package/contracts/registry/IRegistry.sol +15 -9
- package/contracts/registry/IRelease.sol +6 -3
- package/contracts/registry/Registry.sol +15 -9
- package/contracts/registry/RegistryAdmin.sol +39 -118
- package/contracts/registry/RegistryAuthorization.sol +139 -69
- package/contracts/registry/RegistryService.sol +1 -1
- package/contracts/registry/ReleaseAdmin.sol +59 -106
- package/contracts/registry/ReleaseRegistry.sol +20 -12
- package/contracts/registry/ServiceAuthorizationV3.sol +43 -32
- package/contracts/registry/TokenRegistry.sol +56 -52
- package/contracts/shared/Component.sol +8 -8
- package/contracts/shared/ComponentService.sol +245 -262
- package/contracts/shared/ContractLib.sol +106 -75
- package/contracts/shared/EcdsaChecker.sol +5 -0
- package/contracts/shared/IAuthorizedComponent.sol +15 -0
- package/contracts/shared/IComponent.sol +1 -1
- package/contracts/shared/IComponentService.sol +14 -15
- package/contracts/shared/IInstanceLinkedComponent.sol +2 -5
- package/contracts/shared/INftOwnable.sol +2 -0
- package/contracts/shared/IRegisterable.sol +0 -1
- package/contracts/shared/InstanceLinkedComponent.sol +64 -26
- package/contracts/shared/NftOwnable.sol +3 -1
- package/contracts/shared/PolicyHolder.sol +3 -2
- package/contracts/shared/Service.sol +6 -4
- package/contracts/staking/IStaking.sol +261 -70
- package/contracts/staking/IStakingService.sol +39 -84
- package/contracts/staking/ITargetLimitHandler.sol +17 -0
- package/contracts/staking/Staking.sol +468 -217
- package/contracts/staking/StakingLib.sol +38 -124
- package/contracts/staking/StakingManager.sol +4 -3
- package/contracts/staking/StakingReader.sol +62 -71
- package/contracts/staking/StakingService.sol +42 -185
- package/contracts/staking/StakingServiceManager.sol +1 -0
- package/contracts/staking/StakingStore.sol +1093 -331
- package/contracts/staking/TargetHandler.sol +132 -0
- package/contracts/staking/TargetManagerLib.sol +69 -46
- package/contracts/type/Amount.sol +4 -0
- package/contracts/type/Blocknumber.sol +17 -22
- package/contracts/type/ChainId.sol +101 -0
- package/contracts/type/Fee.sol +8 -8
- package/contracts/type/NftId.sol +3 -3
- package/contracts/type/ObjectType.sol +17 -33
- package/contracts/type/Referral.sol +6 -0
- package/contracts/type/RequestIdSet.sol +62 -0
- package/contracts/type/RoleId.sol +57 -59
- package/contracts/type/Seconds.sol +23 -0
- package/contracts/type/String.sol +42 -0
- package/contracts/type/Timestamp.sol +14 -3
- package/contracts/type/UFixed.sol +28 -10
- package/contracts/upgradeability/IVersionable.sol +3 -0
- package/contracts/upgradeability/ProxyManager.sol +26 -12
- package/contracts/upgradeability/UpgradableProxyWithAdmin.sol +12 -2
- package/contracts/upgradeability/Versionable.sol +6 -3
- package/package.json +2 -1
- package/artifacts/contracts/authorization/AccessAdmin.sol/IAccessManagedChecker.dbg.json +0 -4
- package/artifacts/contracts/authorization/AccessAdmin.sol/IAccessManagedChecker.json +0 -24
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +0 -4
- package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.dbg.json +0 -4
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.dbg.json +0 -4
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.json +0 -538
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.dbg.json +0 -4
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.json +0 -205
- package/contracts/shared/ComponentVerifyingService.sol +0 -128
- package/contracts/shared/IKeyValueStore.sol +0 -54
- package/contracts/shared/KeyValueStore.sol +0 -131
- package/contracts/staking/StakingLifecycle.sol +0 -23
@@ -2,14 +2,17 @@
|
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
4
|
import {IAccess} from "../authorization/IAccess.sol";
|
5
|
+
import {IInstance} from "../instance/Instance.sol";
|
5
6
|
|
7
|
+
import {AccessAdminLib} from "../authorization/AccessAdminLib.sol";
|
6
8
|
import {Authorization} from "../authorization/Authorization.sol";
|
7
9
|
import {ACCOUNTING, ORACLE, POOL, INSTANCE, COMPONENT, DISTRIBUTION, APPLICATION, POLICY, CLAIM, BUNDLE, RISK} from "../../contracts/type/ObjectType.sol";
|
8
10
|
import {BundleSet} from "../instance/BundleSet.sol";
|
9
|
-
import {Instance} from "../instance/Instance.sol";
|
10
11
|
import {InstanceAdmin} from "../instance/InstanceAdmin.sol";
|
11
12
|
import {InstanceStore} from "../instance/InstanceStore.sol";
|
12
|
-
import {
|
13
|
+
import {INSTANCE_TARGET_NAME, INSTANCE_ADMIN_TARGET_NAME, INSTANCE_STORE_TARGET_NAME, PRODUCT_STORE_TARGET_NAME, BUNDLE_SET_TARGET_NAME, RISK_SET_TARGET_NAME} from "./TargetNames.sol";
|
14
|
+
import {ProductStore} from "../instance/ProductStore.sol";
|
15
|
+
import {ADMIN_ROLE, INSTANCE_OWNER_ROLE, PUBLIC_ROLE} from "../type/RoleId.sol";
|
13
16
|
import {RiskSet} from "../instance/RiskSet.sol";
|
14
17
|
|
15
18
|
|
@@ -18,30 +21,44 @@ contract InstanceAuthorizationV3
|
|
18
21
|
{
|
19
22
|
|
20
23
|
string public constant INSTANCE_ROLE_NAME = "InstanceRole";
|
21
|
-
|
22
|
-
string public constant INSTANCE_TARGET_NAME = "Instance";
|
23
|
-
string public constant INSTANCE_STORE_TARGET_NAME = "InstanceStore";
|
24
|
-
string public constant INSTANCE_ADMIN_TARGET_NAME = "InstanceAdmin";
|
25
|
-
string public constant BUNDLE_SET_TARGET_NAME = "BundleSet";
|
26
|
-
string public constant RISK_SET_TARGET_NAME = "RiskSet";
|
24
|
+
string public constant INSTANCE_OWNER_ROLE_NAME = "InstanceOwnerRole";
|
27
25
|
|
28
26
|
constructor()
|
29
|
-
Authorization(
|
27
|
+
Authorization(
|
28
|
+
INSTANCE_TARGET_NAME,
|
29
|
+
INSTANCE(),
|
30
|
+
3,
|
31
|
+
COMMIT_HASH,
|
32
|
+
TargetType.Instance,
|
33
|
+
false)
|
30
34
|
{ }
|
31
35
|
|
32
36
|
function _setupServiceTargets() internal virtual override {
|
33
37
|
// service targets relevant to instance
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
38
|
+
_authorizeServiceDomain(INSTANCE(), address(10));
|
39
|
+
_authorizeServiceDomain(ACCOUNTING(), address(11));
|
40
|
+
_authorizeServiceDomain(COMPONENT(), address(12));
|
41
|
+
_authorizeServiceDomain(DISTRIBUTION(), address(13));
|
42
|
+
_authorizeServiceDomain(ORACLE(), address(14));
|
43
|
+
_authorizeServiceDomain(POOL(), address(15));
|
44
|
+
_authorizeServiceDomain(BUNDLE(), address(16));
|
45
|
+
_authorizeServiceDomain(RISK(), address(17));
|
46
|
+
_authorizeServiceDomain(APPLICATION(), address(18));
|
47
|
+
_authorizeServiceDomain(POLICY(), address(19));
|
48
|
+
_authorizeServiceDomain(CLAIM(), address(20));
|
49
|
+
}
|
50
|
+
|
51
|
+
function _setupRoles()
|
52
|
+
internal
|
53
|
+
override
|
54
|
+
{
|
55
|
+
_addRole(
|
56
|
+
INSTANCE_OWNER_ROLE(),
|
57
|
+
AccessAdminLib.roleInfo(
|
58
|
+
ADMIN_ROLE(),
|
59
|
+
TargetType.Custom,
|
60
|
+
0, // max member count special case: instance nft owner is sole role owner
|
61
|
+
INSTANCE_OWNER_ROLE_NAME));
|
45
62
|
}
|
46
63
|
|
47
64
|
function _setupTargets()
|
@@ -49,12 +66,11 @@ contract InstanceAuthorizationV3
|
|
49
66
|
override
|
50
67
|
{
|
51
68
|
// instance supporting targets
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
69
|
+
_addInstanceTarget(INSTANCE_ADMIN_TARGET_NAME);
|
70
|
+
_addInstanceTarget(INSTANCE_STORE_TARGET_NAME);
|
71
|
+
_addInstanceTarget(PRODUCT_STORE_TARGET_NAME);
|
72
|
+
_addInstanceTarget(BUNDLE_SET_TARGET_NAME);
|
73
|
+
_addInstanceTarget(RISK_SET_TARGET_NAME);
|
58
74
|
}
|
59
75
|
|
60
76
|
|
@@ -65,6 +81,7 @@ contract InstanceAuthorizationV3
|
|
65
81
|
_setupInstanceAuthorization();
|
66
82
|
_setupInstanceAdminAuthorization();
|
67
83
|
_setupInstanceStoreAuthorization();
|
84
|
+
_setupProductStoreAuthorization();
|
68
85
|
_setupBundleSetAuthorization();
|
69
86
|
_setUpRiskSetAuthorization();
|
70
87
|
}
|
@@ -95,7 +112,7 @@ contract InstanceAuthorizationV3
|
|
95
112
|
// authorize risk service role
|
96
113
|
functions = _authorizeForTarget(RISK_SET_TARGET_NAME, getServiceRole(RISK()));
|
97
114
|
_authorize(functions, RiskSet.add.selector, "add");
|
98
|
-
_authorize(functions, RiskSet.
|
115
|
+
_authorize(functions, RiskSet.deactivate.selector, "deactivate");
|
99
116
|
_authorize(functions, RiskSet.activate.selector, "activate");
|
100
117
|
|
101
118
|
// authorize policy service role
|
@@ -112,25 +129,28 @@ contract InstanceAuthorizationV3
|
|
112
129
|
|
113
130
|
// authorize instance service role
|
114
131
|
functions = _authorizeForTarget(INSTANCE_TARGET_NAME, PUBLIC_ROLE());
|
115
|
-
_authorize(functions,
|
116
|
-
_authorize(functions,
|
132
|
+
_authorize(functions, IInstance.registerProduct.selector, "registerProduct");
|
133
|
+
_authorize(functions, IInstance.upgradeInstanceReader.selector, "upgradeInstanceReader");
|
117
134
|
|
118
135
|
// staking
|
119
|
-
_authorize(functions,
|
120
|
-
_authorize(functions,
|
121
|
-
_authorize(functions,
|
122
|
-
_authorize(functions,
|
136
|
+
_authorize(functions, IInstance.setStakingLockingPeriod.selector, "setStakingLockingPeriod");
|
137
|
+
_authorize(functions, IInstance.setStakingRewardRate.selector, "setStakingRewardRate");
|
138
|
+
_authorize(functions, IInstance.setStakingMaxAmount.selector, "setStakingMaxAmount");
|
139
|
+
_authorize(functions, IInstance.refillStakingRewardReserves.selector, "refillStakingRewardReserves");
|
140
|
+
_authorize(functions, IInstance.withdrawStakingRewardReserves.selector, "withdrawStakingRewardReserves");
|
123
141
|
|
124
142
|
// custom authz
|
125
|
-
_authorize(functions,
|
126
|
-
_authorize(functions,
|
127
|
-
_authorize(functions,
|
128
|
-
_authorize(functions,
|
129
|
-
_authorize(functions,
|
143
|
+
_authorize(functions, IInstance.createRole.selector, "createRole");
|
144
|
+
_authorize(functions, IInstance.setRoleActive.selector, "setRoleActive");
|
145
|
+
_authorize(functions, IInstance.grantRole.selector, "grantRole");
|
146
|
+
_authorize(functions, IInstance.revokeRole.selector, "revokeRole");
|
147
|
+
_authorize(functions, IInstance.createTarget.selector, "createTarget");
|
148
|
+
_authorize(functions, IInstance.authorizeFunctions.selector, "authorizeFunctions");
|
149
|
+
_authorize(functions, IInstance.unauthorizeFunctions.selector, "unauthorizeFunctions");
|
130
150
|
|
131
151
|
// authorize instance service role
|
132
152
|
functions = _authorizeForTarget(INSTANCE_TARGET_NAME, getServiceRole(INSTANCE()));
|
133
|
-
_authorize(functions,
|
153
|
+
_authorize(functions, IInstance.setInstanceReader.selector, "setInstanceReader");
|
134
154
|
}
|
135
155
|
|
136
156
|
|
@@ -141,13 +161,21 @@ contract InstanceAuthorizationV3
|
|
141
161
|
|
142
162
|
// authorize component service role
|
143
163
|
functions = _authorizeForTarget(INSTANCE_ADMIN_TARGET_NAME, getServiceRole(INSTANCE()));
|
144
|
-
_authorize(functions, InstanceAdmin.
|
164
|
+
_authorize(functions, InstanceAdmin.createRole.selector, "createRole");
|
165
|
+
_authorize(functions, InstanceAdmin.setRoleActive.selector, "setRoleActive");
|
166
|
+
_authorize(functions, InstanceAdmin.grantRole.selector, "grantRole");
|
167
|
+
_authorize(functions, InstanceAdmin.revokeRole.selector, "revokeRole");
|
168
|
+
|
169
|
+
_authorize(functions, InstanceAdmin.createTarget.selector, "createTarget");
|
170
|
+
_authorize(functions, InstanceAdmin.authorizeFunctions.selector, "authorizeFunctions");
|
171
|
+
_authorize(functions, InstanceAdmin.unauthorizeFunctions.selector, "unauthorizeFunctions");
|
145
172
|
_authorize(functions, InstanceAdmin.setTargetLocked.selector, "setTargetLocked");
|
173
|
+
_authorize(functions, InstanceAdmin.setInstanceLocked.selector, "setInstanceLocked");
|
146
174
|
|
147
175
|
// authorize component service role
|
148
176
|
functions = _authorizeForTarget(INSTANCE_ADMIN_TARGET_NAME, getServiceRole(COMPONENT()));
|
149
177
|
_authorize(functions, InstanceAdmin.initializeComponentAuthorization.selector, "initializeComponentAuthoriz");
|
150
|
-
_authorize(functions, InstanceAdmin.
|
178
|
+
_authorize(functions, InstanceAdmin.setContractLocked.selector, "setContractLocked");
|
151
179
|
}
|
152
180
|
|
153
181
|
|
@@ -168,10 +196,6 @@ contract InstanceAuthorizationV3
|
|
168
196
|
_authorize(functions, InstanceStore.createComponent.selector, "createComponent");
|
169
197
|
_authorize(functions, InstanceStore.updateComponent.selector, "updateComponent");
|
170
198
|
_authorize(functions, InstanceStore.createPool.selector, "createPool");
|
171
|
-
_authorize(functions, InstanceStore.createProduct.selector, "createProduct");
|
172
|
-
_authorize(functions, InstanceStore.updateProduct.selector, "updateProduct");
|
173
|
-
_authorize(functions, InstanceStore.createFee.selector, "createFee");
|
174
|
-
_authorize(functions, InstanceStore.updateFee.selector, "updateFee");
|
175
199
|
|
176
200
|
// authorize distribution service role
|
177
201
|
functions = _authorizeForTarget(INSTANCE_STORE_TARGET_NAME, getServiceRole(DISTRIBUTION()));
|
@@ -203,33 +227,49 @@ contract InstanceAuthorizationV3
|
|
203
227
|
_authorize(functions, InstanceStore.increaseLocked.selector, "increaseLocked");
|
204
228
|
_authorize(functions, InstanceStore.decreaseLocked.selector, "decreaseLocked");
|
205
229
|
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
230
|
+
}
|
231
|
+
|
232
|
+
function _setupProductStoreAuthorization()
|
233
|
+
internal
|
234
|
+
{
|
235
|
+
IAccess.FunctionInfo[] storage functions;
|
236
|
+
|
237
|
+
functions = _authorizeForTarget(PRODUCT_STORE_TARGET_NAME, getServiceRole(COMPONENT()));
|
238
|
+
_authorize(functions, ProductStore.createProduct.selector, "createProduct");
|
239
|
+
_authorize(functions, ProductStore.updateProduct.selector, "updateProduct");
|
240
|
+
_authorize(functions, ProductStore.createFee.selector, "createFee");
|
241
|
+
_authorize(functions, ProductStore.updateFee.selector, "updateFee");
|
211
242
|
|
212
243
|
// authorize application service role
|
213
|
-
functions = _authorizeForTarget(
|
214
|
-
_authorize(functions,
|
215
|
-
_authorize(functions,
|
216
|
-
_authorize(functions,
|
244
|
+
functions = _authorizeForTarget(PRODUCT_STORE_TARGET_NAME, getServiceRole(APPLICATION()));
|
245
|
+
_authorize(functions, ProductStore.createApplication.selector, "createApplication");
|
246
|
+
_authorize(functions, ProductStore.updateApplication.selector, "updateApplication");
|
247
|
+
_authorize(functions, ProductStore.updateApplicationState.selector, "updateApplicationState");
|
217
248
|
|
218
249
|
// authorize policy service role
|
219
|
-
functions = _authorizeForTarget(
|
220
|
-
_authorize(functions,
|
221
|
-
_authorize(functions,
|
222
|
-
|
223
|
-
|
250
|
+
functions = _authorizeForTarget(PRODUCT_STORE_TARGET_NAME, getServiceRole(POLICY()));
|
251
|
+
_authorize(functions, ProductStore.updatePolicy.selector, "updatePolicy");
|
252
|
+
_authorize(functions, ProductStore.updatePolicyState.selector, "updatePolicyState");
|
253
|
+
|
254
|
+
// authorize policy service role
|
255
|
+
functions = _authorizeForTarget(PRODUCT_STORE_TARGET_NAME, getServiceRole(POLICY()));
|
256
|
+
_authorize(functions, ProductStore.createPremium.selector, "createPremium");
|
257
|
+
_authorize(functions, ProductStore.updatePremiumState.selector, "updatePremiumState");
|
258
|
+
|
259
|
+
// authorize risk service role
|
260
|
+
functions = _authorizeForTarget(PRODUCT_STORE_TARGET_NAME, getServiceRole(RISK()));
|
261
|
+
_authorize(functions, ProductStore.createRisk.selector, "createRisk");
|
262
|
+
_authorize(functions, ProductStore.updateRisk.selector, "updateRisk");
|
263
|
+
_authorize(functions, ProductStore.updateRiskState.selector, "updateRiskState");
|
224
264
|
|
225
265
|
// authorize claim service role
|
226
|
-
functions = _authorizeForTarget(
|
227
|
-
_authorize(functions,
|
228
|
-
_authorize(functions,
|
229
|
-
_authorize(functions,
|
230
|
-
_authorize(functions,
|
231
|
-
_authorize(functions,
|
232
|
-
_authorize(functions,
|
266
|
+
functions = _authorizeForTarget(PRODUCT_STORE_TARGET_NAME, getServiceRole(CLAIM()));
|
267
|
+
_authorize(functions, ProductStore.updatePolicyClaims.selector, "updatePolicyClaims");
|
268
|
+
_authorize(functions, ProductStore.createClaim.selector, "createClaim");
|
269
|
+
_authorize(functions, ProductStore.updateClaim.selector, "updateClaim");
|
270
|
+
_authorize(functions, ProductStore.createPayout.selector, "createPayout");
|
271
|
+
_authorize(functions, ProductStore.updatePayout.selector, "updatePayout");
|
272
|
+
_authorize(functions, ProductStore.updatePayoutState.selector, "updatePayoutState");
|
233
273
|
}
|
234
274
|
}
|
235
275
|
|