@etherisc/gif-next 0.0.2-a4051e9-983 → 0.0.2-a419a2f-980
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/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +1 -1
- 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/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/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +2 -2
- 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/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +40 -24
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +21 -13
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- 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 +3 -3
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.json +2 -2
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.json +44 -49
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.json +2 -2
- 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 +2 -2
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.json +2 -2
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.json +2 -2
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.json +2 -2
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.dbg.json +1 -1
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.json +2 -2
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +2 -2
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +4 -4
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +2 -2
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +2 -2
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +2 -2
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +2 -2
- 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/base/BalanceStore.sol/BalanceStore.dbg.json +1 -1
- 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/ObjectLifecycle.sol/ObjectLifecycle.dbg.json +1 -1
- 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 +2 -2
- 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/IOracleService.sol/IOracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +2 -2
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +2 -2
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +1 -1
- 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 +84 -84
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +43 -43
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- 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/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolService.sol/PoolService.json +2 -2
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +2 -2
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +18 -18
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +10 -10
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +1 -1
- 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 +76 -76
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +39 -39
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
- 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/IPricingService.sol/IPricingService.dbg.json +1 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- 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 +56 -56
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +29 -29
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +38 -38
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +20 -20
- package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/product/RiskService.sol/RiskService.dbg.json +1 -1
- package/artifacts/contracts/product/RiskService.sol/RiskService.json +2 -2
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.json +2 -2
- 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 +2 -2
- 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/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 +2 -2
- 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/ComponentService.sol/ComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +70 -70
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +36 -36
- 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/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +1 -1
- 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/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/NftOwnable.sol/NftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
- 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/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/IStaking.sol/IStaking.dbg.json +1 -1
- 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 +2 -2
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +2 -2
- 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 +20 -20
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +11 -11
- 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/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
- 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/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
- package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/Referral.sol/ReferralLib.dbg.json +1 -1
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
- 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/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +1 -1
- package/contracts/distribution/DistributionService.sol +1 -1
- package/contracts/examples/fire/FirePool.sol +5 -7
- package/contracts/examples/fire/FireProduct.sol +0 -3
- package/contracts/instance/InstanceAdmin.sol +3 -3
- package/contracts/instance/InstanceService.sol +3 -1
- package/contracts/pool/BundleService.sol +28 -15
- package/contracts/product/ApplicationService.sol +8 -6
- package/contracts/product/ClaimService.sol +16 -8
- package/contracts/product/PolicyService.sol +15 -7
- package/contracts/product/PricingService.sol +4 -1
- package/contracts/shared/ComponentService.sol +11 -1
- package/contracts/staking/StakingService.sol +14 -0
- package/package.json +1 -1
@@ -171,7 +171,7 @@ contract DistributionService is
|
|
171
171
|
if (bytes(code).length == 0) {
|
172
172
|
revert ErrorIDistributionServiceInvalidReferral(code);
|
173
173
|
}
|
174
|
-
if (expiryAt.eqz()) {
|
174
|
+
if (expiryAt.eqz() || expiryAt.lte(TimestampLib.blockTimestamp())) {
|
175
175
|
revert ErrorIDistributionServiceExpirationInvalid(expiryAt);
|
176
176
|
}
|
177
177
|
|
@@ -1,14 +1,12 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {Amount
|
4
|
+
import {Amount} from "../../type/Amount.sol";
|
5
5
|
import {BasicPool} from "../../pool/BasicPool.sol";
|
6
|
-
import {BasicPoolAuthorization} from "../../pool/BasicPoolAuthorization.sol";
|
7
6
|
import {Fee} from "../../type/Fee.sol";
|
8
7
|
import {IAuthorization} from "../../authorization/IAuthorization.sol";
|
9
8
|
import {NftId} from "../../type/NftId.sol";
|
10
9
|
import {Seconds} from "../../type/Timestamp.sol";
|
11
|
-
import {UFixed} from "../../type/UFixed.sol";
|
12
10
|
|
13
11
|
contract FirePool is
|
14
12
|
BasicPool
|
@@ -16,7 +14,7 @@ contract FirePool is
|
|
16
14
|
|
17
15
|
constructor(
|
18
16
|
address registry,
|
19
|
-
NftId
|
17
|
+
NftId fireProductNftId,
|
20
18
|
string memory componentName,
|
21
19
|
address token,
|
22
20
|
IAuthorization authorization
|
@@ -25,7 +23,7 @@ contract FirePool is
|
|
25
23
|
address initialOwner = msg.sender;
|
26
24
|
_intialize(
|
27
25
|
registry,
|
28
|
-
|
26
|
+
fireProductNftId,
|
29
27
|
componentName,
|
30
28
|
token,
|
31
29
|
authorization,
|
@@ -34,7 +32,7 @@ contract FirePool is
|
|
34
32
|
|
35
33
|
function _intialize(
|
36
34
|
address registry,
|
37
|
-
NftId
|
35
|
+
NftId fireProductNftId,
|
38
36
|
string memory componentName,
|
39
37
|
address token,
|
40
38
|
IAuthorization authorization,
|
@@ -45,7 +43,7 @@ contract FirePool is
|
|
45
43
|
{
|
46
44
|
_initializeBasicPool(
|
47
45
|
registry,
|
48
|
-
|
46
|
+
fireProductNftId,
|
49
47
|
authorization,
|
50
48
|
token,
|
51
49
|
componentName,
|
@@ -65,7 +65,6 @@ contract FireProduct is
|
|
65
65
|
NftId instanceNftid,
|
66
66
|
string memory componentName,
|
67
67
|
address token,
|
68
|
-
address pool,
|
69
68
|
IAuthorization authorization
|
70
69
|
)
|
71
70
|
{
|
@@ -76,7 +75,6 @@ contract FireProduct is
|
|
76
75
|
instanceNftid,
|
77
76
|
componentName,
|
78
77
|
token,
|
79
|
-
pool,
|
80
78
|
authorization,
|
81
79
|
initialOwner);
|
82
80
|
}
|
@@ -86,7 +84,6 @@ contract FireProduct is
|
|
86
84
|
NftId instanceNftid,
|
87
85
|
string memory componentName,
|
88
86
|
address token,
|
89
|
-
address pool,
|
90
87
|
IAuthorization authorization,
|
91
88
|
address initialOwner
|
92
89
|
)
|
@@ -43,11 +43,11 @@ contract InstanceAdmin is
|
|
43
43
|
/// @dev Only used for master instance admin.
|
44
44
|
/// Contracts created via constructor come with disabled initializers.
|
45
45
|
constructor(
|
46
|
-
|
46
|
+
address instanceAuthorization
|
47
47
|
)
|
48
48
|
AccessAdmin()
|
49
49
|
{
|
50
|
-
_instanceAuthorization = instanceAuthorization;
|
50
|
+
_instanceAuthorization = IAuthorization(instanceAuthorization);
|
51
51
|
}
|
52
52
|
|
53
53
|
/// @dev Initializes this instance admin with the provided instances authorization specification.
|
@@ -56,7 +56,7 @@ contract InstanceAdmin is
|
|
56
56
|
/// Important: Initialization of this instance admin is only complete after calling function initializeInstance.
|
57
57
|
function initialize(
|
58
58
|
AccessManagerCloneable accessManager,
|
59
|
-
|
59
|
+
address instanceAuthorization
|
60
60
|
)
|
61
61
|
external
|
62
62
|
initializer()
|
@@ -293,9 +293,11 @@ contract InstanceService is
|
|
293
293
|
clonedAccessManager.initialize(
|
294
294
|
address(clonedInstanceAdmin)); // grant ADMIN_ROLE to instance admin
|
295
295
|
|
296
|
+
address authorization = address(
|
297
|
+
InstanceAdmin(_masterInstanceAdmin).getInstanceAuthorization());
|
296
298
|
clonedInstanceAdmin.initialize(
|
297
299
|
clonedAccessManager,
|
298
|
-
|
300
|
+
authorization);
|
299
301
|
}
|
300
302
|
|
301
303
|
|
@@ -63,8 +63,9 @@ contract BundleService is
|
|
63
63
|
)
|
64
64
|
external
|
65
65
|
virtual
|
66
|
-
onlyNftOfType(bundleNftId, BUNDLE())
|
67
66
|
{
|
67
|
+
_checkNftType(bundleNftId, BUNDLE());
|
68
|
+
|
68
69
|
(NftId poolNftId,, IInstance instance) = _getAndVerifyActiveComponent(POOL());
|
69
70
|
InstanceReader instanceReader = instance.getInstanceReader();
|
70
71
|
IBundle.BundleInfo memory bundleInfo = instanceReader.getBundleInfo(bundleNftId);
|
@@ -93,9 +94,10 @@ contract BundleService is
|
|
93
94
|
external
|
94
95
|
override
|
95
96
|
restricted
|
96
|
-
onlyNftOfType(poolNftId, POOL())
|
97
97
|
returns(NftId bundleNftId)
|
98
98
|
{
|
99
|
+
_checkNftType(poolNftId, POOL());
|
100
|
+
|
99
101
|
// register bundle with registry
|
100
102
|
bundleNftId = _registryService.registerBundle(
|
101
103
|
IRegistry.ObjectInfo(
|
@@ -149,9 +151,10 @@ contract BundleService is
|
|
149
151
|
external
|
150
152
|
virtual
|
151
153
|
restricted()
|
152
|
-
onlyNftOfType(policyNftId, POLICY())
|
153
|
-
onlyNftOfType(bundleNftId, BUNDLE())
|
154
154
|
{
|
155
|
+
_checkNftType(policyNftId, POLICY());
|
156
|
+
_checkNftType(bundleNftId, BUNDLE());
|
157
|
+
|
155
158
|
InstanceReader instanceReader = instance.getInstanceReader();
|
156
159
|
|
157
160
|
{
|
@@ -191,8 +194,9 @@ contract BundleService is
|
|
191
194
|
function lock(NftId bundleNftId)
|
192
195
|
external
|
193
196
|
virtual
|
194
|
-
onlyNftOfType(bundleNftId, BUNDLE())
|
195
197
|
{
|
198
|
+
_checkNftType(bundleNftId, BUNDLE());
|
199
|
+
|
196
200
|
(,, IInstance instance) = _getAndVerifyActiveComponent(POOL());
|
197
201
|
|
198
202
|
// udpate bundle state
|
@@ -209,8 +213,9 @@ contract BundleService is
|
|
209
213
|
function unlock(NftId bundleNftId)
|
210
214
|
external
|
211
215
|
virtual
|
212
|
-
onlyNftOfType(bundleNftId, BUNDLE())
|
213
216
|
{
|
217
|
+
_checkNftType(bundleNftId, BUNDLE());
|
218
|
+
|
214
219
|
(,, IInstance instance) = _getAndVerifyActiveComponent(POOL());
|
215
220
|
|
216
221
|
// udpate bundle state
|
@@ -231,9 +236,10 @@ contract BundleService is
|
|
231
236
|
external
|
232
237
|
virtual
|
233
238
|
restricted
|
234
|
-
onlyNftOfType(bundleNftId, BUNDLE())
|
235
239
|
returns (Amount unstakedAmount, Amount feeAmount)
|
236
240
|
{
|
241
|
+
_checkNftType(bundleNftId, BUNDLE());
|
242
|
+
|
237
243
|
InstanceReader instanceReader = instance.getInstanceReader();
|
238
244
|
|
239
245
|
// ensure no open policies attached to bundle
|
@@ -265,9 +271,10 @@ contract BundleService is
|
|
265
271
|
)
|
266
272
|
external
|
267
273
|
virtual
|
268
|
-
onlyNftOfType(bundleNftId, BUNDLE())
|
269
274
|
// TODO: restricted() (once #462 is done)
|
270
275
|
{
|
276
|
+
_checkNftType(bundleNftId, BUNDLE());
|
277
|
+
|
271
278
|
IBundle.BundleInfo memory bundleInfo = instance.getInstanceReader().getBundleInfo(bundleNftId);
|
272
279
|
StateId bundleState = instance.getInstanceReader().getBundleState(bundleNftId);
|
273
280
|
|
@@ -292,10 +299,11 @@ contract BundleService is
|
|
292
299
|
)
|
293
300
|
external
|
294
301
|
virtual
|
295
|
-
onlyNftOfType(bundleNftId, BUNDLE())
|
296
302
|
// TODO: restricted() (once #462 is done)
|
297
303
|
returns (Amount unstakedAmount)
|
298
304
|
{
|
305
|
+
_checkNftType(bundleNftId, BUNDLE());
|
306
|
+
|
299
307
|
InstanceStore instanceStore = instance.getInstanceStore();
|
300
308
|
(
|
301
309
|
Amount balanceAmount,
|
@@ -327,10 +335,11 @@ contract BundleService is
|
|
327
335
|
function extend(NftId bundleNftId, Seconds lifetimeExtension)
|
328
336
|
external
|
329
337
|
virtual
|
330
|
-
onlyNftOfType(bundleNftId, BUNDLE())
|
331
338
|
// TODO: restricted() (once #462 is done)
|
332
339
|
returns (Timestamp extendedExpiredAt)
|
333
340
|
{
|
341
|
+
_checkNftType(bundleNftId, BUNDLE());
|
342
|
+
|
334
343
|
(NftId poolNftId,, IInstance instance) = _getAndVerifyActiveComponent(POOL());
|
335
344
|
IBundle.BundleInfo memory bundleInfo = instance.getInstanceReader().getBundleInfo(bundleNftId);
|
336
345
|
StateId bundleState = instance.getInstanceReader().getBundleState(bundleNftId);
|
@@ -367,9 +376,10 @@ contract BundleService is
|
|
367
376
|
external
|
368
377
|
virtual
|
369
378
|
restricted()
|
370
|
-
onlyNftOfType(policyNftId, POLICY())
|
371
|
-
onlyNftOfType(bundleNftId, BUNDLE())
|
372
379
|
{
|
380
|
+
_checkNftType(policyNftId, POLICY());
|
381
|
+
_checkNftType(bundleNftId, BUNDLE());
|
382
|
+
|
373
383
|
instance.getInstanceStore().decreaseLocked(bundleNftId, collateralAmount);
|
374
384
|
}
|
375
385
|
|
@@ -381,8 +391,9 @@ contract BundleService is
|
|
381
391
|
external
|
382
392
|
virtual
|
383
393
|
restricted
|
384
|
-
onlyNftOfType(policyNftId, POLICY())
|
385
394
|
{
|
395
|
+
_checkNftType(policyNftId, POLICY());
|
396
|
+
|
386
397
|
// ensure policy is closeable
|
387
398
|
if (!policyIsCloseable(instance, policyNftId)) {
|
388
399
|
revert ErrorBundleServicePolicyNotCloseable(policyNftId);
|
@@ -395,10 +406,11 @@ contract BundleService is
|
|
395
406
|
function withdrawBundleFees(NftId bundleNftId, Amount amount)
|
396
407
|
public
|
397
408
|
virtual
|
398
|
-
onlyNftOfType(bundleNftId, BUNDLE())
|
399
409
|
// TODO: restricted() (once #462 is done)
|
400
410
|
returns (Amount withdrawnAmount)
|
401
411
|
{
|
412
|
+
_checkNftType(bundleNftId, BUNDLE());
|
413
|
+
|
402
414
|
(NftId poolNftId,, IInstance instance) = _getAndVerifyActiveComponent(POOL());
|
403
415
|
InstanceReader reader = instance.getInstanceReader();
|
404
416
|
|
@@ -438,9 +450,10 @@ contract BundleService is
|
|
438
450
|
function policyIsCloseable(IInstance instance, NftId policyNftId)
|
439
451
|
public
|
440
452
|
view
|
441
|
-
onlyNftOfType(policyNftId, POLICY())
|
442
453
|
returns (bool isCloseable)
|
443
454
|
{
|
455
|
+
_checkNftType(policyNftId, POLICY());
|
456
|
+
|
444
457
|
IPolicy.PolicyInfo memory info = instance.getInstanceReader().getPolicyInfo(policyNftId);
|
445
458
|
|
446
459
|
if (info.productNftId.eqz()) { return false; } // not closeable: policy does not exist (or does not belong to this instance)
|
@@ -135,9 +135,10 @@ contract ApplicationService is
|
|
135
135
|
external
|
136
136
|
virtual
|
137
137
|
nonReentrant()
|
138
|
-
onlyNftOfType(bundleNftId, BUNDLE())
|
139
138
|
returns (NftId applicationNftId)
|
140
139
|
{
|
140
|
+
_checkNftType(bundleNftId, BUNDLE());
|
141
|
+
|
141
142
|
(NftId productNftId,, IInstance instance) = _getAndVerifyActiveComponent(PRODUCT());
|
142
143
|
|
143
144
|
// check if provided references are valid and linked to calling product contract
|
@@ -212,10 +213,10 @@ contract ApplicationService is
|
|
212
213
|
external
|
213
214
|
virtual
|
214
215
|
nonReentrant()
|
215
|
-
onlyNftOfType(policyNftId, POLICY())
|
216
|
-
onlyNftOfType(bundleNftId, BUNDLE())
|
217
216
|
returns (NftId applicationNftId)
|
218
217
|
{
|
218
|
+
_checkNftType(policyNftId, POLICY());
|
219
|
+
_checkNftType(bundleNftId, BUNDLE());
|
219
220
|
// TODO implement
|
220
221
|
}
|
221
222
|
|
@@ -232,9 +233,9 @@ contract ApplicationService is
|
|
232
233
|
external
|
233
234
|
virtual
|
234
235
|
nonReentrant()
|
235
|
-
onlyNftOfType(applicationNftId, POLICY())
|
236
|
-
onlyNftOfType(bundleNftId, BUNDLE())
|
237
236
|
{
|
237
|
+
_checkNftType(applicationNftId, POLICY());
|
238
|
+
_checkNftType(bundleNftId, BUNDLE());
|
238
239
|
// TODO implement
|
239
240
|
}
|
240
241
|
|
@@ -242,8 +243,9 @@ contract ApplicationService is
|
|
242
243
|
external
|
243
244
|
virtual
|
244
245
|
nonReentrant()
|
245
|
-
onlyNftOfType(applicationNftId, POLICY())
|
246
246
|
{
|
247
|
+
_checkNftType(applicationNftId, POLICY());
|
248
|
+
|
247
249
|
(,, IInstance instance) = _getAndVerifyActiveComponent(PRODUCT());
|
248
250
|
instance.getInstanceStore().updateApplicationState(applicationNftId, REVOKED());
|
249
251
|
}
|
@@ -60,10 +60,11 @@ contract ClaimService is
|
|
60
60
|
)
|
61
61
|
external
|
62
62
|
virtual
|
63
|
-
onlyNftOfType(policyNftId, POLICY())
|
64
63
|
// nonReentrant() // prevents creating a reinsurance claim in a single tx
|
65
64
|
returns (ClaimId claimId)
|
66
65
|
{
|
66
|
+
_checkNftType(policyNftId, POLICY());
|
67
|
+
|
67
68
|
(
|
68
69
|
,
|
69
70
|
IInstance instance,,
|
@@ -117,9 +118,10 @@ contract ClaimService is
|
|
117
118
|
)
|
118
119
|
external
|
119
120
|
virtual
|
120
|
-
onlyNftOfType(policyNftId, POLICY())
|
121
121
|
// nonReentrant() // prevents creating a reinsurance claim in a single tx
|
122
122
|
{
|
123
|
+
_checkNftType(policyNftId, POLICY());
|
124
|
+
|
123
125
|
(
|
124
126
|
NftId productNftId,
|
125
127
|
IInstance instance,
|
@@ -162,9 +164,10 @@ contract ClaimService is
|
|
162
164
|
)
|
163
165
|
external
|
164
166
|
virtual
|
165
|
-
onlyNftOfType(policyNftId, POLICY())
|
166
167
|
// nonReentrant() // prevents creating a reinsurance claim in a single tx
|
167
168
|
{
|
169
|
+
_checkNftType(policyNftId, POLICY());
|
170
|
+
|
168
171
|
(
|
169
172
|
,
|
170
173
|
IInstance instance,
|
@@ -194,9 +197,10 @@ contract ClaimService is
|
|
194
197
|
)
|
195
198
|
external
|
196
199
|
virtual
|
197
|
-
onlyNftOfType(policyNftId, POLICY())
|
198
200
|
// nonReentrant() // prevents creating a reinsurance claim in a single tx
|
199
201
|
{
|
202
|
+
_checkNftType(policyNftId, POLICY());
|
203
|
+
|
200
204
|
(
|
201
205
|
,
|
202
206
|
IInstance instance,
|
@@ -224,9 +228,10 @@ contract ClaimService is
|
|
224
228
|
)
|
225
229
|
external
|
226
230
|
virtual
|
227
|
-
onlyNftOfType(policyNftId, POLICY())
|
228
231
|
// nonReentrant() // prevents creating a reinsurance claim in a single tx
|
229
232
|
{
|
233
|
+
_checkNftType(policyNftId, POLICY());
|
234
|
+
|
230
235
|
(
|
231
236
|
,
|
232
237
|
IInstance instance,
|
@@ -269,10 +274,11 @@ contract ClaimService is
|
|
269
274
|
)
|
270
275
|
external
|
271
276
|
virtual
|
272
|
-
onlyNftOfType(policyNftId, POLICY())
|
273
277
|
// nonReentrant() // prevents creating a reinsurance claim in a single tx
|
274
278
|
returns (PayoutId payoutId)
|
275
279
|
{
|
280
|
+
_checkNftType(policyNftId, POLICY());
|
281
|
+
|
276
282
|
if (beneficiary == address(0)) {
|
277
283
|
revert ErrorClaimServiceBeneficiaryIsZero(policyNftId, claimId);
|
278
284
|
}
|
@@ -294,10 +300,11 @@ contract ClaimService is
|
|
294
300
|
)
|
295
301
|
external
|
296
302
|
virtual
|
297
|
-
onlyNftOfType(policyNftId, POLICY())
|
298
303
|
// nonReentrant() // prevents creating a reinsurance payout in a single tx
|
299
304
|
returns (PayoutId payoutId)
|
300
305
|
{
|
306
|
+
_checkNftType(policyNftId, POLICY());
|
307
|
+
|
301
308
|
return _createPayout(
|
302
309
|
policyNftId,
|
303
310
|
claimId,
|
@@ -313,9 +320,10 @@ contract ClaimService is
|
|
313
320
|
)
|
314
321
|
external
|
315
322
|
virtual
|
316
|
-
onlyNftOfType(policyNftId, POLICY())
|
317
323
|
// nonReentrant() // prevents creating a reinsurance payout in a single tx
|
318
324
|
{
|
325
|
+
_checkNftType(policyNftId, POLICY());
|
326
|
+
|
319
327
|
(
|
320
328
|
,
|
321
329
|
IInstance instance,
|
@@ -15,7 +15,7 @@ import {Amount, AmountLib} from "../type/Amount.sol";
|
|
15
15
|
import {Timestamp, TimestampLib, zeroTimestamp} from "../type/Timestamp.sol";
|
16
16
|
import {ObjectType, APPLICATION, COMPONENT, DISTRIBUTION, PRODUCT, POOL, POLICY, BUNDLE, CLAIM, PRICE} from "../type/ObjectType.sol";
|
17
17
|
import {APPLIED, COLLATERALIZED, KEEP_STATE, CLOSED, DECLINED, PAID} from "../type/StateId.sol";
|
18
|
-
import {NftId
|
18
|
+
import {NftId} from "../type/NftId.sol";
|
19
19
|
import {ReferralId} from "../type/Referral.sol";
|
20
20
|
import {StateId} from "../type/StateId.sol";
|
21
21
|
import {VersionPart} from "../type/Version.sol";
|
@@ -38,10 +38,7 @@ contract PolicyService is
|
|
38
38
|
ComponentVerifyingService,
|
39
39
|
IPolicyService
|
40
40
|
{
|
41
|
-
IApplicationService internal _applicationService;
|
42
41
|
IComponentService internal _componentService;
|
43
|
-
IBundleService internal _bundleService;
|
44
|
-
IClaimService internal _claimService;
|
45
42
|
IDistributionService internal _distributionService;
|
46
43
|
IPoolService internal _poolService;
|
47
44
|
IPricingService internal _pricingService;
|
@@ -62,10 +59,7 @@ contract PolicyService is
|
|
62
59
|
_initializeService(registryAddress, authority, owner);
|
63
60
|
|
64
61
|
VersionPart majorVersion = getVersion().toMajorPart();
|
65
|
-
_applicationService = IApplicationService(getRegistry().getServiceAddress(APPLICATION(), majorVersion));
|
66
|
-
_bundleService = IBundleService(getRegistry().getServiceAddress(BUNDLE(), majorVersion));
|
67
62
|
_componentService = IComponentService(getRegistry().getServiceAddress(COMPONENT(), majorVersion));
|
68
|
-
_claimService = IClaimService(getRegistry().getServiceAddress(CLAIM(), majorVersion));
|
69
63
|
_poolService = IPoolService(getRegistry().getServiceAddress(POOL(), majorVersion));
|
70
64
|
_distributionService = IDistributionService(getRegistry().getServiceAddress(DISTRIBUTION(), majorVersion));
|
71
65
|
_pricingService = IPricingService(getRegistry().getServiceAddress(PRICE(), majorVersion));
|
@@ -81,6 +75,8 @@ contract PolicyService is
|
|
81
75
|
virtual
|
82
76
|
nonReentrant()
|
83
77
|
{
|
78
|
+
_checkNftType(applicationNftId, POLICY());
|
79
|
+
|
84
80
|
(NftId productNftId,, IInstance instance) = _getAndVerifyActiveComponent(PRODUCT());
|
85
81
|
InstanceReader instanceReader = instance.getInstanceReader();
|
86
82
|
|
@@ -117,6 +113,8 @@ contract PolicyService is
|
|
117
113
|
virtual
|
118
114
|
nonReentrant()
|
119
115
|
{
|
116
|
+
_checkNftType(applicationNftId, POLICY());
|
117
|
+
|
120
118
|
// check caller is registered product
|
121
119
|
(NftId productNftId,, IInstance instance) = _getAndVerifyActiveComponent(PRODUCT());
|
122
120
|
InstanceReader instanceReader = instance.getInstanceReader();
|
@@ -202,6 +200,8 @@ contract PolicyService is
|
|
202
200
|
virtual
|
203
201
|
nonReentrant()
|
204
202
|
{
|
203
|
+
_checkNftType(policyNftId, POLICY());
|
204
|
+
|
205
205
|
// check caller is registered product
|
206
206
|
(,, IInstance instance) = _getAndVerifyActiveComponent(PRODUCT());
|
207
207
|
InstanceReader instanceReader = instance.getInstanceReader();
|
@@ -246,6 +246,8 @@ contract PolicyService is
|
|
246
246
|
virtual
|
247
247
|
nonReentrant()
|
248
248
|
{
|
249
|
+
_checkNftType(policyNftId, POLICY());
|
250
|
+
|
249
251
|
// check caller is registered product
|
250
252
|
(,, IInstance instance) = _getAndVerifyActiveComponent(PRODUCT());
|
251
253
|
InstanceReader instanceReader = instance.getInstanceReader();
|
@@ -273,6 +275,8 @@ contract PolicyService is
|
|
273
275
|
nonReentrant()
|
274
276
|
returns (Timestamp expiredAt)
|
275
277
|
{
|
278
|
+
_checkNftType(policyNftId, POLICY());
|
279
|
+
|
276
280
|
(NftId productNftId,, IInstance instance) = _getAndVerifyActiveComponent(PRODUCT());
|
277
281
|
|
278
282
|
// check policy matches with calling product
|
@@ -302,6 +306,8 @@ contract PolicyService is
|
|
302
306
|
nonReentrant()
|
303
307
|
returns (Timestamp expiredAt)
|
304
308
|
{
|
309
|
+
_checkNftType(policyNftId, POLICY());
|
310
|
+
|
305
311
|
return _expire(
|
306
312
|
instance,
|
307
313
|
policyNftId,
|
@@ -361,6 +367,8 @@ contract PolicyService is
|
|
361
367
|
virtual
|
362
368
|
nonReentrant()
|
363
369
|
{
|
370
|
+
_checkNftType(policyNftId, POLICY());
|
371
|
+
|
364
372
|
(,, IInstance instance) = _getAndVerifyActiveComponent(PRODUCT());
|
365
373
|
InstanceReader instanceReader = instance.getInstanceReader();
|
366
374
|
|
@@ -9,7 +9,7 @@ import {NftId} from "../type/NftId.sol";
|
|
9
9
|
import {Fee} from "../type/Fee.sol";
|
10
10
|
import {ReferralId} from "../type/Referral.sol";
|
11
11
|
import {RiskId} from "../type/RiskId.sol";
|
12
|
-
import {PRODUCT, DISTRIBUTION, PRICE} from "../type/ObjectType.sol";
|
12
|
+
import {PRODUCT, BUNDLE, DISTRIBUTION, PRICE} from "../type/ObjectType.sol";
|
13
13
|
import {IRegistry} from "../registry/IRegistry.sol";
|
14
14
|
|
15
15
|
import {IProductComponent} from "./IProductComponent.sol";
|
@@ -70,6 +70,9 @@ contract PricingService is
|
|
70
70
|
IPolicy.PremiumInfo memory premium
|
71
71
|
)
|
72
72
|
{
|
73
|
+
_checkNftType(productNftId, PRODUCT());
|
74
|
+
_checkNftType(bundleNftId, BUNDLE());
|
75
|
+
|
73
76
|
InstanceReader reader;
|
74
77
|
Amount netPremiumAmount;
|
75
78
|
|