@etherisc/gif-next 0.0.2-b2910e7-757 → 0.0.2-b312c9a-831
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.dbg.json +4 -0
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.json +1000 -0
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.dbg.json +4 -0
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.json +746 -0
- package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.dbg.json +4 -0
- package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.json +767 -0
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.json +2 -2
- 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/Authorization.sol/Authorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.json +2 -2
- 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/IAuthorization.sol/IAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ReleaseAccessManager.sol/ReleaseAccessManager.dbg.json +1 -1
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.json +2 -2
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +24 -42
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +2 -2
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +0 -18
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +58 -58
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +30 -30
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +0 -18
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/DamageLevel.sol/DamageLevelLib.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.json +40 -14
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.json +24 -24
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.json +86 -60
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.json +17 -17
- package/artifacts/contracts/examples/fire/FireUSD.sol/FireUSD.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.json +39 -26
- 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 +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.json +16 -34
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.json +33 -20
- 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 +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.json +50 -24
- 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 +147 -42
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +46 -0
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +22 -2
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +64 -13
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +83 -70
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +40 -27
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +298 -65
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +44 -24
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +12 -12
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +2 -2
- package/artifacts/contracts/instance/RiskSet.sol/RiskSet.dbg.json +4 -0
- package/artifacts/contracts/instance/RiskSet.sol/RiskSet.json +810 -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 +2 -2
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.json +2 -2
- package/artifacts/contracts/instance/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 +14 -32
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +2 -2
- 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 +0 -18
- 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 +0 -18
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +70 -62
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +36 -16
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.json +0 -18
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.json +2 -2
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +68 -177
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +35 -63
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.json +0 -42
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.json +0 -18
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/pool/Pool.sol/Pool.json +0 -18
- package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolService.sol/PoolService.json +62 -78
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +32 -24
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +44 -25
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +6 -10
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +0 -18
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.json +2 -2
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +2 -2
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +2 -2
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.json +34 -7
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.json +31 -18
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +1 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.json +0 -18
- package/artifacts/contracts/product/IRiskService.sol/IRiskService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +119 -122
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +45 -37
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +2 -2
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +2 -2
- package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/product/Product.sol/Product.json +0 -18
- package/artifacts/contracts/product/RiskService.sol/RiskService.dbg.json +1 -1
- package/artifacts/contracts/product/RiskService.sol/RiskService.json +20 -20
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.json +11 -11
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.json +2 -2
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +58 -58
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +2 -2
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +2 -2
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.json +2 -2
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.json +2 -2
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +6 -6
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +2 -2
- package/artifacts/contracts/shared/Component.sol/Component.dbg.json +1 -1
- package/artifacts/contracts/shared/Component.sol/Component.json +0 -18
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +70 -428
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +36 -64
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +1 -1
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.dbg.json +1 -1
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.json +383 -6
- 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/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponent.sol/IComponent.json +0 -18
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.json +0 -270
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.json +0 -18
- package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
- package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.dbg.json +1 -1
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.json +0 -18
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.dbg.json +1 -1
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.json +2 -2
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +2 -2
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +2 -2
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +2 -2
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +2 -2
- package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +2 -2
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.json +2 -2
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.json +2 -2
- package/artifacts/contracts/staking/IStaking.sol/IStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/IStaking.sol/IStaking.json +0 -18
- 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 +2 -2
- package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.json +26 -26
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.json +2 -2
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +14 -14
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +2 -2
- package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingService.sol/StakingService.json +2 -2
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +2 -2
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +2 -2
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +2 -2
- 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/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.json +2 -2
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.json +2 -2
- package/artifacts/contracts/type/Fee.sol/FeeLib.dbg.json +1 -1
- package/artifacts/contracts/type/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 +2 -2
- package/artifacts/contracts/type/Referral.sol/ReferralLib.dbg.json +1 -1
- package/artifacts/contracts/type/Referral.sol/ReferralLib.json +2 -2
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.json +2 -2
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.json +43 -5
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.json +2 -2
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.dbg.json +1 -1
- package/artifacts/contracts/type/StateId.sol/StateIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/String.sol/StrLib.dbg.json +1 -1
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/MathLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionPartLib.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.json +2 -2
- 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 +264 -0
- package/contracts/accounting/AccountingServiceManager.sol +38 -0
- package/contracts/accounting/IAccountingService.sol +45 -0
- package/contracts/authorization/AccessAdmin.sol +21 -1
- package/contracts/distribution/BasicDistribution.sol +4 -4
- package/contracts/distribution/Distribution.sol +27 -24
- package/contracts/distribution/DistributionService.sol +10 -7
- package/contracts/examples/fire/FirePool.sol +6 -2
- package/contracts/examples/fire/FirePoolAuthorization.sol +1 -0
- package/contracts/examples/fire/FireProduct.sol +5 -0
- package/contracts/examples/fire/FireProductAuthorization.sol +1 -0
- package/contracts/examples/unpermissioned/SimpleDistribution.sol +6 -7
- package/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol +28 -0
- package/contracts/examples/unpermissioned/SimplePool.sol +7 -8
- package/contracts/examples/unpermissioned/SimplePoolAuthorization.sol +28 -0
- package/contracts/examples/unpermissioned/SimpleProduct.sol +7 -0
- package/contracts/examples/unpermissioned/SimpleProductAuthorization.sol +28 -0
- package/contracts/instance/BundleSet.sol +38 -34
- package/contracts/instance/IInstance.sol +6 -0
- package/contracts/instance/IInstanceService.sol +5 -1
- package/contracts/instance/Instance.sol +14 -5
- package/contracts/instance/InstanceAdmin.sol +3 -1
- package/contracts/instance/InstanceAuthorizationV3.sol +42 -14
- package/contracts/instance/InstanceReader.sol +85 -1
- package/contracts/instance/InstanceService.sol +18 -7
- package/contracts/instance/RiskSet.sol +119 -0
- package/contracts/instance/base/ObjectSet.sol +24 -25
- package/contracts/instance/module/IRisk.sol +1 -0
- package/contracts/oracle/OracleService.sol +87 -70
- package/contracts/pool/BundleService.sol +9 -69
- package/contracts/pool/IBundleService.sol +0 -19
- package/contracts/pool/IPoolService.sol +0 -19
- package/contracts/pool/PoolService.sol +49 -54
- package/contracts/product/ApplicationService.sol +12 -12
- package/contracts/product/BasicProductAuthorization.sol +1 -2
- package/contracts/product/IApplicationService.sol +5 -2
- package/contracts/product/IPolicyService.sol +14 -6
- package/contracts/product/PolicyService.sol +233 -192
- package/contracts/product/Product.sol +2 -7
- package/contracts/product/RiskService.sol +14 -3
- package/contracts/registry/RegistryAdmin.sol +7 -12
- package/contracts/registry/ServiceAuthorizationV3.sol +43 -39
- package/contracts/shared/Component.sol +5 -20
- package/contracts/shared/ComponentService.sol +79 -205
- package/contracts/shared/ContractLib.sol +181 -11
- package/contracts/shared/IComponent.sol +0 -5
- package/contracts/shared/IComponentService.sol +1 -19
- package/contracts/shared/InstanceLinkedComponent.sol +1 -1
- package/contracts/shared/TokenHandler.sol +1 -9
- package/contracts/staking/Staking.sol +10 -0
- package/contracts/staking/StakingService.sol +0 -13
- package/contracts/type/Key32.sol +2 -2
- package/contracts/type/Key32Set.sol +62 -0
- package/contracts/type/NftId.sol +6 -0
- package/contracts/type/ObjectType.sol +10 -0
- package/contracts/type/RiskId.sol +18 -6
- package/package.json +1 -1
@@ -1,6 +1,7 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
+
import {IAccountingService} from "../accounting/IAccountingService.sol";
|
4
5
|
import {IBundle} from "../instance/module/IBundle.sol";
|
5
6
|
import {IBundleService} from "./IBundleService.sol";
|
6
7
|
import {IComponents} from "../instance/module/IComponents.sol";
|
@@ -15,23 +16,24 @@ import {IStaking} from "../staking/IStaking.sol";
|
|
15
16
|
|
16
17
|
import {Amount, AmountLib} from "../type/Amount.sol";
|
17
18
|
import {ClaimId} from "../type/ClaimId.sol";
|
19
|
+
import {ContractLib} from "../shared/ContractLib.sol";
|
18
20
|
import {Fee, FeeLib} from "../type/Fee.sol";
|
19
21
|
import {NftId} from "../type/NftId.sol";
|
20
|
-
import {ObjectType, POOL, BUNDLE, PRODUCT, POLICY, COMPONENT} from "../type/ObjectType.sol";
|
22
|
+
import {ObjectType, ACCOUNTING, POOL, BUNDLE, PRODUCT, POLICY, COMPONENT} from "../type/ObjectType.sol";
|
21
23
|
import {Fee, FeeLib} from "../type/Fee.sol";
|
22
24
|
import {KEEP_STATE} from "../type/StateId.sol";
|
23
|
-
import {Seconds} from "../type/Seconds.sol";
|
24
25
|
import {UFixed} from "../type/UFixed.sol";
|
25
|
-
import {
|
26
|
+
import {Service} from "../shared/Service.sol";
|
26
27
|
import {InstanceReader} from "../instance/InstanceReader.sol";
|
27
28
|
import {InstanceStore} from "../instance/InstanceStore.sol";
|
28
29
|
|
29
30
|
string constant POOL_SERVICE_NAME = "PoolService";
|
30
31
|
|
31
32
|
contract PoolService is
|
32
|
-
|
33
|
+
Service,
|
33
34
|
IPoolService
|
34
35
|
{
|
36
|
+
IAccountingService private _accountingService;
|
35
37
|
IBundleService internal _bundleService;
|
36
38
|
IComponentService internal _componentService;
|
37
39
|
IStaking private _staking;
|
@@ -51,6 +53,7 @@ contract PoolService is
|
|
51
53
|
|
52
54
|
_initializeService(registryAddress, authority, owner);
|
53
55
|
|
56
|
+
_accountingService = IAccountingService(_getServiceAddress(ACCOUNTING()));
|
54
57
|
_bundleService = IBundleService(_getServiceAddress(BUNDLE()));
|
55
58
|
_componentService = IComponentService(_getServiceAddress(COMPONENT()));
|
56
59
|
_staking = IStaking(getRegistry().getStakingAddress());
|
@@ -64,7 +67,7 @@ contract PoolService is
|
|
64
67
|
external
|
65
68
|
virtual
|
66
69
|
{
|
67
|
-
(NftId poolNftId
|
70
|
+
(NftId poolNftId, IInstance instance) = _getAndVerifyActivePool();
|
68
71
|
InstanceReader instanceReader = instance.getInstanceReader();
|
69
72
|
IComponents.PoolInfo memory poolInfo = instanceReader.getPoolInfo(poolNftId);
|
70
73
|
|
@@ -75,32 +78,6 @@ contract PoolService is
|
|
75
78
|
emit LogPoolServiceMaxBalanceAmountUpdated(poolNftId, previousMaxBalanceAmount, maxBalanceAmount);
|
76
79
|
}
|
77
80
|
|
78
|
-
// TODO cleanup
|
79
|
-
// /// @inheritdoc IPoolService
|
80
|
-
// function createBundle(
|
81
|
-
// address bundleOwner, // initial bundle owner
|
82
|
-
// Fee memory fee, // fees deducted from premium that go to bundle owner
|
83
|
-
// Seconds lifetime, // initial duration for which new policies are covered
|
84
|
-
// bytes calldata filter // optional use case specific criteria that define if a policy may be covered by this bundle
|
85
|
-
// )
|
86
|
-
// external
|
87
|
-
// virtual
|
88
|
-
// returns(NftId bundleNftId)
|
89
|
-
// {
|
90
|
-
// (NftId poolNftId,, IInstance instance) = _getAndVerifyActiveComponent(POOL());
|
91
|
-
|
92
|
-
// // create the empty bundle
|
93
|
-
// bundleNftId = _bundleService.create(
|
94
|
-
// instance,
|
95
|
-
// poolNftId,
|
96
|
-
// bundleOwner,
|
97
|
-
// fee,
|
98
|
-
// lifetime,
|
99
|
-
// filter);
|
100
|
-
|
101
|
-
// emit LogPoolServiceBundleCreated(instance.getNftId(), poolNftId, bundleNftId);
|
102
|
-
// }
|
103
|
-
|
104
81
|
|
105
82
|
function closeBundle(NftId bundleNftId)
|
106
83
|
external
|
@@ -108,14 +85,14 @@ contract PoolService is
|
|
108
85
|
{
|
109
86
|
_checkNftType(bundleNftId, BUNDLE());
|
110
87
|
|
111
|
-
(NftId poolNftId
|
88
|
+
(NftId poolNftId, IInstance instance) = _getAndVerifyActivePool();
|
112
89
|
|
113
90
|
// TODO get performance fee for pool (#477)
|
114
91
|
|
115
92
|
// releasing collateral in bundle
|
116
93
|
(Amount unstakedAmount, Amount feeAmount) = _bundleService.close(instance, bundleNftId);
|
117
94
|
|
118
|
-
|
95
|
+
_accountingService.decreasePoolBalance(
|
119
96
|
instance.getInstanceStore(),
|
120
97
|
poolNftId,
|
121
98
|
unstakedAmount + feeAmount,
|
@@ -144,9 +121,9 @@ contract PoolService is
|
|
144
121
|
{
|
145
122
|
_checkNftType(policyNftId, POLICY());
|
146
123
|
|
147
|
-
(NftId poolNftId
|
124
|
+
(NftId poolNftId, IInstance instance) = _getAndVerifyActivePool();
|
148
125
|
InstanceReader instanceReader = instance.getInstanceReader();
|
149
|
-
NftId productNftId =
|
126
|
+
NftId productNftId = getRegistry().getObjectInfo(poolNftId).parentNftId;
|
150
127
|
|
151
128
|
// check policy matches with calling pool
|
152
129
|
IPolicy.PolicyInfo memory policyInfo = instanceReader.getPolicyInfo(policyNftId);
|
@@ -176,7 +153,7 @@ contract PoolService is
|
|
176
153
|
{
|
177
154
|
_checkNftType(bundleNftId, BUNDLE());
|
178
155
|
|
179
|
-
(NftId poolNftId
|
156
|
+
(NftId poolNftId, IInstance instance) = _getAndVerifyActivePool();
|
180
157
|
InstanceReader instanceReader = instance.getInstanceReader();
|
181
158
|
IBundle.BundleInfo memory bundleInfo = instanceReader.getBundleInfo(bundleNftId);
|
182
159
|
IComponents.PoolInfo memory poolInfo = instanceReader.getPoolInfo(poolNftId);
|
@@ -208,7 +185,7 @@ contract PoolService is
|
|
208
185
|
}
|
209
186
|
|
210
187
|
// do all the book keeping
|
211
|
-
|
188
|
+
_accountingService.increasePoolBalance(
|
212
189
|
instance.getInstanceStore(),
|
213
190
|
poolNftId,
|
214
191
|
netAmount,
|
@@ -241,7 +218,7 @@ contract PoolService is
|
|
241
218
|
{
|
242
219
|
_checkNftType(bundleNftId, BUNDLE());
|
243
220
|
|
244
|
-
(NftId poolNftId
|
221
|
+
(NftId poolNftId, IInstance instance) = _getAndVerifyActivePool();
|
245
222
|
InstanceReader instanceReader = instance.getInstanceReader();
|
246
223
|
InstanceStore instanceStore = instance.getInstanceStore();
|
247
224
|
IBundle.BundleInfo memory bundleInfo = instanceReader.getBundleInfo(bundleNftId);
|
@@ -260,7 +237,7 @@ contract PoolService is
|
|
260
237
|
netAmount = unstakedAmount;
|
261
238
|
|
262
239
|
// update pool bookkeeping - performance fees stay in the pool, but as fees
|
263
|
-
|
240
|
+
_accountingService.decreasePoolBalance(
|
264
241
|
instanceStore,
|
265
242
|
poolNftId,
|
266
243
|
unstakedAmount,
|
@@ -289,9 +266,9 @@ contract PoolService is
|
|
289
266
|
// restricted()
|
290
267
|
{
|
291
268
|
(
|
292
|
-
NftId poolNftId
|
269
|
+
NftId poolNftId,
|
293
270
|
IInstance instance
|
294
|
-
) =
|
271
|
+
) = _getAndVerifyActivePool();
|
295
272
|
|
296
273
|
// check that pool is externally managed
|
297
274
|
InstanceReader reader = instance.getInstanceReader();
|
@@ -316,9 +293,9 @@ contract PoolService is
|
|
316
293
|
// restricted()
|
317
294
|
{
|
318
295
|
(
|
319
|
-
NftId poolNftId
|
296
|
+
NftId poolNftId,
|
320
297
|
IInstance instance
|
321
|
-
) =
|
298
|
+
) = _getAndVerifyActivePool();
|
322
299
|
|
323
300
|
// check that pool is externally managed
|
324
301
|
InstanceReader reader = instance.getInstanceReader();
|
@@ -349,22 +326,21 @@ contract PoolService is
|
|
349
326
|
|
350
327
|
IRegistry registry = getRegistry();
|
351
328
|
NftId poolNftId = registry.getObjectInfo(bundleNftId).parentNftId;
|
352
|
-
|
353
|
-
|
354
|
-
registry.getObjectInfo(poolNftId).parentNftId);
|
329
|
+
(, address instanceAddress) = ContractLib.getInfoAndInstance(registry, poolNftId, true);
|
330
|
+
IInstance instance = IInstance(instanceAddress);
|
355
331
|
|
356
332
|
Amount poolFeeAmount = premium.poolFeeFixAmount + premium.poolFeeVarAmount;
|
357
333
|
Amount bundleFeeAmount = premium.bundleFeeFixAmount + premium.bundleFeeVarAmount;
|
358
334
|
Amount bundleNetAmount = premium.netPremiumAmount;
|
359
335
|
|
360
336
|
InstanceStore instanceStore = instance.getInstanceStore();
|
361
|
-
|
337
|
+
_accountingService.increasePoolBalance(
|
362
338
|
instanceStore,
|
363
339
|
poolNftId,
|
364
340
|
bundleNetAmount + bundleFeeAmount,
|
365
341
|
poolFeeAmount);
|
366
342
|
|
367
|
-
|
343
|
+
_accountingService.increaseBundleBalanceForPool(
|
368
344
|
instanceStore,
|
369
345
|
bundleNftId,
|
370
346
|
bundleNetAmount,
|
@@ -450,13 +426,13 @@ contract PoolService is
|
|
450
426
|
NftId poolNftId = getRegistry().getObjectInfo(bundleNftId).parentNftId;
|
451
427
|
InstanceStore instanceStore = instance.getInstanceStore();
|
452
428
|
|
453
|
-
|
429
|
+
_accountingService.decreasePoolBalance(
|
454
430
|
instanceStore,
|
455
431
|
poolNftId,
|
456
432
|
payoutAmount,
|
457
433
|
AmountLib.zero());
|
458
434
|
|
459
|
-
|
435
|
+
_accountingService.decreaseBundleBalanceForPool(
|
460
436
|
instanceStore,
|
461
437
|
bundleNftId,
|
462
438
|
payoutAmount,
|
@@ -498,10 +474,6 @@ contract PoolService is
|
|
498
474
|
policyInfo.bundleNftId,
|
499
475
|
remainingCollateralAmount);
|
500
476
|
|
501
|
-
_bundleService.unlinkPolicy(
|
502
|
-
instance,
|
503
|
-
policyNftId);
|
504
|
-
|
505
477
|
// update value locked with staking service
|
506
478
|
_staking.decreaseTotalValueLocked(
|
507
479
|
instance.getNftId(),
|
@@ -614,6 +586,29 @@ contract PoolService is
|
|
614
586
|
}
|
615
587
|
|
616
588
|
|
589
|
+
function _getAndVerifyActivePool()
|
590
|
+
internal
|
591
|
+
virtual
|
592
|
+
view
|
593
|
+
returns (
|
594
|
+
NftId poolNftId,
|
595
|
+
IInstance instance
|
596
|
+
)
|
597
|
+
{
|
598
|
+
(
|
599
|
+
IRegistry.ObjectInfo memory info,
|
600
|
+
address instanceAddress
|
601
|
+
) = ContractLib.getAndVerifyComponent(
|
602
|
+
getRegistry(),
|
603
|
+
msg.sender,
|
604
|
+
POOL(),
|
605
|
+
true); // only active pools
|
606
|
+
|
607
|
+
poolNftId = info.nftId;
|
608
|
+
instance = IInstance(instanceAddress);
|
609
|
+
}
|
610
|
+
|
611
|
+
|
617
612
|
function _getDomain() internal pure override returns(ObjectType) {
|
618
613
|
return POOL();
|
619
614
|
}
|
@@ -55,10 +55,10 @@ contract ApplicationService is
|
|
55
55
|
}
|
56
56
|
|
57
57
|
|
58
|
-
function
|
58
|
+
function _checkLinkedApplicationParameters(
|
59
59
|
InstanceReader instanceReader,
|
60
60
|
NftId productNftId,
|
61
|
-
RiskId
|
61
|
+
RiskId riskId,
|
62
62
|
ReferralId referralId,
|
63
63
|
NftId bundleNftId
|
64
64
|
)
|
@@ -66,18 +66,18 @@ contract ApplicationService is
|
|
66
66
|
virtual
|
67
67
|
view
|
68
68
|
{
|
69
|
-
|
69
|
+
// check risk with product
|
70
|
+
(bool exists, bool active) = instanceReader.getRiskSet().checkRisk(productNftId, riskId);
|
71
|
+
if (!exists) { revert ErrorApplicationServiceRiskUnknown(riskId, productNftId); }
|
72
|
+
if (!active) { revert ErrorApplicationServiceRiskPaused(riskId, productNftId); }
|
70
73
|
|
71
|
-
//
|
74
|
+
// check bundle with pool
|
75
|
+
NftId poolNftId = instanceReader.getProductInfo(productNftId).poolNftId;
|
76
|
+
(exists, active) = instanceReader.getBundleSet().checkBundle(poolNftId, bundleNftId);
|
77
|
+
if (!exists) { revert ErrorApplicationServiceBundleUnknown(bundleNftId, poolNftId); }
|
78
|
+
if (!active) { revert ErrorApplicationServiceBundleLocked(bundleNftId, poolNftId); }
|
72
79
|
|
73
80
|
// TODO check referral with distribution
|
74
|
-
|
75
|
-
// check bundle with pool
|
76
|
-
NftId productPoolNftId = productInfo.poolNftId;
|
77
|
-
NftId bundlePoolNftId = instanceReader.getBundleInfo(bundleNftId).poolNftId;
|
78
|
-
if(bundlePoolNftId != productPoolNftId) {
|
79
|
-
revert ErrorApplicationServiceBundlePoolMismatch(bundleNftId, productPoolNftId, bundlePoolNftId);
|
80
|
-
}
|
81
81
|
}
|
82
82
|
|
83
83
|
|
@@ -143,7 +143,7 @@ contract ApplicationService is
|
|
143
143
|
|
144
144
|
// check if provided references are valid and linked to calling product contract
|
145
145
|
InstanceReader instanceReader = instance.getInstanceReader();
|
146
|
-
|
146
|
+
_checkLinkedApplicationParameters(
|
147
147
|
instanceReader,
|
148
148
|
productNftId,
|
149
149
|
riskId,
|
@@ -6,8 +6,7 @@ import {BasicProduct} from "./BasicProduct.sol";
|
|
6
6
|
import {PRODUCT} from "../type/ObjectType.sol";
|
7
7
|
import {IAccess} from "../authorization/IAccess.sol";
|
8
8
|
import {IInstanceLinkedComponent} from "../shared/IInstanceLinkedComponent.sol";
|
9
|
-
import {PUBLIC_ROLE} from "
|
10
|
-
import {RoleId} from "../type/RoleId.sol";
|
9
|
+
import {RoleId, PUBLIC_ROLE} from "../type/RoleId.sol";
|
11
10
|
|
12
11
|
|
13
12
|
contract BasicProductAuthorization
|
@@ -15,8 +15,11 @@ import {Seconds} from "../type/Seconds.sol";
|
|
15
15
|
/// only product components may call transaction functions
|
16
16
|
interface IApplicationService is IService {
|
17
17
|
|
18
|
-
|
19
|
-
error
|
18
|
+
// _checkLinkedApplicationParameters
|
19
|
+
error ErrorApplicationServiceRiskUnknown(RiskId riskId, NftId productNftId);
|
20
|
+
error ErrorApplicationServiceRiskPaused(RiskId riskId, NftId productNftId);
|
21
|
+
error ErrorApplicationServiceBundleUnknown(NftId bundleNftId, NftId poolNftId);
|
22
|
+
error ErrorApplicationServiceBundleLocked(NftId bundleNftId, NftId poolNftId);
|
20
23
|
|
21
24
|
/// @dev creates a new application based on the specified attributes
|
22
25
|
/// may only be called by a product component
|
@@ -5,6 +5,7 @@ import {IService} from "../shared/IService.sol";
|
|
5
5
|
|
6
6
|
import {Amount} from "../type/Amount.sol";
|
7
7
|
import {IInstance} from "../instance/IInstance.sol";
|
8
|
+
import {InstanceReader} from "../instance/InstanceReader.sol";
|
8
9
|
import {NftId} from "../type/NftId.sol";
|
9
10
|
import {StateId} from "../type/StateId.sol";
|
10
11
|
import {Timestamp} from "../type/Timestamp.sol";
|
@@ -28,8 +29,9 @@ interface IPolicyService is IService {
|
|
28
29
|
|
29
30
|
error ErrorPolicyServiceInsufficientAllowance(address customer, address tokenHandlerAddress, uint256 amount);
|
30
31
|
error ErrorPolicyServicePremiumAlreadyPaid(NftId policyNftId);
|
31
|
-
|
32
|
-
error
|
32
|
+
|
33
|
+
error ErrorPolicyServicePolicyNotCloseable(NftId policyNftId);
|
34
|
+
|
33
35
|
error ErrorPolicyServicePolicyNotActive(NftId policyNftId, StateId state);
|
34
36
|
error ErrorPolicyServicePremiumNotPaid(NftId policyNftId, Amount premiumAmount);
|
35
37
|
error ErrorPolicyServiceOpenClaims(NftId policyNftId, uint16 openClaimsCount);
|
@@ -65,18 +67,24 @@ interface IPolicyService is IService {
|
|
65
67
|
/// to activate a policy it needs to be in underwritten state
|
66
68
|
function activate(NftId policyNftId, Timestamp activateAt) external;
|
67
69
|
|
68
|
-
/// @dev
|
70
|
+
/// @dev Expires the specified policy and sets the expiry date in the policy metadata.
|
71
|
+
/// Function consumers are products.
|
72
|
+
/// If expiry date is set to 0, then the earliest possible expiry date (current blocktime) is set
|
69
73
|
/// to expire a policy it must be in active state, policies may be expired even when the predefined expiry date is still in the future
|
70
74
|
/// a policy can only be closed when it has been expired. in addition, it must not have any open claims
|
71
75
|
/// this function can only be called by a product. the policy needs to match with the calling product
|
72
76
|
/// @return expiredAt the effective expiry date
|
73
77
|
function expire(NftId policyNftId, Timestamp expireAt) external returns (Timestamp expiredAt);
|
74
78
|
|
75
|
-
|
76
|
-
|
77
|
-
/// @dev closes the specified policy and sets the closed data in the policy metadata
|
79
|
+
/// @dev Closes the specified policy and sets the closed data in the policy metadata
|
78
80
|
/// a policy can only be closed when it has been expired. in addition, it must not have any open claims
|
79
81
|
/// this function can only be called by a product. the policy needs to match with the calling product
|
80
82
|
function close(NftId policyNftId) external;
|
81
83
|
|
84
|
+
/// @dev Expires the specified policy and sets the expiry date in the policy metadata.
|
85
|
+
/// Function consumers is claim service.
|
86
|
+
function expirePolicy(IInstance instance, NftId policyNftId, Timestamp expireAt) external returns (Timestamp expiredAt);
|
87
|
+
|
88
|
+
/// @dev Returns true iff policy is closeable
|
89
|
+
function policyIsCloseable(InstanceReader instanceReader, NftId policyNftId) external view returns (bool isCloseable);
|
82
90
|
}
|