@etherisc/gif-next 0.0.2-f9905e1 → 0.0.2-f99f1d2-109

Sign up to get free protection for your applications and to get access to all the features.
Files changed (172) hide show
  1. package/README.md +33 -0
  2. package/artifacts/contracts/components/Component.sol/Component.dbg.json +1 -1
  3. package/artifacts/contracts/components/Component.sol/Component.json +35 -9
  4. package/artifacts/contracts/components/Component.sol/InstanceLinked.dbg.json +1 -1
  5. package/artifacts/contracts/components/Component.sol/InstanceLinked.json +2 -2
  6. package/artifacts/contracts/components/IPool.sol/IPoolComponent.dbg.json +1 -1
  7. package/artifacts/contracts/components/IPool.sol/IPoolComponent.json +84 -8
  8. package/artifacts/contracts/components/IProduct.sol/IProductComponent.dbg.json +1 -1
  9. package/artifacts/contracts/components/IProduct.sol/IProductComponent.json +34 -152
  10. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  11. package/artifacts/contracts/components/Pool.sol/Pool.json +146 -13
  12. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  13. package/artifacts/contracts/components/Product.sol/Product.json +148 -15
  14. package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +4 -0
  15. package/artifacts/contracts/experiment/errors/Require.sol/Require.json +105 -0
  16. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +4 -0
  17. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.json +105 -0
  18. package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +1 -1
  19. package/artifacts/contracts/experiment/inheritance/A.sol/A.json +2 -2
  20. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +1 -1
  21. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.json +2 -2
  22. package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +1 -1
  23. package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +1 -1
  24. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +1 -1
  25. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +1 -1
  26. package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +1 -1
  27. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +1 -1
  28. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +4 -0
  29. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +59 -0
  30. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +4 -0
  31. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.json +124 -0
  32. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +4 -0
  33. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.json +74 -0
  34. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +4 -0
  35. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +124 -0
  36. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +4 -0
  37. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +207 -0
  38. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +1 -1
  39. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.json +2 -2
  40. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +1 -1
  41. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.json +2 -2
  42. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  43. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +714 -127
  44. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  45. package/artifacts/contracts/instance/Instance.sol/Instance.json +845 -129
  46. package/artifacts/contracts/instance/access/Access.sol/AccessModule.dbg.json +1 -1
  47. package/artifacts/contracts/instance/access/IAccess.sol/IAccess.dbg.json +1 -1
  48. package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.dbg.json +1 -1
  49. package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.dbg.json +1 -1
  50. package/artifacts/contracts/instance/access/IAccess.sol/IAccessModule.dbg.json +1 -1
  51. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.dbg.json +1 -1
  52. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.json +31 -59
  53. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.dbg.json +1 -1
  54. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.json +103 -6
  55. package/artifacts/contracts/instance/component/IComponent.sol/IComponent.dbg.json +1 -1
  56. package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.dbg.json +1 -1
  57. package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.json +34 -8
  58. package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.dbg.json +1 -1
  59. package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.json +31 -59
  60. package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.dbg.json +1 -1
  61. package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.json +50 -3
  62. package/artifacts/contracts/instance/component/IComponent.sol/IInstanceLinked.dbg.json +1 -1
  63. package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycle.dbg.json +4 -0
  64. package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycle.json +134 -0
  65. package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycleModule.dbg.json +4 -0
  66. package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycleModule.json +182 -0
  67. package/artifacts/contracts/instance/lifecycle/LifecycleModule.sol/LifecycleModule.dbg.json +4 -0
  68. package/artifacts/contracts/instance/lifecycle/LifecycleModule.sol/LifecycleModule.json +221 -0
  69. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicy.dbg.json +1 -1
  70. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.dbg.json +1 -1
  71. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.json +44 -21
  72. package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.dbg.json +1 -1
  73. package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.json +44 -21
  74. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPool.dbg.json +1 -1
  75. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.dbg.json +1 -1
  76. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.json +23 -43
  77. package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.dbg.json +1 -1
  78. package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.json +28 -35
  79. package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.dbg.json +1 -1
  80. package/artifacts/contracts/instance/product/IProductService.sol/IProductService.dbg.json +1 -1
  81. package/artifacts/contracts/instance/product/IProductService.sol/IProductService.json +21 -8
  82. package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.dbg.json +1 -1
  83. package/artifacts/contracts/instance/product/ProductService.sol/ProductService.dbg.json +1 -1
  84. package/artifacts/contracts/instance/product/ProductService.sol/ProductService.json +85 -14
  85. package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasury.dbg.json +4 -0
  86. package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasury.json +10 -0
  87. package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasuryModule.dbg.json +4 -0
  88. package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasuryModule.json +490 -0
  89. package/artifacts/contracts/instance/treasury/TokenHandler.sol/TokenHandler.dbg.json +4 -0
  90. package/artifacts/contracts/instance/treasury/TokenHandler.sol/TokenHandler.json +45 -0
  91. package/artifacts/contracts/instance/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +4 -0
  92. package/artifacts/contracts/instance/treasury/TreasuryModule.sol/TreasuryModule.json +490 -0
  93. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +4 -0
  94. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +534 -0
  95. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +4 -0
  96. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.json +452 -0
  97. package/artifacts/contracts/registry/IRegistry.sol/IOwnable.dbg.json +1 -1
  98. package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.dbg.json +1 -1
  99. package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.json +8 -8
  100. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  101. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +45 -128
  102. package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.dbg.json +1 -1
  103. package/artifacts/contracts/registry/Registry.sol/Registerable.dbg.json +1 -1
  104. package/artifacts/contracts/registry/Registry.sol/Registerable.json +9 -9
  105. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  106. package/artifacts/contracts/registry/Registry.sol/Registry.json +95 -128
  107. package/artifacts/contracts/registry/Registry.sol/RegistryLinked.dbg.json +1 -1
  108. package/artifacts/contracts/registry/Registry.sol/RegistryLinked.json +2 -2
  109. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +4 -0
  110. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.json +174 -0
  111. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  112. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.json +2 -2
  113. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +4 -0
  114. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +92 -0
  115. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +4 -0
  116. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +92 -0
  117. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +4 -0
  118. package/artifacts/contracts/types/StateId.sol/StateIdLib.json +92 -0
  119. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +4 -0
  120. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +174 -0
  121. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +4 -0
  122. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +453 -0
  123. package/contracts/components/Component.sol +39 -24
  124. package/contracts/components/IPool.sol +9 -3
  125. package/contracts/components/IProduct.sol +11 -6
  126. package/contracts/components/Pool.sol +37 -14
  127. package/contracts/components/Product.sol +48 -24
  128. package/contracts/experiment/errors/Require.sol +38 -0
  129. package/contracts/experiment/errors/Revert.sol +44 -0
  130. package/contracts/experiment/inheritance/A.sol +8 -11
  131. package/contracts/experiment/inheritance/B.sol +10 -5
  132. package/contracts/experiment/inheritance/C.sol +11 -5
  133. package/contracts/experiment/inheritance/IA.sol +2 -7
  134. package/contracts/experiment/inheritance/IB.sol +3 -2
  135. package/contracts/experiment/inheritance/IC.sol +4 -3
  136. package/contracts/experiment/statemachine/Dummy.sol +27 -0
  137. package/contracts/experiment/statemachine/ISM.sol +25 -0
  138. package/contracts/experiment/statemachine/README.md +112 -0
  139. package/contracts/experiment/statemachine/SM.sol +57 -0
  140. package/contracts/experiment/statemachine/SimpleStateMachine.sol +31 -0
  141. package/contracts/experiment/types/TypeA.sol +14 -9
  142. package/contracts/experiment/types/TypeB.sol +14 -9
  143. package/contracts/instance/IInstance.sol +9 -4
  144. package/contracts/instance/Instance.sol +24 -15
  145. package/contracts/instance/access/Access.sol +63 -116
  146. package/contracts/instance/access/IAccess.sol +28 -48
  147. package/contracts/instance/component/ComponentModule.sol +162 -147
  148. package/contracts/instance/component/IComponent.sol +41 -61
  149. package/contracts/instance/lifecycle/ILifecycle.sol +47 -0
  150. package/contracts/instance/lifecycle/LifecycleModule.sol +88 -0
  151. package/contracts/instance/policy/IPolicy.sol +19 -35
  152. package/contracts/instance/policy/PolicyModule.sol +52 -44
  153. package/contracts/instance/pool/IPoolModule.sol +9 -26
  154. package/contracts/instance/pool/PoolModule.sol +43 -45
  155. package/contracts/instance/product/IProductService.sol +10 -19
  156. package/contracts/instance/product/ProductService.sol +86 -55
  157. package/contracts/instance/treasury/ITreasury.sol +91 -0
  158. package/contracts/instance/treasury/TokenHandler.sol +24 -0
  159. package/contracts/instance/treasury/TreasuryModule.sol +168 -0
  160. package/contracts/registry/ChainNft.sol +135 -0
  161. package/contracts/registry/IChainNft.sol +21 -0
  162. package/contracts/registry/IRegistry.sol +41 -40
  163. package/contracts/registry/Registry.sol +82 -97
  164. package/contracts/types/Blocknumber.sol +118 -0
  165. package/contracts/types/ChainId.sol +24 -10
  166. package/contracts/types/Fee.sol +32 -0
  167. package/contracts/types/NftId.sol +51 -0
  168. package/contracts/types/ObjectType.sol +107 -0
  169. package/contracts/types/StateId.sol +91 -0
  170. package/contracts/types/Timestamp.sol +102 -0
  171. package/contracts/types/UFixed.sol +206 -0
  172. package/package.json +13 -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`.
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/f211b802294e8958d4ab3ed8cbf2371f.json"
3
+ "buildInfo": "../../../build-info/ddbd31d07c8880f0f0a18b3f2b9bcc56.json"
4
4
  }
@@ -72,9 +72,9 @@
72
72
  "name": "getNftId",
73
73
  "outputs": [
74
74
  {
75
- "internalType": "uint256",
76
- "name": "id",
77
- "type": "uint256"
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": "uint256",
101
+ "internalType": "NftId",
102
102
  "name": "",
103
- "type": "uint256"
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": "uint256",
140
+ "internalType": "ObjectType",
128
141
  "name": "objectType",
129
- "type": "uint256"
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": "uint256",
192
+ "internalType": "NftId",
167
193
  "name": "componentId",
168
- "type": "uint256"
194
+ "type": "uint96"
169
195
  }
170
196
  ],
171
197
  "stateMutability": "nonpayable",
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/f211b802294e8958d4ab3ed8cbf2371f.json"
3
+ "buildInfo": "../../../build-info/ddbd31d07c8880f0f0a18b3f2b9bcc56.json"
4
4
  }
@@ -28,8 +28,8 @@
28
28
  "type": "function"
29
29
  }
30
30
  ],
31
- "bytecode": "0x608060405234801561001057600080fd5b50604051610249380380610249833981810160405281019061003291906100db565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a88261007d565b9050919050565b6100b88161009d565b81146100c357600080fd5b50565b6000815190506100d5816100af565b92915050565b6000602082840312156100f1576100f0610078565b5b60006100ff848285016100c6565b91505092915050565b610132806101176000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063de7b5d1414602d575b600080fd5b60336047565b604051603e919060e3565b60405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060af60ab60a7846070565b6090565b6070565b9050919050565b600060bf82609a565b9050919050565b600060cf8260b6565b9050919050565b60dd8160c6565b82525050565b600060208201905060f6600083018460d6565b9291505056fea2646970667358221220873d5c4bbee30c8a7c897b08b455e417128aa79af15134b5b818168ab116de3d64736f6c63430008140033",
32
- "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063de7b5d1414602d575b600080fd5b60336047565b604051603e919060e3565b60405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060af60ab60a7846070565b6090565b6070565b9050919050565b600060bf82609a565b9050919050565b600060cf8260b6565b9050919050565b60dd8160c6565b82525050565b600060208201905060f6600083018460d6565b9291505056fea2646970667358221220873d5c4bbee30c8a7c897b08b455e417128aa79af15134b5b818168ab116de3d64736f6c63430008140033",
31
+ "bytecode": "0x608060405234801561001057600080fd5b50604051610249380380610249833981810160405281019061003291906100db565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a88261007d565b9050919050565b6100b88161009d565b81146100c357600080fd5b50565b6000815190506100d5816100af565b92915050565b6000602082840312156100f1576100f0610078565b5b60006100ff848285016100c6565b91505092915050565b610132806101176000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063de7b5d1414602d575b600080fd5b60336047565b604051603e919060e3565b60405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060af60ab60a7846070565b6090565b6070565b9050919050565b600060bf82609a565b9050919050565b600060cf8260b6565b9050919050565b60dd8160c6565b82525050565b600060208201905060f6600083018460d6565b9291505056fea2646970667358221220fcb5a0020aae4f4c62be3c6596d758b295998722c0558cf6dbbf52e3b5809cf564736f6c63430008140033",
32
+ "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063de7b5d1414602d575b600080fd5b60336047565b604051603e919060e3565b60405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060af60ab60a7846070565b6090565b6070565b9050919050565b600060bf82609a565b9050919050565b600060cf8260b6565b9050919050565b60dd8160c6565b82525050565b600060208201905060f6600083018460d6565b9291505056fea2646970667358221220fcb5a0020aae4f4c62be3c6596d758b295998722c0558cf6dbbf52e3b5809cf564736f6c63430008140033",
33
33
  "linkReferences": {},
34
34
  "deployedLinkReferences": {}
35
35
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/f211b802294e8958d4ab3ed8cbf2371f.json"
3
+ "buildInfo": "../../../build-info/ddbd31d07c8880f0f0a18b3f2b9bcc56.json"
4
4
  }
@@ -72,9 +72,9 @@
72
72
  "name": "getNftId",
73
73
  "outputs": [
74
74
  {
75
- "internalType": "uint256",
75
+ "internalType": "NftId",
76
76
  "name": "nftId",
77
- "type": "uint256"
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": "uint256",
101
+ "internalType": "NftId",
102
102
  "name": "parentNftId",
103
- "type": "uint256"
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": "uint256",
190
+ "internalType": "ObjectType",
128
191
  "name": "objectType",
129
- "type": "uint256"
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": "uint256",
242
+ "internalType": "NftId",
167
243
  "name": "nftId",
168
- "type": "uint256"
244
+ "type": "uint96"
169
245
  }
170
246
  ],
171
247
  "stateMutability": "nonpayable",
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/f211b802294e8958d4ab3ed8cbf2371f.json"
3
+ "buildInfo": "../../../build-info/ddbd31d07c8880f0f0a18b3f2b9bcc56.json"
4
4
  }
@@ -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": "getOwner",
8
+ "name": "getPolicyFee",
86
9
  "outputs": [
87
10
  {
88
- "internalType": "address",
89
- "name": "owner",
90
- "type": "address"
91
- }
92
- ],
93
- "stateMutability": "view",
94
- "type": "function"
95
- },
96
- {
97
- "inputs": [],
98
- "name": "getParentNftId",
99
- "outputs": [
100
- {
101
- "internalType": "uint256",
102
- "name": "parentNftId",
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": "uint256",
36
+ "internalType": "NftId",
115
37
  "name": "poolNftId",
116
- "type": "uint256"
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": "getType",
46
+ "name": "getProcessingFee",
138
47
  "outputs": [
139
48
  {
140
- "internalType": "uint256",
141
- "name": "objectType",
142
- "type": "uint256"
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",
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/f211b802294e8958d4ab3ed8cbf2371f.json"
3
+ "buildInfo": "../../../build-info/ddbd31d07c8880f0f0a18b3f2b9bcc56.json"
4
4
  }