@etherisc/gif-next 0.0.2-2a0a7d0-893 → 0.0.2-2a59cd5-352
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/README.md +73 -1
- package/artifacts/contracts/components/Component.sol/Component.dbg.json +1 -1
- package/artifacts/contracts/components/Component.sol/Component.json +405 -6
- package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/components/Distribution.sol/Distribution.json +883 -141
- package/artifacts/contracts/components/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IComponent.sol/IComponent.json +113 -6
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +798 -0
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +662 -43
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +656 -0
- package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/components/Pool.sol/Pool.json +583 -75
- package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/components/Product.sol/Product.json +504 -5
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Cloner.dbg.json +1 -1
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock1.dbg.json +1 -1
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock2.dbg.json +1 -1
- package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +1 -1
- package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +2 -2
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +1 -1
- package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +1 -1
- package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +1 -1
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +1 -1
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +2 -2
- package/artifacts/contracts/instance/Cloneable.sol/Cloneable.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +450 -35
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +111 -7
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +589 -223
- package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.json +39 -89
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +58 -53
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +400 -96
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +175 -25
- package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.dbg.json +1 -1
- package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.json +2 -2
- package/artifacts/contracts/instance/base/ComponentService.sol/ComponentService.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ComponentService.sol/ComponentService.json +166 -7
- package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +1 -1
- package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +2 -2
- package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +1 -1
- package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +2 -2
- package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IAccess.sol/IAccess.json +13 -13
- package/artifacts/contracts/instance/module/IBundle.sol/IBundle.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/instance/module/ISetup.sol/ISetup.dbg.json +1 -1
- package/artifacts/contracts/instance/module/ITreasury.sol/ITreasury.dbg.json +1 -1
- package/artifacts/contracts/instance/service/ApplicationService.sol/ApplicationService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/ApplicationService.sol/ApplicationService.json +1117 -0
- package/artifacts/contracts/instance/service/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/BundleService.sol/BundleService.json +290 -66
- package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.json +169 -19
- package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +439 -27
- package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.json +194 -16
- package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.json +638 -0
- package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.json +118 -40
- package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +217 -7
- package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.json +33 -20
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +20 -7
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +20 -7
- package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.json +223 -64
- package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.json +182 -32
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +186 -27
- package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.json +166 -16
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +186 -27
- package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.json +166 -16
- 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 +15 -2
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +100 -26
- 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 +28 -15
- package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.json +2 -2
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +260 -40
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +166 -16
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +11 -11
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +160 -10
- package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.dbg.json +1 -1
- package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
- package/artifacts/contracts/shared/ERC165.sol/ERC165.json +41 -3
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.json +37 -0
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +4 -0
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.json +129 -0
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +18 -5
- package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +4 -0
- package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.json +69 -0
- package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
- package/artifacts/contracts/shared/IService.sol/IService.json +20 -7
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +2 -2
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +156 -11
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +4 -0
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +269 -0
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +156 -6
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +152 -11
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +4 -0
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +105 -0
- package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
- package/artifacts/contracts/shared/Service.sol/Service.json +166 -7
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +2 -2
- package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
- package/artifacts/contracts/shared/Versionable.sol/Versionable.json +2 -2
- package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
- package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
- package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +152 -11
- package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
- package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +2 -2
- package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
- package/artifacts/contracts/test/TestService.sol/TestService.json +184 -25
- package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +1 -1
- package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +1 -1
- package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
- package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +8 -8
- package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +1 -1
- package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +1 -1
- package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
- package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
- package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.json +2 -2
- package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +1 -1
- package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +1 -1
- package/artifacts/contracts/types/Key32.sol/Key32Lib.json +2 -2
- package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/NftId.sol/NftIdLib.json +2 -2
- package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
- package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +2 -2
- package/artifacts/contracts/types/NumberId.sol/NumberIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
- package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
- package/artifacts/contracts/types/Referral.sol/ReferralLib.dbg.json +1 -1
- package/artifacts/contracts/types/Referral.sol/ReferralLib.json +2 -2
- package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +2 -2
- package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +2 -2
- package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/types/UFixed.sol/MathLib.dbg.json +1 -1
- package/artifacts/contracts/types/UFixed.sol/UFixedLib.dbg.json +1 -1
- package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
- package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
- package/contracts/components/Component.sol +121 -62
- package/contracts/components/Distribution.sol +207 -53
- package/contracts/components/IComponent.sol +16 -3
- package/contracts/components/IDistributionComponent.sol +59 -3
- package/contracts/components/IPoolComponent.sol +50 -29
- package/contracts/components/IProductComponent.sol +5 -1
- package/contracts/components/Pool.sol +133 -137
- package/contracts/components/Product.sol +90 -107
- package/contracts/instance/IInstance.sol +26 -6
- package/contracts/instance/IInstanceService.sol +19 -0
- package/contracts/instance/Instance.sol +58 -30
- package/contracts/instance/InstanceAccessManager.sol +12 -13
- package/contracts/instance/InstanceService.sol +119 -39
- package/contracts/instance/base/ComponentService.sol +3 -2
- package/contracts/instance/module/IAccess.sol +3 -4
- package/contracts/instance/module/ISetup.sol +5 -4
- package/contracts/instance/service/ApplicationService.sol +268 -0
- package/contracts/instance/service/BundleService.sol +11 -6
- package/contracts/instance/service/DistributionService.sol +197 -30
- package/contracts/instance/service/IApplicationService.sol +82 -0
- package/contracts/instance/service/IBundleService.sol +11 -1
- package/contracts/instance/service/IDistributionService.sol +53 -0
- package/contracts/instance/service/IPolicyService.sol +10 -16
- package/contracts/instance/service/PolicyService.sol +84 -98
- package/contracts/instance/service/PoolService.sol +9 -42
- package/contracts/instance/service/ProductService.sol +20 -28
- package/contracts/registry/IRegistry.sol +3 -2
- package/contracts/registry/IRegistryService.sol +16 -6
- package/contracts/registry/Registry.sol +20 -8
- package/contracts/registry/RegistryService.sol +50 -85
- package/contracts/registry/ReleaseManager.sol +19 -40
- package/contracts/registry/TokenRegistry.sol +4 -3
- package/contracts/shared/ERC165.sol +12 -11
- package/contracts/shared/INftOwnable.sol +12 -6
- package/contracts/shared/IPolicyHolder.sol +26 -0
- package/contracts/shared/IRegisterable.sol +4 -4
- package/contracts/shared/IRegistryLinked.sol +15 -0
- package/contracts/shared/IVersionable.sol +2 -2
- package/contracts/shared/NftOwnable.sol +113 -59
- package/contracts/shared/PolicyHolder.sol +81 -0
- package/contracts/shared/ProxyManager.sol +5 -4
- package/contracts/shared/Registerable.sol +15 -24
- package/contracts/shared/RegistryLinked.sol +64 -0
- package/contracts/shared/Service.sol +5 -5
- package/contracts/shared/Versionable.sol +3 -2
- package/contracts/test/TestRegisterable.sol +1 -1
- package/contracts/test/TestService.sol +1 -1
- package/contracts/types/DistributorType.sol +2 -2
- package/contracts/types/ObjectType.sol +6 -2
- package/package.json +3 -3
- package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +0 -4
- package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +0 -100
- package/contracts/instance/base/IInstanceBase.sol +0 -21
package/README.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# GIF-Next (Generic Insurance Framework, next version)
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
```mermaid
|
|
5
|
+
graph TD
|
|
6
|
+
IPoolComponent --> IComponent
|
|
7
|
+
IComponent --> IRegisterable
|
|
8
|
+
IComponent --> ITransferInterceptor
|
|
9
|
+
IRegistryService --> IService
|
|
10
|
+
IService-->IRegisterable
|
|
11
|
+
IService-->IVersionable
|
|
12
|
+
IRegisterable-->INftOwnable
|
|
13
|
+
INftOwnable-->IERC165
|
|
14
|
+
```
|
|
15
|
+
|
|
3
16
|
## Add OpenZeppelin V5 Dependencies
|
|
4
17
|
|
|
5
18
|
```shell
|
|
@@ -392,9 +405,68 @@ Intercepting property
|
|
|
392
405
|
|
|
393
406
|
### Product
|
|
394
407
|
|
|
408
|
+
### Payout Handling
|
|
409
|
+
|
|
410
|
+
Pool specifies **retention level**.
|
|
411
|
+
Retention level defines up to which percentage of the sum insured the pool is payout out using its own/current funds.
|
|
412
|
+
Depending on the amount of a new payout the poolService decides to either execute the payout directly or to add the payout as a pending payout with a notification of the pool.
|
|
413
|
+
|
|
414
|
+
The sequence below sketches the small payout flow (payout < retention amount)
|
|
415
|
+
- retention level: 30%
|
|
416
|
+
- sum insured: 1000
|
|
417
|
+
- payout: 200
|
|
418
|
+
|
|
419
|
+
```mermaid
|
|
420
|
+
sequenceDiagram
|
|
421
|
+
participant customer
|
|
422
|
+
participant product
|
|
423
|
+
participant productService
|
|
424
|
+
participant poolService
|
|
425
|
+
participant pool
|
|
426
|
+
product->>productService: createPayout()
|
|
427
|
+
productService ->> poolService: requestPayout()
|
|
428
|
+
poolService -->> pool: verifyPayout() *
|
|
429
|
+
poolService ->> poolService: processPayout()
|
|
430
|
+
poolService ->> customer: transfer token for payout
|
|
431
|
+
poolService ->> productService: payoutExecuted()
|
|
432
|
+
poolService -->> customer: payoutExecutedCallback() **
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
*: if pool is configured to verify payouts before execution
|
|
436
|
+
|
|
437
|
+
**: callback only if customer is contract (IPolicyHolder)
|
|
438
|
+
|
|
439
|
+
The sequence below sketches the call flow for payouts larger than the retention amount
|
|
440
|
+
- retention level: 30%
|
|
441
|
+
- sum insured: 1000
|
|
442
|
+
- payout: 500
|
|
443
|
+
* locally available: 300
|
|
444
|
+
* via policy (re-insurance): 200
|
|
445
|
+
|
|
446
|
+
```mermaid
|
|
447
|
+
sequenceDiagram
|
|
448
|
+
participant customer
|
|
449
|
+
participant product
|
|
450
|
+
participant productService
|
|
451
|
+
participant poolService
|
|
452
|
+
participant pool
|
|
453
|
+
pool ->> reinsuranceProduct: applyForPolicy()
|
|
454
|
+
product->>productService: createPayout()
|
|
455
|
+
productService ->> poolService: requestPayout()
|
|
456
|
+
poolService ->> pool: pendingPayoutAdded()
|
|
457
|
+
pool ->> pool: getReinsurancePolicy()
|
|
458
|
+
pool ->> reinsuranceProduct: claim()
|
|
459
|
+
reinsuranceProduct -->> reinsurancePool: createPayout
|
|
460
|
+
reinsurancePool ->> pool: transfer token for payout
|
|
461
|
+
reinsurancePool ->> pool: payoutExecutedCallback()
|
|
462
|
+
pool ->> poolService: processPendingPayout()
|
|
463
|
+
poolService ->> customer: transfer token for payout
|
|
464
|
+
poolService ->> productService: payoutExecuted()
|
|
465
|
+
```
|
|
466
|
+
|
|
395
467
|
### Pool
|
|
396
468
|
|
|
397
|
-
###
|
|
469
|
+
### Distribution
|
|
398
470
|
|
|
399
471
|
### Oracle
|
|
400
472
|
|
|
@@ -3,6 +3,44 @@
|
|
|
3
3
|
"contractName": "Component",
|
|
4
4
|
"sourceName": "contracts/components/Component.sol",
|
|
5
5
|
"abi": [
|
|
6
|
+
{
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"internalType": "address",
|
|
10
|
+
"name": "authority",
|
|
11
|
+
"type": "address"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"name": "AccessManagedInvalidAuthority",
|
|
15
|
+
"type": "error"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"inputs": [
|
|
19
|
+
{
|
|
20
|
+
"internalType": "address",
|
|
21
|
+
"name": "caller",
|
|
22
|
+
"type": "address"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"internalType": "uint32",
|
|
26
|
+
"name": "delay",
|
|
27
|
+
"type": "uint32"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"name": "AccessManagedRequiredDelay",
|
|
31
|
+
"type": "error"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"inputs": [
|
|
35
|
+
{
|
|
36
|
+
"internalType": "address",
|
|
37
|
+
"name": "caller",
|
|
38
|
+
"type": "address"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"name": "AccessManagedUnauthorized",
|
|
42
|
+
"type": "error"
|
|
43
|
+
},
|
|
6
44
|
{
|
|
7
45
|
"inputs": [
|
|
8
46
|
{
|
|
@@ -41,6 +79,33 @@
|
|
|
41
79
|
"name": "ErrorAlreadyLinked",
|
|
42
80
|
"type": "error"
|
|
43
81
|
},
|
|
82
|
+
{
|
|
83
|
+
"inputs": [
|
|
84
|
+
{
|
|
85
|
+
"internalType": "address",
|
|
86
|
+
"name": "caller",
|
|
87
|
+
"type": "address"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"name": "ErrorComponentNotChainNft",
|
|
91
|
+
"type": "error"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"inputs": [
|
|
95
|
+
{
|
|
96
|
+
"internalType": "NftId",
|
|
97
|
+
"name": "instanceNftId",
|
|
98
|
+
"type": "uint96"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"internalType": "address",
|
|
102
|
+
"name": "instance",
|
|
103
|
+
"type": "address"
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"name": "ErrorComponentNotInstance",
|
|
107
|
+
"type": "error"
|
|
108
|
+
},
|
|
44
109
|
{
|
|
45
110
|
"inputs": [
|
|
46
111
|
{
|
|
@@ -84,6 +149,11 @@
|
|
|
84
149
|
"name": "ErrorComponentWalletAddressIsSameAsCurrent",
|
|
85
150
|
"type": "error"
|
|
86
151
|
},
|
|
152
|
+
{
|
|
153
|
+
"inputs": [],
|
|
154
|
+
"name": "ErrorComponentWalletAddressZero",
|
|
155
|
+
"type": "error"
|
|
156
|
+
},
|
|
87
157
|
{
|
|
88
158
|
"inputs": [
|
|
89
159
|
{
|
|
@@ -121,6 +191,11 @@
|
|
|
121
191
|
"name": "ErrorContractNotRegistered",
|
|
122
192
|
"type": "error"
|
|
123
193
|
},
|
|
194
|
+
{
|
|
195
|
+
"inputs": [],
|
|
196
|
+
"name": "ErrorInitialOwnerZero",
|
|
197
|
+
"type": "error"
|
|
198
|
+
},
|
|
124
199
|
{
|
|
125
200
|
"inputs": [
|
|
126
201
|
{
|
|
@@ -201,6 +276,19 @@
|
|
|
201
276
|
"name": "SafeERC20FailedOperation",
|
|
202
277
|
"type": "error"
|
|
203
278
|
},
|
|
279
|
+
{
|
|
280
|
+
"anonymous": false,
|
|
281
|
+
"inputs": [
|
|
282
|
+
{
|
|
283
|
+
"indexed": false,
|
|
284
|
+
"internalType": "address",
|
|
285
|
+
"name": "authority",
|
|
286
|
+
"type": "address"
|
|
287
|
+
}
|
|
288
|
+
],
|
|
289
|
+
"name": "AuthorityUpdated",
|
|
290
|
+
"type": "event"
|
|
291
|
+
},
|
|
204
292
|
{
|
|
205
293
|
"anonymous": false,
|
|
206
294
|
"inputs": [
|
|
@@ -252,6 +340,32 @@
|
|
|
252
340
|
"name": "LogComponentWalletTokensTransferred",
|
|
253
341
|
"type": "event"
|
|
254
342
|
},
|
|
343
|
+
{
|
|
344
|
+
"inputs": [],
|
|
345
|
+
"name": "CONTRACT_LOCATION_V1",
|
|
346
|
+
"outputs": [
|
|
347
|
+
{
|
|
348
|
+
"internalType": "bytes32",
|
|
349
|
+
"name": "",
|
|
350
|
+
"type": "bytes32"
|
|
351
|
+
}
|
|
352
|
+
],
|
|
353
|
+
"stateMutability": "view",
|
|
354
|
+
"type": "function"
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"inputs": [],
|
|
358
|
+
"name": "NFT_OWNABLE_STORAGE_LOCATION_V1",
|
|
359
|
+
"outputs": [
|
|
360
|
+
{
|
|
361
|
+
"internalType": "bytes32",
|
|
362
|
+
"name": "",
|
|
363
|
+
"type": "bytes32"
|
|
364
|
+
}
|
|
365
|
+
],
|
|
366
|
+
"stateMutability": "view",
|
|
367
|
+
"type": "function"
|
|
368
|
+
},
|
|
255
369
|
{
|
|
256
370
|
"inputs": [],
|
|
257
371
|
"name": "REGISTERABLE_LOCATION_V1",
|
|
@@ -265,6 +379,19 @@
|
|
|
265
379
|
"stateMutability": "view",
|
|
266
380
|
"type": "function"
|
|
267
381
|
},
|
|
382
|
+
{
|
|
383
|
+
"inputs": [],
|
|
384
|
+
"name": "authority",
|
|
385
|
+
"outputs": [
|
|
386
|
+
{
|
|
387
|
+
"internalType": "address",
|
|
388
|
+
"name": "",
|
|
389
|
+
"type": "address"
|
|
390
|
+
}
|
|
391
|
+
],
|
|
392
|
+
"stateMutability": "view",
|
|
393
|
+
"type": "function"
|
|
394
|
+
},
|
|
268
395
|
{
|
|
269
396
|
"inputs": [],
|
|
270
397
|
"name": "getInitialInfo",
|
|
@@ -308,13 +435,21 @@
|
|
|
308
435
|
}
|
|
309
436
|
],
|
|
310
437
|
"internalType": "struct IRegistry.ObjectInfo",
|
|
311
|
-
"name": "",
|
|
438
|
+
"name": "info",
|
|
312
439
|
"type": "tuple"
|
|
313
|
-
}
|
|
440
|
+
}
|
|
441
|
+
],
|
|
442
|
+
"stateMutability": "view",
|
|
443
|
+
"type": "function"
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"inputs": [],
|
|
447
|
+
"name": "getInitialOwner",
|
|
448
|
+
"outputs": [
|
|
314
449
|
{
|
|
315
|
-
"internalType": "
|
|
316
|
-
"name": "
|
|
317
|
-
"type": "
|
|
450
|
+
"internalType": "address",
|
|
451
|
+
"name": "",
|
|
452
|
+
"type": "address"
|
|
318
453
|
}
|
|
319
454
|
],
|
|
320
455
|
"stateMutability": "view",
|
|
@@ -333,6 +468,32 @@
|
|
|
333
468
|
"stateMutability": "view",
|
|
334
469
|
"type": "function"
|
|
335
470
|
},
|
|
471
|
+
{
|
|
472
|
+
"inputs": [],
|
|
473
|
+
"name": "getInstanceReader",
|
|
474
|
+
"outputs": [
|
|
475
|
+
{
|
|
476
|
+
"internalType": "contract InstanceReader",
|
|
477
|
+
"name": "reader",
|
|
478
|
+
"type": "address"
|
|
479
|
+
}
|
|
480
|
+
],
|
|
481
|
+
"stateMutability": "view",
|
|
482
|
+
"type": "function"
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
"inputs": [],
|
|
486
|
+
"name": "getInstanceService",
|
|
487
|
+
"outputs": [
|
|
488
|
+
{
|
|
489
|
+
"internalType": "contract IInstanceService",
|
|
490
|
+
"name": "",
|
|
491
|
+
"type": "address"
|
|
492
|
+
}
|
|
493
|
+
],
|
|
494
|
+
"stateMutability": "view",
|
|
495
|
+
"type": "function"
|
|
496
|
+
},
|
|
336
497
|
{
|
|
337
498
|
"inputs": [],
|
|
338
499
|
"name": "getName",
|
|
@@ -343,7 +504,7 @@
|
|
|
343
504
|
"type": "string"
|
|
344
505
|
}
|
|
345
506
|
],
|
|
346
|
-
"stateMutability": "
|
|
507
|
+
"stateMutability": "view",
|
|
347
508
|
"type": "function"
|
|
348
509
|
},
|
|
349
510
|
{
|
|
@@ -385,6 +546,19 @@
|
|
|
385
546
|
"stateMutability": "view",
|
|
386
547
|
"type": "function"
|
|
387
548
|
},
|
|
549
|
+
{
|
|
550
|
+
"inputs": [],
|
|
551
|
+
"name": "getProductService",
|
|
552
|
+
"outputs": [
|
|
553
|
+
{
|
|
554
|
+
"internalType": "contract IProductService",
|
|
555
|
+
"name": "",
|
|
556
|
+
"type": "address"
|
|
557
|
+
}
|
|
558
|
+
],
|
|
559
|
+
"stateMutability": "view",
|
|
560
|
+
"type": "function"
|
|
561
|
+
},
|
|
388
562
|
{
|
|
389
563
|
"inputs": [],
|
|
390
564
|
"name": "getRegistry",
|
|
@@ -398,6 +572,19 @@
|
|
|
398
572
|
"stateMutability": "view",
|
|
399
573
|
"type": "function"
|
|
400
574
|
},
|
|
575
|
+
{
|
|
576
|
+
"inputs": [],
|
|
577
|
+
"name": "getRegistryAddress",
|
|
578
|
+
"outputs": [
|
|
579
|
+
{
|
|
580
|
+
"internalType": "address",
|
|
581
|
+
"name": "",
|
|
582
|
+
"type": "address"
|
|
583
|
+
}
|
|
584
|
+
],
|
|
585
|
+
"stateMutability": "view",
|
|
586
|
+
"type": "function"
|
|
587
|
+
},
|
|
401
588
|
{
|
|
402
589
|
"inputs": [],
|
|
403
590
|
"name": "getToken",
|
|
@@ -424,6 +611,169 @@
|
|
|
424
611
|
"stateMutability": "view",
|
|
425
612
|
"type": "function"
|
|
426
613
|
},
|
|
614
|
+
{
|
|
615
|
+
"inputs": [
|
|
616
|
+
{
|
|
617
|
+
"internalType": "address",
|
|
618
|
+
"name": "registry",
|
|
619
|
+
"type": "address"
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
"internalType": "NftId",
|
|
623
|
+
"name": "instanceNftId",
|
|
624
|
+
"type": "uint96"
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
"internalType": "string",
|
|
628
|
+
"name": "name",
|
|
629
|
+
"type": "string"
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
"internalType": "address",
|
|
633
|
+
"name": "token",
|
|
634
|
+
"type": "address"
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
"internalType": "ObjectType",
|
|
638
|
+
"name": "componentType",
|
|
639
|
+
"type": "uint8"
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
"internalType": "bool",
|
|
643
|
+
"name": "isInterceptor",
|
|
644
|
+
"type": "bool"
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
"internalType": "address",
|
|
648
|
+
"name": "initialOwner",
|
|
649
|
+
"type": "address"
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
"internalType": "bytes",
|
|
653
|
+
"name": "data",
|
|
654
|
+
"type": "bytes"
|
|
655
|
+
}
|
|
656
|
+
],
|
|
657
|
+
"name": "initializeComponent",
|
|
658
|
+
"outputs": [],
|
|
659
|
+
"stateMutability": "nonpayable",
|
|
660
|
+
"type": "function"
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
"inputs": [],
|
|
664
|
+
"name": "initializeERC165",
|
|
665
|
+
"outputs": [],
|
|
666
|
+
"stateMutability": "nonpayable",
|
|
667
|
+
"type": "function"
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
"inputs": [
|
|
671
|
+
{
|
|
672
|
+
"internalType": "address",
|
|
673
|
+
"name": "initialOwner",
|
|
674
|
+
"type": "address"
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
"internalType": "address",
|
|
678
|
+
"name": "registryAddress",
|
|
679
|
+
"type": "address"
|
|
680
|
+
}
|
|
681
|
+
],
|
|
682
|
+
"name": "initializeNftOwnable",
|
|
683
|
+
"outputs": [],
|
|
684
|
+
"stateMutability": "nonpayable",
|
|
685
|
+
"type": "function"
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
"inputs": [
|
|
689
|
+
{
|
|
690
|
+
"internalType": "address",
|
|
691
|
+
"name": "initialOwner",
|
|
692
|
+
"type": "address"
|
|
693
|
+
}
|
|
694
|
+
],
|
|
695
|
+
"name": "initializeOwner",
|
|
696
|
+
"outputs": [],
|
|
697
|
+
"stateMutability": "nonpayable",
|
|
698
|
+
"type": "function"
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
"inputs": [
|
|
702
|
+
{
|
|
703
|
+
"internalType": "address",
|
|
704
|
+
"name": "registryAddress",
|
|
705
|
+
"type": "address"
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
"internalType": "NftId",
|
|
709
|
+
"name": "parentNftId",
|
|
710
|
+
"type": "uint96"
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
"internalType": "ObjectType",
|
|
714
|
+
"name": "objectType",
|
|
715
|
+
"type": "uint8"
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
"internalType": "bool",
|
|
719
|
+
"name": "isInterceptor",
|
|
720
|
+
"type": "bool"
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
"internalType": "address",
|
|
724
|
+
"name": "initialOwner",
|
|
725
|
+
"type": "address"
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"internalType": "bytes",
|
|
729
|
+
"name": "data",
|
|
730
|
+
"type": "bytes"
|
|
731
|
+
}
|
|
732
|
+
],
|
|
733
|
+
"name": "initializeRegisterable",
|
|
734
|
+
"outputs": [],
|
|
735
|
+
"stateMutability": "nonpayable",
|
|
736
|
+
"type": "function"
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
"inputs": [
|
|
740
|
+
{
|
|
741
|
+
"internalType": "address",
|
|
742
|
+
"name": "registryAddress",
|
|
743
|
+
"type": "address"
|
|
744
|
+
}
|
|
745
|
+
],
|
|
746
|
+
"name": "initializeRegistryLinked",
|
|
747
|
+
"outputs": [],
|
|
748
|
+
"stateMutability": "nonpayable",
|
|
749
|
+
"type": "function"
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
"inputs": [],
|
|
753
|
+
"name": "isConsumingScheduledOp",
|
|
754
|
+
"outputs": [
|
|
755
|
+
{
|
|
756
|
+
"internalType": "bytes4",
|
|
757
|
+
"name": "",
|
|
758
|
+
"type": "bytes4"
|
|
759
|
+
}
|
|
760
|
+
],
|
|
761
|
+
"stateMutability": "view",
|
|
762
|
+
"type": "function"
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
"inputs": [],
|
|
766
|
+
"name": "isNftInterceptor",
|
|
767
|
+
"outputs": [
|
|
768
|
+
{
|
|
769
|
+
"internalType": "bool",
|
|
770
|
+
"name": "isInterceptor",
|
|
771
|
+
"type": "bool"
|
|
772
|
+
}
|
|
773
|
+
],
|
|
774
|
+
"stateMutability": "view",
|
|
775
|
+
"type": "function"
|
|
776
|
+
},
|
|
427
777
|
{
|
|
428
778
|
"inputs": [],
|
|
429
779
|
"name": "linkToRegisteredNftId",
|
|
@@ -438,6 +788,55 @@
|
|
|
438
788
|
"stateMutability": "nonpayable",
|
|
439
789
|
"type": "function"
|
|
440
790
|
},
|
|
791
|
+
{
|
|
792
|
+
"inputs": [
|
|
793
|
+
{
|
|
794
|
+
"internalType": "address",
|
|
795
|
+
"name": "from",
|
|
796
|
+
"type": "address"
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
"internalType": "address",
|
|
800
|
+
"name": "to",
|
|
801
|
+
"type": "address"
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
"internalType": "uint256",
|
|
805
|
+
"name": "tokenId",
|
|
806
|
+
"type": "uint256"
|
|
807
|
+
}
|
|
808
|
+
],
|
|
809
|
+
"name": "nftTransferFrom",
|
|
810
|
+
"outputs": [],
|
|
811
|
+
"stateMutability": "nonpayable",
|
|
812
|
+
"type": "function"
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
"inputs": [
|
|
816
|
+
{
|
|
817
|
+
"internalType": "bytes4",
|
|
818
|
+
"name": "interfaceId",
|
|
819
|
+
"type": "bytes4"
|
|
820
|
+
}
|
|
821
|
+
],
|
|
822
|
+
"name": "registerInterface",
|
|
823
|
+
"outputs": [],
|
|
824
|
+
"stateMutability": "nonpayable",
|
|
825
|
+
"type": "function"
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
"inputs": [
|
|
829
|
+
{
|
|
830
|
+
"internalType": "address",
|
|
831
|
+
"name": "newAuthority",
|
|
832
|
+
"type": "address"
|
|
833
|
+
}
|
|
834
|
+
],
|
|
835
|
+
"name": "setAuthority",
|
|
836
|
+
"outputs": [],
|
|
837
|
+
"stateMutability": "nonpayable",
|
|
838
|
+
"type": "function"
|
|
839
|
+
},
|
|
441
840
|
{
|
|
442
841
|
"inputs": [
|
|
443
842
|
{
|