@etherisc/gif-next 0.0.2-d67ce7f-686 → 0.0.2-d6a50e7-658
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +32 -8
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.dbg.json +4 -0
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.json +1007 -0
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.dbg.json +4 -0
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.json +744 -0
- package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.dbg.json +4 -0
- package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.json +791 -0
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.json +158 -70
- package/artifacts/contracts/authorization/AccessAdmin.sol/IAccessManagedChecker.dbg.json +4 -0
- package/artifacts/contracts/authorization/AccessAdmin.sol/IAccessManagedChecker.json +24 -0
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.json +233 -5
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.json +67 -11
- package/artifacts/contracts/authorization/IAccess.sol/IAccess.dbg.json +1 -1
- package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.dbg.json +1 -1
- package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.json +97 -37
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.json +40 -3
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.json +19 -0
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.json +68 -5
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +175 -371
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +82 -22
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +115 -295
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +239 -295
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +125 -119
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +115 -143
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +127 -64
- package/artifacts/contracts/examples/fire/DamageLevel.sol/DamageLevelLib.dbg.json +4 -0
- package/artifacts/contracts/examples/fire/DamageLevel.sol/DamageLevelLib.json +22 -0
- package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.dbg.json +4 -0
- package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.json +1475 -0
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.dbg.json +4 -0
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.json +502 -0
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.dbg.json +4 -0
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.json +2040 -0
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.dbg.json +4 -0
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.json +470 -0
- package/artifacts/contracts/examples/fire/FireUSD.sol/FireUSD.dbg.json +4 -0
- package/artifacts/contracts/examples/fire/FireUSD.sol/FireUSD.json +376 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.json +1479 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.json +470 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.json +1195 -0
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.json +1655 -0
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.json +502 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.json +2408 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.json +470 -0
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.dbg.json +1 -1
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.json +193 -45
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +130 -61
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +105 -103
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +165 -157
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +317 -143
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +58 -85
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +927 -262
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +131 -266
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +102 -92
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +692 -443
- package/artifacts/contracts/instance/RiskSet.sol/RiskSet.dbg.json +4 -0
- package/artifacts/contracts/instance/RiskSet.sol/RiskSet.json +853 -0
- 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 +46 -5
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.json +16 -5
- package/artifacts/contracts/instance/base/ObjectSetHelperLib.sol/ObjectSetHelperLib.dbg.json +4 -0
- package/artifacts/contracts/instance/base/ObjectSetHelperLib.sol/ObjectSetHelperLib.json +168 -0
- package/artifacts/contracts/instance/module/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/oracle/BasicOracle.sol/BasicOracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.json +127 -323
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +84 -24
- package/artifacts/contracts/oracle/IOracle.sol/IOracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.json +102 -130
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.json +69 -11
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.json +103 -283
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +153 -190
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +122 -88
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.json +125 -305
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.json +114 -22
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +170 -337
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +111 -133
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.json +86 -67
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.json +124 -163
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.json +303 -207
- package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/pool/Pool.sol/Pool.json +122 -313
- package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolService.sol/PoolService.json +384 -410
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +122 -104
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +134 -184
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +91 -93
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +238 -357
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.json +82 -22
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +421 -222
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +142 -108
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.json +94 -9
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.json +303 -9
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.json +302 -150
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +1 -1
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.json +136 -83
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.json +235 -202
- package/artifacts/contracts/product/IRiskService.sol/IRiskService.dbg.json +4 -0
- package/artifacts/contracts/product/{IProductService.sol/IProductService.json → IRiskService.sol/IRiskService.json} +57 -4
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +347 -378
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +115 -109
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +227 -314
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +120 -122
- package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/product/Product.sol/Product.json +236 -355
- package/artifacts/contracts/product/RiskService.sol/RiskService.dbg.json +4 -0
- package/artifacts/contracts/product/RiskService.sol/RiskService.json +637 -0
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +4 -0
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.json +724 -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 +315 -34
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +144 -41
- package/artifacts/contracts/registry/IRelease.sol/IRelease.dbg.json +4 -0
- package/artifacts/contracts/registry/IRelease.sol/IRelease.json +24 -0
- package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
- package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.json +5 -18
- package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.json +521 -95
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +275 -160
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +109 -292
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +94 -80
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.dbg.json +4 -0
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.json +1795 -0
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.json +47 -6
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.json +412 -246
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +66 -8
- 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 +89 -240
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +502 -617
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +137 -133
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.json +57 -111
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.dbg.json +4 -0
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.json +541 -0
- package/artifacts/contracts/shared/ContractLib.sol/IInstanceAdminHelper.dbg.json +4 -0
- package/artifacts/contracts/shared/ContractLib.sol/IInstanceAdminHelper.json +24 -0
- package/artifacts/contracts/shared/ContractLib.sol/ITargetHelper.dbg.json +4 -0
- package/artifacts/contracts/shared/ContractLib.sol/ITargetHelper.json +30 -0
- package/artifacts/contracts/shared/ContractLib.sol/ITokenRegistryHelper.dbg.json +4 -0
- package/artifacts/contracts/shared/ContractLib.sol/ITokenRegistryHelper.json +40 -0
- package/artifacts/contracts/shared/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponent.sol/IComponent.json +89 -88
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.json +448 -260
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.json +102 -130
- package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.json +36 -0
- package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.json +36 -0
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.json +16 -0
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.json +15 -47
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +148 -0
- package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
- package/artifacts/contracts/shared/IService.sol/IService.json +55 -2
- package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.dbg.json +1 -1
- package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.json +2 -22
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.json +102 -282
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.json +42 -1
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.json +42 -1
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.dbg.json +1 -1
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.json +2 -2
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +22 -57
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +19 -141
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +122 -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 +57 -111
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +674 -49
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.dbg.json +4 -0
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.json +395 -0
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.dbg.json +4 -0
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.json +172 -0
- package/artifacts/contracts/staking/IStaking.sol/IStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/IStaking.sol/IStaking.json +134 -125
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.json +55 -23
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.json +64 -94
- package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.json +217 -359
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.json +46 -5
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +119 -104
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +6 -11
- package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingService.sol/StakingService.json +100 -171
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +98 -84
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +149 -108
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +55 -24
- package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.dbg.json +1 -1
- package/artifacts/contracts/type/Amount.sol/AmountLib.dbg.json +1 -1
- package/artifacts/contracts/type/Amount.sol/AmountLib.json +33 -9
- package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.json +28 -4
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.json +2 -2
- package/artifacts/contracts/type/Fee.sol/FeeLib.dbg.json +1 -1
- package/artifacts/contracts/type/Fee.sol/FeeLib.json +3 -3
- package/artifacts/contracts/type/Key32.sol/Key32Lib.dbg.json +1 -1
- package/artifacts/contracts/type/Key32.sol/Key32Lib.json +2 -2
- package/artifacts/contracts/type/Key32Set.sol/LibKey32Set.dbg.json +4 -0
- package/artifacts/contracts/type/Key32Set.sol/LibKey32Set.json +33 -0
- package/artifacts/contracts/type/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/NftId.sol/NftIdLib.json +23 -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 +2 -2
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.json +19 -19
- package/artifacts/contracts/type/Referral.sol/ReferralLib.dbg.json +1 -1
- package/artifacts/contracts/type/Referral.sol/ReferralLib.json +2 -2
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.json +2 -2
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.json +118 -5
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.json +3 -3
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +1 -1
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.json +26 -2
- package/artifacts/contracts/type/Selector.sol/SelectorLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.dbg.json +1 -1
- package/artifacts/contracts/type/StateId.sol/StateIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/StateId.sol/StateIdLib.json +15 -2
- package/artifacts/contracts/type/String.sol/StrLib.dbg.json +1 -1
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.json +2 -2
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.json +16 -3
- package/artifacts/contracts/type/Version.sol/VersionLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionLib.json +2 -21
- package/artifacts/contracts/type/Version.sol/VersionPartLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionPartLib.json +47 -2
- package/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.json +71 -70
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +1 -1
- package/contracts/accounting/AccountingService.sol +262 -0
- package/contracts/accounting/AccountingServiceManager.sol +38 -0
- package/contracts/accounting/IAccountingService.sol +45 -0
- package/contracts/authorization/AccessAdmin.sol +192 -124
- package/contracts/authorization/AccessManagerCloneable.sol +136 -3
- package/contracts/authorization/Authorization.sol +111 -40
- package/contracts/authorization/IAccess.sol +1 -0
- package/contracts/authorization/IAccessAdmin.sol +10 -6
- package/contracts/authorization/IAuthorization.sol +13 -7
- package/contracts/authorization/IServiceAuthorization.sol +3 -1
- package/contracts/authorization/ServiceAuthorization.sol +26 -10
- package/contracts/distribution/BasicDistribution.sol +8 -7
- package/contracts/distribution/BasicDistributionAuthorization.sol +1 -1
- package/contracts/distribution/Distribution.sol +33 -41
- package/contracts/distribution/DistributionService.sol +112 -91
- package/contracts/distribution/DistributionServiceManager.sol +6 -6
- package/contracts/distribution/IDistributionComponent.sol +1 -1
- package/contracts/distribution/IDistributionService.sol +14 -11
- package/contracts/examples/fire/DamageLevel.sol +59 -0
- package/contracts/examples/fire/FirePool.sol +90 -0
- package/contracts/examples/fire/FirePoolAuthorization.sol +35 -0
- package/contracts/examples/fire/FireProduct.sol +438 -0
- package/contracts/examples/fire/FireProductAuthorization.sol +45 -0
- package/contracts/examples/fire/FireUSD.sol +26 -0
- package/contracts/examples/unpermissioned/SimpleDistribution.sol +57 -0
- package/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol +28 -0
- package/contracts/examples/unpermissioned/SimpleOracle.sol +137 -0
- package/contracts/examples/unpermissioned/SimplePool.sol +107 -0
- package/contracts/examples/unpermissioned/SimplePoolAuthorization.sol +28 -0
- package/contracts/examples/unpermissioned/SimpleProduct.sol +370 -0
- package/contracts/examples/unpermissioned/SimpleProductAuthorization.sol +28 -0
- package/contracts/instance/BundleSet.sol +42 -38
- package/contracts/instance/IInstance.sol +16 -36
- package/contracts/instance/IInstanceService.sol +9 -29
- package/contracts/instance/Instance.sol +47 -66
- package/contracts/instance/InstanceAdmin.sol +133 -73
- package/contracts/instance/InstanceAuthorizationV3.sol +55 -34
- package/contracts/instance/InstanceReader.sol +218 -27
- package/contracts/instance/InstanceService.sol +125 -164
- package/contracts/instance/InstanceServiceManager.sol +6 -7
- package/contracts/instance/InstanceStore.sol +23 -2
- package/contracts/instance/RiskSet.sol +118 -0
- package/contracts/instance/base/ObjectCounter.sol +1 -2
- package/contracts/instance/base/ObjectLifecycle.sol +10 -1
- package/contracts/instance/base/ObjectSet.sol +31 -33
- package/contracts/instance/base/ObjectSetHelperLib.sol +30 -0
- package/contracts/instance/module/IComponents.sol +14 -10
- package/contracts/instance/module/IPolicy.sol +25 -24
- package/contracts/instance/module/IRisk.sol +3 -0
- package/contracts/oracle/BasicOracle.sol +0 -1
- package/contracts/oracle/IOracleService.sol +2 -1
- package/contracts/oracle/Oracle.sol +7 -17
- package/contracts/oracle/OracleService.sol +113 -81
- package/contracts/oracle/OracleServiceManager.sol +6 -6
- package/contracts/pool/BasicPool.sol +35 -26
- package/contracts/pool/BasicPoolAuthorization.sol +14 -4
- package/contracts/pool/BundleService.sol +105 -117
- package/contracts/pool/BundleServiceManager.sol +6 -6
- package/contracts/pool/IBundleService.sol +8 -20
- package/contracts/pool/IPoolComponent.sol +19 -15
- package/contracts/pool/IPoolService.sol +52 -48
- package/contracts/pool/Pool.sol +145 -128
- package/contracts/pool/PoolService.sol +297 -207
- package/contracts/pool/PoolServiceManager.sol +4 -4
- package/contracts/product/ApplicationService.sol +72 -43
- package/contracts/product/ApplicationServiceManager.sol +4 -4
- package/contracts/product/BasicProduct.sol +11 -12
- package/contracts/product/BasicProductAuthorization.sol +1 -3
- package/contracts/product/ClaimService.sol +422 -138
- package/contracts/product/ClaimServiceManager.sol +4 -4
- package/contracts/product/IApplicationService.sol +6 -2
- package/contracts/product/IClaimService.sol +43 -7
- package/contracts/product/IPolicyService.sol +42 -37
- package/contracts/product/IPricingService.sol +10 -10
- package/contracts/product/IProductComponent.sol +27 -5
- package/contracts/product/{IProductService.sol → IRiskService.sol} +1 -1
- package/contracts/product/PolicyService.sol +477 -283
- package/contracts/product/PolicyServiceManager.sol +4 -4
- package/contracts/product/PricingService.sol +66 -62
- package/contracts/product/PricingServiceManager.sol +4 -4
- package/contracts/product/Product.sol +143 -91
- package/contracts/product/RiskService.sol +151 -0
- package/contracts/product/RiskServiceManager.sol +39 -0
- package/contracts/registry/ChainNft.sol +72 -40
- package/contracts/registry/IRegistry.sol +58 -28
- package/contracts/registry/IRegistryService.sol +5 -12
- package/contracts/registry/IRelease.sol +26 -0
- package/contracts/registry/ITransferInterceptor.sol +1 -2
- package/contracts/registry/Registry.sol +353 -203
- package/contracts/registry/RegistryAdmin.sol +161 -182
- package/contracts/registry/RegistryService.sol +37 -48
- package/contracts/registry/RegistryServiceManager.sol +3 -3
- package/contracts/registry/ReleaseAdmin.sol +245 -0
- package/contracts/registry/ReleaseLifecycle.sol +8 -3
- package/contracts/registry/ReleaseRegistry.sol +258 -232
- package/contracts/registry/ServiceAuthorizationV3.sol +94 -52
- package/contracts/registry/TokenRegistry.sol +6 -8
- package/contracts/shared/Component.sol +72 -127
- package/contracts/shared/ComponentService.sol +427 -377
- package/contracts/shared/ComponentServiceManager.sol +8 -5
- package/contracts/shared/ComponentVerifyingService.sol +28 -17
- package/contracts/shared/ContractLib.sol +252 -0
- package/contracts/shared/IComponent.sol +8 -18
- package/contracts/shared/IComponentService.sol +45 -37
- package/contracts/shared/IInstanceLinkedComponent.sol +6 -32
- package/contracts/shared/ILifecycle.sol +3 -1
- package/contracts/shared/INftOwnable.sol +2 -0
- package/contracts/shared/IPolicyHolder.sol +12 -22
- package/contracts/shared/IRegisterable.sol +23 -1
- package/contracts/shared/IService.sol +3 -5
- package/contracts/shared/InitializableERC165.sol +2 -2
- package/contracts/shared/InstanceLinkedComponent.sol +72 -47
- package/contracts/shared/KeyValueStore.sol +1 -1
- package/contracts/shared/Lifecycle.sol +15 -4
- package/contracts/shared/NftOwnable.sol +29 -9
- package/contracts/shared/PolicyHolder.sol +15 -52
- package/contracts/shared/Registerable.sol +55 -21
- package/contracts/shared/RegistryLinked.sol +9 -14
- package/contracts/shared/Service.sol +15 -32
- package/contracts/shared/TokenHandler.sol +356 -29
- package/contracts/shared/TokenHandlerDeployerLib.sol +20 -0
- package/contracts/staking/IStaking.sol +11 -5
- package/contracts/staking/IStakingService.sol +0 -3
- package/contracts/staking/StakeManagerLib.sol +18 -25
- package/contracts/staking/Staking.sol +71 -61
- package/contracts/staking/StakingManager.sol +8 -6
- package/contracts/staking/StakingReader.sol +12 -5
- package/contracts/staking/StakingService.sol +57 -25
- package/contracts/staking/StakingServiceManager.sol +2 -2
- package/contracts/staking/TargetManagerLib.sol +7 -3
- package/contracts/type/Amount.sol +15 -0
- package/contracts/type/ClaimId.sol +6 -1
- package/contracts/type/Key32.sol +2 -2
- package/contracts/type/Key32Set.sol +62 -0
- package/contracts/type/NftId.sol +7 -0
- package/contracts/type/ObjectType.sol +36 -17
- package/contracts/type/PayoutId.sol +10 -10
- package/contracts/type/RiskId.sol +35 -4
- package/contracts/type/RoleId.sol +4 -13
- package/contracts/type/Seconds.sol +8 -0
- package/contracts/type/StateId.sol +15 -1
- package/contracts/type/Timestamp.sol +0 -5
- package/contracts/type/UFixed.sol +13 -119
- package/contracts/type/Version.sol +15 -5
- package/contracts/upgradeability/ProxyManager.sol +68 -34
- package/contracts/upgradeability/Versionable.sol +2 -2
- package/package.json +4 -3
- package/artifacts/contracts/authorization/IModuleAuthorization.sol/IModuleAuthorization.dbg.json +0 -4
- package/artifacts/contracts/authorization/IModuleAuthorization.sol/IModuleAuthorization.json +0 -290
- package/artifacts/contracts/authorization/ModuleAuthorization.sol/ModuleAuthorization.dbg.json +0 -4
- package/artifacts/contracts/authorization/ModuleAuthorization.sol/ModuleAuthorization.json +0 -390
- 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/shared/InitializableCustom.sol/InitializableCustom.dbg.json +0 -4
- package/artifacts/contracts/shared/InitializableCustom.sol/InitializableCustom.json +0 -39
- package/artifacts/contracts/type/UFixed.sol/MathLib.dbg.json +0 -4
- package/artifacts/contracts/type/UFixed.sol/MathLib.json +0 -16
- package/contracts/authorization/IModuleAuthorization.sol +0 -21
- package/contracts/authorization/ModuleAuthorization.sol +0 -78
- package/contracts/product/ProductService.sol +0 -99
- package/contracts/product/ProductServiceManager.sol +0 -39
- package/contracts/shared/InitializableCustom.sol +0 -177
@@ -1,37 +1,36 @@
|
|
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
|
-
import {
|
6
|
+
import {IComponent} from "../shared/IComponent.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";
|
12
10
|
import {IAuthorization} from "../authorization/IAuthorization.sol";
|
13
11
|
import {IComponentService} from "../shared/IComponentService.sol";
|
12
|
+
import {InstanceLinkedComponent} from "../shared/InstanceLinkedComponent.sol";
|
13
|
+
import {IInstanceLinkedComponent} from "../shared/IInstanceLinkedComponent.sol";
|
14
14
|
import {IPolicyService} from "./IPolicyService.sol";
|
15
|
-
import {
|
15
|
+
import {IRiskService} from "./IRiskService.sol";
|
16
16
|
import {IClaimService} from "./IClaimService.sol";
|
17
17
|
import {IPricingService} from "./IPricingService.sol";
|
18
18
|
import {IProductComponent} from "./IProductComponent.sol";
|
19
19
|
import {NftId, NftIdLib} from "../type/NftId.sol";
|
20
|
+
import {ObjectType, COMPONENT, DISTRIBUTION, ORACLE, POOL, PRODUCT, BUNDLE, APPLICATION, POLICY, CLAIM, PRICE } from "../type/ObjectType.sol";
|
20
21
|
import {PayoutId} from "../type/PayoutId.sol";
|
21
|
-
import {COMPONENT, PRODUCT, APPLICATION, POLICY, CLAIM, PRICE } from "../type/ObjectType.sol";
|
22
|
+
import {COMPONENT, PRODUCT, APPLICATION, POLICY, CLAIM, PRICE, BUNDLE, RISK } from "../type/ObjectType.sol";
|
22
23
|
import {ReferralId} from "../type/Referral.sol";
|
23
24
|
import {RiskId, RiskIdLib} from "../type/RiskId.sol";
|
24
25
|
import {Seconds} from "../type/Seconds.sol";
|
25
26
|
import {StateId} from "../type/StateId.sol";
|
26
27
|
import {Timestamp} from "../type/Timestamp.sol";
|
27
28
|
|
28
|
-
import {TokenHandler} from "../shared/TokenHandler.sol";
|
29
|
-
|
30
|
-
import {InstanceReader} from "../instance/InstanceReader.sol";
|
31
29
|
import {IPolicy} from "../instance/module/IPolicy.sol";
|
32
30
|
import {IComponents} from "../instance/module/IComponents.sol";
|
33
|
-
import {
|
34
|
-
import {
|
31
|
+
import {IDistributionComponent} from "../distribution/IDistributionComponent.sol";
|
32
|
+
import {IOracleComponent} from "../oracle/IOracleComponent.sol";
|
33
|
+
import {IPoolComponent} from "../pool/IPoolComponent.sol";
|
35
34
|
|
36
35
|
abstract contract Product is
|
37
36
|
InstanceLinkedComponent,
|
@@ -41,16 +40,38 @@ abstract contract Product is
|
|
41
40
|
bytes32 public constant PRODUCT_STORAGE_LOCATION_V1 = 0x0bb7aafdb8e380f81267337bc5b5dfdf76e6d3a380ecadb51ec665246d9d6800;
|
42
41
|
|
43
42
|
struct ProductStorage {
|
44
|
-
|
43
|
+
IComponents.ProductInfo _productInfo;
|
44
|
+
IComponents.FeeInfo _feeInfo;
|
45
|
+
IComponentService _componentService;
|
46
|
+
IRiskService _riskService;
|
45
47
|
IApplicationService _applicationService;
|
46
48
|
IPolicyService _policyService;
|
47
49
|
IClaimService _claimService;
|
48
50
|
IPricingService _pricingService;
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
51
|
+
}
|
52
|
+
|
53
|
+
|
54
|
+
function registerComponent(address component)
|
55
|
+
external
|
56
|
+
virtual
|
57
|
+
onlyOwner()
|
58
|
+
returns (NftId componentNftId)
|
59
|
+
{
|
60
|
+
return _getProductStorage()._componentService.registerComponent(component);
|
61
|
+
}
|
62
|
+
|
63
|
+
|
64
|
+
function processFundedClaim(
|
65
|
+
NftId policyNftId,
|
66
|
+
ClaimId claimId,
|
67
|
+
Amount availableAmount
|
68
|
+
)
|
69
|
+
external
|
70
|
+
virtual
|
71
|
+
restricted() // pool service role
|
72
|
+
onlyNftOfType(policyNftId, POLICY())
|
73
|
+
{
|
74
|
+
// default implementation does nothing
|
54
75
|
}
|
55
76
|
|
56
77
|
|
@@ -62,12 +83,13 @@ abstract contract Product is
|
|
62
83
|
NftId bundleNftId,
|
63
84
|
ReferralId referralId
|
64
85
|
)
|
65
|
-
|
86
|
+
public
|
66
87
|
view
|
67
88
|
override
|
89
|
+
onlyNftOfType(bundleNftId, BUNDLE())
|
68
90
|
returns (Amount premiumAmount)
|
69
91
|
{
|
70
|
-
IPolicy.
|
92
|
+
IPolicy.PremiumInfo memory premium = _getProductStorage()._pricingService.calculatePremium(
|
71
93
|
getNftId(),
|
72
94
|
riskId,
|
73
95
|
sumInsuredAmount,
|
@@ -77,14 +99,14 @@ abstract contract Product is
|
|
77
99
|
referralId
|
78
100
|
);
|
79
101
|
|
80
|
-
return
|
102
|
+
return premium.premiumAmount;
|
81
103
|
}
|
82
104
|
|
83
105
|
function calculateNetPremium(
|
84
106
|
Amount sumInsuredAmount,
|
85
|
-
RiskId
|
86
|
-
Seconds
|
87
|
-
bytes memory
|
107
|
+
RiskId,
|
108
|
+
Seconds,
|
109
|
+
bytes memory
|
88
110
|
)
|
89
111
|
external
|
90
112
|
view
|
@@ -96,56 +118,34 @@ abstract contract Product is
|
|
96
118
|
}
|
97
119
|
|
98
120
|
|
99
|
-
function register()
|
100
|
-
external
|
101
|
-
virtual
|
102
|
-
onlyOwner()
|
103
|
-
{
|
104
|
-
_getProductStorage()._componentService.registerProduct();
|
105
|
-
_approveTokenHandler(type(uint256).max);
|
106
|
-
}
|
107
|
-
|
108
|
-
|
109
121
|
function getInitialProductInfo()
|
110
122
|
public
|
111
123
|
virtual
|
112
124
|
view
|
113
125
|
returns (IComponents.ProductInfo memory poolInfo)
|
114
126
|
{
|
115
|
-
|
116
|
-
|
117
|
-
return IComponents.ProductInfo({
|
118
|
-
distributionNftId: $._distributionNftId,
|
119
|
-
poolNftId: $._poolNftId,
|
120
|
-
productFee: FeeLib.zero(),
|
121
|
-
processingFee: FeeLib.zero(),
|
122
|
-
distributionFee: FeeLib.zero(),
|
123
|
-
minDistributionOwnerFee: FeeLib.zero(),
|
124
|
-
poolFee: FeeLib.zero(),
|
125
|
-
stakingFee: FeeLib.zero(),
|
126
|
-
performanceFee: FeeLib.zero()
|
127
|
-
});
|
127
|
+
return _getProductStorage()._productInfo;
|
128
128
|
}
|
129
129
|
|
130
|
-
function
|
131
|
-
|
130
|
+
function getInitialFeeInfo()
|
131
|
+
public
|
132
|
+
virtual
|
133
|
+
view
|
134
|
+
returns (IComponents.FeeInfo memory feeInfo)
|
135
|
+
{
|
136
|
+
return _getProductStorage()._feeInfo;
|
132
137
|
}
|
133
138
|
|
134
|
-
function getDistributionNftId() external view override returns (NftId distributionNftId) {
|
135
|
-
return getRegistry().getNftId(address(_getProductStorage()._distribution));
|
136
|
-
}
|
137
139
|
|
138
140
|
function _initializeProduct(
|
139
141
|
address registry,
|
140
142
|
NftId instanceNftId,
|
141
|
-
IAuthorization authorization,
|
142
|
-
address initialOwner,
|
143
143
|
string memory name,
|
144
144
|
address token,
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
145
|
+
IComponents.ProductInfo memory productInfo,
|
146
|
+
IComponents.FeeInfo memory feeInfo,
|
147
|
+
IAuthorization authorization,
|
148
|
+
address initialOwner,
|
149
149
|
bytes memory componentData // writeonly data that will saved in the object info record of the registry
|
150
150
|
)
|
151
151
|
internal
|
@@ -159,26 +159,21 @@ abstract contract Product is
|
|
159
159
|
token,
|
160
160
|
PRODUCT(),
|
161
161
|
authorization,
|
162
|
-
|
162
|
+
productInfo.isInterceptingPolicyTransfers,
|
163
163
|
initialOwner,
|
164
|
-
registryData,
|
165
164
|
componentData);
|
166
165
|
|
167
166
|
ProductStorage storage $ = _getProductStorage();
|
168
|
-
|
169
|
-
|
170
|
-
$.
|
167
|
+
$._productInfo = productInfo;
|
168
|
+
$._feeInfo = feeInfo;
|
169
|
+
$._riskService = IRiskService(_getServiceAddress(RISK()));
|
171
170
|
$._applicationService = IApplicationService(_getServiceAddress(APPLICATION()));
|
172
171
|
$._policyService = IPolicyService(_getServiceAddress(POLICY()));
|
173
172
|
$._claimService = IClaimService(_getServiceAddress(CLAIM()));
|
174
173
|
$._pricingService = IPricingService(_getServiceAddress(PRICE()));
|
175
174
|
$._componentService = IComponentService(_getServiceAddress(COMPONENT()));
|
176
|
-
$._pool = Pool(pool);
|
177
|
-
$._distribution = Distribution(distribution);
|
178
|
-
$._poolNftId = getRegistry().getNftId(pool);
|
179
|
-
$._distributionNftId = getRegistry().getNftId(distribution);
|
180
175
|
|
181
|
-
|
176
|
+
_registerInterface(type(IProductComponent).interfaceId);
|
182
177
|
}
|
183
178
|
|
184
179
|
|
@@ -196,8 +191,11 @@ abstract contract Product is
|
|
196
191
|
function _createRisk(
|
197
192
|
RiskId id,
|
198
193
|
bytes memory data
|
199
|
-
)
|
200
|
-
|
194
|
+
)
|
195
|
+
internal
|
196
|
+
virtual
|
197
|
+
{
|
198
|
+
_getProductStorage()._riskService.createRisk(
|
201
199
|
id,
|
202
200
|
data
|
203
201
|
);
|
@@ -206,8 +204,11 @@ abstract contract Product is
|
|
206
204
|
function _updateRisk(
|
207
205
|
RiskId id,
|
208
206
|
bytes memory data
|
209
|
-
)
|
210
|
-
|
207
|
+
)
|
208
|
+
internal
|
209
|
+
virtual
|
210
|
+
{
|
211
|
+
_getProductStorage()._riskService.updateRisk(
|
211
212
|
id,
|
212
213
|
data
|
213
214
|
);
|
@@ -216,35 +217,36 @@ abstract contract Product is
|
|
216
217
|
function _updateRiskState(
|
217
218
|
RiskId id,
|
218
219
|
StateId state
|
219
|
-
)
|
220
|
-
|
220
|
+
)
|
221
|
+
internal
|
222
|
+
virtual
|
223
|
+
{
|
224
|
+
_getProductStorage()._riskService.updateRiskState(
|
221
225
|
id,
|
222
226
|
state
|
223
227
|
);
|
224
228
|
}
|
225
229
|
|
226
230
|
|
227
|
-
function _getRiskInfo(RiskId id) internal view returns (IRisk.RiskInfo memory info) {
|
228
|
-
return getInstance().getInstanceReader().getRiskInfo(id);
|
229
|
-
}
|
230
|
-
|
231
|
-
|
232
231
|
function _createApplication(
|
233
232
|
address applicationOwner,
|
234
233
|
RiskId riskId,
|
235
234
|
Amount sumInsuredAmount,
|
235
|
+
Amount premiumAmount,
|
236
236
|
Seconds lifetime,
|
237
237
|
NftId bundleNftId,
|
238
238
|
ReferralId referralId,
|
239
239
|
bytes memory applicationData
|
240
240
|
)
|
241
241
|
internal
|
242
|
+
virtual
|
242
243
|
returns (NftId applicationNftId)
|
243
244
|
{
|
244
245
|
return _getProductStorage()._applicationService.create(
|
245
246
|
applicationOwner,
|
246
247
|
riskId,
|
247
248
|
sumInsuredAmount,
|
249
|
+
premiumAmount,
|
248
250
|
lifetime,
|
249
251
|
bundleNftId,
|
250
252
|
referralId,
|
@@ -252,16 +254,16 @@ abstract contract Product is
|
|
252
254
|
);
|
253
255
|
}
|
254
256
|
|
255
|
-
function
|
256
|
-
NftId
|
257
|
-
bool requirePremiumPayment,
|
257
|
+
function _createPolicy(
|
258
|
+
NftId applicationNftId,
|
258
259
|
Timestamp activateAt
|
259
260
|
)
|
260
261
|
internal
|
262
|
+
virtual
|
263
|
+
returns (Amount premiumAmount)
|
261
264
|
{
|
262
|
-
_getProductStorage()._policyService.
|
263
|
-
|
264
|
-
requirePremiumPayment,
|
265
|
+
premiumAmount = _getProductStorage()._policyService.createPolicy(
|
266
|
+
applicationNftId,
|
265
267
|
activateAt);
|
266
268
|
}
|
267
269
|
|
@@ -269,6 +271,7 @@ abstract contract Product is
|
|
269
271
|
NftId policyNftId
|
270
272
|
)
|
271
273
|
internal
|
274
|
+
virtual
|
272
275
|
{
|
273
276
|
_getProductStorage()._policyService.decline(
|
274
277
|
policyNftId);
|
@@ -279,9 +282,10 @@ abstract contract Product is
|
|
279
282
|
Timestamp expireAt
|
280
283
|
)
|
281
284
|
internal
|
282
|
-
|
285
|
+
virtual
|
286
|
+
returns (Timestamp expiredAt)
|
283
287
|
{
|
284
|
-
|
288
|
+
expiredAt = _getProductStorage()._policyService.expire(policyNftId, expireAt);
|
285
289
|
}
|
286
290
|
|
287
291
|
function _collectPremium(
|
@@ -289,6 +293,7 @@ abstract contract Product is
|
|
289
293
|
Timestamp activateAt
|
290
294
|
)
|
291
295
|
internal
|
296
|
+
virtual
|
292
297
|
{
|
293
298
|
_getProductStorage()._policyService.collectPremium(
|
294
299
|
policyNftId,
|
@@ -300,6 +305,7 @@ abstract contract Product is
|
|
300
305
|
Timestamp activateAt
|
301
306
|
)
|
302
307
|
internal
|
308
|
+
virtual
|
303
309
|
{
|
304
310
|
_getProductStorage()._policyService.activate(
|
305
311
|
policyNftId,
|
@@ -310,6 +316,7 @@ abstract contract Product is
|
|
310
316
|
NftId policyNftId
|
311
317
|
)
|
312
318
|
internal
|
319
|
+
virtual
|
313
320
|
{
|
314
321
|
_getProductStorage()._policyService.close(
|
315
322
|
policyNftId);
|
@@ -321,6 +328,7 @@ abstract contract Product is
|
|
321
328
|
bytes memory claimData
|
322
329
|
)
|
323
330
|
internal
|
331
|
+
virtual
|
324
332
|
returns(ClaimId)
|
325
333
|
{
|
326
334
|
return _getProductStorage()._claimService.submit(
|
@@ -329,6 +337,18 @@ abstract contract Product is
|
|
329
337
|
claimData);
|
330
338
|
}
|
331
339
|
|
340
|
+
function _revokeClaim(
|
341
|
+
NftId policyNftId,
|
342
|
+
ClaimId claimId
|
343
|
+
)
|
344
|
+
internal
|
345
|
+
virtual
|
346
|
+
{
|
347
|
+
_getProductStorage()._claimService.revoke(
|
348
|
+
policyNftId,
|
349
|
+
claimId);
|
350
|
+
}
|
351
|
+
|
332
352
|
function _confirmClaim(
|
333
353
|
NftId policyNftId,
|
334
354
|
ClaimId claimId,
|
@@ -336,6 +356,7 @@ abstract contract Product is
|
|
336
356
|
bytes memory data
|
337
357
|
)
|
338
358
|
internal
|
359
|
+
virtual
|
339
360
|
{
|
340
361
|
_getProductStorage()._claimService.confirm(
|
341
362
|
policyNftId,
|
@@ -350,6 +371,7 @@ abstract contract Product is
|
|
350
371
|
bytes memory data
|
351
372
|
)
|
352
373
|
internal
|
374
|
+
virtual
|
353
375
|
{
|
354
376
|
_getProductStorage()._claimService.decline(
|
355
377
|
policyNftId,
|
@@ -362,6 +384,7 @@ abstract contract Product is
|
|
362
384
|
ClaimId claimId
|
363
385
|
)
|
364
386
|
internal
|
387
|
+
virtual
|
365
388
|
{
|
366
389
|
_getProductStorage()._claimService.close(
|
367
390
|
policyNftId,
|
@@ -375,6 +398,7 @@ abstract contract Product is
|
|
375
398
|
bytes memory data
|
376
399
|
)
|
377
400
|
internal
|
401
|
+
virtual
|
378
402
|
returns (PayoutId)
|
379
403
|
{
|
380
404
|
return _getProductStorage()._claimService.createPayout(
|
@@ -384,28 +408,56 @@ abstract contract Product is
|
|
384
408
|
data);
|
385
409
|
}
|
386
410
|
|
411
|
+
function _createPayoutForBeneficiary(
|
412
|
+
NftId policyNftId,
|
413
|
+
ClaimId claimId,
|
414
|
+
Amount amount,
|
415
|
+
address beneficiary,
|
416
|
+
bytes memory data
|
417
|
+
)
|
418
|
+
internal
|
419
|
+
virtual
|
420
|
+
returns (PayoutId)
|
421
|
+
{
|
422
|
+
return _getProductStorage()._claimService.createPayoutForBeneficiary(
|
423
|
+
policyNftId,
|
424
|
+
claimId,
|
425
|
+
amount,
|
426
|
+
beneficiary,
|
427
|
+
data);
|
428
|
+
}
|
429
|
+
|
387
430
|
function _processPayout(
|
388
431
|
NftId policyNftId,
|
389
432
|
PayoutId payoutId
|
390
433
|
)
|
391
434
|
internal
|
435
|
+
virtual
|
392
436
|
{
|
393
437
|
_getProductStorage()._claimService.processPayout(
|
394
438
|
policyNftId,
|
395
439
|
payoutId);
|
396
440
|
}
|
397
441
|
|
398
|
-
function
|
442
|
+
function _cancelPayout(
|
443
|
+
NftId policyNftId,
|
444
|
+
PayoutId payoutId
|
445
|
+
)
|
446
|
+
internal
|
447
|
+
virtual
|
448
|
+
{
|
449
|
+
_getProductStorage()._claimService.cancelPayout(
|
450
|
+
policyNftId,
|
451
|
+
payoutId);
|
452
|
+
}
|
453
|
+
|
454
|
+
function _toRiskId(string memory riskName) internal virtual pure returns (RiskId riskId) {
|
399
455
|
return RiskIdLib.toRiskId(riskName);
|
400
456
|
}
|
401
457
|
|
402
|
-
function _getProductStorage()
|
458
|
+
function _getProductStorage() internal virtual pure returns (ProductStorage storage $) {
|
403
459
|
assembly {
|
404
460
|
$.slot := PRODUCT_STORAGE_LOCATION_V1
|
405
461
|
}
|
406
462
|
}
|
407
|
-
|
408
|
-
function _getProductService() internal view returns (IProductService) {
|
409
|
-
return _getProductStorage()._productService;
|
410
|
-
}
|
411
463
|
}
|
@@ -0,0 +1,151 @@
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
2
|
+
pragma solidity ^0.8.20;
|
3
|
+
|
4
|
+
import {IInstance} from "../instance/IInstance.sol";
|
5
|
+
import {IInstanceService} from "../instance/IInstanceService.sol";
|
6
|
+
import {IPoolService} from "../pool/PoolService.sol";
|
7
|
+
import {IRegistry} from "../registry/IRegistry.sol";
|
8
|
+
import {IRegistryService} from "../registry/IRegistryService.sol";
|
9
|
+
import {IRisk} from "../instance/module/IRisk.sol";
|
10
|
+
import {IRiskService} from "./IRiskService.sol";
|
11
|
+
|
12
|
+
import {ContractLib} from "../shared/ContractLib.sol";
|
13
|
+
import {InstanceReader} from "../instance/InstanceReader.sol";
|
14
|
+
import {ObjectType, COMPONENT, INSTANCE, PRODUCT, POOL, POLICY, REGISTRY, RISK} from "../type/ObjectType.sol";
|
15
|
+
import {ACTIVE, PAUSED, KEEP_STATE} from "../type/StateId.sol";
|
16
|
+
import {NftId} from "../type/NftId.sol";
|
17
|
+
import {RiskId} from "../type/RiskId.sol";
|
18
|
+
import {StateId} from "../type/StateId.sol";
|
19
|
+
import {RiskSet} from "../instance/RiskSet.sol";
|
20
|
+
import {Service} from "../shared/Service.sol";
|
21
|
+
import {TimestampLib} from "../type/Timestamp.sol";
|
22
|
+
|
23
|
+
contract RiskService is
|
24
|
+
Service,
|
25
|
+
IRiskService
|
26
|
+
{
|
27
|
+
|
28
|
+
function _initialize(
|
29
|
+
address owner,
|
30
|
+
bytes memory data
|
31
|
+
)
|
32
|
+
internal
|
33
|
+
initializer
|
34
|
+
virtual override
|
35
|
+
{
|
36
|
+
(
|
37
|
+
address authority,
|
38
|
+
address registry
|
39
|
+
) = abi.decode(data, (address, address));
|
40
|
+
|
41
|
+
__Service_init(authority, registry, owner);
|
42
|
+
|
43
|
+
// TODO cleanup
|
44
|
+
// _instanceService = IInstanceService(_getServiceAddress(INSTANCE()));
|
45
|
+
// _poolService = IPoolService(getRegistry().getServiceAddress(POOL(), getVersion().toMajorPart()));
|
46
|
+
// _registryService = IRegistryService(_getServiceAddress(REGISTRY()));
|
47
|
+
|
48
|
+
_registerInterface(type(IRiskService).interfaceId);
|
49
|
+
}
|
50
|
+
|
51
|
+
|
52
|
+
function createRisk(
|
53
|
+
RiskId riskId,
|
54
|
+
bytes memory data
|
55
|
+
)
|
56
|
+
external
|
57
|
+
restricted()
|
58
|
+
{
|
59
|
+
// checks
|
60
|
+
(NftId productNftId, IInstance instance) = _getAndVerifyActiveComponent(PRODUCT());
|
61
|
+
|
62
|
+
// effects
|
63
|
+
IRisk.RiskInfo memory riskInfo = IRisk.RiskInfo({
|
64
|
+
productNftId: productNftId,
|
65
|
+
createdAt: TimestampLib.blockTimestamp(),
|
66
|
+
data: data});
|
67
|
+
|
68
|
+
instance.getInstanceStore().createRisk(
|
69
|
+
riskId,
|
70
|
+
riskInfo
|
71
|
+
);
|
72
|
+
|
73
|
+
// add risk to RiskSet
|
74
|
+
RiskSet riskSet = instance.getRiskSet();
|
75
|
+
riskSet.add(riskId);
|
76
|
+
}
|
77
|
+
|
78
|
+
|
79
|
+
function updateRisk(
|
80
|
+
RiskId riskId,
|
81
|
+
bytes memory data
|
82
|
+
)
|
83
|
+
external
|
84
|
+
restricted()
|
85
|
+
{
|
86
|
+
// checks
|
87
|
+
(NftId productNftId, IInstance instance) = _getAndVerifyActiveComponent(PRODUCT());
|
88
|
+
|
89
|
+
// effects
|
90
|
+
InstanceReader instanceReader = instance.getInstanceReader();
|
91
|
+
IRisk.RiskInfo memory riskInfo = instanceReader.getRiskInfo(riskId);
|
92
|
+
riskInfo.data = data;
|
93
|
+
instance.getInstanceStore().updateRisk(riskId, riskInfo, KEEP_STATE());
|
94
|
+
}
|
95
|
+
|
96
|
+
|
97
|
+
function updateRiskState(
|
98
|
+
RiskId riskId,
|
99
|
+
StateId state
|
100
|
+
)
|
101
|
+
external
|
102
|
+
restricted()
|
103
|
+
{
|
104
|
+
// checks
|
105
|
+
(NftId productNftId, IInstance instance) = _getAndVerifyActiveComponent(PRODUCT());
|
106
|
+
|
107
|
+
// effects
|
108
|
+
instance.getInstanceStore().updateRiskState(riskId, state);
|
109
|
+
|
110
|
+
if (state == ACTIVE()) {
|
111
|
+
instance.getRiskSet().activate(riskId);
|
112
|
+
} else if (state == PAUSED()) {
|
113
|
+
instance.getRiskSet().pause(riskId);
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
function _getAndVerifyActiveComponent(ObjectType expectedType)
|
118
|
+
internal
|
119
|
+
view
|
120
|
+
returns (
|
121
|
+
NftId componentNftId,
|
122
|
+
IInstance instance
|
123
|
+
)
|
124
|
+
{
|
125
|
+
IRegistry.ObjectInfo memory info;
|
126
|
+
address instanceAddress;
|
127
|
+
bool isActive = true;
|
128
|
+
|
129
|
+
if (expectedType != COMPONENT()) {
|
130
|
+
(info, instanceAddress) = ContractLib.getAndVerifyComponent(
|
131
|
+
getRegistry(),
|
132
|
+
msg.sender, // caller
|
133
|
+
expectedType,
|
134
|
+
isActive);
|
135
|
+
} else {
|
136
|
+
(info, instanceAddress) = ContractLib.getAndVerifyAnyComponent(
|
137
|
+
getRegistry(),
|
138
|
+
msg.sender,
|
139
|
+
isActive);
|
140
|
+
}
|
141
|
+
|
142
|
+
// get component nft id and instance
|
143
|
+
componentNftId = info.nftId;
|
144
|
+
instance = IInstance(instanceAddress);
|
145
|
+
}
|
146
|
+
|
147
|
+
|
148
|
+
function _getDomain() internal pure override returns(ObjectType) {
|
149
|
+
return RISK();
|
150
|
+
}
|
151
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
2
|
+
pragma solidity ^0.8.20;
|
3
|
+
|
4
|
+
import {IVersionable} from "../upgradeability/IVersionable.sol";
|
5
|
+
import {ProxyManager} from "../upgradeability/ProxyManager.sol";
|
6
|
+
import {RiskService} from "./RiskService.sol";
|
7
|
+
|
8
|
+
contract RiskServiceManager is ProxyManager {
|
9
|
+
|
10
|
+
RiskService private _riskService;
|
11
|
+
|
12
|
+
/// @dev initializes proxy manager with product service implementation
|
13
|
+
constructor(
|
14
|
+
address authority,
|
15
|
+
address registry,
|
16
|
+
bytes32 salt
|
17
|
+
)
|
18
|
+
{
|
19
|
+
RiskService svc = new RiskService{salt: salt}();
|
20
|
+
bytes memory data = abi.encode(authority, registry);
|
21
|
+
IVersionable versionable = initialize(
|
22
|
+
registry,
|
23
|
+
address(svc),
|
24
|
+
data,
|
25
|
+
salt);
|
26
|
+
|
27
|
+
_riskService = RiskService(address(versionable));
|
28
|
+
}
|
29
|
+
|
30
|
+
//--- view functions ----------------------------------------------------//
|
31
|
+
function getRiskService()
|
32
|
+
external
|
33
|
+
view
|
34
|
+
returns (RiskService riskService)
|
35
|
+
{
|
36
|
+
return _riskService;
|
37
|
+
}
|
38
|
+
|
39
|
+
}
|