@etherisc/gif-next 0.0.2-2af39ab-356 → 0.0.2-2b1c495-461
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 +6 -83
- package/artifacts/contracts/components/Component.sol/Component.dbg.json +1 -1
- package/artifacts/contracts/components/Component.sol/Component.json +28 -0
- package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/components/Distribution.sol/Distribution.json +24 -14
- package/artifacts/contracts/components/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IComponent.sol/IComponent.json +118 -0
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +110 -10
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +128 -0
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +118 -0
- package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/components/Pool.sol/Pool.json +38 -0
- package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/components/Product.sol/Product.json +28 -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 +36 -41
- 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 +103 -16
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +175 -51
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +184 -86
- package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.json +472 -126
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +56 -51
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +304 -171
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +71 -23
- 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 +2 -2
- package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +1 -1
- 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 +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 +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 +298 -160
- 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 +356 -111
- package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.json +57 -45
- 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 +142 -113
- 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 +250 -18
- package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.json +106 -19
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +430 -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 +152 -60
- 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 +474 -53
- package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.json +21 -13
- 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/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
- 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/TestVersionable.sol/TestVersionable.dbg.json +1 -1
- 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/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/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/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
- 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/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 +23 -4
- package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +1 -1
- 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/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 +22 -10
- package/contracts/components/Distribution.sol +0 -13
- package/contracts/components/IComponent.sol +3 -1
- package/contracts/components/IDistributionComponent.sol +0 -8
- package/contracts/components/Pool.sol +11 -7
- package/contracts/instance/AccessManagerUpgradeableInitializeable.sol +13 -0
- package/contracts/instance/Cloneable.sol +7 -2
- package/contracts/instance/IInstance.sol +13 -8
- package/contracts/instance/IInstanceService.sol +18 -6
- package/contracts/instance/Instance.sol +38 -5
- package/contracts/instance/InstanceAccessManager.sol +388 -158
- package/contracts/instance/InstanceReader.sol +4 -7
- package/contracts/instance/InstanceService.sol +182 -177
- package/contracts/instance/ObjectManager.sol +6 -8
- package/contracts/instance/base/ComponentService.sol +17 -30
- package/contracts/instance/base/KeyValueStore.sol +8 -3
- package/contracts/instance/module/IAccess.sol +21 -14
- package/contracts/instance/module/IBundle.sol +6 -4
- package/contracts/instance/module/IComponents.sol +6 -0
- package/contracts/instance/module/ISetup.sol +1 -31
- package/contracts/instance/service/ApplicationService.sol +9 -9
- package/contracts/instance/service/BundleService.sol +155 -60
- package/contracts/instance/service/ClaimService.sol +3 -3
- package/contracts/instance/service/DistributionService.sol +118 -77
- package/contracts/instance/service/IBundleService.sol +53 -22
- package/contracts/instance/service/IDistributionService.sol +14 -1
- package/contracts/instance/service/IPolicyService.sol +2 -0
- package/contracts/instance/service/IPoolService.sol +65 -1
- package/contracts/instance/service/PolicyService.sol +96 -144
- package/contracts/instance/service/PoolService.sol +153 -13
- package/contracts/instance/service/ProductService.sol +30 -53
- 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/test/TestService.sol +1 -1
- package/contracts/types/Amount.sol +60 -0
- package/contracts/types/Fee.sol +12 -5
- package/contracts/types/Referral.sol +4 -0
- package/contracts/types/RoleId.sol +6 -4
- 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
|
|
@@ -40,6 +28,10 @@ This repository uses submodules. To checkout or update to the latest submodules,
|
|
|
40
28
|
git submodule update --recursive
|
|
41
29
|
```
|
|
42
30
|
|
|
31
|
+
## Example components
|
|
32
|
+
|
|
33
|
+
A (very early) example of a product and a pool can be found in the [gif-next-sandbox repository](https://github.com/etherisc/gif-next-sandbox).
|
|
34
|
+
|
|
43
35
|
## Hardhat
|
|
44
36
|
|
|
45
37
|
### NPM Commands
|
|
@@ -232,17 +224,7 @@ https://book.getfoundry.sh/reference/
|
|
|
232
224
|
|
|
233
225
|
## Style Guide
|
|
234
226
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
Documentation of the code should be written inline using [NatSpec](https://docs.soliditylang.org/en/latest/natspec-format.html).
|
|
238
|
-
|
|
239
|
-
### Naming conventions
|
|
240
|
-
|
|
241
|
-
Additionally, we use the following naming conventions:
|
|
242
|
-
|
|
243
|
-
- Function arguments and return types: If using custom data types, make the name include the type by appending the Type to the argument name, e.g. `function getInfo(NftId bundleNftId)` instead of `function getInfo(NftId bundleId)`. Background: Custom data types are lost when using the ABI or Typescript binding classes (e.g. instead of `NftID` a `uint96` is used), so the type needs to be included in the name to make it clear what the argument is without having to look at the documentation or checking the solidity source code.
|
|
244
|
-
- When naming a field or an attribute `id` and the context is not clear, call it `nftId` instead so its clear what type if id it is as there will be multiple ids for different kind of objects. Example: if you the function has a bundle nft id and a policy nft id as arguments, call them `bundleNftId` and `policyNftId` instead of `id` and `policyId`. In case of doubt, be a bit more verbose for the sake of clarity.
|
|
245
|
-
- When naming things, remember that the code will likely be used in Javascript/Typescript as well, so avoid names that are reserved in Javascript/Typescript. A list of reserved words in Javascript can be found [here](https://www.w3schools.com/js/js_reserved.asp) and a list of reserved words in Typescript can be found [here](https://www.tektutorialshub.com/typescript/identifiers-keywords-in-typescript/).
|
|
227
|
+
Please see https://docs.etherisc.com/gif-next/3.x/ for style guide and general coding rules.
|
|
246
228
|
|
|
247
229
|
### Automatic code formatting
|
|
248
230
|
|
|
@@ -257,7 +239,7 @@ We use solhint to lint the code.
|
|
|
257
239
|
To execute linting run `npm run lint`.
|
|
258
240
|
|
|
259
241
|
|
|
260
|
-
### Adding Brownie (Legacy)
|
|
242
|
+
### Adding Brownie (Legacy - don't do that :wink: )
|
|
261
243
|
|
|
262
244
|
python3 is already installed
|
|
263
245
|
|
|
@@ -405,65 +387,6 @@ Intercepting property
|
|
|
405
387
|
|
|
406
388
|
### Product
|
|
407
389
|
|
|
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
390
|
### Pool
|
|
468
391
|
|
|
469
392
|
### Distribution
|
|
@@ -360,6 +360,16 @@
|
|
|
360
360
|
"name": "wallet",
|
|
361
361
|
"type": "address"
|
|
362
362
|
},
|
|
363
|
+
{
|
|
364
|
+
"internalType": "Amount",
|
|
365
|
+
"name": "balanceAmount",
|
|
366
|
+
"type": "uint96"
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"internalType": "Amount",
|
|
370
|
+
"name": "feeAmount",
|
|
371
|
+
"type": "uint96"
|
|
372
|
+
},
|
|
363
373
|
{
|
|
364
374
|
"internalType": "bytes",
|
|
365
375
|
"name": "data",
|
|
@@ -705,6 +715,24 @@
|
|
|
705
715
|
"stateMutability": "nonpayable",
|
|
706
716
|
"type": "function"
|
|
707
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
|
+
},
|
|
708
736
|
{
|
|
709
737
|
"inputs": [
|
|
710
738
|
{
|
|
@@ -504,6 +504,16 @@
|
|
|
504
504
|
"name": "wallet",
|
|
505
505
|
"type": "address"
|
|
506
506
|
},
|
|
507
|
+
{
|
|
508
|
+
"internalType": "Amount",
|
|
509
|
+
"name": "balanceAmount",
|
|
510
|
+
"type": "uint96"
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"internalType": "Amount",
|
|
514
|
+
"name": "feeAmount",
|
|
515
|
+
"type": "uint96"
|
|
516
|
+
},
|
|
507
517
|
{
|
|
508
518
|
"internalType": "bytes",
|
|
509
519
|
"name": "data",
|
|
@@ -803,7 +813,7 @@
|
|
|
803
813
|
},
|
|
804
814
|
{
|
|
805
815
|
"internalType": "uint256",
|
|
806
|
-
"name": "
|
|
816
|
+
"name": "sumDistributionOwnerFees",
|
|
807
817
|
"type": "uint256"
|
|
808
818
|
}
|
|
809
819
|
],
|
|
@@ -1111,11 +1121,6 @@
|
|
|
1111
1121
|
},
|
|
1112
1122
|
{
|
|
1113
1123
|
"inputs": [
|
|
1114
|
-
{
|
|
1115
|
-
"internalType": "address",
|
|
1116
|
-
"name": "from",
|
|
1117
|
-
"type": "address"
|
|
1118
|
-
},
|
|
1119
1124
|
{
|
|
1120
1125
|
"internalType": "address",
|
|
1121
1126
|
"name": "to",
|
|
@@ -1127,7 +1132,7 @@
|
|
|
1127
1132
|
"type": "uint256"
|
|
1128
1133
|
}
|
|
1129
1134
|
],
|
|
1130
|
-
"name": "
|
|
1135
|
+
"name": "nftMint",
|
|
1131
1136
|
"outputs": [],
|
|
1132
1137
|
"stateMutability": "nonpayable",
|
|
1133
1138
|
"type": "function"
|
|
@@ -1135,17 +1140,22 @@
|
|
|
1135
1140
|
{
|
|
1136
1141
|
"inputs": [
|
|
1137
1142
|
{
|
|
1138
|
-
"internalType": "
|
|
1139
|
-
"name": "
|
|
1140
|
-
"type": "
|
|
1143
|
+
"internalType": "address",
|
|
1144
|
+
"name": "from",
|
|
1145
|
+
"type": "address"
|
|
1146
|
+
},
|
|
1147
|
+
{
|
|
1148
|
+
"internalType": "address",
|
|
1149
|
+
"name": "to",
|
|
1150
|
+
"type": "address"
|
|
1141
1151
|
},
|
|
1142
1152
|
{
|
|
1143
1153
|
"internalType": "uint256",
|
|
1144
|
-
"name": "
|
|
1154
|
+
"name": "tokenId",
|
|
1145
1155
|
"type": "uint256"
|
|
1146
1156
|
}
|
|
1147
1157
|
],
|
|
1148
|
-
"name": "
|
|
1158
|
+
"name": "nftTransferFrom",
|
|
1149
1159
|
"outputs": [],
|
|
1150
1160
|
"stateMutability": "nonpayable",
|
|
1151
1161
|
"type": "function"
|
|
@@ -1159,11 +1169,11 @@
|
|
|
1159
1169
|
},
|
|
1160
1170
|
{
|
|
1161
1171
|
"internalType": "uint256",
|
|
1162
|
-
"name": "
|
|
1172
|
+
"name": "feeAmount",
|
|
1163
1173
|
"type": "uint256"
|
|
1164
1174
|
}
|
|
1165
1175
|
],
|
|
1166
|
-
"name": "
|
|
1176
|
+
"name": "processRenewal",
|
|
1167
1177
|
"outputs": [],
|
|
1168
1178
|
"stateMutability": "nonpayable",
|
|
1169
1179
|
"type": "function"
|
|
@@ -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,19 @@
|
|
|
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
|
+
},
|
|
173
237
|
{
|
|
174
238
|
"inputs": [],
|
|
175
239
|
"name": "getComponentInfo",
|
|
@@ -196,6 +260,16 @@
|
|
|
196
260
|
"name": "wallet",
|
|
197
261
|
"type": "address"
|
|
198
262
|
},
|
|
263
|
+
{
|
|
264
|
+
"internalType": "Amount",
|
|
265
|
+
"name": "balanceAmount",
|
|
266
|
+
"type": "uint96"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"internalType": "Amount",
|
|
270
|
+
"name": "feeAmount",
|
|
271
|
+
"type": "uint96"
|
|
272
|
+
},
|
|
199
273
|
{
|
|
200
274
|
"internalType": "bytes",
|
|
201
275
|
"name": "data",
|
|
@@ -377,6 +451,19 @@
|
|
|
377
451
|
"stateMutability": "view",
|
|
378
452
|
"type": "function"
|
|
379
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
|
+
},
|
|
380
467
|
{
|
|
381
468
|
"inputs": [],
|
|
382
469
|
"name": "isNftInterceptor",
|
|
@@ -404,6 +491,24 @@
|
|
|
404
491
|
"stateMutability": "nonpayable",
|
|
405
492
|
"type": "function"
|
|
406
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
|
+
},
|
|
407
512
|
{
|
|
408
513
|
"inputs": [
|
|
409
514
|
{
|
|
@@ -427,6 +532,19 @@
|
|
|
427
532
|
"stateMutability": "nonpayable",
|
|
428
533
|
"type": "function"
|
|
429
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
|
+
},
|
|
430
548
|
{
|
|
431
549
|
"inputs": [
|
|
432
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
|
{
|
|
@@ -327,6 +391,16 @@
|
|
|
327
391
|
"name": "wallet",
|
|
328
392
|
"type": "address"
|
|
329
393
|
},
|
|
394
|
+
{
|
|
395
|
+
"internalType": "Amount",
|
|
396
|
+
"name": "balanceAmount",
|
|
397
|
+
"type": "uint96"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"internalType": "Amount",
|
|
401
|
+
"name": "feeAmount",
|
|
402
|
+
"type": "uint96"
|
|
403
|
+
},
|
|
330
404
|
{
|
|
331
405
|
"internalType": "bytes",
|
|
332
406
|
"name": "data",
|
|
@@ -607,7 +681,7 @@
|
|
|
607
681
|
},
|
|
608
682
|
{
|
|
609
683
|
"internalType": "uint256",
|
|
610
|
-
"name": "
|
|
684
|
+
"name": "sumDistributionOwnerFees",
|
|
611
685
|
"type": "uint256"
|
|
612
686
|
}
|
|
613
687
|
],
|
|
@@ -645,6 +719,19 @@
|
|
|
645
719
|
"stateMutability": "view",
|
|
646
720
|
"type": "function"
|
|
647
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
|
+
},
|
|
648
735
|
{
|
|
649
736
|
"inputs": [],
|
|
650
737
|
"name": "isNftInterceptor",
|
|
@@ -685,6 +772,24 @@
|
|
|
685
772
|
"stateMutability": "nonpayable",
|
|
686
773
|
"type": "function"
|
|
687
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
|
+
},
|
|
688
793
|
{
|
|
689
794
|
"inputs": [
|
|
690
795
|
{
|
|
@@ -729,17 +834,12 @@
|
|
|
729
834
|
{
|
|
730
835
|
"inputs": [
|
|
731
836
|
{
|
|
732
|
-
"internalType": "
|
|
733
|
-
"name": "
|
|
734
|
-
"type": "
|
|
735
|
-
},
|
|
736
|
-
{
|
|
737
|
-
"internalType": "uint256",
|
|
738
|
-
"name": "feeAmount",
|
|
739
|
-
"type": "uint256"
|
|
837
|
+
"internalType": "address",
|
|
838
|
+
"name": "",
|
|
839
|
+
"type": "address"
|
|
740
840
|
}
|
|
741
841
|
],
|
|
742
|
-
"name": "
|
|
842
|
+
"name": "setAuthority",
|
|
743
843
|
"outputs": [],
|
|
744
844
|
"stateMutability": "nonpayable",
|
|
745
845
|
"type": "function"
|