@etherisc/gif-next 0.0.2-e922e07-736 → 0.0.2-e9a637d-547
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +0 -71
- package/artifacts/contracts/components/Component.sol/Component.dbg.json +1 -1
- package/artifacts/contracts/components/Component.sol/Component.json +68 -0
- package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/components/Distribution.sol/Distribution.json +68 -0
- package/artifacts/contracts/components/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IComponent.sol/IComponent.json +158 -0
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +158 -0
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +184 -149
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +158 -0
- package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/components/Pool.sol/Pool.json +114 -189
- package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/components/Product.sol/Product.json +68 -0
- package/artifacts/contracts/instance/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.dbg.json +4 -0
- package/artifacts/contracts/instance/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.json +1206 -0
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +1 -1
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +64 -50
- package/artifacts/contracts/instance/Cloneable.sol/Cloneable.dbg.json +1 -1
- package/artifacts/contracts/instance/Cloneable.sol/Cloneable.json +5 -0
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +214 -2063
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +196 -51
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +363 -2832
- package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.json +491 -127
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +101 -167
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +333 -171
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +75 -23
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +4 -0
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +2677 -0
- package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.dbg.json +1 -1
- package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.json +8 -13
- package/artifacts/contracts/instance/base/ComponentService.sol/ComponentService.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ComponentService.sol/ComponentService.json +85 -30
- 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 +40 -10
- package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +1 -1
- package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +36 -11
- package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IAccess.sol/IAccess.json +56 -73
- package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IComponents.sol/IComponents.dbg.json +4 -0
- package/artifacts/contracts/instance/module/IComponents.sol/IComponents.json +10 -0
- 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 +1 -1
- package/artifacts/contracts/instance/service/ApplicationService.sol/ApplicationService.json +124 -53
- package/artifacts/contracts/instance/service/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/ApplicationServiceManager.sol/ApplicationServiceManager.json +21 -13
- package/artifacts/contracts/instance/service/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/BundleService.sol/BundleService.json +384 -249
- package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.json +74 -14
- package/artifacts/contracts/instance/service/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/ClaimService.sol/ClaimService.json +104 -41
- package/artifacts/contracts/instance/service/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/ClaimServiceManager.sol/ClaimServiceManager.json +11 -7
- package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +195 -121
- package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.json +51 -47
- package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.json +80 -14
- package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.json +212 -186
- package/artifacts/contracts/instance/service/IClaimService.sol/IClaimService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IClaimService.sol/IClaimService.json +80 -14
- package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +101 -24
- package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.json +90 -24
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +511 -14
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +80 -14
- package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.json +136 -65
- package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.json +27 -19
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +561 -51
- package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.json +24 -12
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +114 -51
- package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.json +16 -12
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +15 -2
- 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/IRegistryService.sol/IRegistryService.json +0 -24
- package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
- package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.json +18 -0
- package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.json +31 -12
- 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 +17 -36
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +7 -7
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +23 -11
- 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/ContractDeployerLib.sol/ContractDeployerLib.dbg.json +1 -1
- package/artifacts/contracts/shared/ERC165.sol/ERC165.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/IService.sol/IService.json +80 -14
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.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 +2 -2
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +2 -2
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +2 -2
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +2 -2
- package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
- package/artifacts/contracts/shared/Service.sol/Service.json +86 -15
- 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/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/test/TestFee.sol/TestFee.dbg.json +1 -1
- package/artifacts/contracts/test/TestFee.sol/TestFee.json +2 -2
- package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
- package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +2 -2
- package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
- package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +6 -6
- package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
- package/artifacts/contracts/test/TestService.sol/TestService.json +101 -26
- 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/TestVersion.sol/TestVersion.json +2 -2
- package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
- package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +2 -2
- 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/Amount.sol/AmountLib.dbg.json +4 -0
- package/artifacts/contracts/types/Amount.sol/AmountLib.json +161 -0
- package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
- package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.json +2 -2
- package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/ClaimId.sol/ClaimIdLib.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/Fee.sol/FeeLib.json +40 -9
- 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 +17 -4
- 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/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
- 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/Seconds.sol/SecondsLib.dbg.json +1 -1
- package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/StateId.sol/StateIdLib.json +2 -2
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +2 -2
- package/artifacts/contracts/types/UFixed.sol/MathLib.dbg.json +1 -1
- package/artifacts/contracts/types/UFixed.sol/MathLib.json +2 -2
- package/artifacts/contracts/types/UFixed.sol/UFixedLib.dbg.json +1 -1
- package/artifacts/contracts/types/UFixed.sol/UFixedLib.json +2 -2
- package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
- package/artifacts/contracts/types/Version.sol/VersionLib.json +2 -2
- package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
- package/artifacts/contracts/types/Version.sol/VersionPartLib.json +2 -2
- package/contracts/components/Component.sol +42 -10
- package/contracts/components/IComponent.sol +9 -1
- package/contracts/components/IPoolComponent.sol +5 -43
- package/contracts/components/Pool.sol +47 -122
- package/contracts/components/Product.sol +4 -0
- package/contracts/instance/AccessManagerUpgradeableInitializeable.sol +13 -0
- package/contracts/instance/BundleManager.sol +6 -4
- package/contracts/instance/Cloneable.sol +7 -2
- package/contracts/instance/IInstance.sol +23 -55
- package/contracts/instance/IInstanceService.sol +31 -6
- package/contracts/instance/Instance.sol +90 -182
- package/contracts/instance/InstanceAccessManager.sol +402 -159
- package/contracts/instance/InstanceReader.sol +12 -12
- package/contracts/instance/InstanceService.sol +287 -246
- package/contracts/instance/InstanceStore.sol +219 -0
- package/contracts/instance/ObjectManager.sol +6 -8
- package/contracts/instance/base/ComponentService.sol +17 -30
- package/contracts/instance/base/KeyValueStore.sol +13 -5
- package/contracts/instance/base/Lifecycle.sol +11 -2
- package/contracts/instance/module/IAccess.sol +21 -14
- package/contracts/instance/module/IBundle.sol +6 -4
- package/contracts/instance/module/IComponents.sol +41 -0
- package/contracts/instance/module/ISetup.sol +3 -16
- package/contracts/instance/service/ApplicationService.sol +18 -16
- package/contracts/instance/service/BundleService.sol +213 -81
- package/contracts/instance/service/ClaimService.sol +3 -3
- package/contracts/instance/service/DistributionService.sol +57 -70
- package/contracts/instance/service/IBundleService.sol +63 -25
- package/contracts/instance/service/IDistributionService.sol +1 -0
- package/contracts/instance/service/IPoolService.sol +82 -3
- package/contracts/instance/service/PolicyService.sol +68 -100
- package/contracts/instance/service/PoolService.sol +214 -20
- package/contracts/instance/service/ProductService.sol +34 -58
- package/contracts/registry/ChainNft.sol +8 -0
- package/contracts/registry/IRegistry.sol +2 -0
- package/contracts/registry/IRegistryService.sol +4 -3
- package/contracts/registry/ITransferInterceptor.sol +1 -0
- package/contracts/registry/Registry.sol +23 -20
- package/contracts/registry/RegistryService.sol +10 -11
- package/contracts/registry/ReleaseManager.sol +20 -18
- package/contracts/shared/IService.sol +4 -6
- package/contracts/shared/Service.sol +21 -7
- package/contracts/shared/TokenHandler.sol +11 -5
- package/contracts/test/TestService.sol +1 -1
- package/contracts/types/Amount.sol +60 -0
- package/contracts/types/Blocknumber.sol +1 -0
- package/contracts/types/Fee.sol +13 -5
- package/contracts/types/NftId.sol +8 -0
- package/contracts/types/ObjectType.sol +1 -0
- package/contracts/types/RoleId.sol +6 -4
- package/contracts/types/StateId.sol +1 -0
- package/contracts/types/Timestamp.sol +1 -0
- package/contracts/types/UFixed.sol +1 -0
- package/contracts/types/Version.sol +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
@@ -1,18 +1,6 @@
|
|
1
1
|
# GIF-Next (Generic Insurance Framework, next version)
|
2
2
|
|
3
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
|
-
|
16
4
|
## Add OpenZeppelin V5 Dependencies
|
17
5
|
|
18
6
|
```shell
|
@@ -405,65 +393,6 @@ Intercepting property
|
|
405
393
|
|
406
394
|
### Product
|
407
395
|
|
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 claimService
|
424
|
-
participant poolService
|
425
|
-
participant pool
|
426
|
-
product->>claimService: createPayout()
|
427
|
-
claimService ->> poolService: requestPayout()
|
428
|
-
poolService -->> pool: verifyPayout() *
|
429
|
-
poolService ->> poolService: processPayout()
|
430
|
-
poolService ->> customer: transfer token for payout
|
431
|
-
poolService ->> claimService: 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 claimService
|
451
|
-
participant poolService
|
452
|
-
participant pool
|
453
|
-
pool ->> reinsuranceProduct: applyForPolicy()
|
454
|
-
product->>claimService: createPayout()
|
455
|
-
claimService ->> 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 ->> claimService: payoutExecuted()
|
465
|
-
```
|
466
|
-
|
467
396
|
### Pool
|
468
397
|
|
469
398
|
### Distribution
|
@@ -334,6 +334,56 @@
|
|
334
334
|
"stateMutability": "view",
|
335
335
|
"type": "function"
|
336
336
|
},
|
337
|
+
{
|
338
|
+
"inputs": [],
|
339
|
+
"name": "getComponentInfo",
|
340
|
+
"outputs": [
|
341
|
+
{
|
342
|
+
"components": [
|
343
|
+
{
|
344
|
+
"internalType": "string",
|
345
|
+
"name": "name",
|
346
|
+
"type": "string"
|
347
|
+
},
|
348
|
+
{
|
349
|
+
"internalType": "contract IERC20Metadata",
|
350
|
+
"name": "token",
|
351
|
+
"type": "address"
|
352
|
+
},
|
353
|
+
{
|
354
|
+
"internalType": "contract TokenHandler",
|
355
|
+
"name": "tokenHandler",
|
356
|
+
"type": "address"
|
357
|
+
},
|
358
|
+
{
|
359
|
+
"internalType": "address",
|
360
|
+
"name": "wallet",
|
361
|
+
"type": "address"
|
362
|
+
},
|
363
|
+
{
|
364
|
+
"internalType": "Amount",
|
365
|
+
"name": "balanceAmount",
|
366
|
+
"type": "uint96"
|
367
|
+
},
|
368
|
+
{
|
369
|
+
"internalType": "Amount",
|
370
|
+
"name": "feeAmount",
|
371
|
+
"type": "uint96"
|
372
|
+
},
|
373
|
+
{
|
374
|
+
"internalType": "bytes",
|
375
|
+
"name": "data",
|
376
|
+
"type": "bytes"
|
377
|
+
}
|
378
|
+
],
|
379
|
+
"internalType": "struct IComponents.ComponentInfo",
|
380
|
+
"name": "info",
|
381
|
+
"type": "tuple"
|
382
|
+
}
|
383
|
+
],
|
384
|
+
"stateMutability": "view",
|
385
|
+
"type": "function"
|
386
|
+
},
|
337
387
|
{
|
338
388
|
"inputs": [],
|
339
389
|
"name": "getInitialInfo",
|
@@ -665,6 +715,24 @@
|
|
665
715
|
"stateMutability": "nonpayable",
|
666
716
|
"type": "function"
|
667
717
|
},
|
718
|
+
{
|
719
|
+
"inputs": [
|
720
|
+
{
|
721
|
+
"internalType": "address",
|
722
|
+
"name": "to",
|
723
|
+
"type": "address"
|
724
|
+
},
|
725
|
+
{
|
726
|
+
"internalType": "uint256",
|
727
|
+
"name": "tokenId",
|
728
|
+
"type": "uint256"
|
729
|
+
}
|
730
|
+
],
|
731
|
+
"name": "nftMint",
|
732
|
+
"outputs": [],
|
733
|
+
"stateMutability": "nonpayable",
|
734
|
+
"type": "function"
|
735
|
+
},
|
668
736
|
{
|
669
737
|
"inputs": [
|
670
738
|
{
|
@@ -478,6 +478,56 @@
|
|
478
478
|
"stateMutability": "nonpayable",
|
479
479
|
"type": "function"
|
480
480
|
},
|
481
|
+
{
|
482
|
+
"inputs": [],
|
483
|
+
"name": "getComponentInfo",
|
484
|
+
"outputs": [
|
485
|
+
{
|
486
|
+
"components": [
|
487
|
+
{
|
488
|
+
"internalType": "string",
|
489
|
+
"name": "name",
|
490
|
+
"type": "string"
|
491
|
+
},
|
492
|
+
{
|
493
|
+
"internalType": "contract IERC20Metadata",
|
494
|
+
"name": "token",
|
495
|
+
"type": "address"
|
496
|
+
},
|
497
|
+
{
|
498
|
+
"internalType": "contract TokenHandler",
|
499
|
+
"name": "tokenHandler",
|
500
|
+
"type": "address"
|
501
|
+
},
|
502
|
+
{
|
503
|
+
"internalType": "address",
|
504
|
+
"name": "wallet",
|
505
|
+
"type": "address"
|
506
|
+
},
|
507
|
+
{
|
508
|
+
"internalType": "Amount",
|
509
|
+
"name": "balanceAmount",
|
510
|
+
"type": "uint96"
|
511
|
+
},
|
512
|
+
{
|
513
|
+
"internalType": "Amount",
|
514
|
+
"name": "feeAmount",
|
515
|
+
"type": "uint96"
|
516
|
+
},
|
517
|
+
{
|
518
|
+
"internalType": "bytes",
|
519
|
+
"name": "data",
|
520
|
+
"type": "bytes"
|
521
|
+
}
|
522
|
+
],
|
523
|
+
"internalType": "struct IComponents.ComponentInfo",
|
524
|
+
"name": "info",
|
525
|
+
"type": "tuple"
|
526
|
+
}
|
527
|
+
],
|
528
|
+
"stateMutability": "view",
|
529
|
+
"type": "function"
|
530
|
+
},
|
481
531
|
{
|
482
532
|
"inputs": [
|
483
533
|
{
|
@@ -1069,6 +1119,24 @@
|
|
1069
1119
|
"stateMutability": "nonpayable",
|
1070
1120
|
"type": "function"
|
1071
1121
|
},
|
1122
|
+
{
|
1123
|
+
"inputs": [
|
1124
|
+
{
|
1125
|
+
"internalType": "address",
|
1126
|
+
"name": "to",
|
1127
|
+
"type": "address"
|
1128
|
+
},
|
1129
|
+
{
|
1130
|
+
"internalType": "uint256",
|
1131
|
+
"name": "tokenId",
|
1132
|
+
"type": "uint256"
|
1133
|
+
}
|
1134
|
+
],
|
1135
|
+
"name": "nftMint",
|
1136
|
+
"outputs": [],
|
1137
|
+
"stateMutability": "nonpayable",
|
1138
|
+
"type": "function"
|
1139
|
+
},
|
1072
1140
|
{
|
1073
1141
|
"inputs": [
|
1074
1142
|
{
|
@@ -3,6 +3,44 @@
|
|
3
3
|
"contractName": "IComponent",
|
4
4
|
"sourceName": "contracts/components/IComponent.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
|
{
|
@@ -126,6 +164,19 @@
|
|
126
164
|
"name": "ErrorNotRegistry",
|
127
165
|
"type": "error"
|
128
166
|
},
|
167
|
+
{
|
168
|
+
"anonymous": false,
|
169
|
+
"inputs": [
|
170
|
+
{
|
171
|
+
"indexed": false,
|
172
|
+
"internalType": "address",
|
173
|
+
"name": "authority",
|
174
|
+
"type": "address"
|
175
|
+
}
|
176
|
+
],
|
177
|
+
"name": "AuthorityUpdated",
|
178
|
+
"type": "event"
|
179
|
+
},
|
129
180
|
{
|
130
181
|
"anonymous": false,
|
131
182
|
"inputs": [
|
@@ -170,6 +221,69 @@
|
|
170
221
|
"name": "LogComponentWalletTokensTransferred",
|
171
222
|
"type": "event"
|
172
223
|
},
|
224
|
+
{
|
225
|
+
"inputs": [],
|
226
|
+
"name": "authority",
|
227
|
+
"outputs": [
|
228
|
+
{
|
229
|
+
"internalType": "address",
|
230
|
+
"name": "",
|
231
|
+
"type": "address"
|
232
|
+
}
|
233
|
+
],
|
234
|
+
"stateMutability": "view",
|
235
|
+
"type": "function"
|
236
|
+
},
|
237
|
+
{
|
238
|
+
"inputs": [],
|
239
|
+
"name": "getComponentInfo",
|
240
|
+
"outputs": [
|
241
|
+
{
|
242
|
+
"components": [
|
243
|
+
{
|
244
|
+
"internalType": "string",
|
245
|
+
"name": "name",
|
246
|
+
"type": "string"
|
247
|
+
},
|
248
|
+
{
|
249
|
+
"internalType": "contract IERC20Metadata",
|
250
|
+
"name": "token",
|
251
|
+
"type": "address"
|
252
|
+
},
|
253
|
+
{
|
254
|
+
"internalType": "contract TokenHandler",
|
255
|
+
"name": "tokenHandler",
|
256
|
+
"type": "address"
|
257
|
+
},
|
258
|
+
{
|
259
|
+
"internalType": "address",
|
260
|
+
"name": "wallet",
|
261
|
+
"type": "address"
|
262
|
+
},
|
263
|
+
{
|
264
|
+
"internalType": "Amount",
|
265
|
+
"name": "balanceAmount",
|
266
|
+
"type": "uint96"
|
267
|
+
},
|
268
|
+
{
|
269
|
+
"internalType": "Amount",
|
270
|
+
"name": "feeAmount",
|
271
|
+
"type": "uint96"
|
272
|
+
},
|
273
|
+
{
|
274
|
+
"internalType": "bytes",
|
275
|
+
"name": "data",
|
276
|
+
"type": "bytes"
|
277
|
+
}
|
278
|
+
],
|
279
|
+
"internalType": "struct IComponents.ComponentInfo",
|
280
|
+
"name": "info",
|
281
|
+
"type": "tuple"
|
282
|
+
}
|
283
|
+
],
|
284
|
+
"stateMutability": "view",
|
285
|
+
"type": "function"
|
286
|
+
},
|
173
287
|
{
|
174
288
|
"inputs": [],
|
175
289
|
"name": "getInitialInfo",
|
@@ -337,6 +451,19 @@
|
|
337
451
|
"stateMutability": "view",
|
338
452
|
"type": "function"
|
339
453
|
},
|
454
|
+
{
|
455
|
+
"inputs": [],
|
456
|
+
"name": "isConsumingScheduledOp",
|
457
|
+
"outputs": [
|
458
|
+
{
|
459
|
+
"internalType": "bytes4",
|
460
|
+
"name": "",
|
461
|
+
"type": "bytes4"
|
462
|
+
}
|
463
|
+
],
|
464
|
+
"stateMutability": "view",
|
465
|
+
"type": "function"
|
466
|
+
},
|
340
467
|
{
|
341
468
|
"inputs": [],
|
342
469
|
"name": "isNftInterceptor",
|
@@ -364,6 +491,24 @@
|
|
364
491
|
"stateMutability": "nonpayable",
|
365
492
|
"type": "function"
|
366
493
|
},
|
494
|
+
{
|
495
|
+
"inputs": [
|
496
|
+
{
|
497
|
+
"internalType": "address",
|
498
|
+
"name": "to",
|
499
|
+
"type": "address"
|
500
|
+
},
|
501
|
+
{
|
502
|
+
"internalType": "uint256",
|
503
|
+
"name": "tokenId",
|
504
|
+
"type": "uint256"
|
505
|
+
}
|
506
|
+
],
|
507
|
+
"name": "nftMint",
|
508
|
+
"outputs": [],
|
509
|
+
"stateMutability": "nonpayable",
|
510
|
+
"type": "function"
|
511
|
+
},
|
367
512
|
{
|
368
513
|
"inputs": [
|
369
514
|
{
|
@@ -387,6 +532,19 @@
|
|
387
532
|
"stateMutability": "nonpayable",
|
388
533
|
"type": "function"
|
389
534
|
},
|
535
|
+
{
|
536
|
+
"inputs": [
|
537
|
+
{
|
538
|
+
"internalType": "address",
|
539
|
+
"name": "",
|
540
|
+
"type": "address"
|
541
|
+
}
|
542
|
+
],
|
543
|
+
"name": "setAuthority",
|
544
|
+
"outputs": [],
|
545
|
+
"stateMutability": "nonpayable",
|
546
|
+
"type": "function"
|
547
|
+
},
|
390
548
|
{
|
391
549
|
"inputs": [
|
392
550
|
{
|
package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json
CHANGED
@@ -3,6 +3,44 @@
|
|
3
3
|
"contractName": "IDistributionComponent",
|
4
4
|
"sourceName": "contracts/components/IDistributionComponent.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
|
{
|
@@ -126,6 +164,19 @@
|
|
126
164
|
"name": "ErrorNotRegistry",
|
127
165
|
"type": "error"
|
128
166
|
},
|
167
|
+
{
|
168
|
+
"anonymous": false,
|
169
|
+
"inputs": [
|
170
|
+
{
|
171
|
+
"indexed": false,
|
172
|
+
"internalType": "address",
|
173
|
+
"name": "authority",
|
174
|
+
"type": "address"
|
175
|
+
}
|
176
|
+
],
|
177
|
+
"name": "AuthorityUpdated",
|
178
|
+
"type": "event"
|
179
|
+
},
|
129
180
|
{
|
130
181
|
"anonymous": false,
|
131
182
|
"inputs": [
|
@@ -189,6 +240,19 @@
|
|
189
240
|
"name": "LogDistributorUpdated",
|
190
241
|
"type": "event"
|
191
242
|
},
|
243
|
+
{
|
244
|
+
"inputs": [],
|
245
|
+
"name": "authority",
|
246
|
+
"outputs": [
|
247
|
+
{
|
248
|
+
"internalType": "address",
|
249
|
+
"name": "",
|
250
|
+
"type": "address"
|
251
|
+
}
|
252
|
+
],
|
253
|
+
"stateMutability": "view",
|
254
|
+
"type": "function"
|
255
|
+
},
|
192
256
|
{
|
193
257
|
"inputs": [
|
194
258
|
{
|
@@ -301,6 +365,56 @@
|
|
301
365
|
"stateMutability": "nonpayable",
|
302
366
|
"type": "function"
|
303
367
|
},
|
368
|
+
{
|
369
|
+
"inputs": [],
|
370
|
+
"name": "getComponentInfo",
|
371
|
+
"outputs": [
|
372
|
+
{
|
373
|
+
"components": [
|
374
|
+
{
|
375
|
+
"internalType": "string",
|
376
|
+
"name": "name",
|
377
|
+
"type": "string"
|
378
|
+
},
|
379
|
+
{
|
380
|
+
"internalType": "contract IERC20Metadata",
|
381
|
+
"name": "token",
|
382
|
+
"type": "address"
|
383
|
+
},
|
384
|
+
{
|
385
|
+
"internalType": "contract TokenHandler",
|
386
|
+
"name": "tokenHandler",
|
387
|
+
"type": "address"
|
388
|
+
},
|
389
|
+
{
|
390
|
+
"internalType": "address",
|
391
|
+
"name": "wallet",
|
392
|
+
"type": "address"
|
393
|
+
},
|
394
|
+
{
|
395
|
+
"internalType": "Amount",
|
396
|
+
"name": "balanceAmount",
|
397
|
+
"type": "uint96"
|
398
|
+
},
|
399
|
+
{
|
400
|
+
"internalType": "Amount",
|
401
|
+
"name": "feeAmount",
|
402
|
+
"type": "uint96"
|
403
|
+
},
|
404
|
+
{
|
405
|
+
"internalType": "bytes",
|
406
|
+
"name": "data",
|
407
|
+
"type": "bytes"
|
408
|
+
}
|
409
|
+
],
|
410
|
+
"internalType": "struct IComponents.ComponentInfo",
|
411
|
+
"name": "info",
|
412
|
+
"type": "tuple"
|
413
|
+
}
|
414
|
+
],
|
415
|
+
"stateMutability": "view",
|
416
|
+
"type": "function"
|
417
|
+
},
|
304
418
|
{
|
305
419
|
"inputs": [
|
306
420
|
{
|
@@ -605,6 +719,19 @@
|
|
605
719
|
"stateMutability": "view",
|
606
720
|
"type": "function"
|
607
721
|
},
|
722
|
+
{
|
723
|
+
"inputs": [],
|
724
|
+
"name": "isConsumingScheduledOp",
|
725
|
+
"outputs": [
|
726
|
+
{
|
727
|
+
"internalType": "bytes4",
|
728
|
+
"name": "",
|
729
|
+
"type": "bytes4"
|
730
|
+
}
|
731
|
+
],
|
732
|
+
"stateMutability": "view",
|
733
|
+
"type": "function"
|
734
|
+
},
|
608
735
|
{
|
609
736
|
"inputs": [],
|
610
737
|
"name": "isNftInterceptor",
|
@@ -645,6 +772,24 @@
|
|
645
772
|
"stateMutability": "nonpayable",
|
646
773
|
"type": "function"
|
647
774
|
},
|
775
|
+
{
|
776
|
+
"inputs": [
|
777
|
+
{
|
778
|
+
"internalType": "address",
|
779
|
+
"name": "to",
|
780
|
+
"type": "address"
|
781
|
+
},
|
782
|
+
{
|
783
|
+
"internalType": "uint256",
|
784
|
+
"name": "tokenId",
|
785
|
+
"type": "uint256"
|
786
|
+
}
|
787
|
+
],
|
788
|
+
"name": "nftMint",
|
789
|
+
"outputs": [],
|
790
|
+
"stateMutability": "nonpayable",
|
791
|
+
"type": "function"
|
792
|
+
},
|
648
793
|
{
|
649
794
|
"inputs": [
|
650
795
|
{
|
@@ -686,6 +831,19 @@
|
|
686
831
|
"stateMutability": "nonpayable",
|
687
832
|
"type": "function"
|
688
833
|
},
|
834
|
+
{
|
835
|
+
"inputs": [
|
836
|
+
{
|
837
|
+
"internalType": "address",
|
838
|
+
"name": "",
|
839
|
+
"type": "address"
|
840
|
+
}
|
841
|
+
],
|
842
|
+
"name": "setAuthority",
|
843
|
+
"outputs": [],
|
844
|
+
"stateMutability": "nonpayable",
|
845
|
+
"type": "function"
|
846
|
+
},
|
689
847
|
{
|
690
848
|
"inputs": [
|
691
849
|
{
|