@etherisc/gif-next 0.0.2-ed4dd55 → 0.0.2-f74fcad-685
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +33 -0
- package/artifacts/contracts/components/Component.sol/Component.dbg.json +1 -1
- package/artifacts/contracts/components/Component.sol/Component.json +35 -9
- package/artifacts/contracts/components/Component.sol/InstanceLinked.dbg.json +1 -1
- package/artifacts/contracts/components/Component.sol/InstanceLinked.json +2 -2
- package/artifacts/contracts/components/IPool.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IPool.sol/IPoolComponent.json +84 -8
- package/artifacts/contracts/components/IProduct.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IProduct.sol/IProductComponent.json +34 -152
- package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/components/Pool.sol/Pool.json +146 -13
- package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/components/Product.sol/Product.json +148 -15
- package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +4 -0
- package/artifacts/contracts/experiment/errors/Require.sol/Require.json +105 -0
- package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +4 -0
- package/artifacts/contracts/experiment/errors/Revert.sol/Revert.json +105 -0
- package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/A.sol/A.json +2 -2
- package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/A.sol/AShared.json +2 -2
- 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 +4 -0
- package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +59 -0
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +4 -0
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.json +124 -0
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +4 -0
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.json +74 -0
- package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +4 -0
- package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +124 -0
- package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +4 -0
- package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +207 -0
- package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +1 -1
- package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.json +2 -2
- package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +1 -1
- package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.json +2 -2
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +714 -127
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +845 -129
- package/artifacts/contracts/instance/access/Access.sol/AccessModule.dbg.json +1 -1
- package/artifacts/contracts/instance/access/IAccess.sol/IAccess.dbg.json +1 -1
- package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.dbg.json +1 -1
- package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.dbg.json +1 -1
- package/artifacts/contracts/instance/access/IAccess.sol/IAccessModule.dbg.json +1 -1
- package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.dbg.json +1 -1
- package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.json +31 -59
- package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.dbg.json +1 -1
- package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.json +103 -6
- package/artifacts/contracts/instance/component/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.dbg.json +1 -1
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.json +34 -8
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.dbg.json +1 -1
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.json +31 -59
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.dbg.json +1 -1
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.json +50 -3
- package/artifacts/contracts/instance/component/IComponent.sol/IInstanceLinked.dbg.json +1 -1
- package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycle.dbg.json +4 -0
- package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycle.json +134 -0
- package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycleModule.dbg.json +4 -0
- package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycleModule.json +182 -0
- package/artifacts/contracts/instance/lifecycle/LifecycleModule.sol/LifecycleModule.dbg.json +4 -0
- package/artifacts/contracts/instance/lifecycle/LifecycleModule.sol/LifecycleModule.json +221 -0
- package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicy.dbg.json +1 -1
- package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.dbg.json +1 -1
- package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.json +44 -21
- package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.dbg.json +1 -1
- package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.json +44 -21
- package/artifacts/contracts/instance/pool/IPoolModule.sol/IPool.dbg.json +1 -1
- package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.dbg.json +1 -1
- package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.json +23 -43
- package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.dbg.json +1 -1
- package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.json +28 -35
- package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.dbg.json +1 -1
- package/artifacts/contracts/instance/product/IProductService.sol/IProductService.dbg.json +1 -1
- package/artifacts/contracts/instance/product/IProductService.sol/IProductService.json +21 -8
- package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.dbg.json +1 -1
- package/artifacts/contracts/instance/product/ProductService.sol/ProductService.dbg.json +1 -1
- package/artifacts/contracts/instance/product/ProductService.sol/ProductService.json +85 -14
- package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasury.dbg.json +4 -0
- package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasury.json +10 -0
- package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasuryModule.dbg.json +4 -0
- package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasuryModule.json +490 -0
- package/artifacts/contracts/instance/treasury/TokenHandler.sol/TokenHandler.dbg.json +4 -0
- package/artifacts/contracts/instance/treasury/TokenHandler.sol/TokenHandler.json +45 -0
- package/artifacts/contracts/instance/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +4 -0
- package/artifacts/contracts/instance/treasury/TreasuryModule.sol/TreasuryModule.json +490 -0
- package/artifacts/contracts/mock/Dip.sol/DIP.dbg.json +4 -0
- package/artifacts/contracts/mock/Dip.sol/DIP.json +338 -0
- package/artifacts/contracts/mock/TestPool.sol/TestPool.dbg.json +4 -0
- package/artifacts/contracts/mock/TestPool.sol/TestPool.json +294 -0
- package/artifacts/contracts/mock/TestProduct.sol/TestProduct.dbg.json +4 -0
- package/artifacts/contracts/mock/TestProduct.sol/TestProduct.json +384 -0
- package/artifacts/contracts/mock/Usdc.sol/USDC.dbg.json +4 -0
- package/artifacts/contracts/mock/Usdc.sol/USDC.json +338 -0
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +2 -2
- package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IOwnable.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.json +8 -8
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +20 -111
- package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registerable.json +9 -9
- package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.json +66 -115
- package/artifacts/contracts/registry/Registry.sol/RegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/RegistryLinked.json +2 -2
- package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +4 -0
- package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.json +174 -0
- package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/ChainId.sol/ChainIdLib.json +2 -2
- package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/NftId.sol/NftIdLib.json +85 -3
- package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +4 -0
- package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +92 -0
- package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/StateId.sol/StateIdLib.json +92 -0
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +4 -0
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +174 -0
- package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +4 -0
- package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +479 -0
- package/contracts/components/Component.sol +39 -24
- package/contracts/components/IPool.sol +9 -3
- package/contracts/components/IProduct.sol +11 -6
- package/contracts/components/Pool.sol +37 -14
- package/contracts/components/Product.sol +48 -24
- package/contracts/experiment/errors/Require.sol +38 -0
- package/contracts/experiment/errors/Revert.sol +44 -0
- package/contracts/experiment/inheritance/A.sol +8 -11
- package/contracts/experiment/inheritance/B.sol +10 -5
- package/contracts/experiment/inheritance/C.sol +11 -5
- package/contracts/experiment/inheritance/IA.sol +2 -7
- package/contracts/experiment/inheritance/IB.sol +3 -2
- package/contracts/experiment/inheritance/IC.sol +4 -3
- package/contracts/experiment/statemachine/Dummy.sol +27 -0
- package/contracts/experiment/statemachine/ISM.sol +25 -0
- package/contracts/experiment/statemachine/README.md +112 -0
- package/contracts/experiment/statemachine/SM.sol +57 -0
- package/contracts/experiment/statemachine/SimpleStateMachine.sol +31 -0
- package/contracts/experiment/types/TypeA.sol +14 -9
- package/contracts/experiment/types/TypeB.sol +14 -9
- package/contracts/instance/IInstance.sol +8 -3
- package/contracts/instance/Instance.sol +24 -15
- package/contracts/instance/access/Access.sol +63 -116
- package/contracts/instance/access/IAccess.sol +28 -48
- package/contracts/instance/component/ComponentModule.sol +162 -147
- package/contracts/instance/component/IComponent.sol +41 -61
- package/contracts/instance/lifecycle/ILifecycle.sol +47 -0
- package/contracts/instance/lifecycle/LifecycleModule.sol +88 -0
- package/contracts/instance/policy/IPolicy.sol +19 -35
- package/contracts/instance/policy/PolicyModule.sol +52 -44
- package/contracts/instance/pool/IPoolModule.sol +9 -26
- package/contracts/instance/pool/PoolModule.sol +43 -45
- package/contracts/instance/product/IProductService.sol +10 -19
- package/contracts/instance/product/ProductService.sol +86 -55
- package/contracts/instance/treasury/ITreasury.sol +91 -0
- package/contracts/instance/treasury/TokenHandler.sol +24 -0
- package/contracts/instance/treasury/TreasuryModule.sol +168 -0
- package/contracts/mock/Dip.sol +26 -0
- package/contracts/mock/TestPool.sol +16 -0
- package/contracts/mock/TestProduct.sol +39 -0
- package/contracts/mock/Usdc.sol +26 -0
- package/contracts/registry/ChainNft.sol +23 -61
- package/contracts/registry/IChainNft.sol +10 -7
- package/contracts/registry/IRegistry.sol +40 -41
- package/contracts/registry/Registry.sol +73 -67
- package/contracts/types/Blocknumber.sol +118 -0
- package/contracts/types/ChainId.sol +24 -10
- package/contracts/types/Fee.sol +32 -0
- package/contracts/types/NftId.sol +36 -10
- package/contracts/types/ObjectType.sol +107 -0
- package/contracts/types/StateId.sol +91 -0
- package/contracts/types/Timestamp.sol +102 -0
- package/contracts/types/UFixed.sol +210 -0
- package/package.json +14 -5
package/README.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# gif-next (Generic Insurance Framework next version)
|
2
2
|
|
3
|
+
## Submodules checkout
|
4
|
+
|
5
|
+
This repository uses submodules. To checkout or update to the latest submodules, run the following command after updating to any revision (or checking out the repository)
|
6
|
+
|
7
|
+
```shell
|
8
|
+
git submodule update --recursive
|
9
|
+
```
|
10
|
+
|
3
11
|
## Hardhat
|
4
12
|
|
5
13
|
### NPM Commands
|
@@ -125,3 +133,28 @@ uint256 policyNftId = ps.createApplicationForBundle(customer, bundleNftId, sumIn
|
|
125
133
|
|
126
134
|
https://book.getfoundry.sh/reference/
|
127
135
|
|
136
|
+
## Style Guide
|
137
|
+
|
138
|
+
Solidity code is to be written according to the [Solidity Style Guide](https://docs.soliditylang.org/en/latest/style-guide.html).
|
139
|
+
|
140
|
+
Documentation of the code should be written inline using [NatSpec](https://docs.soliditylang.org/en/latest/natspec-format.html).
|
141
|
+
|
142
|
+
### Naming conventions
|
143
|
+
|
144
|
+
Additionally, we use the following naming conventions:
|
145
|
+
|
146
|
+
- 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.
|
147
|
+
- 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.
|
148
|
+
- 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/).
|
149
|
+
|
150
|
+
### Automatic code formatting
|
151
|
+
|
152
|
+
We use prettier and the solidity plugin to format the code automatically.
|
153
|
+
The plugin is configured to use the style guide mentioned above.
|
154
|
+
To execute format checks run `npm run styleCheck`.
|
155
|
+
To execute formatting run `npm run styleFix`.
|
156
|
+
|
157
|
+
### Linting
|
158
|
+
|
159
|
+
We use solhint to lint the code.
|
160
|
+
To execute linting run `npm run lint`.
|
@@ -72,9 +72,9 @@
|
|
72
72
|
"name": "getNftId",
|
73
73
|
"outputs": [
|
74
74
|
{
|
75
|
-
"internalType": "
|
76
|
-
"name": "
|
77
|
-
"type": "
|
75
|
+
"internalType": "NftId",
|
76
|
+
"name": "nftId",
|
77
|
+
"type": "uint96"
|
78
78
|
}
|
79
79
|
],
|
80
80
|
"stateMutability": "view",
|
@@ -98,9 +98,9 @@
|
|
98
98
|
"name": "getParentNftId",
|
99
99
|
"outputs": [
|
100
100
|
{
|
101
|
-
"internalType": "
|
101
|
+
"internalType": "NftId",
|
102
102
|
"name": "",
|
103
|
-
"type": "
|
103
|
+
"type": "uint96"
|
104
104
|
}
|
105
105
|
],
|
106
106
|
"stateMutability": "view",
|
@@ -119,14 +119,40 @@
|
|
119
119
|
"stateMutability": "view",
|
120
120
|
"type": "function"
|
121
121
|
},
|
122
|
+
{
|
123
|
+
"inputs": [],
|
124
|
+
"name": "getToken",
|
125
|
+
"outputs": [
|
126
|
+
{
|
127
|
+
"internalType": "contract IERC20Metadata",
|
128
|
+
"name": "token",
|
129
|
+
"type": "address"
|
130
|
+
}
|
131
|
+
],
|
132
|
+
"stateMutability": "view",
|
133
|
+
"type": "function"
|
134
|
+
},
|
122
135
|
{
|
123
136
|
"inputs": [],
|
124
137
|
"name": "getType",
|
125
138
|
"outputs": [
|
126
139
|
{
|
127
|
-
"internalType": "
|
140
|
+
"internalType": "ObjectType",
|
128
141
|
"name": "objectType",
|
129
|
-
"type": "
|
142
|
+
"type": "uint8"
|
143
|
+
}
|
144
|
+
],
|
145
|
+
"stateMutability": "view",
|
146
|
+
"type": "function"
|
147
|
+
},
|
148
|
+
{
|
149
|
+
"inputs": [],
|
150
|
+
"name": "getWallet",
|
151
|
+
"outputs": [
|
152
|
+
{
|
153
|
+
"internalType": "address",
|
154
|
+
"name": "walletAddress",
|
155
|
+
"type": "address"
|
130
156
|
}
|
131
157
|
],
|
132
158
|
"stateMutability": "view",
|
@@ -163,9 +189,9 @@
|
|
163
189
|
"name": "register",
|
164
190
|
"outputs": [
|
165
191
|
{
|
166
|
-
"internalType": "
|
192
|
+
"internalType": "NftId",
|
167
193
|
"name": "componentId",
|
168
|
-
"type": "
|
194
|
+
"type": "uint96"
|
169
195
|
}
|
170
196
|
],
|
171
197
|
"stateMutability": "nonpayable",
|
@@ -28,8 +28,8 @@
|
|
28
28
|
"type": "function"
|
29
29
|
}
|
30
30
|
],
|
31
|
-
"bytecode": "
|
32
|
-
"deployedBytecode": "
|
31
|
+
"bytecode": "0x608060405234801561001057600080fd5b5060405161011438038061011483398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b6082806100926000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063de7b5d1414602d575b600080fd5b600054604080516001600160a01b039092168252519081900360200190f3fea264697066735822122073a0ea8fa4352d28b2a129d826cfd42d4c8f65d3a006cdf283aa909e0fac0e4264736f6c63430008140033",
|
32
|
+
"deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063de7b5d1414602d575b600080fd5b600054604080516001600160a01b039092168252519081900360200190f3fea264697066735822122073a0ea8fa4352d28b2a129d826cfd42d4c8f65d3a006cdf283aa909e0fac0e4264736f6c63430008140033",
|
33
33
|
"linkReferences": {},
|
34
34
|
"deployedLinkReferences": {}
|
35
35
|
}
|
@@ -72,9 +72,9 @@
|
|
72
72
|
"name": "getNftId",
|
73
73
|
"outputs": [
|
74
74
|
{
|
75
|
-
"internalType": "
|
75
|
+
"internalType": "NftId",
|
76
76
|
"name": "nftId",
|
77
|
-
"type": "
|
77
|
+
"type": "uint96"
|
78
78
|
}
|
79
79
|
],
|
80
80
|
"stateMutability": "view",
|
@@ -98,9 +98,34 @@
|
|
98
98
|
"name": "getParentNftId",
|
99
99
|
"outputs": [
|
100
100
|
{
|
101
|
-
"internalType": "
|
101
|
+
"internalType": "NftId",
|
102
102
|
"name": "parentNftId",
|
103
|
-
"type": "
|
103
|
+
"type": "uint96"
|
104
|
+
}
|
105
|
+
],
|
106
|
+
"stateMutability": "view",
|
107
|
+
"type": "function"
|
108
|
+
},
|
109
|
+
{
|
110
|
+
"inputs": [],
|
111
|
+
"name": "getPerformanceFee",
|
112
|
+
"outputs": [
|
113
|
+
{
|
114
|
+
"components": [
|
115
|
+
{
|
116
|
+
"internalType": "UFixed",
|
117
|
+
"name": "fractionalFee",
|
118
|
+
"type": "uint256"
|
119
|
+
},
|
120
|
+
{
|
121
|
+
"internalType": "uint256",
|
122
|
+
"name": "fixedFee",
|
123
|
+
"type": "uint256"
|
124
|
+
}
|
125
|
+
],
|
126
|
+
"internalType": "struct Fee",
|
127
|
+
"name": "performanceFee",
|
128
|
+
"type": "tuple"
|
104
129
|
}
|
105
130
|
],
|
106
131
|
"stateMutability": "view",
|
@@ -119,14 +144,65 @@
|
|
119
144
|
"stateMutability": "view",
|
120
145
|
"type": "function"
|
121
146
|
},
|
147
|
+
{
|
148
|
+
"inputs": [],
|
149
|
+
"name": "getStakingFee",
|
150
|
+
"outputs": [
|
151
|
+
{
|
152
|
+
"components": [
|
153
|
+
{
|
154
|
+
"internalType": "UFixed",
|
155
|
+
"name": "fractionalFee",
|
156
|
+
"type": "uint256"
|
157
|
+
},
|
158
|
+
{
|
159
|
+
"internalType": "uint256",
|
160
|
+
"name": "fixedFee",
|
161
|
+
"type": "uint256"
|
162
|
+
}
|
163
|
+
],
|
164
|
+
"internalType": "struct Fee",
|
165
|
+
"name": "stakingFee",
|
166
|
+
"type": "tuple"
|
167
|
+
}
|
168
|
+
],
|
169
|
+
"stateMutability": "view",
|
170
|
+
"type": "function"
|
171
|
+
},
|
172
|
+
{
|
173
|
+
"inputs": [],
|
174
|
+
"name": "getToken",
|
175
|
+
"outputs": [
|
176
|
+
{
|
177
|
+
"internalType": "contract IERC20Metadata",
|
178
|
+
"name": "token",
|
179
|
+
"type": "address"
|
180
|
+
}
|
181
|
+
],
|
182
|
+
"stateMutability": "view",
|
183
|
+
"type": "function"
|
184
|
+
},
|
122
185
|
{
|
123
186
|
"inputs": [],
|
124
187
|
"name": "getType",
|
125
188
|
"outputs": [
|
126
189
|
{
|
127
|
-
"internalType": "
|
190
|
+
"internalType": "ObjectType",
|
128
191
|
"name": "objectType",
|
129
|
-
"type": "
|
192
|
+
"type": "uint8"
|
193
|
+
}
|
194
|
+
],
|
195
|
+
"stateMutability": "view",
|
196
|
+
"type": "function"
|
197
|
+
},
|
198
|
+
{
|
199
|
+
"inputs": [],
|
200
|
+
"name": "getWallet",
|
201
|
+
"outputs": [
|
202
|
+
{
|
203
|
+
"internalType": "address",
|
204
|
+
"name": "walletAddress",
|
205
|
+
"type": "address"
|
130
206
|
}
|
131
207
|
],
|
132
208
|
"stateMutability": "view",
|
@@ -163,9 +239,9 @@
|
|
163
239
|
"name": "register",
|
164
240
|
"outputs": [
|
165
241
|
{
|
166
|
-
"internalType": "
|
242
|
+
"internalType": "NftId",
|
167
243
|
"name": "nftId",
|
168
|
-
"type": "
|
244
|
+
"type": "uint96"
|
169
245
|
}
|
170
246
|
],
|
171
247
|
"stateMutability": "nonpayable",
|
@@ -3,104 +3,26 @@
|
|
3
3
|
"contractName": "IProductComponent",
|
4
4
|
"sourceName": "contracts/components/IProduct.sol",
|
5
5
|
"abi": [
|
6
|
-
{
|
7
|
-
"anonymous": false,
|
8
|
-
"inputs": [
|
9
|
-
{
|
10
|
-
"indexed": false,
|
11
|
-
"internalType": "uint256",
|
12
|
-
"name": "idx",
|
13
|
-
"type": "uint256"
|
14
|
-
},
|
15
|
-
{
|
16
|
-
"indexed": false,
|
17
|
-
"internalType": "address",
|
18
|
-
"name": "module",
|
19
|
-
"type": "address"
|
20
|
-
},
|
21
|
-
{
|
22
|
-
"indexed": false,
|
23
|
-
"internalType": "string",
|
24
|
-
"name": "comment",
|
25
|
-
"type": "string"
|
26
|
-
}
|
27
|
-
],
|
28
|
-
"name": "LogDebug",
|
29
|
-
"type": "event"
|
30
|
-
},
|
31
|
-
{
|
32
|
-
"inputs": [],
|
33
|
-
"name": "getData",
|
34
|
-
"outputs": [
|
35
|
-
{
|
36
|
-
"internalType": "bytes",
|
37
|
-
"name": "data",
|
38
|
-
"type": "bytes"
|
39
|
-
}
|
40
|
-
],
|
41
|
-
"stateMutability": "view",
|
42
|
-
"type": "function"
|
43
|
-
},
|
44
|
-
{
|
45
|
-
"inputs": [],
|
46
|
-
"name": "getInitialOwner",
|
47
|
-
"outputs": [
|
48
|
-
{
|
49
|
-
"internalType": "address",
|
50
|
-
"name": "initialOwner",
|
51
|
-
"type": "address"
|
52
|
-
}
|
53
|
-
],
|
54
|
-
"stateMutability": "view",
|
55
|
-
"type": "function"
|
56
|
-
},
|
57
|
-
{
|
58
|
-
"inputs": [],
|
59
|
-
"name": "getInstance",
|
60
|
-
"outputs": [
|
61
|
-
{
|
62
|
-
"internalType": "contract IInstance",
|
63
|
-
"name": "instance",
|
64
|
-
"type": "address"
|
65
|
-
}
|
66
|
-
],
|
67
|
-
"stateMutability": "view",
|
68
|
-
"type": "function"
|
69
|
-
},
|
70
|
-
{
|
71
|
-
"inputs": [],
|
72
|
-
"name": "getNftId",
|
73
|
-
"outputs": [
|
74
|
-
{
|
75
|
-
"internalType": "uint256",
|
76
|
-
"name": "nftId",
|
77
|
-
"type": "uint256"
|
78
|
-
}
|
79
|
-
],
|
80
|
-
"stateMutability": "view",
|
81
|
-
"type": "function"
|
82
|
-
},
|
83
6
|
{
|
84
7
|
"inputs": [],
|
85
|
-
"name": "
|
8
|
+
"name": "getPolicyFee",
|
86
9
|
"outputs": [
|
87
10
|
{
|
88
|
-
"
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
"
|
102
|
-
"
|
103
|
-
"type": "uint256"
|
11
|
+
"components": [
|
12
|
+
{
|
13
|
+
"internalType": "UFixed",
|
14
|
+
"name": "fractionalFee",
|
15
|
+
"type": "uint256"
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"internalType": "uint256",
|
19
|
+
"name": "fixedFee",
|
20
|
+
"type": "uint256"
|
21
|
+
}
|
22
|
+
],
|
23
|
+
"internalType": "struct Fee",
|
24
|
+
"name": "policyFee",
|
25
|
+
"type": "tuple"
|
104
26
|
}
|
105
27
|
],
|
106
28
|
"stateMutability": "view",
|
@@ -111,22 +33,9 @@
|
|
111
33
|
"name": "getPoolNftId",
|
112
34
|
"outputs": [
|
113
35
|
{
|
114
|
-
"internalType": "
|
36
|
+
"internalType": "NftId",
|
115
37
|
"name": "poolNftId",
|
116
|
-
"type": "
|
117
|
-
}
|
118
|
-
],
|
119
|
-
"stateMutability": "view",
|
120
|
-
"type": "function"
|
121
|
-
},
|
122
|
-
{
|
123
|
-
"inputs": [],
|
124
|
-
"name": "getRegistry",
|
125
|
-
"outputs": [
|
126
|
-
{
|
127
|
-
"internalType": "contract IRegistry",
|
128
|
-
"name": "registry",
|
129
|
-
"type": "address"
|
38
|
+
"type": "uint96"
|
130
39
|
}
|
131
40
|
],
|
132
41
|
"stateMutability": "view",
|
@@ -134,55 +43,28 @@
|
|
134
43
|
},
|
135
44
|
{
|
136
45
|
"inputs": [],
|
137
|
-
"name": "
|
46
|
+
"name": "getProcessingFee",
|
138
47
|
"outputs": [
|
139
48
|
{
|
140
|
-
"
|
141
|
-
|
142
|
-
|
49
|
+
"components": [
|
50
|
+
{
|
51
|
+
"internalType": "UFixed",
|
52
|
+
"name": "fractionalFee",
|
53
|
+
"type": "uint256"
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"internalType": "uint256",
|
57
|
+
"name": "fixedFee",
|
58
|
+
"type": "uint256"
|
59
|
+
}
|
60
|
+
],
|
61
|
+
"internalType": "struct Fee",
|
62
|
+
"name": "processingFee",
|
63
|
+
"type": "tuple"
|
143
64
|
}
|
144
65
|
],
|
145
66
|
"stateMutability": "view",
|
146
67
|
"type": "function"
|
147
|
-
},
|
148
|
-
{
|
149
|
-
"inputs": [],
|
150
|
-
"name": "isRegisterable",
|
151
|
-
"outputs": [
|
152
|
-
{
|
153
|
-
"internalType": "bool",
|
154
|
-
"name": "",
|
155
|
-
"type": "bool"
|
156
|
-
}
|
157
|
-
],
|
158
|
-
"stateMutability": "pure",
|
159
|
-
"type": "function"
|
160
|
-
},
|
161
|
-
{
|
162
|
-
"inputs": [],
|
163
|
-
"name": "isRegistered",
|
164
|
-
"outputs": [
|
165
|
-
{
|
166
|
-
"internalType": "bool",
|
167
|
-
"name": "",
|
168
|
-
"type": "bool"
|
169
|
-
}
|
170
|
-
],
|
171
|
-
"stateMutability": "view",
|
172
|
-
"type": "function"
|
173
|
-
},
|
174
|
-
{
|
175
|
-
"inputs": [],
|
176
|
-
"name": "register",
|
177
|
-
"outputs": [
|
178
|
-
{
|
179
|
-
"internalType": "uint256",
|
180
|
-
"name": "nftId",
|
181
|
-
"type": "uint256"
|
182
|
-
}
|
183
|
-
],
|
184
|
-
"stateMutability": "nonpayable",
|
185
|
-
"type": "function"
|
186
68
|
}
|
187
69
|
],
|
188
70
|
"bytecode": "0x",
|