@etherisc/gif-next 0.0.2-ee01d06-525 → 0.0.2-ee54ca6-863
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +32 -3
- 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/authorization/IAccess.sol/IAccess.json +10 -0
- package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.dbg.json +4 -0
- package/artifacts/contracts/{shared → authorization}/IAccessAdmin.sol/IAccessAdmin.json +95 -252
- 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/{registry → authorization}/IServiceAuthorization.sol/IServiceAuthorization.json +10 -10
- 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 +1342 -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 +46 -450
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +255 -233
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +67 -106
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +91 -160
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +152 -47
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.json +1411 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.json +1171 -0
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.json +1517 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.json +1978 -0
- 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 +6 -19
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +32 -44
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +28 -178
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +1208 -290
- 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 +290 -141
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +52 -224
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +35 -110
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +216 -226
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.json +2 -2
- package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.json +2 -2
- package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.json +6 -6
- 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/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/mock/Dip.sol/Dip.json +2 -2
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.dbg.json +4 -0
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.json +979 -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 +1 -1
- package/artifacts/contracts/oracle/IOracle.sol/IOracle.json +43 -1
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.json +43 -37
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.json +40 -315
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +32 -144
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +34 -85
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +4 -0
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.json +1248 -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 +402 -174
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +111 -94
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.json +205 -1
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.json +45 -290
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.json +220 -100
- package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/pool/Pool.sol/Pool.json +45 -576
- package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolService.sol/PoolService.json +264 -248
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +40 -87
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +31 -162
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +31 -94
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +4 -0
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +1096 -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 +185 -175
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +58 -105
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.json +5 -0
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.json +114 -0
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.json +184 -119
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +1 -1
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.json +43 -43
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.json +32 -79
- package/artifacts/contracts/product/IRiskService.sol/IRiskService.dbg.json +4 -0
- package/artifacts/contracts/product/{IProductService.sol/IProductService.json → IRiskService.sol/IRiskService.json} +2 -2
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +242 -321
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +55 -106
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +113 -265
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +55 -126
- package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/product/Product.sol/Product.json +35 -378
- package/artifacts/contracts/product/RiskService.sol/RiskService.dbg.json +4 -0
- package/artifacts/contracts/product/RiskService.sol/RiskService.json +583 -0
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +4 -0
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.json +651 -0
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +59 -16
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +246 -42
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +0 -183
- 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 +464 -99
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +336 -376
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +18 -130
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +27 -78
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.json +6 -6
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.dbg.json +4 -0
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.json +1169 -0
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +24 -16
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +4 -4
- package/artifacts/contracts/shared/Component.sol/Component.dbg.json +1 -1
- package/artifacts/contracts/shared/Component.sol/Component.json +0 -211
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +242 -185
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +69 -112
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.json +0 -112
- package/artifacts/contracts/shared/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponent.sol/IComponent.json +0 -26
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.json +153 -0
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.json +32 -37
- package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.json +0 -42
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
- package/artifacts/contracts/shared/InitializableCustom.sol/InitializableCustom.dbg.json +1 -1
- package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.dbg.json +4 -0
- package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.json +53 -0
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.json +32 -275
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.dbg.json +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 +6 -57
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +4 -136
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +8 -97
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +2 -15
- package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
- package/artifacts/contracts/shared/Service.sol/Service.json +0 -112
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +330 -11
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.dbg.json +4 -0
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.json +108 -0
- package/artifacts/contracts/staking/IStaking.sol/IStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/IStaking.sol/IStaking.json +27 -27
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.json +85 -105
- package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.json +85 -262
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.json +6 -6
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +47 -94
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +6 -6
- package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingService.sol/StakingService.json +26 -138
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +31 -82
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +139 -134
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +58 -22
- 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 +37 -8
- package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
- package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.json +2 -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 +17 -12
- 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 +4 -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 +55 -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 +1 -1
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.json +4 -4
- 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 +117 -14
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +1 -1
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.json +50 -2
- package/artifacts/contracts/type/Selector.sol/SelectorLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorLib.json +2 -2
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.json +2 -2
- package/artifacts/contracts/type/StateId.sol/StateIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/StateId.sol/StateIdLib.json +2 -2
- package/artifacts/contracts/type/String.sol/StrLib.dbg.json +1 -1
- package/artifacts/contracts/type/String.sol/StrLib.json +2 -2
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.json +23 -4
- package/artifacts/contracts/type/UFixed.sol/MathLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/MathLib.json +9 -3
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.json +58 -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/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.dbg.json +4 -0
- package/artifacts/contracts/{shared → upgradeability}/IVersionable.sol/IVersionable.json +1 -1
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.dbg.json +4 -0
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.json +566 -0
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +4 -0
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +129 -0
- package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +4 -0
- package/artifacts/contracts/{shared → upgradeability}/Versionable.sol/Versionable.json +1 -1
- package/contracts/{shared → authorization}/AccessAdmin.sol +135 -305
- package/contracts/authorization/AccessManagerCloneable.sol +16 -0
- package/contracts/authorization/Authorization.sol +217 -0
- package/contracts/authorization/IAccess.sol +48 -0
- package/contracts/{shared → authorization}/IAccessAdmin.sol +22 -54
- package/contracts/authorization/IAuthorization.sol +54 -0
- package/contracts/authorization/IModuleAuthorization.sol +21 -0
- package/contracts/{registry → authorization}/IServiceAuthorization.sol +5 -5
- package/contracts/authorization/ModuleAuthorization.sol +78 -0
- package/contracts/{registry → authorization}/ServiceAuthorization.sol +17 -17
- package/contracts/distribution/BasicDistribution.sol +138 -0
- package/contracts/distribution/BasicDistributionAuthorization.sol +47 -0
- package/contracts/distribution/Distribution.sol +145 -111
- package/contracts/distribution/DistributionService.sol +80 -41
- package/contracts/distribution/DistributionServiceManager.sol +2 -5
- package/contracts/distribution/IDistributionComponent.sol +25 -39
- package/contracts/distribution/IDistributionService.sol +23 -3
- package/contracts/examples/unpermissioned/SimpleDistribution.sol +50 -0
- package/contracts/examples/unpermissioned/SimpleOracle.sol +137 -0
- package/contracts/examples/unpermissioned/SimplePool.sol +76 -0
- package/contracts/examples/unpermissioned/SimpleProduct.sol +351 -0
- package/contracts/instance/{BundleManager.sol → BundleSet.sol} +23 -23
- package/contracts/instance/IInstance.sol +14 -38
- package/contracts/instance/IInstanceService.sol +13 -18
- package/contracts/instance/Instance.sol +68 -102
- package/contracts/instance/InstanceAdmin.sol +221 -267
- package/contracts/instance/InstanceAuthorizationV3.sol +204 -0
- package/contracts/instance/InstanceReader.sol +54 -16
- package/contracts/instance/InstanceService.sol +112 -84
- package/contracts/instance/InstanceServiceManager.sol +2 -6
- package/contracts/instance/InstanceStore.sol +17 -2
- package/contracts/instance/base/ObjectLifecycle.sol +9 -4
- package/contracts/instance/base/{ObjectManager.sol → ObjectSet.sol} +11 -12
- package/contracts/instance/module/IBundle.sol +1 -1
- package/contracts/instance/module/IComponents.sol +1 -7
- package/contracts/instance/module/IDistribution.sol +0 -1
- package/contracts/instance/module/IPolicy.sol +22 -22
- package/contracts/mock/Dip.sol +1 -1
- package/contracts/oracle/BasicOracle.sol +48 -0
- package/contracts/oracle/BasicOracleAuthorization.sol +46 -0
- package/contracts/oracle/IOracle.sol +16 -0
- package/contracts/oracle/IOracleComponent.sol +2 -1
- package/contracts/oracle/Oracle.sol +73 -51
- package/contracts/oracle/OracleService.sol +4 -3
- package/contracts/oracle/OracleServiceManager.sol +2 -5
- package/contracts/pool/BasicPool.sol +166 -0
- package/contracts/pool/BasicPoolAuthorization.sol +58 -0
- package/contracts/pool/BundleService.sol +192 -50
- package/contracts/pool/BundleServiceManager.sol +2 -5
- package/contracts/pool/IBundleService.sol +33 -5
- package/contracts/pool/IPoolComponent.sol +6 -60
- package/contracts/pool/IPoolService.sol +36 -26
- package/contracts/pool/Pool.sol +165 -138
- package/contracts/pool/PoolService.sol +165 -108
- package/contracts/pool/PoolServiceManager.sol +2 -5
- package/contracts/product/ApplicationService.sol +53 -59
- package/contracts/product/ApplicationServiceManager.sol +2 -2
- package/contracts/product/BasicProduct.sol +53 -0
- package/contracts/product/BasicProductAuthorization.sol +43 -0
- package/contracts/product/ClaimService.sol +120 -75
- package/contracts/product/ClaimServiceManager.sol +2 -2
- package/contracts/product/IApplicationService.sol +1 -0
- package/contracts/product/IClaimService.sol +28 -5
- package/contracts/product/IPolicyService.sol +27 -32
- package/contracts/product/IPricingService.sol +7 -7
- package/contracts/product/IProductComponent.sol +7 -10
- package/contracts/product/{IProductService.sol → IRiskService.sol} +1 -1
- package/contracts/product/PolicyService.sol +280 -182
- package/contracts/product/PolicyServiceManager.sol +2 -5
- package/contracts/product/PricingService.sol +44 -43
- package/contracts/product/PricingServiceManager.sol +2 -5
- package/contracts/product/Product.sol +162 -114
- package/contracts/product/{ProductService.sol → RiskService.sol} +11 -38
- package/contracts/product/RiskServiceManager.sol +39 -0
- package/contracts/registry/ChainNft.sol +65 -32
- package/contracts/registry/IRegistry.sol +63 -19
- package/contracts/registry/IRegistryService.sol +6 -6
- package/contracts/registry/Registry.sol +333 -213
- package/contracts/registry/RegistryAdmin.sol +260 -131
- package/contracts/registry/RegistryService.sol +6 -20
- package/contracts/registry/RegistryServiceManager.sol +2 -2
- package/contracts/registry/{ReleaseManager.sol → ReleaseRegistry.sol} +107 -119
- package/contracts/registry/ServiceAuthorizationV3.sol +16 -17
- package/contracts/registry/TokenRegistry.sol +2 -2
- package/contracts/shared/Component.sol +30 -43
- package/contracts/shared/ComponentService.sol +99 -78
- package/contracts/shared/ComponentServiceManager.sol +2 -2
- package/contracts/shared/ComponentVerifyingService.sol +2 -2
- package/contracts/shared/IComponent.sol +4 -4
- package/contracts/shared/IComponentService.sol +15 -9
- package/contracts/shared/IInstanceLinkedComponent.sol +10 -7
- package/contracts/shared/IPolicyHolder.sol +0 -9
- package/contracts/shared/IService.sol +1 -1
- package/contracts/shared/{ERC165.sol → InitializableERC165.sol} +3 -3
- package/contracts/shared/InstanceLinkedComponent.sol +51 -23
- package/contracts/shared/{NftIdSetManager.sol → NftIdSet.sol} +1 -1
- package/contracts/shared/NftOwnable.sol +7 -7
- package/contracts/shared/PolicyHolder.sol +7 -53
- package/contracts/shared/Registerable.sol +4 -4
- package/contracts/shared/RegistryLinked.sol +3 -2
- package/contracts/shared/Service.sol +8 -9
- package/contracts/shared/TokenHandler.sol +100 -19
- package/contracts/shared/TokenHandlerDeployerLib.sol +12 -0
- package/contracts/staking/IStaking.sol +3 -3
- package/contracts/staking/IStakingService.sol +12 -5
- package/contracts/staking/StakeManagerLib.sol +18 -25
- package/contracts/staking/Staking.sol +26 -41
- package/contracts/staking/StakingManager.sol +2 -6
- package/contracts/staking/StakingReader.sol +12 -16
- package/contracts/staking/StakingService.sol +10 -14
- package/contracts/staking/StakingServiceManager.sol +2 -2
- package/contracts/staking/StakingStore.sol +12 -22
- package/contracts/staking/TargetManagerLib.sol +7 -3
- package/contracts/type/Amount.sol +12 -5
- package/contracts/type/Blocknumber.sol +7 -1
- package/contracts/type/ObjectType.sol +52 -18
- package/contracts/type/Referral.sol +1 -0
- package/contracts/type/RoleId.sol +55 -82
- package/contracts/type/Seconds.sol +21 -1
- package/contracts/type/StateId.sol +1 -0
- package/contracts/type/Timestamp.sol +11 -1
- package/contracts/type/UFixed.sol +34 -9
- package/contracts/type/Version.sol +3 -1
- package/contracts/{shared → upgradeability}/ProxyManager.sol +4 -5
- package/contracts/{shared → upgradeability}/UpgradableProxyWithAdmin.sol +1 -3
- package/package.json +3 -3
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +0 -4
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +0 -709
- package/artifacts/contracts/instance/InstanceAuthorizationsLib.sol/InstanceAuthorizationsLib.dbg.json +0 -4
- package/artifacts/contracts/instance/InstanceAuthorizationsLib.sol/InstanceAuthorizationsLib.json +0 -228
- package/artifacts/contracts/instance/base/ObjectManager.sol/ObjectManager.dbg.json +0 -4
- package/artifacts/contracts/instance/base/ObjectManager.sol/ObjectManager.json +0 -187
- package/artifacts/contracts/product/IProductService.sol/IProductService.dbg.json +0 -4
- package/artifacts/contracts/product/ProductService.sol/ProductService.dbg.json +0 -4
- package/artifacts/contracts/product/ProductService.sol/ProductService.json +0 -708
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.dbg.json +0 -4
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.json +0 -702
- package/artifacts/contracts/registry/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +0 -4
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +0 -4
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +0 -1177
- package/artifacts/contracts/registry/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +0 -4
- package/artifacts/contracts/registry/ServiceAuthorization.sol/ServiceAuthorization.json +0 -190
- package/artifacts/contracts/shared/AccessAdmin.sol/AccessAdmin.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessAdmin.sol/AccessAdmin.json +0 -1559
- 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 -1747
- package/artifacts/contracts/shared/AccessManagerExtendedInitializeable.sol/AccessManagerExtendedInitializeable.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtendedInitializeable.sol/AccessManagerExtendedInitializeable.json +0 -1760
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisable.sol/AccessManagerExtendedWithDisable.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisable.sol/AccessManagerExtendedWithDisable.json +0 -1838
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol/AccessManagerExtendedWithDisableInitializeable.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol/AccessManagerExtendedWithDisableInitializeable.json +0 -1856
- package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +0 -4
- package/artifacts/contracts/shared/ERC165.sol/ERC165.json +0 -73
- package/artifacts/contracts/shared/IAccessAdmin.sol/IAccessAdmin.dbg.json +0 -4
- 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 -1600
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +0 -4
- package/artifacts/contracts/shared/NftIdSetManager.sol/NftIdSetManager.dbg.json +0 -4
- package/artifacts/contracts/shared/NftIdSetManager.sol/NftIdSetManager.json +0 -306
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +0 -4
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +0 -617
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +0 -4
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +0 -129
- package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +0 -4
- package/contracts/instance/InstanceAuthorizationsLib.sol +0 -377
- package/contracts/product/ProductServiceManager.sol +0 -42
- package/contracts/shared/AccessManagerCustom.sol +0 -741
- package/contracts/shared/AccessManagerExtended.sol +0 -481
- package/contracts/shared/AccessManagerExtendedInitializeable.sol +0 -13
- package/contracts/shared/AccessManagerExtendedWithDisable.sol +0 -137
- package/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol +0 -14
- package/contracts/shared/IAccessManagerExtended.sol +0 -74
- package/contracts/shared/IAccessManagerExtendedWithDisable.sol +0 -18
- /package/contracts/{shared → upgradeability}/IVersionable.sol +0 -0
- /package/contracts/{shared → upgradeability}/Versionable.sol +0 -0
@@ -50,8 +50,8 @@ contract PricingService is
|
|
50
50
|
address authority
|
51
51
|
) = abi.decode(data, (address, address, address));
|
52
52
|
|
53
|
-
|
54
|
-
|
53
|
+
_initializeService(registryAddress, authority, owner);
|
54
|
+
_registerInterface(type(IPricingService).interfaceId);
|
55
55
|
|
56
56
|
_distributionService = IDistributionService(_getServiceAddress(DISTRIBUTION()));
|
57
57
|
}
|
@@ -71,7 +71,7 @@ contract PricingService is
|
|
71
71
|
view
|
72
72
|
virtual override
|
73
73
|
returns (
|
74
|
-
IPolicy.
|
74
|
+
IPolicy.PremiumInfo memory premium
|
75
75
|
)
|
76
76
|
{
|
77
77
|
InstanceReader reader;
|
@@ -84,6 +84,7 @@ contract PricingService is
|
|
84
84
|
IInstance instance
|
85
85
|
) = _getAndVerifyComponentInfo(productNftId, PRODUCT(), false);
|
86
86
|
|
87
|
+
// get instance reader from local instance variable
|
87
88
|
reader = instance.getInstanceReader();
|
88
89
|
|
89
90
|
// calculate net premium
|
@@ -104,19 +105,21 @@ contract PricingService is
|
|
104
105
|
revert ErrorIPricingServiceBundlePoolMismatch(bundleNftId, bundleInfo.poolNftId, productInfo.poolNftId);
|
105
106
|
}
|
106
107
|
|
107
|
-
// calculate
|
108
|
+
// calculate fixed fees for product, pool, bundle
|
108
109
|
premium = _getFixedFeeAmounts(
|
109
110
|
netPremiumAmount,
|
110
111
|
productInfo,
|
111
112
|
bundleInfo
|
112
113
|
);
|
113
114
|
|
115
|
+
// calculate variable fees for product, pool, bundle
|
114
116
|
premium = _calculateVariableFeeAmounts(
|
115
117
|
premium,
|
116
118
|
productInfo,
|
117
119
|
bundleInfo
|
118
120
|
);
|
119
121
|
|
122
|
+
// calculate distribution fee and (if applicable) commission
|
120
123
|
premium = _calculateDistributionOwnerFeeAmount(
|
121
124
|
premium,
|
122
125
|
productInfo,
|
@@ -124,18 +127,18 @@ contract PricingService is
|
|
124
127
|
reader
|
125
128
|
);
|
126
129
|
|
130
|
+
// calculate resulting amounts for product, pool, and distribution wallets
|
127
131
|
premium = _calculateTargetWalletAmounts(premium);
|
128
132
|
|
129
133
|
// sanity check to validate the fee calculation
|
130
|
-
if(
|
131
|
-
premium.productFeeAmount
|
134
|
+
if(premium.premiumAmount != premium.productFeeAmount
|
132
135
|
+ premium.distributionFeeAndCommissionAmount
|
133
136
|
+ premium.poolPremiumAndFeeAmount)
|
134
137
|
{
|
135
138
|
revert ErrorPricingServiceTargetWalletAmountsMismatch();
|
136
139
|
}
|
137
140
|
|
138
|
-
if (premium.distributionOwnerFeeFixAmount < productInfo.minDistributionOwnerFee.fixedFee) {
|
141
|
+
if (premium.distributionOwnerFeeFixAmount.toInt() < productInfo.minDistributionOwnerFee.fixedFee) {
|
139
142
|
revert ErrorIPricingServiceFeeCalculationMismatch(
|
140
143
|
premium.distributionFeeFixAmount,
|
141
144
|
premium.distributionFeeVarAmount,
|
@@ -168,64 +171,64 @@ contract PricingService is
|
|
168
171
|
internal
|
169
172
|
pure
|
170
173
|
returns (
|
171
|
-
IPolicy.
|
174
|
+
IPolicy.PremiumInfo memory premium
|
172
175
|
)
|
173
176
|
{
|
174
177
|
// initial premium amount is the net premium
|
175
|
-
premium.netPremiumAmount = netPremiumAmount
|
176
|
-
premium.fullPremiumAmount = netPremiumAmount
|
178
|
+
premium.netPremiumAmount = netPremiumAmount;
|
179
|
+
premium.fullPremiumAmount = netPremiumAmount;
|
177
180
|
|
178
|
-
|
181
|
+
Amount t = AmountLib.toAmount(productInfo.productFee.fixedFee);
|
179
182
|
premium.productFeeFixAmount = t;
|
180
|
-
premium.fullPremiumAmount
|
183
|
+
premium.fullPremiumAmount = premium.fullPremiumAmount + t;
|
181
184
|
|
182
|
-
t = productInfo.poolFee.fixedFee;
|
185
|
+
t = AmountLib.toAmount(productInfo.poolFee.fixedFee);
|
183
186
|
premium.poolFeeFixAmount = t;
|
184
|
-
premium.fullPremiumAmount
|
187
|
+
premium.fullPremiumAmount = premium.fullPremiumAmount + t;
|
185
188
|
|
186
|
-
t = bundleInfo.fee.fixedFee;
|
189
|
+
t = AmountLib.toAmount(bundleInfo.fee.fixedFee);
|
187
190
|
premium.bundleFeeFixAmount = t;
|
188
|
-
premium.fullPremiumAmount
|
191
|
+
premium.fullPremiumAmount = premium.fullPremiumAmount + t;
|
189
192
|
|
190
|
-
t = productInfo.distributionFee.fixedFee;
|
193
|
+
t = AmountLib.toAmount(productInfo.distributionFee.fixedFee);
|
191
194
|
premium.distributionFeeFixAmount = t;
|
192
|
-
premium.fullPremiumAmount
|
195
|
+
premium.fullPremiumAmount = premium.fullPremiumAmount + t;
|
193
196
|
}
|
194
197
|
|
195
198
|
function _calculateVariableFeeAmounts(
|
196
|
-
IPolicy.
|
199
|
+
IPolicy.PremiumInfo memory premium,
|
197
200
|
IComponents.ProductInfo memory productInfo,
|
198
201
|
IBundle.BundleInfo memory bundleInfo
|
199
202
|
)
|
200
203
|
internal
|
201
204
|
pure
|
202
205
|
returns (
|
203
|
-
IPolicy.
|
206
|
+
IPolicy.PremiumInfo memory intermadiatePremium
|
204
207
|
)
|
205
208
|
{
|
206
|
-
|
209
|
+
Amount netPremiumAmount = premium.netPremiumAmount;
|
207
210
|
|
208
|
-
|
211
|
+
Amount t = netPremiumAmount.multiplyWith(productInfo.productFee.fractionalFee);
|
209
212
|
premium.productFeeVarAmount = t;
|
210
|
-
premium.fullPremiumAmount
|
213
|
+
premium.fullPremiumAmount = premium.fullPremiumAmount + t;
|
211
214
|
|
212
|
-
t = (
|
215
|
+
t = netPremiumAmount.multiplyWith(productInfo.poolFee.fractionalFee);
|
213
216
|
premium.poolFeeVarAmount = t;
|
214
|
-
premium.fullPremiumAmount
|
217
|
+
premium.fullPremiumAmount = premium.fullPremiumAmount + t;
|
215
218
|
|
216
|
-
t = (
|
219
|
+
t = netPremiumAmount.multiplyWith(bundleInfo.fee.fractionalFee);
|
217
220
|
premium.bundleFeeVarAmount = t;
|
218
|
-
premium.fullPremiumAmount
|
221
|
+
premium.fullPremiumAmount = premium.fullPremiumAmount + t;
|
219
222
|
|
220
|
-
t = (
|
223
|
+
t = netPremiumAmount.multiplyWith(productInfo.distributionFee.fractionalFee);
|
221
224
|
premium.distributionFeeVarAmount = t;
|
222
|
-
premium.fullPremiumAmount
|
225
|
+
premium.fullPremiumAmount = premium.fullPremiumAmount + t;
|
223
226
|
|
224
227
|
return premium;
|
225
228
|
}
|
226
229
|
|
227
230
|
function _calculateDistributionOwnerFeeAmount(
|
228
|
-
IPolicy.
|
231
|
+
IPolicy.PremiumInfo memory premium,
|
229
232
|
IComponents.ProductInfo memory productInfo,
|
230
233
|
// ISetup.DistributionSetupInfo memory distInfo,
|
231
234
|
ReferralId referralId,
|
@@ -233,7 +236,7 @@ contract PricingService is
|
|
233
236
|
)
|
234
237
|
internal
|
235
238
|
view
|
236
|
-
returns (IPolicy.
|
239
|
+
returns (IPolicy.PremiumInfo memory finalPremium)
|
237
240
|
{
|
238
241
|
|
239
242
|
// if the referral is not valid, then the distribution owner gets everything
|
@@ -253,10 +256,10 @@ contract PricingService is
|
|
253
256
|
IDistribution.DistributorInfo memory distributorInfo = reader.getDistributorInfo(referralInfo.distributorNftId);
|
254
257
|
IDistribution.DistributorTypeInfo memory distributorTypeInfo = reader.getDistributorTypeInfo(distributorInfo.distributorType);
|
255
258
|
|
256
|
-
|
259
|
+
Amount commissionAmount = premium.netPremiumAmount.multiplyWith(distributorTypeInfo.commissionPercentage);
|
257
260
|
premium.commissionAmount = commissionAmount;
|
258
|
-
premium.discountAmount =
|
259
|
-
premium.distributionOwnerFeeFixAmount = minDistributionOwnerFee.fixedFee;
|
261
|
+
premium.discountAmount = premium.fullPremiumAmount.multiplyWith(referralInfo.discountPercentage);
|
262
|
+
premium.distributionOwnerFeeFixAmount = AmountLib.toAmount(minDistributionOwnerFee.fixedFee);
|
260
263
|
premium.distributionOwnerFeeVarAmount = premium.distributionFeeVarAmount - commissionAmount - premium.discountAmount;
|
261
264
|
premium.premiumAmount = premium.fullPremiumAmount - premium.discountAmount;
|
262
265
|
}
|
@@ -266,29 +269,27 @@ contract PricingService is
|
|
266
269
|
|
267
270
|
|
268
271
|
function _calculateTargetWalletAmounts(
|
269
|
-
IPolicy.
|
272
|
+
IPolicy.PremiumInfo memory premium
|
270
273
|
)
|
271
274
|
internal
|
272
275
|
virtual
|
273
276
|
view
|
274
277
|
returns (
|
275
|
-
IPolicy.
|
278
|
+
IPolicy.PremiumInfo memory premiumWithTargetWalletAmounts
|
276
279
|
)
|
277
280
|
{
|
278
281
|
// fees for product owner
|
279
|
-
premium.productFeeAmount =
|
280
|
-
premium.productFeeFixAmount + premium.productFeeVarAmount);
|
282
|
+
premium.productFeeAmount = premium.productFeeFixAmount + premium.productFeeVarAmount;
|
281
283
|
|
282
284
|
// fees for distribution owner + distributor commission
|
283
|
-
premium.distributionFeeAndCommissionAmount =
|
285
|
+
premium.distributionFeeAndCommissionAmount =
|
284
286
|
premium.distributionFeeFixAmount + premium.distributionOwnerFeeVarAmount
|
285
|
-
+ premium.commissionAmount
|
287
|
+
+ premium.commissionAmount;
|
286
288
|
|
287
289
|
// net premium + fees for pool owner + bundle owner
|
288
|
-
premium.poolPremiumAndFeeAmount =
|
289
|
-
premium.netPremiumAmount
|
290
|
+
premium.poolPremiumAndFeeAmount = premium.netPremiumAmount
|
290
291
|
+ premium.poolFeeFixAmount + premium.poolFeeVarAmount
|
291
|
-
+ premium.bundleFeeFixAmount + premium.bundleFeeVarAmount
|
292
|
+
+ premium.bundleFeeFixAmount + premium.bundleFeeVarAmount;
|
292
293
|
|
293
294
|
premiumWithTargetWalletAmounts = premium;
|
294
295
|
}
|
@@ -1,12 +1,9 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {IVersionable} from "../
|
5
|
-
import {ProxyManager} from "../
|
4
|
+
import {IVersionable} from "../upgradeability/IVersionable.sol";
|
5
|
+
import {ProxyManager} from "../upgradeability/ProxyManager.sol";
|
6
6
|
import {PricingService} from "./PricingService.sol";
|
7
|
-
import {Registry} from "../registry/Registry.sol";
|
8
|
-
import {RegistryService} from "../registry/RegistryService.sol";
|
9
|
-
import {REGISTRY} from "../type/ObjectType.sol";
|
10
7
|
|
11
8
|
contract PricingServiceManager is ProxyManager {
|
12
9
|
|
@@ -1,21 +1,20 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
|
5
|
-
|
6
4
|
import {Amount, AmountLib} from "../type/Amount.sol";
|
7
5
|
import {ClaimId} from "../type/ClaimId.sol";
|
8
6
|
import {InstanceLinkedComponent} from "../shared/InstanceLinkedComponent.sol";
|
9
7
|
import {Fee, FeeLib} from "../type/Fee.sol";
|
10
8
|
import {IRisk} from "../instance/module/IRisk.sol";
|
11
9
|
import {IApplicationService} from "./IApplicationService.sol";
|
10
|
+
import {IAuthorization} from "../authorization/IAuthorization.sol";
|
12
11
|
import {IComponentService} from "../shared/IComponentService.sol";
|
13
12
|
import {IPolicyService} from "./IPolicyService.sol";
|
14
|
-
import {
|
13
|
+
import {IRiskService} from "./IRiskService.sol";
|
15
14
|
import {IClaimService} from "./IClaimService.sol";
|
16
15
|
import {IPricingService} from "./IPricingService.sol";
|
17
16
|
import {IProductComponent} from "./IProductComponent.sol";
|
18
|
-
import {NftId
|
17
|
+
import {NftId} from "../type/NftId.sol";
|
19
18
|
import {PayoutId} from "../type/PayoutId.sol";
|
20
19
|
import {COMPONENT, PRODUCT, APPLICATION, POLICY, CLAIM, PRICE } from "../type/ObjectType.sol";
|
21
20
|
import {ReferralId} from "../type/Referral.sol";
|
@@ -24,9 +23,6 @@ import {Seconds} from "../type/Seconds.sol";
|
|
24
23
|
import {StateId} from "../type/StateId.sol";
|
25
24
|
import {Timestamp} from "../type/Timestamp.sol";
|
26
25
|
|
27
|
-
import {TokenHandler} from "../shared/TokenHandler.sol";
|
28
|
-
|
29
|
-
import {InstanceReader} from "../instance/InstanceReader.sol";
|
30
26
|
import {IPolicy} from "../instance/module/IPolicy.sol";
|
31
27
|
import {IComponents} from "../instance/module/IComponents.sol";
|
32
28
|
import {Pool} from "../pool/Pool.sol";
|
@@ -40,7 +36,7 @@ abstract contract Product is
|
|
40
36
|
bytes32 public constant PRODUCT_STORAGE_LOCATION_V1 = 0x0bb7aafdb8e380f81267337bc5b5dfdf76e6d3a380ecadb51ec665246d9d6800;
|
41
37
|
|
42
38
|
struct ProductStorage {
|
43
|
-
|
39
|
+
IRiskService _riskService;
|
44
40
|
IApplicationService _applicationService;
|
45
41
|
IPolicyService _policyService;
|
46
42
|
IClaimService _claimService;
|
@@ -52,28 +48,122 @@ abstract contract Product is
|
|
52
48
|
Distribution _distribution;
|
53
49
|
}
|
54
50
|
|
55
|
-
|
51
|
+
|
52
|
+
function calculatePremium(
|
53
|
+
Amount sumInsuredAmount,
|
54
|
+
RiskId riskId,
|
55
|
+
Seconds lifetime,
|
56
|
+
bytes memory applicationData,
|
57
|
+
NftId bundleNftId,
|
58
|
+
ReferralId referralId
|
59
|
+
)
|
60
|
+
public
|
61
|
+
view
|
62
|
+
override
|
63
|
+
returns (Amount premiumAmount)
|
64
|
+
{
|
65
|
+
IPolicy.PremiumInfo memory premium = _getProductStorage()._pricingService.calculatePremium(
|
66
|
+
getNftId(),
|
67
|
+
riskId,
|
68
|
+
sumInsuredAmount,
|
69
|
+
lifetime,
|
70
|
+
applicationData,
|
71
|
+
bundleNftId,
|
72
|
+
referralId
|
73
|
+
);
|
74
|
+
|
75
|
+
return premium.premiumAmount;
|
76
|
+
}
|
77
|
+
|
78
|
+
function calculateNetPremium(
|
79
|
+
Amount sumInsuredAmount,
|
80
|
+
RiskId,
|
81
|
+
Seconds,
|
82
|
+
bytes memory
|
83
|
+
)
|
84
|
+
external
|
85
|
+
view
|
86
|
+
virtual override
|
87
|
+
returns (Amount netPremiumAmount)
|
88
|
+
{
|
89
|
+
// default 10% of sum insured
|
90
|
+
return AmountLib.toAmount(sumInsuredAmount.toInt() / 10);
|
91
|
+
}
|
92
|
+
|
93
|
+
|
94
|
+
function register()
|
95
|
+
external
|
96
|
+
virtual
|
97
|
+
onlyOwner()
|
98
|
+
{
|
99
|
+
_getProductStorage()._componentService.registerProduct();
|
100
|
+
_approveTokenHandler(type(uint256).max);
|
101
|
+
}
|
102
|
+
|
103
|
+
|
104
|
+
function getInitialProductInfo()
|
105
|
+
public
|
106
|
+
virtual
|
107
|
+
view
|
108
|
+
returns (IComponents.ProductInfo memory poolInfo)
|
109
|
+
{
|
110
|
+
ProductStorage storage $ = _getProductStorage();
|
111
|
+
|
112
|
+
return IComponents.ProductInfo({
|
113
|
+
distributionNftId: $._distributionNftId,
|
114
|
+
poolNftId: $._poolNftId,
|
115
|
+
productFee: FeeLib.zero(),
|
116
|
+
processingFee: FeeLib.zero(),
|
117
|
+
distributionFee: FeeLib.zero(),
|
118
|
+
minDistributionOwnerFee: FeeLib.zero(),
|
119
|
+
poolFee: FeeLib.zero(),
|
120
|
+
stakingFee: FeeLib.zero(),
|
121
|
+
performanceFee: FeeLib.zero()
|
122
|
+
});
|
123
|
+
}
|
124
|
+
|
125
|
+
function getPoolNftId() external view override returns (NftId poolNftId) {
|
126
|
+
return getRegistry().getNftIdForAddress(address(_getProductStorage()._pool));
|
127
|
+
}
|
128
|
+
|
129
|
+
function getDistributionNftId() external view override returns (NftId distributionNftId) {
|
130
|
+
return getRegistry().getNftIdForAddress(address(_getProductStorage()._distribution));
|
131
|
+
}
|
132
|
+
|
133
|
+
function _initializeProduct(
|
56
134
|
address registry,
|
57
135
|
NftId instanceNftId,
|
136
|
+
IAuthorization authorization,
|
58
137
|
address initialOwner,
|
59
138
|
string memory name,
|
60
139
|
address token,
|
61
140
|
bool isInterceptor,
|
62
|
-
address pool,
|
63
|
-
address distribution,
|
141
|
+
address pool, // switch to pool nft id (#527)
|
142
|
+
address distribution, // switch to distribution nft id (#527)
|
143
|
+
// add NftId [] oracleNftIds (#527)
|
64
144
|
bytes memory registryData, // writeonly data that will saved in the object info record of the registry
|
65
145
|
bytes memory componentData // writeonly data that will saved in the object info record of the registry
|
66
146
|
)
|
67
|
-
|
147
|
+
internal
|
68
148
|
virtual
|
69
149
|
onlyInitializing()
|
70
150
|
{
|
71
|
-
|
151
|
+
_initializeInstanceLinkedComponent(
|
152
|
+
registry,
|
153
|
+
instanceNftId,
|
154
|
+
name,
|
155
|
+
token,
|
156
|
+
PRODUCT(),
|
157
|
+
authorization,
|
158
|
+
isInterceptor,
|
159
|
+
initialOwner,
|
160
|
+
registryData,
|
161
|
+
componentData);
|
72
162
|
|
73
163
|
ProductStorage storage $ = _getProductStorage();
|
74
164
|
// TODO add validation
|
75
|
-
// TODO refactor to go via registry
|
76
|
-
$.
|
165
|
+
// TODO refactor to go via registry for all components linked to this product (#527)
|
166
|
+
$._riskService = IRiskService(_getServiceAddress(PRODUCT()));
|
77
167
|
$._applicationService = IApplicationService(_getServiceAddress(APPLICATION()));
|
78
168
|
$._policyService = IPolicyService(_getServiceAddress(POLICY()));
|
79
169
|
$._claimService = IClaimService(_getServiceAddress(CLAIM()));
|
@@ -81,39 +171,29 @@ abstract contract Product is
|
|
81
171
|
$._componentService = IComponentService(_getServiceAddress(COMPONENT()));
|
82
172
|
$._pool = Pool(pool);
|
83
173
|
$._distribution = Distribution(distribution);
|
84
|
-
$._poolNftId = getRegistry().
|
85
|
-
$._distributionNftId = getRegistry().
|
174
|
+
$._poolNftId = getRegistry().getNftIdForAddress(pool);
|
175
|
+
$._distributionNftId = getRegistry().getNftIdForAddress(distribution);
|
86
176
|
|
87
|
-
|
177
|
+
_registerInterface(type(IProductComponent).interfaceId);
|
88
178
|
}
|
89
179
|
|
90
180
|
|
91
|
-
function
|
92
|
-
external
|
93
|
-
virtual
|
94
|
-
onlyOwner()
|
95
|
-
{
|
96
|
-
_getProductStorage()._componentService.registerProduct();
|
97
|
-
}
|
98
|
-
|
99
|
-
|
100
|
-
function setFees(
|
181
|
+
function _setFees(
|
101
182
|
Fee memory productFee,
|
102
183
|
Fee memory processingFee
|
103
184
|
)
|
104
|
-
|
105
|
-
|
106
|
-
restricted()
|
107
|
-
override
|
185
|
+
internal
|
186
|
+
virtual
|
108
187
|
{
|
109
188
|
_getProductStorage()._componentService.setProductFees(productFee, processingFee);
|
110
189
|
}
|
111
190
|
|
191
|
+
|
112
192
|
function _createRisk(
|
113
193
|
RiskId id,
|
114
194
|
bytes memory data
|
115
195
|
) internal {
|
116
|
-
|
196
|
+
_getRiskService().createRisk(
|
117
197
|
id,
|
118
198
|
data
|
119
199
|
);
|
@@ -123,7 +203,7 @@ abstract contract Product is
|
|
123
203
|
RiskId id,
|
124
204
|
bytes memory data
|
125
205
|
) internal {
|
126
|
-
|
206
|
+
_getRiskService().updateRisk(
|
127
207
|
id,
|
128
208
|
data
|
129
209
|
);
|
@@ -133,20 +213,23 @@ abstract contract Product is
|
|
133
213
|
RiskId id,
|
134
214
|
StateId state
|
135
215
|
) internal {
|
136
|
-
|
216
|
+
_getRiskService().updateRiskState(
|
137
217
|
id,
|
138
218
|
state
|
139
219
|
);
|
140
220
|
}
|
141
221
|
|
222
|
+
|
142
223
|
function _getRiskInfo(RiskId id) internal view returns (IRisk.RiskInfo memory info) {
|
143
224
|
return getInstance().getInstanceReader().getRiskInfo(id);
|
144
225
|
}
|
145
226
|
|
227
|
+
|
146
228
|
function _createApplication(
|
147
229
|
address applicationOwner,
|
148
230
|
RiskId riskId,
|
149
231
|
Amount sumInsuredAmount,
|
232
|
+
Amount premiumAmount,
|
150
233
|
Seconds lifetime,
|
151
234
|
NftId bundleNftId,
|
152
235
|
ReferralId referralId,
|
@@ -159,6 +242,7 @@ abstract contract Product is
|
|
159
242
|
applicationOwner,
|
160
243
|
riskId,
|
161
244
|
sumInsuredAmount,
|
245
|
+
premiumAmount,
|
162
246
|
lifetime,
|
163
247
|
bundleNftId,
|
164
248
|
referralId,
|
@@ -166,19 +250,36 @@ abstract contract Product is
|
|
166
250
|
);
|
167
251
|
}
|
168
252
|
|
169
|
-
function
|
170
|
-
NftId
|
171
|
-
bool requirePremiumPayment,
|
253
|
+
function _createPolicy(
|
254
|
+
NftId applicationNftId,
|
172
255
|
Timestamp activateAt
|
173
256
|
)
|
174
257
|
internal
|
175
258
|
{
|
176
|
-
_getProductStorage()._policyService.
|
177
|
-
|
178
|
-
requirePremiumPayment,
|
259
|
+
_getProductStorage()._policyService.createPolicy(
|
260
|
+
applicationNftId,
|
179
261
|
activateAt);
|
180
262
|
}
|
181
263
|
|
264
|
+
function _decline(
|
265
|
+
NftId policyNftId
|
266
|
+
)
|
267
|
+
internal
|
268
|
+
{
|
269
|
+
_getProductStorage()._policyService.decline(
|
270
|
+
policyNftId);
|
271
|
+
}
|
272
|
+
|
273
|
+
function _expire(
|
274
|
+
NftId policyNftId,
|
275
|
+
Timestamp expireAt
|
276
|
+
)
|
277
|
+
internal
|
278
|
+
returns (Timestamp expiredAt)
|
279
|
+
{
|
280
|
+
expiredAt = _getProductStorage()._policyService.expire(policyNftId, expireAt);
|
281
|
+
}
|
282
|
+
|
182
283
|
function _collectPremium(
|
183
284
|
NftId policyNftId,
|
184
285
|
Timestamp activateAt
|
@@ -279,6 +380,24 @@ abstract contract Product is
|
|
279
380
|
data);
|
280
381
|
}
|
281
382
|
|
383
|
+
function _createPayoutForBeneficiary(
|
384
|
+
NftId policyNftId,
|
385
|
+
ClaimId claimId,
|
386
|
+
Amount amount,
|
387
|
+
address beneficiary,
|
388
|
+
bytes memory data
|
389
|
+
)
|
390
|
+
internal
|
391
|
+
returns (PayoutId)
|
392
|
+
{
|
393
|
+
return _getProductStorage()._claimService.createPayoutForBeneficiary(
|
394
|
+
policyNftId,
|
395
|
+
claimId,
|
396
|
+
amount,
|
397
|
+
beneficiary,
|
398
|
+
data);
|
399
|
+
}
|
400
|
+
|
282
401
|
function _processPayout(
|
283
402
|
NftId policyNftId,
|
284
403
|
PayoutId payoutId
|
@@ -290,77 +409,6 @@ abstract contract Product is
|
|
290
409
|
payoutId);
|
291
410
|
}
|
292
411
|
|
293
|
-
function calculatePremium(
|
294
|
-
Amount sumInsuredAmount,
|
295
|
-
RiskId riskId,
|
296
|
-
Seconds lifetime,
|
297
|
-
bytes memory applicationData,
|
298
|
-
NftId bundleNftId,
|
299
|
-
ReferralId referralId
|
300
|
-
)
|
301
|
-
external
|
302
|
-
view
|
303
|
-
override
|
304
|
-
returns (Amount premiumAmount)
|
305
|
-
{
|
306
|
-
IPolicy.Premium memory premium = _getProductStorage()._pricingService.calculatePremium(
|
307
|
-
getNftId(),
|
308
|
-
riskId,
|
309
|
-
sumInsuredAmount,
|
310
|
-
lifetime,
|
311
|
-
applicationData,
|
312
|
-
bundleNftId,
|
313
|
-
referralId
|
314
|
-
);
|
315
|
-
|
316
|
-
return AmountLib.toAmount(premium.premiumAmount);
|
317
|
-
}
|
318
|
-
|
319
|
-
function calculateNetPremium(
|
320
|
-
Amount sumInsuredAmount,
|
321
|
-
RiskId riskId,
|
322
|
-
Seconds lifetime,
|
323
|
-
bytes memory applicationData
|
324
|
-
)
|
325
|
-
external
|
326
|
-
view
|
327
|
-
virtual override
|
328
|
-
returns (Amount netPremiumAmount)
|
329
|
-
{
|
330
|
-
// default 10% of sum insured
|
331
|
-
return AmountLib.toAmount(sumInsuredAmount.toInt() / 10);
|
332
|
-
}
|
333
|
-
|
334
|
-
|
335
|
-
function getInitialProductInfo()
|
336
|
-
public
|
337
|
-
virtual
|
338
|
-
view
|
339
|
-
returns (IComponents.ProductInfo memory poolInfo)
|
340
|
-
{
|
341
|
-
ProductStorage storage $ = _getProductStorage();
|
342
|
-
|
343
|
-
return IComponents.ProductInfo({
|
344
|
-
distributionNftId: $._distributionNftId,
|
345
|
-
poolNftId: $._poolNftId,
|
346
|
-
productFee: FeeLib.zero(),
|
347
|
-
processingFee: FeeLib.zero(),
|
348
|
-
distributionFee: FeeLib.zero(),
|
349
|
-
minDistributionOwnerFee: FeeLib.zero(),
|
350
|
-
poolFee: FeeLib.zero(),
|
351
|
-
stakingFee: FeeLib.zero(),
|
352
|
-
performanceFee: FeeLib.zero()
|
353
|
-
});
|
354
|
-
}
|
355
|
-
|
356
|
-
function getPoolNftId() external view override returns (NftId poolNftId) {
|
357
|
-
return getRegistry().getNftId(address(_getProductStorage()._pool));
|
358
|
-
}
|
359
|
-
|
360
|
-
function getDistributionNftId() external view override returns (NftId distributionNftId) {
|
361
|
-
return getRegistry().getNftId(address(_getProductStorage()._distribution));
|
362
|
-
}
|
363
|
-
|
364
412
|
function _toRiskId(string memory riskName) internal pure returns (RiskId riskId) {
|
365
413
|
return RiskIdLib.toRiskId(riskName);
|
366
414
|
}
|
@@ -371,7 +419,7 @@ abstract contract Product is
|
|
371
419
|
}
|
372
420
|
}
|
373
421
|
|
374
|
-
function
|
375
|
-
return _getProductStorage().
|
422
|
+
function _getRiskService() internal view returns (IRiskService) {
|
423
|
+
return _getProductStorage()._riskService;
|
376
424
|
}
|
377
425
|
}
|