@etherisc/gif-next 0.0.2-9dd41ff-671 → 0.0.2-9ed3c41-176
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -2
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +4 -0
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.json +1253 -0
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.dbg.json +4 -0
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.json +1206 -0
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.json +358 -0
- package/artifacts/contracts/authorization/IAccess.sol/IAccess.dbg.json +4 -0
- package/artifacts/contracts/{instance/module/ISetup.sol/ISetup.json → authorization/IAccess.sol/IAccess.json} +2 -2
- package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.dbg.json +4 -0
- package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.json +1032 -0
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.json +258 -0
- package/artifacts/contracts/authorization/IModuleAuthorization.sol/IModuleAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/IModuleAuthorization.sol/IModuleAuthorization.json +290 -0
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.json +148 -0
- package/artifacts/contracts/authorization/ModuleAuthorization.sol/ModuleAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/ModuleAuthorization.sol/ModuleAuthorization.json +390 -0
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.json +190 -0
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +4 -0
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +1505 -0
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +4 -0
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +410 -0
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +148 -352
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +154 -335
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +72 -97
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +151 -251
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +67 -64
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.dbg.json +4 -0
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.json +703 -0
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +71 -72
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +190 -49
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +81 -141
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +1158 -278
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +4 -0
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +601 -0
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +493 -332
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +271 -109
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +65 -58
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +1103 -359
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.dbg.json +4 -0
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.json +318 -0
- package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.dbg.json +1 -1
- package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.json +0 -53
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.dbg.json +4 -0
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.json +10 -0
- package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.dbg.json +4 -0
- package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.json +182 -0
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.dbg.json +4 -0
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.json +181 -0
- package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IAccess.sol/IAccess.json +21 -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 +4 -0
- package/artifacts/contracts/mock/Dip.sol/Dip.json +376 -0
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.dbg.json +4 -0
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.json +1155 -0
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +4 -0
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +418 -0
- package/artifacts/contracts/oracle/IOracle.sol/IOracle.dbg.json +4 -0
- package/artifacts/contracts/oracle/IOracle.sol/IOracle.json +52 -0
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.dbg.json +4 -0
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.json +772 -0
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.dbg.json +4 -0
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.json +675 -0
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.dbg.json +4 -0
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.json +1063 -0
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +4 -0
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +1034 -0
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +4 -0
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +730 -0
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +4 -0
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.json +1477 -0
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.dbg.json +4 -0
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.json +410 -0
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +95 -268
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +60 -73
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.json +19 -51
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.json +149 -285
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.json +134 -133
- package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/pool/Pool.sol/Pool.json +191 -348
- package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolService.sol/PoolService.json +180 -368
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +47 -84
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +93 -167
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +61 -50
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +4 -0
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +1299 -0
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.dbg.json +4 -0
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.json +410 -0
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +121 -211
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +75 -72
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.json +20 -1
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.json +20 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.json +94 -25
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +1 -1
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.json +40 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.json +253 -148
- package/artifacts/contracts/product/IProductService.sol/IProductService.dbg.json +1 -1
- package/artifacts/contracts/product/IProductService.sol/IProductService.json +13 -55
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +180 -297
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +58 -103
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +163 -174
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +86 -59
- package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/product/Product.sol/Product.json +288 -248
- package/artifacts/contracts/product/ProductService.sol/ProductService.dbg.json +1 -1
- package/artifacts/contracts/product/ProductService.sol/ProductService.json +47 -222
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.json +39 -48
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +2 -2
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +106 -32
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +42 -73
- 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 +359 -47
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +1557 -116
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +198 -28
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +45 -42
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.dbg.json +4 -0
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.json +164 -0
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.dbg.json +4 -0
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.json +1159 -0
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +4 -0
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +214 -0
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +314 -136
- package/artifacts/contracts/shared/Component.sol/Component.dbg.json +1 -1
- package/artifacts/contracts/shared/Component.sol/Component.json +100 -96
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +892 -55
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +4 -0
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +784 -0
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +4 -0
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.json +539 -0
- package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
- package/artifacts/contracts/shared/ERC165.sol/ERC165.json +2 -2
- package/artifacts/contracts/shared/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponent.sol/IComponent.json +76 -81
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +4 -0
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.json +880 -0
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +4 -0
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.json +718 -0
- package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.dbg.json +4 -0
- package/artifacts/contracts/{instance/base → shared}/IKeyValueStore.sol/IKeyValueStore.json +12 -16
- package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.dbg.json +4 -0
- package/artifacts/contracts/{instance/base → shared}/ILifecycle.sol/ILifecycle.json +1 -6
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.json +7 -1
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.json +21 -3
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +7 -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 +20 -1
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
- package/artifacts/contracts/shared/InitializableCustom.sol/InitializableCustom.dbg.json +4 -0
- package/artifacts/contracts/shared/InitializableCustom.sol/InitializableCustom.json +39 -0
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.dbg.json +4 -0
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.json +996 -0
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.dbg.json +4 -0
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.json +497 -0
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.dbg.json +4 -0
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.json +133 -0
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.dbg.json +4 -0
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.json +306 -0
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +33 -20
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +31 -13
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +19 -32
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +17 -22
- 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 +16 -16
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +40 -4
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +2 -2
- package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
- package/artifacts/contracts/staking/IStaking.sol/IStaking.dbg.json +4 -0
- package/artifacts/contracts/staking/IStaking.sol/IStaking.json +1438 -0
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.json +566 -54
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.dbg.json +4 -0
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.json +460 -0
- package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +4 -0
- package/artifacts/contracts/staking/Staking.sol/Staking.json +2005 -0
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.dbg.json +4 -0
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.json +164 -0
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +4 -0
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +761 -0
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +4 -0
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +592 -0
- package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingService.sol/StakingService.json +657 -100
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +65 -46
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +4 -0
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +2237 -0
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +4 -0
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +571 -0
- package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.dbg.json +1 -1
- package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.json +2 -2
- package/artifacts/contracts/type/Amount.sol/AmountLib.dbg.json +1 -1
- package/artifacts/contracts/type/Amount.sol/AmountLib.json +68 -4
- package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
- package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.json +53 -2
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.json +4 -4
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.json +4 -4
- package/artifacts/contracts/type/Fee.sol/FeeLib.dbg.json +1 -1
- package/artifacts/contracts/type/Fee.sol/FeeLib.json +34 -34
- package/artifacts/contracts/type/Key32.sol/Key32Lib.dbg.json +1 -1
- package/artifacts/contracts/type/Key32.sol/Key32Lib.json +2 -2
- package/artifacts/contracts/type/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/NftId.sol/NftIdLib.json +47 -4
- 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 +149 -2
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.json +4 -4
- package/artifacts/contracts/type/Referral.sol/ReferralLib.dbg.json +1 -1
- package/artifacts/contracts/type/Referral.sol/ReferralLib.json +4 -4
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.dbg.json +4 -0
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.json +204 -0
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.json +4 -4
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.json +219 -6
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +1 -1
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.json +76 -2
- package/artifacts/contracts/type/Selector.sol/SelectorLib.dbg.json +4 -0
- package/artifacts/contracts/type/Selector.sol/SelectorLib.json +129 -0
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.dbg.json +4 -0
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.json +10 -0
- package/artifacts/contracts/type/StateId.sol/StateIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/StateId.sol/StateIdLib.json +2 -2
- package/artifacts/contracts/type/String.sol/StrLib.dbg.json +4 -0
- package/artifacts/contracts/type/String.sol/StrLib.json +132 -0
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.json +17 -4
- package/artifacts/contracts/type/UFixed.sol/MathLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/MathLib.json +2 -2
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.json +21 -2
- package/artifacts/contracts/type/Version.sol/VersionLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionLib.json +2 -2
- package/artifacts/contracts/type/Version.sol/VersionPartLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionPartLib.json +21 -2
- package/contracts/authorization/AccessAdmin.sol +591 -0
- package/contracts/authorization/AccessManagerCloneable.sol +16 -0
- package/contracts/authorization/Authorization.sol +218 -0
- package/contracts/authorization/IAccess.sol +48 -0
- package/contracts/authorization/IAccessAdmin.sol +136 -0
- package/contracts/authorization/IAuthorization.sol +54 -0
- package/contracts/authorization/IModuleAuthorization.sol +21 -0
- package/contracts/authorization/IServiceAuthorization.sol +38 -0
- package/contracts/authorization/ModuleAuthorization.sol +78 -0
- package/contracts/authorization/ServiceAuthorization.sol +90 -0
- package/contracts/distribution/BasicDistribution.sol +149 -0
- package/contracts/distribution/BasicDistributionAuthorization.sol +43 -0
- package/contracts/distribution/Distribution.sol +144 -146
- package/contracts/distribution/DistributionService.sol +69 -118
- package/contracts/distribution/IDistributionComponent.sol +20 -43
- package/contracts/distribution/IDistributionService.sol +7 -9
- package/contracts/instance/{BundleManager.sol → BundleSet.sol} +23 -23
- package/contracts/instance/IInstance.sol +21 -12
- package/contracts/instance/IInstanceService.sol +44 -25
- package/contracts/instance/Instance.sol +110 -86
- package/contracts/instance/InstanceAdmin.sol +194 -282
- package/contracts/instance/InstanceAuthorizationV3.sol +202 -0
- package/contracts/instance/InstanceReader.sol +84 -47
- package/contracts/instance/InstanceService.sol +253 -108
- package/contracts/instance/InstanceStore.sol +131 -66
- package/contracts/instance/base/BalanceStore.sol +123 -0
- package/contracts/instance/base/Cloneable.sol +2 -25
- package/contracts/instance/base/ObjectCounter.sol +21 -0
- package/contracts/instance/base/ObjectLifecycle.sol +106 -0
- package/contracts/instance/base/{ObjectManager.sol → ObjectSet.sol} +11 -14
- package/contracts/instance/module/IAccess.sol +2 -0
- package/contracts/instance/module/IBundle.sol +1 -4
- package/contracts/instance/module/IComponents.sol +15 -4
- package/contracts/instance/module/IPolicy.sol +8 -2
- package/contracts/mock/Dip.sol +26 -0
- package/contracts/oracle/BasicOracle.sol +48 -0
- package/contracts/oracle/BasicOracleAuthorization.sol +46 -0
- package/contracts/oracle/IOracle.sol +36 -0
- package/contracts/oracle/IOracleComponent.sol +32 -0
- package/contracts/oracle/IOracleService.sol +65 -0
- package/contracts/oracle/Oracle.sol +157 -0
- package/contracts/oracle/OracleService.sol +278 -0
- package/contracts/oracle/OracleServiceManager.sol +42 -0
- package/contracts/pool/BasicPool.sol +164 -0
- package/contracts/pool/BasicPoolAuthorization.sol +49 -0
- package/contracts/pool/BundleService.sol +86 -174
- package/contracts/pool/IBundleService.sol +4 -16
- package/contracts/pool/IPoolComponent.sol +4 -66
- package/contracts/pool/IPoolService.sol +45 -9
- package/contracts/pool/Pool.sol +150 -141
- package/contracts/pool/PoolService.sol +191 -144
- package/contracts/product/ApplicationService.sol +109 -42
- package/contracts/product/BasicProduct.sol +82 -0
- package/contracts/product/BasicProductAuthorization.sol +40 -0
- package/contracts/product/ClaimService.sol +18 -19
- package/contracts/product/IApplicationService.sol +1 -1
- package/contracts/product/IClaimService.sol +7 -1
- package/contracts/product/IPolicyService.sol +6 -8
- package/contracts/product/IPricingService.sol +3 -1
- package/contracts/product/IProductComponent.sol +9 -11
- package/contracts/product/IProductService.sol +1 -8
- package/contracts/product/PolicyService.sol +225 -128
- package/contracts/product/PricingService.sol +72 -48
- package/contracts/product/Product.sol +118 -105
- package/contracts/product/ProductService.sol +26 -114
- package/contracts/registry/ChainNft.sol +8 -1
- package/contracts/registry/IRegistry.sol +40 -18
- package/contracts/registry/IRegistryService.sol +15 -5
- package/contracts/registry/Registry.sol +221 -110
- package/contracts/registry/RegistryAdmin.sol +299 -77
- package/contracts/registry/RegistryService.sol +48 -14
- package/contracts/registry/RegistryServiceManager.sol +2 -9
- package/contracts/registry/ReleaseLifecycle.sol +27 -0
- package/contracts/registry/ReleaseRegistry.sol +487 -0
- package/contracts/registry/ServiceAuthorizationV3.sol +200 -0
- package/contracts/registry/TokenRegistry.sol +261 -64
- package/contracts/shared/Component.sol +139 -129
- package/contracts/shared/ComponentService.sol +527 -87
- package/contracts/shared/ComponentServiceManager.sol +35 -0
- package/contracts/shared/ComponentVerifyingService.sol +117 -0
- package/contracts/shared/ERC165.sol +1 -1
- package/contracts/shared/IComponent.sol +17 -37
- package/contracts/shared/IComponentService.sol +102 -0
- package/contracts/shared/IInstanceLinkedComponent.sol +50 -0
- package/contracts/{instance/base → shared}/IKeyValueStore.sol +7 -6
- package/contracts/{instance/base → shared}/ILifecycle.sol +3 -4
- package/contracts/shared/INftOwnable.sol +1 -1
- package/contracts/shared/IPolicyHolder.sol +6 -1
- package/contracts/shared/IService.sol +8 -1
- package/contracts/shared/InitializableCustom.sol +177 -0
- package/contracts/shared/InstanceLinkedComponent.sol +151 -0
- package/contracts/{instance/base → shared}/KeyValueStore.sol +36 -74
- package/contracts/shared/Lifecycle.sol +77 -0
- package/contracts/shared/NftIdSet.sol +65 -0
- package/contracts/shared/NftOwnable.sol +3 -13
- package/contracts/shared/PolicyHolder.sol +21 -13
- package/contracts/shared/ProxyManager.sol +2 -3
- package/contracts/shared/Registerable.sol +2 -2
- package/contracts/shared/Service.sol +32 -21
- package/contracts/shared/TokenHandler.sol +24 -1
- package/contracts/staking/IStaking.sol +167 -0
- package/contracts/staking/IStakingService.sol +105 -47
- package/contracts/staking/StakeManagerLib.sol +231 -0
- package/contracts/staking/Staking.sol +511 -0
- package/contracts/staking/StakingLifecycle.sol +23 -0
- package/contracts/staking/StakingManager.sol +53 -0
- package/contracts/staking/StakingReader.sol +186 -0
- package/contracts/staking/StakingService.sol +286 -44
- package/contracts/staking/StakingServiceManager.sol +7 -3
- package/contracts/staking/StakingStore.sol +615 -0
- package/contracts/staking/TargetManagerLib.sol +207 -0
- package/contracts/type/AddressSet.sol +1 -1
- package/contracts/type/Amount.sol +20 -1
- package/contracts/type/Blocknumber.sol +20 -3
- package/contracts/type/Fee.sol +17 -16
- package/contracts/type/NftId.sol +14 -16
- package/contracts/type/NftIdSet.sol +1 -1
- package/contracts/type/ObjectType.sol +172 -63
- package/contracts/type/Referral.sol +1 -1
- package/contracts/type/RequestId.sol +75 -0
- package/contracts/type/RiskId.sol +1 -1
- package/contracts/type/RoleId.sol +104 -69
- package/contracts/type/Seconds.sol +27 -0
- package/contracts/type/Selector.sol +102 -0
- package/contracts/type/StateId.sol +27 -2
- package/contracts/type/String.sol +53 -0
- package/contracts/type/Timestamp.sol +6 -2
- package/contracts/type/UFixed.sol +6 -0
- package/contracts/type/Version.sol +4 -2
- package/package.json +8 -5
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +0 -4
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +0 -778
- package/artifacts/contracts/instance/InstanceAuthorizationsLib.sol/InstanceAuthorizationsLib.dbg.json +0 -4
- package/artifacts/contracts/instance/InstanceAuthorizationsLib.sol/InstanceAuthorizationsLib.json +0 -188
- package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +0 -4
- package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +0 -4
- package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +0 -4
- package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +0 -581
- package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +0 -4
- package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +0 -194
- package/artifacts/contracts/instance/base/ObjectManager.sol/ObjectManager.dbg.json +0 -4
- package/artifacts/contracts/instance/base/ObjectManager.sol/ObjectManager.json +0 -256
- package/artifacts/contracts/instance/module/ISetup.sol/ISetup.dbg.json +0 -4
- package/artifacts/contracts/instance/module/ITreasury.sol/ITreasury.dbg.json +0 -4
- package/artifacts/contracts/instance/module/ITreasury.sol/ITreasury.json +0 -10
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +0 -4
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +0 -1018
- package/artifacts/contracts/shared/AccessManagerCustom.sol/AccessManagerCustom.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerCustom.sol/AccessManagerCustom.json +0 -1193
- package/artifacts/contracts/shared/AccessManagerExtended.sol/AccessManagerExtended.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtended.sol/AccessManagerExtended.json +0 -1715
- package/artifacts/contracts/shared/AccessManagerExtendedInitializeable.sol/AccessManagerExtendedInitializeable.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtendedInitializeable.sol/AccessManagerExtendedInitializeable.json +0 -1728
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisable.sol/AccessManagerExtendedWithDisable.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisable.sol/AccessManagerExtendedWithDisable.json +0 -1747
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol/AccessManagerExtendedWithDisableInitializeable.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol/AccessManagerExtendedWithDisableInitializeable.json +0 -1765
- package/artifacts/contracts/shared/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.json +0 -1206
- package/artifacts/contracts/shared/IAccessManagerExtended.sol/IAccessManagerExtended.dbg.json +0 -4
- package/artifacts/contracts/shared/IAccessManagerExtended.sol/IAccessManagerExtended.json +0 -1562
- package/artifacts/contracts/shared/IAccessManagerExtendedWithDisable.sol/IAccessManagerExtendedWithDisable.dbg.json +0 -4
- package/artifacts/contracts/shared/IAccessManagerExtendedWithDisable.sol/IAccessManagerExtendedWithDisable.json +0 -1594
- package/contracts/instance/InstanceAuthorizationsLib.sol +0 -320
- package/contracts/instance/base/Lifecycle.sol +0 -121
- package/contracts/instance/module/ISetup.sol +0 -33
- package/contracts/instance/module/ITreasury.sol +0 -23
- package/contracts/registry/ReleaseManager.sol +0 -465
- package/contracts/shared/AccessManagerCustom.sol +0 -736
- package/contracts/shared/AccessManagerExtended.sol +0 -469
- package/contracts/shared/AccessManagerExtendedInitializeable.sol +0 -13
- package/contracts/shared/AccessManagerExtendedWithDisable.sol +0 -125
- package/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol +0 -14
- package/contracts/shared/AccessManagerUpgradeableInitializeable.sol +0 -13
- package/contracts/shared/IAccessManagerExtended.sol +0 -74
- package/contracts/shared/IAccessManagerExtendedWithDisable.sol +0 -17
@@ -1,19 +1,20 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
|
-
pragma solidity ^0.8.
|
2
|
+
pragma solidity ^0.8.20;
|
3
3
|
|
4
4
|
import {IRegistry} from "../registry/IRegistry.sol";
|
5
5
|
import {IInstance} from "../instance/IInstance.sol";
|
6
|
-
import {
|
6
|
+
import {IComponentService} from "../shared/IComponentService.sol";
|
7
|
+
import {IInstanceService} from "../instance/IInstanceService.sol";
|
8
|
+
import {IRegistryService} from "../registry/IRegistryService.sol";
|
7
9
|
import {InstanceReader} from "../instance/InstanceReader.sol";
|
8
|
-
import {
|
10
|
+
import {IComponents} from "../instance/module/IComponents.sol";
|
9
11
|
import {IPolicy} from "../instance/module/IPolicy.sol";
|
10
12
|
|
11
13
|
import {Amount, AmountLib} from "../type/Amount.sol";
|
12
|
-
import {NftId, NftIdLib
|
14
|
+
import {NftId, NftIdLib} from "../type/NftId.sol";
|
13
15
|
import {Fee, FeeLib} from "../type/Fee.sol";
|
14
|
-
import {PRODUCT_SERVICE_ROLE, DISTRIBUTION_OWNER_ROLE} from "../type/RoleId.sol";
|
15
16
|
import {KEEP_STATE} from "../type/StateId.sol";
|
16
|
-
import {ObjectType, DISTRIBUTION, INSTANCE, DISTRIBUTION, DISTRIBUTOR,
|
17
|
+
import {ObjectType, COMPONENT, DISTRIBUTION, INSTANCE, DISTRIBUTION, DISTRIBUTOR, REGISTRY} from "../type/ObjectType.sol";
|
17
18
|
import {Version, VersionLib} from "../type/Version.sol";
|
18
19
|
import {RoleId} from "../type/RoleId.sol";
|
19
20
|
|
@@ -22,7 +23,7 @@ import {Versionable} from "../shared/Versionable.sol";
|
|
22
23
|
|
23
24
|
import {IService} from "../shared/IService.sol";
|
24
25
|
import {Service} from "../shared/Service.sol";
|
25
|
-
import {
|
26
|
+
import {ComponentVerifyingService} from "../shared/ComponentVerifyingService.sol";
|
26
27
|
import {InstanceService} from "../instance/InstanceService.sol";
|
27
28
|
import {IComponent} from "../shared/IComponent.sol";
|
28
29
|
import {IDistributionComponent} from "../distribution/IDistributionComponent.sol";
|
@@ -39,7 +40,7 @@ import {InstanceStore} from "../instance/InstanceStore.sol";
|
|
39
40
|
|
40
41
|
|
41
42
|
contract DistributionService is
|
42
|
-
|
43
|
+
ComponentVerifyingService,
|
43
44
|
IDistributionService
|
44
45
|
{
|
45
46
|
using NftIdLib for NftId;
|
@@ -48,7 +49,9 @@ contract DistributionService is
|
|
48
49
|
using FeeLib for Fee;
|
49
50
|
using ReferralLib for ReferralId;
|
50
51
|
|
51
|
-
|
52
|
+
IComponentService private _componentService;
|
53
|
+
IInstanceService private _instanceService;
|
54
|
+
IRegistryService private _registryService;
|
52
55
|
|
53
56
|
function _initialize(
|
54
57
|
address owner,
|
@@ -58,81 +61,20 @@ contract DistributionService is
|
|
58
61
|
initializer
|
59
62
|
virtual override
|
60
63
|
{
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
64
|
+
address initialOwner;
|
65
|
+
address registryAddress;
|
66
|
+
(registryAddress, initialOwner) = abi.decode(data, (address, address));
|
67
|
+
// TODO while DistributionService is not deployed in DistributionServiceManager constructor
|
68
|
+
// owner is DistributionServiceManager deployer
|
69
|
+
initializeService(registryAddress, address(0), owner);
|
66
70
|
|
67
|
-
|
68
|
-
|
69
|
-
|
71
|
+
_componentService = IComponentService(_getServiceAddress(COMPONENT()));
|
72
|
+
_instanceService = IInstanceService(_getServiceAddress(INSTANCE()));
|
73
|
+
_registryService = IRegistryService(_getServiceAddress(REGISTRY()));
|
70
74
|
|
71
|
-
|
72
|
-
return DISTRIBUTION();
|
75
|
+
registerInterface(type(IDistributionService).interfaceId);
|
73
76
|
}
|
74
77
|
|
75
|
-
function register(address distributionAddress)
|
76
|
-
external
|
77
|
-
returns(NftId distributionNftId)
|
78
|
-
{
|
79
|
-
(
|
80
|
-
IComponent component,
|
81
|
-
address owner,
|
82
|
-
IInstance instance,
|
83
|
-
NftId instanceNftId
|
84
|
-
) = _checkComponentForRegistration(
|
85
|
-
distributionAddress,
|
86
|
-
DISTRIBUTION(),
|
87
|
-
DISTRIBUTION_OWNER_ROLE());
|
88
|
-
|
89
|
-
IRegistry.ObjectInfo memory distributionInfo = getRegistryService().registerDistribution(component, owner);
|
90
|
-
IDistributionComponent distribution = IDistributionComponent(distributionAddress);
|
91
|
-
distribution.linkToRegisteredNftId();
|
92
|
-
distributionNftId = distributionInfo.nftId;
|
93
|
-
|
94
|
-
instance.getInstanceStore().createDistributionSetup(distributionNftId, distribution.getSetupInfo());
|
95
|
-
// TODO move to distribution?
|
96
|
-
bytes4[][] memory selectors = new bytes4[][](2);
|
97
|
-
selectors[0] = new bytes4[](1);
|
98
|
-
// TODO check if array size should be 1 instead of 2
|
99
|
-
selectors[1] = new bytes4[](2);
|
100
|
-
|
101
|
-
selectors[0][0] = IDistributionComponent.setFees.selector;
|
102
|
-
selectors[1][0] = IDistributionComponent.processRenewal.selector;
|
103
|
-
|
104
|
-
RoleId[] memory roles = new RoleId[](2);
|
105
|
-
roles[0] = DISTRIBUTION_OWNER_ROLE();
|
106
|
-
roles[1] = PRODUCT_SERVICE_ROLE();
|
107
|
-
|
108
|
-
getInstanceService().createGifTarget(
|
109
|
-
instanceNftId,
|
110
|
-
distributionAddress,
|
111
|
-
distribution.getName(),
|
112
|
-
selectors,
|
113
|
-
roles);
|
114
|
-
}
|
115
|
-
|
116
|
-
function setFees(
|
117
|
-
Fee memory minDistributionOwnerFee,
|
118
|
-
Fee memory distributionFee
|
119
|
-
)
|
120
|
-
external
|
121
|
-
override
|
122
|
-
{
|
123
|
-
if (minDistributionOwnerFee.fractionalFee > distributionFee.fractionalFee) {
|
124
|
-
revert ErrorIDistributionServiceMinFeeTooHigh(minDistributionOwnerFee.fractionalFee.toInt(), distributionFee.fractionalFee.toInt());
|
125
|
-
}
|
126
|
-
|
127
|
-
(NftId distributionNftId,, IInstance instance) = _getAndVerifyCallingComponentAndInstance(DISTRIBUTION());
|
128
|
-
InstanceReader instanceReader = instance.getInstanceReader();
|
129
|
-
|
130
|
-
ISetup.DistributionSetupInfo memory distSetupInfo = instanceReader.getDistributionSetupInfo(distributionNftId);
|
131
|
-
distSetupInfo.minDistributionOwnerFee = minDistributionOwnerFee;
|
132
|
-
distSetupInfo.distributionFee = distributionFee;
|
133
|
-
|
134
|
-
instance.getInstanceStore().updateDistributionSetup(distributionNftId, distSetupInfo, KEEP_STATE());
|
135
|
-
}
|
136
78
|
|
137
79
|
function createDistributorType(
|
138
80
|
string memory name,
|
@@ -148,14 +90,23 @@ contract DistributionService is
|
|
148
90
|
external
|
149
91
|
returns (DistributorType distributorType)
|
150
92
|
{
|
151
|
-
(NftId distributionNftId,, IInstance instance) =
|
93
|
+
(NftId distributionNftId,, IInstance instance) = _getAndVerifyActiveComponent(DISTRIBUTION());
|
94
|
+
InstanceReader instanceReader = instance.getInstanceReader();
|
152
95
|
|
153
96
|
{
|
154
|
-
|
155
|
-
|
156
|
-
|
97
|
+
NftId productNftId = _getProductNftId(instanceReader, distributionNftId);
|
98
|
+
IComponents.ProductInfo memory productInfo = instance.getInstanceReader().getProductInfo(productNftId);
|
99
|
+
|
100
|
+
UFixed variableDistributionFees = productInfo.distributionFee.fractionalFee;
|
101
|
+
UFixed variableFeesPartsTotal = productInfo.minDistributionOwnerFee.fractionalFee + commissionPercentage;
|
102
|
+
|
103
|
+
if (variableFeesPartsTotal > variableDistributionFees) {
|
104
|
+
revert ErrorDistributionServiceVariableFeesTooHight(variableDistributionFees.toInt1000(), variableFeesPartsTotal.toInt1000());
|
105
|
+
}
|
106
|
+
UFixed maxDiscountPercentageLimit = variableDistributionFees - variableFeesPartsTotal;
|
107
|
+
|
157
108
|
if (maxDiscountPercentage.gt(maxDiscountPercentageLimit)) {
|
158
|
-
revert
|
109
|
+
revert ErrorDistributionServiceMaxDiscountTooHigh(maxDiscountPercentage.toInt1000(), maxDiscountPercentageLimit.toInt1000());
|
159
110
|
}
|
160
111
|
}
|
161
112
|
|
@@ -184,11 +135,11 @@ contract DistributionService is
|
|
184
135
|
virtual
|
185
136
|
returns (NftId distributorNftId)
|
186
137
|
{
|
187
|
-
(NftId distributionNftId,, IInstance instance) =
|
138
|
+
(NftId distributionNftId,, IInstance instance) = _getAndVerifyActiveComponent(DISTRIBUTION());
|
188
139
|
|
189
|
-
distributorNftId =
|
140
|
+
distributorNftId = _registryService.registerDistributor(
|
190
141
|
IRegistry.ObjectInfo(
|
191
|
-
|
142
|
+
NftIdLib.zero(),
|
192
143
|
distributionNftId,
|
193
144
|
DISTRIBUTOR(),
|
194
145
|
true, // intercepting property for bundles is defined on pool
|
@@ -236,7 +187,7 @@ contract DistributionService is
|
|
236
187
|
virtual
|
237
188
|
returns (ReferralId referralId)
|
238
189
|
{
|
239
|
-
(NftId distributionNftId,, IInstance instance) =
|
190
|
+
(NftId distributionNftId,, IInstance instance) = _getAndVerifyActiveComponent(DISTRIBUTION());
|
240
191
|
|
241
192
|
if (bytes(code).length == 0) {
|
242
193
|
revert ErrorIDistributionServiceInvalidReferral(code);
|
@@ -277,57 +228,53 @@ contract DistributionService is
|
|
277
228
|
return referralId;
|
278
229
|
}
|
279
230
|
|
231
|
+
|
280
232
|
function processSale(
|
281
233
|
NftId distributionNftId, // assume always of distribution type
|
282
234
|
ReferralId referralId,
|
283
|
-
IPolicy.Premium memory premium
|
284
|
-
Amount transferredDistributionFeeAmount
|
235
|
+
IPolicy.Premium memory premium
|
285
236
|
)
|
286
237
|
external
|
287
238
|
virtual
|
288
239
|
restricted
|
289
240
|
{
|
290
|
-
bool isReferral = ! referralId.eqz();
|
291
|
-
bool referralValid = referralIsValid(distributionNftId, referralId);
|
292
|
-
|
293
|
-
if (isReferral && ! referralValid) {
|
294
|
-
revert ErrorIDistributionServiceReferralInvalid(distributionNftId, referralId);
|
295
|
-
}
|
296
|
-
|
297
241
|
IInstance instance = _getInstanceForDistribution(distributionNftId);
|
298
242
|
InstanceReader reader = instance.getInstanceReader();
|
299
243
|
InstanceStore store = instance.getInstanceStore();
|
300
|
-
IDistribution.ReferralInfo memory referralInfo = reader.getReferralInfo(referralId);
|
301
|
-
IDistribution.DistributorInfo memory distributorInfo = reader.getDistributorInfo(referralInfo.distributorNftId);
|
302
|
-
ISetup.DistributionSetupInfo memory setupInfo = reader.getDistributionSetupInfo(distributionNftId);
|
303
|
-
|
304
|
-
Amount distributionOwnerFee = AmountLib.toAmount(premium.distributionOwnerFeeFixAmount + premium.distributionOwnerFeeVarAmount);
|
305
|
-
Amount commissionAmount = AmountLib.toAmount(premium.commissionAmount);
|
306
244
|
|
307
|
-
|
308
|
-
|
309
|
-
}
|
245
|
+
// get distribution owner fee amount
|
246
|
+
Amount distributionOwnerFee = AmountLib.toAmount(premium.distributionOwnerFeeFixAmount + premium.distributionOwnerFeeVarAmount);
|
310
247
|
|
248
|
+
// update referral/distributor info if applicable
|
249
|
+
if (referralIsValid(distributionNftId, referralId)) {
|
311
250
|
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
}
|
251
|
+
// increase distribution balance by commission amount and distribution owner fee
|
252
|
+
Amount commissionAmount = AmountLib.toAmount(premium.commissionAmount);
|
253
|
+
_componentService.increaseDistributionBalance(store, distributionNftId, commissionAmount, distributionOwnerFee);
|
316
254
|
|
317
|
-
|
255
|
+
// update book keeping for referral info
|
256
|
+
IDistribution.ReferralInfo memory referralInfo = reader.getReferralInfo(referralId);
|
318
257
|
referralInfo.usedReferrals += 1;
|
319
258
|
store.updateReferral(referralId, referralInfo, KEEP_STATE());
|
320
259
|
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
260
|
+
// update book keeping for distributor info
|
261
|
+
IDistribution.DistributorInfo memory distributorInfo = reader.getDistributorInfo(referralInfo.distributorNftId);
|
262
|
+
// TODO refactor sum of commission amount into a fee balance for distributors
|
263
|
+
distributorInfo.commissionAmount = distributorInfo.commissionAmount + commissionAmount;
|
264
|
+
distributorInfo.numPoliciesSold += 1;
|
265
|
+
store.updateDistributor(referralInfo.distributorNftId, distributorInfo, KEEP_STATE());
|
266
|
+
} else {
|
267
|
+
|
268
|
+
// increase distribution balance by distribution owner fee
|
269
|
+
_componentService.increaseDistributionBalance(store, distributionNftId, AmountLib.zero(), distributionOwnerFee);
|
326
270
|
}
|
327
271
|
}
|
328
272
|
|
329
|
-
// TODO: zero should return false
|
330
273
|
function referralIsValid(NftId distributionNftId, ReferralId referralId) public view returns (bool isValid) {
|
274
|
+
if (distributionNftId.eqz() || referralId.eqz()) {
|
275
|
+
return false;
|
276
|
+
}
|
277
|
+
|
331
278
|
IInstance instance = _getInstanceForDistribution(distributionNftId);
|
332
279
|
IDistribution.ReferralInfo memory info = instance.getInstanceReader().getReferralInfo(referralId);
|
333
280
|
|
@@ -348,4 +295,8 @@ contract DistributionService is
|
|
348
295
|
address instanceAddress = getRegistry().getObjectInfo(instanceNftId).objectAddress;
|
349
296
|
return IInstance(instanceAddress);
|
350
297
|
}
|
298
|
+
|
299
|
+
function _getDomain() internal pure override returns(ObjectType) {
|
300
|
+
return DISTRIBUTION();
|
301
|
+
}
|
351
302
|
}
|
@@ -1,71 +1,48 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
|
-
pragma solidity ^0.8.
|
2
|
+
pragma solidity ^0.8.20;
|
3
3
|
|
4
4
|
import {Fee} from "../type/Fee.sol";
|
5
|
-
import {
|
6
|
-
import {ISetup} from "../instance/module/ISetup.sol";
|
5
|
+
import {IInstanceLinkedComponent} from "../shared/IInstanceLinkedComponent.sol";
|
7
6
|
import {ReferralId, ReferralStatus} from "../type/Referral.sol";
|
8
7
|
import {NftId} from "../type/NftId.sol";
|
9
8
|
import {DistributorType} from "../type/DistributorType.sol";
|
10
9
|
import {UFixed} from "../type/UFixed.sol";
|
11
10
|
import {Timestamp} from "../type/Timestamp.sol";
|
12
11
|
|
13
|
-
interface IDistributionComponent is
|
12
|
+
interface IDistributionComponent is IInstanceLinkedComponent {
|
14
13
|
|
15
|
-
|
14
|
+
error ErrorDistributionNotDistributor(address distributor);
|
15
|
+
error ErrorDistributionAlreadyDistributor(address distributor, NftId distributorNftId);
|
16
16
|
|
17
|
-
|
17
|
+
event LogDistributorUpdated(address to, address caller);
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
Fee memory distributionFee
|
22
|
-
) external;
|
19
|
+
/// @dev Returns true iff the provided address is registered as a distributor with this distribution component.
|
20
|
+
function isDistributor(address candidate) external view returns (bool);
|
23
21
|
|
24
|
-
|
25
|
-
|
26
|
-
UFixed minDiscountPercentage,
|
27
|
-
UFixed maxDiscountPercentage,
|
28
|
-
UFixed commissionPercentage,
|
29
|
-
uint32 maxReferralCount,
|
30
|
-
uint32 maxReferralLifetime,
|
31
|
-
bool allowSelfReferrals,
|
32
|
-
bool allowRenewals,
|
33
|
-
bytes memory data
|
34
|
-
) external returns (DistributorType distributorType);
|
22
|
+
/// @dev Returns the distributor Nft Id for the provided address
|
23
|
+
function getDistributorNftId(address distributor) external view returns (NftId distributorNftId);
|
35
24
|
|
36
|
-
function
|
37
|
-
|
38
|
-
|
39
|
-
bytes memory data
|
40
|
-
) external returns(NftId distributorNftId);
|
25
|
+
function getDiscountPercentage(
|
26
|
+
string memory referralCode
|
27
|
+
) external view returns (UFixed discountPercentage, ReferralStatus status);
|
41
28
|
|
42
|
-
function
|
43
|
-
|
44
|
-
|
45
|
-
bytes memory data
|
46
|
-
) external;
|
29
|
+
function getReferralId(
|
30
|
+
string memory referralCode
|
31
|
+
) external returns (ReferralId referralId);
|
47
32
|
|
48
33
|
function calculateRenewalFeeAmount(
|
49
34
|
ReferralId referralId,
|
50
35
|
uint256 netPremiumAmount
|
51
36
|
) external view returns (uint256 feeAmount);
|
52
37
|
|
53
|
-
/// @dev
|
38
|
+
/// @dev Callback function to process a renewal of a policy.
|
39
|
+
/// The default implementation is empty.
|
40
|
+
/// Overwrite this function to implement a use case specific behaviour.
|
54
41
|
function processRenewal(
|
55
42
|
ReferralId referralId,
|
56
43
|
uint256 feeAmount
|
57
44
|
) external;
|
58
45
|
|
59
|
-
|
60
|
-
string memory referralCode
|
61
|
-
) external view returns (UFixed discountPercentage, ReferralStatus status);
|
62
|
-
|
63
|
-
function getDistributionFee() external view returns (Fee memory distibutionFee);
|
64
|
-
|
65
|
-
function getReferralId(
|
66
|
-
string memory referralCode
|
67
|
-
) external returns (ReferralId referralId);
|
68
|
-
|
69
|
-
/// @dev returns true iff the component needs to be called when selling/renewing policis
|
46
|
+
/// @dev Returns true to ensure component is called when transferring distributor Nft Ids.
|
70
47
|
function isVerifying() external view returns (bool verifying);
|
71
48
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
|
-
pragma solidity ^0.8.
|
2
|
+
pragma solidity ^0.8.20;
|
3
3
|
|
4
4
|
import {Amount} from "../type/Amount.sol";
|
5
5
|
import {NftId} from "../type/NftId.sol";
|
@@ -13,6 +13,7 @@ import {Timestamp} from "../type/Timestamp.sol";
|
|
13
13
|
|
14
14
|
|
15
15
|
interface IDistributionService is IService {
|
16
|
+
|
16
17
|
error ErrorDistributionServiceCallerNotRegistered(address caller);
|
17
18
|
error ErrorIDistributionServiceParentNftIdNotInstance(NftId nftId, NftId parentNftId);
|
18
19
|
error ErrorIDistributionServiceCallerNotDistributor(address caller);
|
@@ -25,15 +26,13 @@ interface IDistributionService is IService {
|
|
25
26
|
error ErrorIDistributionServiceExpirationInvalid(Timestamp expiryAt);
|
26
27
|
error ErrorIDistributionServiceCommissionTooHigh(uint256 commissionPercentage, uint256 maxCommissionPercentage);
|
27
28
|
error ErrorIDistributionServiceMinFeeTooHigh(uint256 minFee, uint256 limit);
|
28
|
-
|
29
|
+
|
30
|
+
error ErrorDistributionServiceVariableFeesTooHight(uint256 maxDiscountPercentage, uint256 limit);
|
31
|
+
error ErrorDistributionServiceMaxDiscountTooHigh(uint256 maxDiscountPercentage, uint256 limit);
|
32
|
+
|
29
33
|
error ErrorIDistributionServiceReferralInvalid(NftId distributionNftId, ReferralId referralId);
|
30
34
|
error ErrorDistributionServiceInvalidFeeTransferred(Amount transferredDistributionFeeAmount, Amount expectedDistributionFeeAmount);
|
31
35
|
|
32
|
-
function setFees(
|
33
|
-
Fee memory minDistributionOwnerFee,
|
34
|
-
Fee memory distributionFee
|
35
|
-
) external;
|
36
|
-
|
37
36
|
function createDistributorType(
|
38
37
|
string memory name,
|
39
38
|
UFixed minDiscountPercentage,
|
@@ -76,8 +75,7 @@ interface IDistributionService is IService {
|
|
76
75
|
function processSale(
|
77
76
|
NftId distributionNftId,
|
78
77
|
ReferralId referralId,
|
79
|
-
IPolicy.Premium memory premium
|
80
|
-
Amount transferredDistributionFeeAmount
|
78
|
+
IPolicy.Premium memory premium
|
81
79
|
) external;
|
82
80
|
|
83
81
|
function referralIsValid(
|
@@ -10,26 +10,26 @@ import {LibNftIdSet} from "../type/NftIdSet.sol";
|
|
10
10
|
import {NftId} from "../type/NftId.sol";
|
11
11
|
import {TimestampLib} from "../type/Timestamp.sol";
|
12
12
|
|
13
|
-
import {
|
13
|
+
import {ObjectSet} from "./base/ObjectSet.sol";
|
14
14
|
|
15
|
-
contract
|
16
|
-
|
15
|
+
contract BundleSet is
|
16
|
+
ObjectSet
|
17
17
|
{
|
18
18
|
|
19
|
-
event
|
20
|
-
event
|
19
|
+
event LogBundleSetPolicyLinked(NftId bundleNftId, NftId policyNftId);
|
20
|
+
event LogBundleSetPolicyUnlinked(NftId bundleNftId, NftId policyNftId);
|
21
21
|
|
22
|
-
event
|
23
|
-
event
|
24
|
-
event
|
25
|
-
event
|
22
|
+
event LogBundleSetBundleAdded(NftId poolNftId, NftId bundleNftId);
|
23
|
+
event LogBundleSetBundleUnlocked(NftId poolNftId, NftId bundleNftId);
|
24
|
+
event LogBundleSetBundleLocked(NftId poolNftId, NftId bundleNftId);
|
25
|
+
event LogBundleSetBundleClosed(NftId poolNftId, NftId bundleNftId);
|
26
26
|
|
27
|
-
error
|
28
|
-
error
|
29
|
-
error
|
30
|
-
error
|
31
|
-
error
|
32
|
-
error
|
27
|
+
error ErrorBundleSetPolicyAlreadyActivated(NftId policyNftId);
|
28
|
+
error ErrorBundleSetBundleLocked(NftId bundleNftId, NftId policyNftId);
|
29
|
+
error ErrorBundleSetPolicyWithOpenClaims(NftId policyNftId, uint256 openClaimsCount);
|
30
|
+
error ErrorBundleSetPolicyNotCloseable(NftId policyNftId);
|
31
|
+
error ErrorBundleSetBundleUnknown(NftId bundleNftId);
|
32
|
+
error ErrorBundleSetBundleNotRegistered(NftId bundleNftId);
|
33
33
|
|
34
34
|
mapping(NftId bundleNftId => LibNftIdSet.Set policies) internal _activePolicies;
|
35
35
|
|
@@ -42,11 +42,11 @@ contract BundleManager is
|
|
42
42
|
|
43
43
|
// ensure bundle is unlocked (in active set) and registered with this instance
|
44
44
|
if (!_isActive(poolNftId, bundleNftId)) {
|
45
|
-
revert
|
45
|
+
revert ErrorBundleSetBundleLocked(bundleNftId, policyNftId);
|
46
46
|
}
|
47
47
|
|
48
48
|
LibNftIdSet.add(_activePolicies[bundleNftId], policyNftId);
|
49
|
-
emit
|
49
|
+
emit LogBundleSetPolicyLinked(bundleNftId, policyNftId);
|
50
50
|
}
|
51
51
|
|
52
52
|
|
@@ -63,11 +63,11 @@ contract BundleManager is
|
|
63
63
|
|
64
64
|
// ensure bundle is registered with this instance
|
65
65
|
if (!_contains(poolNftId, bundleNftId)) {
|
66
|
-
revert
|
66
|
+
revert ErrorBundleSetBundleUnknown(bundleNftId);
|
67
67
|
}
|
68
68
|
|
69
69
|
LibNftIdSet.remove(_activePolicies[bundleNftId], policyNftId);
|
70
|
-
emit
|
70
|
+
emit LogBundleSetPolicyUnlinked(policyInfo.bundleNftId, policyNftId);
|
71
71
|
}
|
72
72
|
|
73
73
|
|
@@ -78,11 +78,11 @@ contract BundleManager is
|
|
78
78
|
|
79
79
|
// ensure pool is registered with instance
|
80
80
|
if(poolNftId.eqz()) {
|
81
|
-
revert
|
81
|
+
revert ErrorBundleSetBundleNotRegistered(bundleNftId);
|
82
82
|
}
|
83
83
|
|
84
84
|
_add(poolNftId, bundleNftId);
|
85
|
-
emit
|
85
|
+
emit LogBundleSetBundleAdded(poolNftId, bundleNftId);
|
86
86
|
}
|
87
87
|
|
88
88
|
|
@@ -90,14 +90,14 @@ contract BundleManager is
|
|
90
90
|
function unlock(NftId bundleNftId) external restricted() {
|
91
91
|
NftId poolNftId = _instance.getInstanceReader().getBundleInfo(bundleNftId).poolNftId;
|
92
92
|
_activate(poolNftId, bundleNftId);
|
93
|
-
emit
|
93
|
+
emit LogBundleSetBundleUnlocked(poolNftId, bundleNftId);
|
94
94
|
}
|
95
95
|
|
96
96
|
/// @dev locked (deactivated) bundles may not collateralize any new policies
|
97
97
|
function lock(NftId bundleNftId) external restricted() {
|
98
98
|
NftId poolNftId = _instance.getInstanceReader().getBundleInfo(bundleNftId).poolNftId;
|
99
99
|
_deactivate(poolNftId, bundleNftId);
|
100
|
-
emit
|
100
|
+
emit LogBundleSetBundleLocked(poolNftId, bundleNftId);
|
101
101
|
}
|
102
102
|
|
103
103
|
function bundles(NftId poolNftId) external view returns(uint256) {
|
@@ -3,6 +3,7 @@ pragma solidity ^0.8.20;
|
|
3
3
|
|
4
4
|
import {IAccessManaged} from "@openzeppelin/contracts/access/manager/IAccessManaged.sol";
|
5
5
|
|
6
|
+
import {Amount} from "../type/Amount.sol";
|
6
7
|
import {ClaimId} from "../type/ClaimId.sol";
|
7
8
|
import {DistributorType} from "../type/DistributorType.sol";
|
8
9
|
import {PayoutId} from "../type/PayoutId.sol";
|
@@ -13,17 +14,19 @@ import {RiskId} from "../type/RiskId.sol";
|
|
13
14
|
import {VersionPart} from "../type/Version.sol";
|
14
15
|
import {Key32} from "../type/Key32.sol";
|
15
16
|
import {RoleId} from "../type/RoleId.sol";
|
17
|
+
import {Seconds} from "../type/Seconds.sol";
|
18
|
+
import {UFixed} from "../type/UFixed.sol";
|
16
19
|
|
17
20
|
import {IRegisterable} from "../shared/IRegisterable.sol";
|
18
21
|
|
19
22
|
import {ITransferInterceptor} from "../registry/ITransferInterceptor.sol";
|
20
23
|
|
21
24
|
import {InstanceAdmin} from "./InstanceAdmin.sol";
|
22
|
-
import {
|
25
|
+
import {BundleSet} from "./BundleSet.sol";
|
23
26
|
import {InstanceReader} from "./InstanceReader.sol";
|
24
27
|
import {InstanceStore} from "./InstanceStore.sol";
|
25
28
|
|
26
|
-
import {IKeyValueStore} from "
|
29
|
+
import {IKeyValueStore} from "../shared/IKeyValueStore.sol";
|
27
30
|
|
28
31
|
import {IAccess} from "./module/IAccess.sol";
|
29
32
|
|
@@ -36,7 +39,6 @@ import {IPolicyService} from "../product/IPolicyService.sol";
|
|
36
39
|
import {IBundleService} from "../pool/IBundleService.sol";
|
37
40
|
|
38
41
|
|
39
|
-
|
40
42
|
interface IInstance is
|
41
43
|
IRegisterable,
|
42
44
|
ITransferInterceptor,
|
@@ -46,15 +48,19 @@ interface IInstance is
|
|
46
48
|
error ErrorInstanceInstanceAdminAlreadySet(address InstanceAdmin);
|
47
49
|
error ErrorInstanceInstanceAdminAuthorityMismatch(address instanceAuthority);
|
48
50
|
|
49
|
-
error
|
50
|
-
error
|
51
|
-
error
|
51
|
+
error ErrorInstanceBundleSetAlreadySet(address instanceBundleSet);
|
52
|
+
error ErrorInstanceBundleSetInstanceMismatch(address instance);
|
53
|
+
error ErrorInstanceBundleSetAuthorityMismatch(address instanceAuthority);
|
52
54
|
|
53
55
|
error ErrorInstanceInstanceReaderInstanceMismatch(address instanceAuthority);
|
54
56
|
|
55
57
|
error ErrorInstanceInstanceStoreAlreadySet(address instanceStore);
|
56
58
|
error ErrorInstanceInstanceStoreAuthorityMismatch(address instanceAuthority);
|
57
59
|
|
60
|
+
struct InstanceInfo {
|
61
|
+
uint64 requestsCount;
|
62
|
+
}
|
63
|
+
|
58
64
|
function createRole(string memory roleName, string memory adminName) external returns (RoleId roleId, RoleId admin);
|
59
65
|
function grantRole(RoleId roleId, address account) external;
|
60
66
|
function revokeRole(RoleId roleId, address account) external;
|
@@ -63,15 +69,18 @@ interface IInstance is
|
|
63
69
|
function setTargetFunctionRole(string memory targetName, bytes4[] calldata selectors, RoleId roleId) external;
|
64
70
|
function setTargetLocked(address target, bool locked) external;
|
65
71
|
|
66
|
-
function
|
67
|
-
function
|
68
|
-
function
|
69
|
-
|
70
|
-
|
72
|
+
function setStakingLockingPeriod(Seconds stakeLockingPeriod) external;
|
73
|
+
function setStakingRewardRate(UFixed rewardRate) external;
|
74
|
+
function refillStakingRewardReserves(Amount dipAmount) external;
|
75
|
+
|
76
|
+
/// @dev Defunds the staking reward reserves for the specified target.
|
77
|
+
/// Permissioned: only the target owner may call this function.
|
78
|
+
function withdrawStakingRewardReserves(Amount dipAmount) external returns (Amount newBalance);
|
71
79
|
|
80
|
+
// get instance release and supporting contracts
|
72
81
|
function getMajorVersion() external pure returns (VersionPart majorVersion);
|
73
82
|
function getInstanceReader() external view returns (InstanceReader);
|
74
|
-
function
|
83
|
+
function getBundleSet() external view returns (BundleSet);
|
75
84
|
function getInstanceAdmin() external view returns (InstanceAdmin);
|
76
85
|
function getInstanceStore() external view returns (InstanceStore);
|
77
86
|
}
|