@etherisc/gif-next 0.0.2-ab82da8-607 → 0.0.2-abde86b-349
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/AccessAdmin.sol/AccessAdmin.json +26 -45
- 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/IAccessAdmin.sol/IAccessAdmin.json +0 -19
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IModuleAuthorization.sol/IModuleAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ModuleAuthorization.sol/ModuleAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ModuleAuthorization.sol/ModuleAuthorization.json +2 -2
- 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 +16 -16
- 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 +13 -8
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +92 -61
- 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/unpermissioned/SimpleDistribution.sol/SimpleDistribution.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.json +16 -16
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.json +11 -11
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.json +60 -32
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.json +71 -69
- 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 +88 -91
- 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 +291 -66
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +17 -12
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +69 -38
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +71 -51
- 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/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 +18 -18
- 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 +31 -26
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +68 -37
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.json +28 -0
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.json +16 -16
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +15 -10
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +90 -59
- 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/IPoolComponent.sol/IPoolComponent.json +28 -0
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.json +73 -4
- package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/pool/Pool.sol/Pool.json +28 -0
- package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolService.sol/PoolService.json +170 -43
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +95 -40
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +31 -26
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +65 -34
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +28 -26
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.json +16 -16
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +103 -82
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +97 -58
- 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/IClaimService.sol/IClaimService.json +8 -8
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.json +82 -0
- 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 +28 -26
- 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 +167 -48
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +92 -45
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +39 -34
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +76 -45
- package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/product/Product.sol/Product.json +28 -26
- package/artifacts/contracts/product/RiskService.sol/RiskService.dbg.json +1 -1
- package/artifacts/contracts/product/RiskService.sol/RiskService.json +11 -6
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.json +62 -31
- 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/IRegistry.sol/IRegistry.json +19 -0
- 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 +55 -36
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +108 -111
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +23 -201
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +60 -29
- 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 +39 -34
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +97 -56
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.json +5 -0
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.dbg.json +4 -0
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.json +92 -0
- 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/IPolicyHolder.sol/IPolicyHolder.json +16 -6
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
- package/artifacts/contracts/shared/InitializableCustom.sol/InitializableCustom.dbg.json +1 -1
- package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.dbg.json +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/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 +18 -8
- 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/Service.sol/Service.json +5 -0
- 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/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/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 +78 -42
- 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 +11 -6
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +64 -33
- 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/Amount.sol/AmountLib.json +2 -2
- 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/Fee.sol/FeeLib.json +2 -2
- 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/PayoutId.sol/PayoutIdLib.json +19 -19
- 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/MathLib.json +2 -2
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.json +15 -2
- 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 +47 -27
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +1 -1
- package/contracts/authorization/AccessAdmin.sol +24 -21
- package/contracts/authorization/Authorization.sol +5 -1
- package/contracts/authorization/IAccessAdmin.sol +0 -1
- package/contracts/distribution/DistributionService.sol +7 -7
- package/contracts/distribution/DistributionServiceManager.sol +6 -6
- package/contracts/instance/InstanceAdmin.sol +6 -3
- package/contracts/instance/InstanceReader.sol +93 -4
- package/contracts/instance/InstanceService.sol +3 -5
- package/contracts/instance/InstanceServiceManager.sol +6 -7
- package/contracts/instance/module/IComponents.sol +3 -1
- package/contracts/instance/module/IPolicy.sol +2 -2
- package/contracts/oracle/OracleService.sol +8 -6
- package/contracts/oracle/OracleServiceManager.sol +6 -6
- package/contracts/pool/BundleService.sol +6 -6
- package/contracts/pool/BundleServiceManager.sol +6 -6
- package/contracts/pool/IPoolComponent.sol +18 -8
- package/contracts/pool/IPoolService.sol +19 -8
- package/contracts/pool/Pool.sol +37 -10
- package/contracts/pool/PoolService.sol +61 -22
- package/contracts/pool/PoolServiceManager.sol +4 -4
- package/contracts/product/ApplicationService.sol +10 -7
- package/contracts/product/ApplicationServiceManager.sol +4 -4
- package/contracts/product/ClaimService.sol +147 -61
- package/contracts/product/ClaimServiceManager.sol +4 -4
- package/contracts/product/IClaimService.sol +1 -1
- package/contracts/product/IPolicyService.sol +7 -3
- package/contracts/product/IProductComponent.sol +17 -3
- package/contracts/product/PolicyService.sol +93 -20
- package/contracts/product/PolicyServiceManager.sol +4 -4
- package/contracts/product/PricingService.sol +2 -3
- package/contracts/product/PricingServiceManager.sol +3 -3
- package/contracts/product/Product.sol +25 -18
- package/contracts/product/RiskService.sol +2 -3
- package/contracts/product/RiskServiceManager.sol +4 -4
- package/contracts/registry/IRegistry.sol +2 -0
- package/contracts/registry/IRegistryService.sol +0 -9
- package/contracts/registry/Registry.sol +7 -2
- package/contracts/registry/RegistryService.sol +53 -46
- package/contracts/registry/RegistryServiceManager.sol +2 -2
- package/contracts/shared/ComponentService.sol +5 -5
- package/contracts/shared/ComponentServiceManager.sol +8 -5
- package/contracts/shared/ComponentVerifyingService.sol +1 -2
- package/contracts/shared/ContractLib.sol +38 -0
- package/contracts/shared/IPolicyHolder.sol +12 -13
- package/contracts/shared/InstanceLinkedComponent.sol +1 -2
- package/contracts/shared/PolicyHolder.sol +11 -5
- package/contracts/shared/Service.sol +12 -7
- package/contracts/staking/Staking.sol +1 -1
- package/contracts/staking/StakingManager.sol +8 -6
- package/contracts/staking/StakingServiceManager.sol +2 -2
- package/contracts/type/PayoutId.sol +10 -10
- package/contracts/type/UFixed.sol +4 -0
- package/contracts/upgradeability/ProxyManager.sol +67 -34
- package/contracts/upgradeability/Versionable.sol +2 -2
- package/package.json +1 -1
@@ -2,12 +2,12 @@
|
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
4
|
import {Amount} from "../type/Amount.sol";
|
5
|
-
import {ClaimId} from "../type/ClaimId.sol";
|
5
|
+
import {ClaimId, ClaimIdLib} from "../type/ClaimId.sol";
|
6
6
|
import {DistributorType} from "../type/DistributorType.sol";
|
7
7
|
import {Key32} from "../type/Key32.sol";
|
8
8
|
import {NftId} from "../type/NftId.sol";
|
9
9
|
import {COMPONENT, DISTRIBUTOR, DISTRIBUTION, PREMIUM, PRODUCT, POLICY, POOL, BUNDLE} from "../type/ObjectType.sol";
|
10
|
-
import {PayoutId} from "../type/PayoutId.sol";
|
10
|
+
import {PayoutId, PayoutIdLib} from "../type/PayoutId.sol";
|
11
11
|
import {ReferralId, ReferralStatus, ReferralLib, REFERRAL_OK, REFERRAL_ERROR_UNKNOWN, REFERRAL_ERROR_EXPIRED, REFERRAL_ERROR_EXHAUSTED} from "../type/Referral.sol";
|
12
12
|
import {RequestId} from "../type/RequestId.sol";
|
13
13
|
import {RiskId} from "../type/RiskId.sol";
|
@@ -26,6 +26,7 @@ import {IRisk} from "../instance/module/IRisk.sol";
|
|
26
26
|
import {TimestampLib} from "../type/Timestamp.sol";
|
27
27
|
|
28
28
|
import {InstanceStore} from "./InstanceStore.sol";
|
29
|
+
import {BundleSet} from "./BundleSet.sol";
|
29
30
|
|
30
31
|
|
31
32
|
contract InstanceReader {
|
@@ -37,6 +38,7 @@ contract InstanceReader {
|
|
37
38
|
|
38
39
|
IInstance internal _instance;
|
39
40
|
InstanceStore internal _store;
|
41
|
+
BundleSet internal _bundleSet;
|
40
42
|
|
41
43
|
/// @dev This initializer needs to be called from the instance itself.
|
42
44
|
function initialize() public {
|
@@ -56,6 +58,7 @@ contract InstanceReader {
|
|
56
58
|
_initialized = true;
|
57
59
|
_instance = IInstance(instanceAddress);
|
58
60
|
_store = _instance.getInstanceStore();
|
61
|
+
_bundleSet = _instance.getBundleSet();
|
59
62
|
}
|
60
63
|
|
61
64
|
|
@@ -99,6 +102,22 @@ contract InstanceReader {
|
|
99
102
|
return _store.getState(toPremiumKey(policyNftId));
|
100
103
|
}
|
101
104
|
|
105
|
+
function activeBundles(NftId poolNftId)
|
106
|
+
public
|
107
|
+
view
|
108
|
+
returns (uint256 bundles)
|
109
|
+
{
|
110
|
+
return _bundleSet.activeBundles(poolNftId);
|
111
|
+
}
|
112
|
+
|
113
|
+
function getActiveBundleNftId(NftId poolNftId, uint256 idx)
|
114
|
+
public
|
115
|
+
view
|
116
|
+
returns (NftId bundleNftId)
|
117
|
+
{
|
118
|
+
return _bundleSet.getActiveBundleNftId(poolNftId, idx);
|
119
|
+
}
|
120
|
+
|
102
121
|
function getBundleState(NftId bundleNftId)
|
103
122
|
public
|
104
123
|
view
|
@@ -107,8 +126,26 @@ contract InstanceReader {
|
|
107
126
|
return _store.getState(toBundleKey(bundleNftId));
|
108
127
|
}
|
109
128
|
|
110
|
-
|
111
|
-
///
|
129
|
+
|
130
|
+
/// @dev Returns true iff policy is active.
|
131
|
+
function policyIsActive(NftId policyNftId)
|
132
|
+
public
|
133
|
+
view
|
134
|
+
returns (bool isCloseable)
|
135
|
+
{
|
136
|
+
IPolicy.PolicyInfo memory info = getPolicyInfo(policyNftId);
|
137
|
+
|
138
|
+
if (info.productNftId.eqz()) { return false; } // not closeable: policy does not exist (or does not belong to this instance)
|
139
|
+
if (info.activatedAt.eqz()) { return false; } // not closeable: not yet activated
|
140
|
+
if (info.activatedAt > TimestampLib.blockTimestamp()) { return false; } // not yet active
|
141
|
+
if (info.expiredAt <= TimestampLib.blockTimestamp()) { return false; } // already expired
|
142
|
+
|
143
|
+
return true;
|
144
|
+
}
|
145
|
+
|
146
|
+
|
147
|
+
/// @dev Returns true iff policy may be closed.
|
148
|
+
/// A policy can be closed all conditions below are met
|
112
149
|
/// - policy exists
|
113
150
|
/// - has been activated
|
114
151
|
/// - is not yet closed
|
@@ -136,6 +173,25 @@ contract InstanceReader {
|
|
136
173
|
return true;
|
137
174
|
}
|
138
175
|
|
176
|
+
|
177
|
+
function claims(NftId policyNftId)
|
178
|
+
public
|
179
|
+
view
|
180
|
+
returns (uint16 claims)
|
181
|
+
{
|
182
|
+
return getPolicyInfo(policyNftId).claimsCount;
|
183
|
+
}
|
184
|
+
|
185
|
+
|
186
|
+
function getClaimId(uint idx)
|
187
|
+
public
|
188
|
+
view
|
189
|
+
returns (ClaimId claimId)
|
190
|
+
{
|
191
|
+
return ClaimIdLib.toClaimId(idx + 1);
|
192
|
+
}
|
193
|
+
|
194
|
+
|
139
195
|
function getClaimInfo(NftId policyNftId, ClaimId claimId)
|
140
196
|
public
|
141
197
|
view
|
@@ -147,6 +203,7 @@ contract InstanceReader {
|
|
147
203
|
}
|
148
204
|
}
|
149
205
|
|
206
|
+
|
150
207
|
function getClaimState(NftId policyNftId, ClaimId claimId)
|
151
208
|
public
|
152
209
|
view
|
@@ -155,6 +212,25 @@ contract InstanceReader {
|
|
155
212
|
return _store.getState(claimId.toKey32(policyNftId));
|
156
213
|
}
|
157
214
|
|
215
|
+
|
216
|
+
function payouts(NftId policyNftId, ClaimId claimId)
|
217
|
+
public
|
218
|
+
view
|
219
|
+
returns (uint24 payouts)
|
220
|
+
{
|
221
|
+
return getClaimInfo(policyNftId, claimId).payoutsCount;
|
222
|
+
}
|
223
|
+
|
224
|
+
|
225
|
+
function getPayoutId(ClaimId claimId, uint24 idx)
|
226
|
+
public
|
227
|
+
view
|
228
|
+
returns (PayoutId payoutId)
|
229
|
+
{
|
230
|
+
return PayoutIdLib.toPayoutId(claimId, idx + 1);
|
231
|
+
}
|
232
|
+
|
233
|
+
|
158
234
|
function getPayoutInfo(NftId policyNftId, PayoutId payoutId)
|
159
235
|
public
|
160
236
|
view
|
@@ -185,6 +261,19 @@ contract InstanceReader {
|
|
185
261
|
}
|
186
262
|
}
|
187
263
|
|
264
|
+
function getWallet(NftId componentNftId)
|
265
|
+
public
|
266
|
+
view
|
267
|
+
returns (address tokenHandler)
|
268
|
+
{
|
269
|
+
bytes memory data = _store.getData(toComponentKey(componentNftId));
|
270
|
+
|
271
|
+
if (data.length > 0) {
|
272
|
+
IComponents.ComponentInfo memory info = abi.decode(data, (IComponents.ComponentInfo));
|
273
|
+
return info.wallet;
|
274
|
+
}
|
275
|
+
}
|
276
|
+
|
188
277
|
function getTokenHandler(NftId componentNftId)
|
189
278
|
public
|
190
279
|
view
|
@@ -193,8 +193,7 @@ contract InstanceService is
|
|
193
193
|
NftId instanceNftId = registry.getObjectInfo(componentAddress).parentNftId;
|
194
194
|
|
195
195
|
IInstance instance = IInstance(
|
196
|
-
registry.
|
197
|
-
instanceNftId).objectAddress);
|
196
|
+
registry.getObjectAddress(instanceNftId));
|
198
197
|
|
199
198
|
// no revert in case already locked
|
200
199
|
// TODO refactor/implement
|
@@ -426,10 +425,9 @@ contract InstanceService is
|
|
426
425
|
initializer()
|
427
426
|
{
|
428
427
|
(
|
429
|
-
address registryAddress
|
430
|
-
//address managerAddress
|
428
|
+
address registryAddress,
|
431
429
|
address authority
|
432
|
-
) = abi.decode(data, (address, address
|
430
|
+
) = abi.decode(data, (address, address));
|
433
431
|
|
434
432
|
_initializeService(registryAddress, authority, owner);
|
435
433
|
|
@@ -12,16 +12,15 @@ contract InstanceServiceManager is ProxyManager {
|
|
12
12
|
/// @dev initializes proxy manager with instance service implementation
|
13
13
|
constructor(
|
14
14
|
address authority,
|
15
|
-
address
|
15
|
+
address registry,
|
16
16
|
bytes32 salt
|
17
17
|
)
|
18
|
-
ProxyManager(registryAddress)
|
19
18
|
{
|
20
|
-
InstanceService
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
address(
|
19
|
+
InstanceService svc = new InstanceService{salt: salt}();
|
20
|
+
bytes memory data = abi.encode(registry, authority);
|
21
|
+
IVersionable versionable = initialize(
|
22
|
+
registry,
|
23
|
+
address(svc),
|
25
24
|
data,
|
26
25
|
salt);
|
27
26
|
|
@@ -24,6 +24,7 @@ interface IComponents {
|
|
24
24
|
struct ProductInfo {
|
25
25
|
NftId distributionNftId;
|
26
26
|
NftId poolNftId;
|
27
|
+
bool isProcessingFundedClaims; // custom logic to react to pool events for funded claims
|
27
28
|
Fee productFee; // product fee on net premium
|
28
29
|
Fee processingFee; // product fee on payout amounts
|
29
30
|
Fee distributionFee; // distribution fee for sales that do not include commissions
|
@@ -37,7 +38,8 @@ interface IComponents {
|
|
37
38
|
struct PoolInfo {
|
38
39
|
Amount maxBalanceAmount; // max balance amount allowed for pool
|
39
40
|
RoleId bundleOwnerRole; // the required role for bundle owners
|
40
|
-
bool isInterceptingBundleTransfers; //
|
41
|
+
bool isInterceptingBundleTransfers; // custom logic for bundle nft transfers
|
42
|
+
bool isProcessingConfirmedClaims; // custom logic for claims confirmation
|
41
43
|
bool isExternallyManaged; // funding bundles is restricted to book keeping, actual funds may be provided as needed to support payouts
|
42
44
|
bool isVerifyingApplications; // underwriting requires the pool component checks/confirms the applications
|
43
45
|
UFixed collateralizationLevel; // factor to calculate collateral for sum insurance (default 100%)
|
@@ -66,8 +66,8 @@ interface IPolicy {
|
|
66
66
|
struct ClaimInfo {
|
67
67
|
Amount claimAmount;
|
68
68
|
Amount paidAmount;
|
69
|
-
|
70
|
-
|
69
|
+
uint24 payoutsCount;
|
70
|
+
uint24 openPayoutsCount;
|
71
71
|
bytes submissionData; // use case specific claim submission data, no changes after submitting the claim
|
72
72
|
bytes processData; // use case specific data that may include information supporting confirm or decline
|
73
73
|
Timestamp closedAt; // payment of confirmed claim amount (or declinedAt)
|
@@ -30,10 +30,12 @@ contract OracleService is
|
|
30
30
|
virtual override
|
31
31
|
initializer()
|
32
32
|
{
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
33
|
+
(
|
34
|
+
address registryAddress,
|
35
|
+
address authority
|
36
|
+
) = abi.decode(data, (address, address));
|
37
|
+
|
38
|
+
_initializeService(registryAddress, authority, owner);
|
37
39
|
_registerInterface(type(IOracleService).interfaceId);
|
38
40
|
}
|
39
41
|
|
@@ -215,7 +217,7 @@ contract OracleService is
|
|
215
217
|
|
216
218
|
// call oracle component
|
217
219
|
// TODO add check that oracle is active?
|
218
|
-
address oracleAddress = getRegistry().
|
220
|
+
address oracleAddress = getRegistry().getObjectAddress(request.oracleNftId);
|
219
221
|
IOracleComponent(oracleAddress).cancel(requestId);
|
220
222
|
|
221
223
|
emit LogOracleServiceRequestCancelled(requestId, requesterNftId);
|
@@ -268,7 +270,7 @@ contract OracleService is
|
|
268
270
|
returns(IInstance instance)
|
269
271
|
{
|
270
272
|
NftId instanceNftId = getRegistry().getObjectInfo(componentNftId).parentNftId;
|
271
|
-
address instanceAddress = getRegistry().
|
273
|
+
address instanceAddress = getRegistry().getObjectAddress(instanceNftId);
|
272
274
|
return IInstance(instanceAddress);
|
273
275
|
}
|
274
276
|
|
@@ -12,15 +12,15 @@ contract OracleServiceManager is ProxyManager {
|
|
12
12
|
/// @dev initializes proxy manager with service implementation and deploys instance
|
13
13
|
constructor(
|
14
14
|
address authority,
|
15
|
-
address
|
15
|
+
address registry,
|
16
16
|
bytes32 salt
|
17
17
|
)
|
18
|
-
ProxyManager(registryAddress)
|
19
18
|
{
|
20
|
-
OracleService
|
21
|
-
bytes memory data = abi.encode(
|
22
|
-
IVersionable versionable =
|
23
|
-
|
19
|
+
OracleService svc = new OracleService{salt: salt}();
|
20
|
+
bytes memory data = abi.encode(registry, authority);
|
21
|
+
IVersionable versionable = initialize(
|
22
|
+
registry,
|
23
|
+
address(svc),
|
24
24
|
data,
|
25
25
|
salt);
|
26
26
|
|
@@ -43,12 +43,12 @@ contract BundleService is
|
|
43
43
|
virtual override
|
44
44
|
initializer()
|
45
45
|
{
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
_initializeService(registryAddress,
|
46
|
+
(
|
47
|
+
address registryAddress,
|
48
|
+
address authority
|
49
|
+
) = abi.decode(data, (address, address));
|
50
|
+
|
51
|
+
_initializeService(registryAddress, authority, owner);
|
52
52
|
|
53
53
|
_registryService = IRegistryService(_getServiceAddress(REGISTRY()));
|
54
54
|
_componentService = IComponentService(_getServiceAddress(COMPONENT()));
|
@@ -12,15 +12,15 @@ contract BundleServiceManager is ProxyManager {
|
|
12
12
|
/// @dev initializes proxy manager with pool service implementation
|
13
13
|
constructor(
|
14
14
|
address authority,
|
15
|
-
address
|
15
|
+
address registry,
|
16
16
|
bytes32 salt
|
17
17
|
)
|
18
|
-
ProxyManager(registryAddress)
|
19
18
|
{
|
20
|
-
BundleService
|
21
|
-
bytes memory data = abi.encode(
|
22
|
-
IVersionable versionable =
|
23
|
-
|
19
|
+
BundleService svc = new BundleService{salt: salt}();
|
20
|
+
bytes memory data = abi.encode(registry, authority);
|
21
|
+
IVersionable versionable = initialize(
|
22
|
+
registry,
|
23
|
+
address(svc),
|
24
24
|
data,
|
25
25
|
salt);
|
26
26
|
|
@@ -2,6 +2,7 @@
|
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
4
|
import {Amount} from "../type/Amount.sol";
|
5
|
+
import {ClaimId} from "../type/ClaimId.sol";
|
5
6
|
import {Fee} from "../type/Fee.sol";
|
6
7
|
import {IInstanceLinkedComponent} from "../shared/IInstanceLinkedComponent.sol";
|
7
8
|
import {IComponents} from "../instance/module/IComponents.sol";
|
@@ -20,10 +21,10 @@ interface IPoolComponent is IInstanceLinkedComponent {
|
|
20
21
|
|
21
22
|
event LogPoolVerifiedByPool(address pool, NftId applicationNftId, Amount collateralizationAmount);
|
22
23
|
|
23
|
-
/// @dev
|
24
|
-
///
|
25
|
-
///
|
26
|
-
///
|
24
|
+
/// @dev This is a callback function that is called by the product service when underwriting a policy.
|
25
|
+
/// The pool has the option to check the details and object to underwriting by reverting.
|
26
|
+
/// The function is only called for "active" pools that ask to be involved/notified.
|
27
|
+
/// The default implementation is empty.
|
27
28
|
function verifyApplication(
|
28
29
|
NftId applicationNftId,
|
29
30
|
bytes memory applicationData,
|
@@ -32,9 +33,9 @@ interface IPoolComponent is IInstanceLinkedComponent {
|
|
32
33
|
Amount collateralizationAmount
|
33
34
|
) external;
|
34
35
|
|
35
|
-
/// @dev
|
36
|
-
///
|
37
|
-
/// default implementation returns true
|
36
|
+
/// @dev Returns true iff the application matches with the bundle.
|
37
|
+
/// This is a callback function that is only called if a pool declares itself as a verifying pool
|
38
|
+
/// The default implementation returns true.
|
38
39
|
function applicationMatchesBundle(
|
39
40
|
NftId applicationNftId,
|
40
41
|
bytes memory applicationData,
|
@@ -46,13 +47,22 @@ interface IPoolComponent is IInstanceLinkedComponent {
|
|
46
47
|
view
|
47
48
|
returns (bool isMatching);
|
48
49
|
|
50
|
+
/// @dev This is a callback function that is called by the claim service when a claim is confirmed.
|
51
|
+
/// The pool has the option to implement custom behavirous such as triggering a reinsurance claim or blocking the claim confirmaation.
|
52
|
+
/// The default implementation is empty.
|
53
|
+
function processConfirmedClaim(
|
54
|
+
NftId policyNftId,
|
55
|
+
ClaimId claimId,
|
56
|
+
Amount amount
|
57
|
+
) external;
|
58
|
+
|
49
59
|
/// @dev Withdraw bundle feeds for the given bundle
|
50
60
|
/// @param bundleNftId the bundle Nft Id
|
51
61
|
/// @param amount the amount to withdraw. If set to AMOUNT_MAX, the full commission available is withdrawn
|
52
62
|
/// @return withdrawnAmount the effective withdrawn amount
|
53
63
|
function withdrawBundleFees(NftId bundleNftId, Amount amount) external returns (Amount withdrawnAmount);
|
54
64
|
|
55
|
-
/// @dev
|
65
|
+
/// @dev Returns initial pool specific infos for this pool
|
56
66
|
function getInitialPoolInfo() external view returns (IComponents.PoolInfo memory info);
|
57
67
|
|
58
68
|
}
|
@@ -2,14 +2,15 @@
|
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
4
|
import {Amount} from "../type/Amount.sol";
|
5
|
+
import {ClaimId} from "../type/ClaimId.sol";
|
5
6
|
import {Fee} from "../type/Fee.sol";
|
6
|
-
import {NftId} from "../type/NftId.sol";
|
7
|
-
import {PayoutId} from "../type/PayoutId.sol";
|
8
7
|
import {IBundle} from "../instance/module/IBundle.sol";
|
9
8
|
import {IInstance} from "../instance/IInstance.sol";
|
10
9
|
import {InstanceReader} from "../instance/InstanceReader.sol";
|
11
10
|
import {IPolicy} from "../instance/module/IPolicy.sol";
|
12
11
|
import {IService} from "../shared/IService.sol";
|
12
|
+
import {NftId} from "../type/NftId.sol";
|
13
|
+
import {PayoutId} from "../type/PayoutId.sol";
|
13
14
|
import {RoleId} from "../type/RoleId.sol";
|
14
15
|
import {Seconds} from "../type/Seconds.sol";
|
15
16
|
import {StateId} from "../type/StateId.sol";
|
@@ -26,6 +27,9 @@ interface IPoolService is IService {
|
|
26
27
|
event LogPoolServiceBundleStaked(NftId instanceNftId, NftId poolNftId, NftId bundleNftId, Amount amount, Amount netAmount);
|
27
28
|
event LogPoolServiceBundleUnstaked(NftId instanceNftId, NftId poolNftId, NftId bundleNftId, Amount amount);
|
28
29
|
|
30
|
+
event LogPoolServiceProcessFundedClaim(NftId policyNftId, ClaimId claimId, Amount availableAmount);
|
31
|
+
|
32
|
+
error ErrorPoolServicePolicyPoolMismatch(NftId policyNftId, NftId productNftId, NftId expectedProductNftId);
|
29
33
|
error ErrorPoolServiceBundleOwnerRoleAlreadySet(NftId poolNftId);
|
30
34
|
error ErrorPoolServiceInvalidTransferAmount(Amount expectedAmount, Amount actualAmount);
|
31
35
|
error ErrorPoolServiceBundlePoolMismatch(NftId bundleNftId, NftId poolNftId);
|
@@ -112,6 +116,11 @@ interface IPoolService is IService {
|
|
112
116
|
function closeBundle(NftId bundleNftId) external;
|
113
117
|
|
114
118
|
|
119
|
+
/// @dev Informs product about available funds to process a confirmed claim.
|
120
|
+
/// The function triggers a callback to the product component when the product's property isProcessingFundedClaims is set.
|
121
|
+
function processFundedClaim(NftId policyNftId, ClaimId claimId, Amount availableAmount) external;
|
122
|
+
|
123
|
+
|
115
124
|
/// @dev Fund the specified pool wallet with the provided amount.
|
116
125
|
/// This function will collect the amount from the sender address and transfers it to the pool wallet.
|
117
126
|
/// The function will not update balance amounts managed by the framework.
|
@@ -130,7 +139,7 @@ interface IPoolService is IService {
|
|
130
139
|
function processSale(NftId bundleNftId, IPolicy.PremiumInfo memory premium) external;
|
131
140
|
|
132
141
|
|
133
|
-
/// @dev
|
142
|
+
/// @dev Calulate required collateral for the provided parameters.
|
134
143
|
function calculateRequiredCollateral(
|
135
144
|
InstanceReader instanceReader,
|
136
145
|
NftId productNftId,
|
@@ -139,12 +148,14 @@ interface IPoolService is IService {
|
|
139
148
|
external
|
140
149
|
view
|
141
150
|
returns(
|
142
|
-
Amount
|
143
|
-
Amount
|
151
|
+
Amount totalCollateralAmount,
|
152
|
+
Amount localCollateralAmount
|
144
153
|
);
|
145
154
|
|
146
155
|
|
147
|
-
/// @dev calulate required collateral for the provided parameters
|
156
|
+
/// @dev calulate required collateral for the provided parameters.
|
157
|
+
/// Collateralization is applied to sum insured.
|
158
|
+
/// Retention level defines the fraction of the collateral that is required locally.
|
148
159
|
function calculateRequiredCollateral(
|
149
160
|
UFixed collateralizationLevel,
|
150
161
|
UFixed retentionLevel,
|
@@ -153,8 +164,8 @@ interface IPoolService is IService {
|
|
153
164
|
external
|
154
165
|
pure
|
155
166
|
returns(
|
156
|
-
Amount
|
157
|
-
Amount
|
167
|
+
Amount totalCollateralAmount,
|
168
|
+
Amount localCollateralAmount
|
158
169
|
);
|
159
170
|
|
160
171
|
}
|
package/contracts/pool/Pool.sol
CHANGED
@@ -3,6 +3,7 @@ pragma solidity ^0.8.20;
|
|
3
3
|
|
4
4
|
import {Amount, AmountLib} from "../type/Amount.sol";
|
5
5
|
import {BUNDLE, COMPONENT, POOL} from "../type/ObjectType.sol";
|
6
|
+
import {ClaimId} from "../type/ClaimId.sol";
|
6
7
|
import {IBundleService} from "./IBundleService.sol";
|
7
8
|
import {IAuthorization} from "../authorization/IAuthorization.sol";
|
8
9
|
import {IPoolComponent} from "./IPoolComponent.sol";
|
@@ -40,6 +41,16 @@ abstract contract Pool is
|
|
40
41
|
}
|
41
42
|
|
42
43
|
|
44
|
+
function register()
|
45
|
+
external
|
46
|
+
virtual
|
47
|
+
onlyOwner()
|
48
|
+
{
|
49
|
+
_getPoolStorage()._componentService.registerPool();
|
50
|
+
_approveTokenHandler(type(uint256).max);
|
51
|
+
}
|
52
|
+
|
53
|
+
|
43
54
|
/// @dev see {IPoolComponent.verifyApplication}
|
44
55
|
function verifyApplication(
|
45
56
|
NftId applicationNftId,
|
@@ -67,6 +78,20 @@ abstract contract Pool is
|
|
67
78
|
}
|
68
79
|
|
69
80
|
|
81
|
+
/// @dev see {IPoolComponent.processConfirmedClaim}
|
82
|
+
function processConfirmedClaim(
|
83
|
+
NftId policyNftId,
|
84
|
+
ClaimId claimId,
|
85
|
+
Amount amount
|
86
|
+
)
|
87
|
+
public
|
88
|
+
virtual
|
89
|
+
restricted()
|
90
|
+
{
|
91
|
+
// default implementation is empty
|
92
|
+
}
|
93
|
+
|
94
|
+
|
70
95
|
/// @dev see {IPoolComponent.applicationMatchesBundle}
|
71
96
|
/// Override this function to implement any custom application verification
|
72
97
|
/// Default implementation always returns true
|
@@ -85,16 +110,6 @@ abstract contract Pool is
|
|
85
110
|
return true;
|
86
111
|
}
|
87
112
|
|
88
|
-
|
89
|
-
function register()
|
90
|
-
external
|
91
|
-
virtual
|
92
|
-
onlyOwner()
|
93
|
-
{
|
94
|
-
_getPoolStorage()._componentService.registerPool();
|
95
|
-
_approveTokenHandler(type(uint256).max);
|
96
|
-
}
|
97
|
-
|
98
113
|
/// @inheritdoc IPoolComponent
|
99
114
|
function withdrawBundleFees(NftId bundleNftId, Amount amount)
|
100
115
|
external
|
@@ -117,6 +132,7 @@ abstract contract Pool is
|
|
117
132
|
maxBalanceAmount: AmountLib.max(),
|
118
133
|
bundleOwnerRole: PUBLIC_ROLE(),
|
119
134
|
isInterceptingBundleTransfers: isNftInterceptor(),
|
135
|
+
isProcessingConfirmedClaims: false,
|
120
136
|
isExternallyManaged: false,
|
121
137
|
isVerifyingApplications: false,
|
122
138
|
collateralizationLevel: UFixedLib.toUFixed(1),
|
@@ -318,6 +334,17 @@ abstract contract Pool is
|
|
318
334
|
return _getPoolStorage()._bundleService.withdrawBundleFees(bundleNftId, amount);
|
319
335
|
}
|
320
336
|
|
337
|
+
function _processFundedClaim(
|
338
|
+
NftId policyNftId,
|
339
|
+
ClaimId claimId,
|
340
|
+
Amount availableAmount
|
341
|
+
)
|
342
|
+
internal
|
343
|
+
{
|
344
|
+
_getPoolStorage()._poolService.processFundedClaim(
|
345
|
+
policyNftId, claimId, availableAmount);
|
346
|
+
}
|
347
|
+
|
321
348
|
function _getPoolStorage() private pure returns (PoolStorage storage $) {
|
322
349
|
assembly {
|
323
350
|
$.slot := POOL_STORAGE_LOCATION_V1
|