@etherisc/gif-next 0.0.2-9141c0d → 0.0.2-a0d749a

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.
Files changed (156) hide show
  1. package/README.md +119 -1
  2. package/artifacts/contracts/components/Component.sol/Component.dbg.json +4 -0
  3. package/artifacts/contracts/components/Component.sol/Component.json +179 -0
  4. package/artifacts/contracts/components/Component.sol/InstanceLinked.dbg.json +4 -0
  5. package/artifacts/contracts/components/Component.sol/InstanceLinked.json +35 -0
  6. package/artifacts/contracts/components/IPool.sol/IPoolComponent.dbg.json +4 -0
  7. package/artifacts/contracts/components/IPool.sol/IPoolComponent.json +179 -0
  8. package/artifacts/contracts/components/IProduct.sol/IProductComponent.dbg.json +4 -0
  9. package/artifacts/contracts/components/IProduct.sol/IProductComponent.json +192 -0
  10. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +4 -0
  11. package/artifacts/contracts/components/Pool.sol/Pool.json +213 -0
  12. package/artifacts/contracts/components/Product.sol/Product.dbg.json +4 -0
  13. package/artifacts/contracts/components/Product.sol/Product.json +231 -0
  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 +4 -0
  19. package/artifacts/contracts/experiment/inheritance/A.sol/A.json +128 -0
  20. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +4 -0
  21. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.json +42 -0
  22. package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +4 -0
  23. package/artifacts/contracts/experiment/inheritance/B.sol/B.json +76 -0
  24. package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +4 -0
  25. package/artifacts/contracts/experiment/inheritance/C.sol/C.json +89 -0
  26. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +4 -0
  27. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.json +128 -0
  28. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +4 -0
  29. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.json +37 -0
  30. package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +4 -0
  31. package/artifacts/contracts/experiment/inheritance/IB.sol/IB.json +50 -0
  32. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +4 -0
  33. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.json +63 -0
  34. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +4 -0
  35. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.json +10 -0
  36. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +4 -0
  37. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.json +10 -0
  38. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +4 -0
  39. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +892 -0
  40. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +4 -0
  41. package/artifacts/contracts/instance/Instance.sol/Instance.json +1067 -0
  42. package/artifacts/contracts/instance/access/Access.sol/AccessModule.dbg.json +4 -0
  43. package/artifacts/contracts/instance/access/Access.sol/AccessModule.json +400 -0
  44. package/artifacts/contracts/instance/access/IAccess.sol/IAccess.dbg.json +4 -0
  45. package/artifacts/contracts/instance/access/IAccess.sol/IAccess.json +10 -0
  46. package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.dbg.json +4 -0
  47. package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.json +35 -0
  48. package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.dbg.json +4 -0
  49. package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.json +50 -0
  50. package/artifacts/contracts/instance/access/IAccess.sol/IAccessModule.dbg.json +4 -0
  51. package/artifacts/contracts/instance/access/IAccess.sol/IAccessModule.json +336 -0
  52. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.dbg.json +4 -0
  53. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.json +327 -0
  54. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.dbg.json +4 -0
  55. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.json +147 -0
  56. package/artifacts/contracts/instance/component/IComponent.sol/IComponent.dbg.json +4 -0
  57. package/artifacts/contracts/instance/component/IComponent.sol/IComponent.json +10 -0
  58. package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.dbg.json +4 -0
  59. package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.json +179 -0
  60. package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.dbg.json +4 -0
  61. package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.json +245 -0
  62. package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.dbg.json +4 -0
  63. package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.json +94 -0
  64. package/artifacts/contracts/instance/component/IComponent.sol/IInstanceLinked.dbg.json +4 -0
  65. package/artifacts/contracts/instance/component/IComponent.sol/IInstanceLinked.json +24 -0
  66. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicy.dbg.json +4 -0
  67. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicy.json +10 -0
  68. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.dbg.json +4 -0
  69. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.json +231 -0
  70. package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.dbg.json +4 -0
  71. package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.json +231 -0
  72. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPool.dbg.json +4 -0
  73. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPool.json +10 -0
  74. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.dbg.json +4 -0
  75. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.json +149 -0
  76. package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.dbg.json +4 -0
  77. package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.json +162 -0
  78. package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.dbg.json +4 -0
  79. package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.json +75 -0
  80. package/artifacts/contracts/instance/product/IProductService.sol/IProductService.dbg.json +4 -0
  81. package/artifacts/contracts/instance/product/IProductService.sol/IProductService.json +114 -0
  82. package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.dbg.json +4 -0
  83. package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.json +75 -0
  84. package/artifacts/contracts/instance/product/ProductService.sol/ProductService.dbg.json +4 -0
  85. package/artifacts/contracts/instance/product/ProductService.sol/ProductService.json +167 -0
  86. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +4 -0
  87. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +534 -0
  88. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +4 -0
  89. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.json +452 -0
  90. package/artifacts/contracts/registry/IRegistry.sol/IOwnable.dbg.json +4 -0
  91. package/artifacts/contracts/registry/IRegistry.sol/IOwnable.json +24 -0
  92. package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.dbg.json +4 -0
  93. package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.json +166 -0
  94. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +4 -0
  95. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +279 -0
  96. package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.dbg.json +4 -0
  97. package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.json +49 -0
  98. package/artifacts/contracts/registry/Registry.sol/Registerable.dbg.json +4 -0
  99. package/artifacts/contracts/registry/Registry.sol/Registerable.json +166 -0
  100. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +4 -0
  101. package/artifacts/contracts/registry/Registry.sol/Registry.json +347 -0
  102. package/artifacts/contracts/registry/Registry.sol/RegistryLinked.dbg.json +4 -0
  103. package/artifacts/contracts/registry/Registry.sol/RegistryLinked.json +60 -0
  104. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +4 -0
  105. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.json +174 -0
  106. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +4 -0
  107. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.json +10 -0
  108. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +4 -0
  109. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +92 -0
  110. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +4 -0
  111. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +174 -0
  112. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +4 -0
  113. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +453 -0
  114. package/contracts/components/Component.sol +60 -0
  115. package/contracts/components/IPool.sol +9 -0
  116. package/contracts/components/IProduct.sol +9 -0
  117. package/contracts/components/Pool.sol +22 -0
  118. package/contracts/components/Product.sol +55 -0
  119. package/contracts/experiment/errors/Require.sol +38 -0
  120. package/contracts/experiment/errors/Revert.sol +44 -0
  121. package/contracts/experiment/inheritance/A.sol +53 -0
  122. package/contracts/experiment/inheritance/B.sol +28 -0
  123. package/contracts/experiment/inheritance/C.sol +34 -0
  124. package/contracts/experiment/inheritance/IA.sol +13 -0
  125. package/contracts/experiment/inheritance/IB.sol +10 -0
  126. package/contracts/experiment/inheritance/IC.sol +12 -0
  127. package/contracts/experiment/types/TypeA.sol +47 -0
  128. package/contracts/experiment/types/TypeB.sol +29 -0
  129. package/contracts/instance/IInstance.sol +18 -0
  130. package/contracts/instance/Instance.sol +64 -0
  131. package/contracts/instance/access/Access.sol +165 -0
  132. package/contracts/instance/access/IAccess.sol +63 -0
  133. package/contracts/instance/component/ComponentModule.sol +213 -0
  134. package/contracts/instance/component/IComponent.sol +73 -0
  135. package/contracts/instance/policy/IPolicy.sol +51 -0
  136. package/contracts/instance/policy/PolicyModule.sol +91 -0
  137. package/contracts/instance/pool/IPoolModule.sol +29 -0
  138. package/contracts/instance/pool/PoolModule.sol +73 -0
  139. package/contracts/instance/product/IProductService.sol +36 -0
  140. package/contracts/instance/product/ProductService.sol +112 -0
  141. package/contracts/registry/ChainNft.sol +135 -0
  142. package/contracts/registry/IChainNft.sol +21 -0
  143. package/contracts/registry/IRegistry.sol +80 -0
  144. package/contracts/registry/Registry.sol +209 -0
  145. package/contracts/types/Blocknumber.sol +118 -0
  146. package/contracts/types/ChainId.sol +38 -0
  147. package/contracts/types/NftId.sol +51 -0
  148. package/contracts/types/Timestamp.sol +102 -0
  149. package/contracts/types/UFixed.sol +205 -0
  150. package/package.json +14 -8
  151. package/artifacts/contracts/Dip.sol/DIP.dbg.json +0 -4
  152. package/artifacts/contracts/Dip.sol/DIP.json +0 -338
  153. package/artifacts/contracts/Lock.sol/Lock.dbg.json +0 -4
  154. package/artifacts/contracts/Lock.sol/Lock.json +0 -74
  155. package/contracts/Dip.sol +0 -26
  156. package/contracts/Lock.sol +0 -34
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Hardhat
4
4
 
5
- ### Commands
5
+ ### NPM Commands
6
6
 
7
7
  ```shell
8
8
  npm run build
@@ -13,6 +13,30 @@ npm run test-with-gas
13
13
  npm run coverage
14
14
  ```
15
15
 
16
+ ### Deployment
17
+
18
+ ```
19
+ hh run --network <networkname> scripts/deploy.ts
20
+ ```
21
+
22
+ Networks:
23
+ - hardhat (dynamically created network - https://hardhat.org/hardhat-network/docs/overview)
24
+ - anvil (anvsil chain running in container next when using devcontainer)
25
+ - mumbai (polygon testnet, requires WEB3_INFURA_PROJECT_ID)
26
+ - mainnet (polygon mainnet, requires WEB3_INFURA_PROJECT_ID)
27
+
28
+
29
+ ### Console
30
+
31
+ ```
32
+ hh console --network <networkname>
33
+
34
+ me = hre.ethers.Wallet.fromPhrase('...')
35
+ provider = hre.ethers.provider
36
+ await provider.getBalance(me)
37
+ ```
38
+
39
+
16
40
  ### Documentation
17
41
 
18
42
  https://hardhat.org/hardhat-runner/docs/guides/compile-contracts
@@ -25,9 +49,103 @@ https://hardhat.org/hardhat-runner/docs/guides/compile-contracts
25
49
  forge build
26
50
 
27
51
  forge test
52
+
53
+ # run single test case
54
+ forge test --mt test_decimals
55
+
56
+ # run single test case with substantial logginglogging
57
+ # to include logs as well use -vvvvv
58
+ forge test -vvvv --mt test_decimals
59
+
60
+ # provide gas report for a single test
61
+ forge test --mt test_decimals --gas-report
62
+
63
+ forge coverage
64
+ ```
65
+
66
+ Chisel session
67
+ ```typescript
68
+ import "./contracts/components/Component.sol";
69
+ import "./contracts/components/IPool.sol";
70
+ import "./contracts/components/IProduct.sol";
71
+ import "./contracts/components/Pool.sol";
72
+ import "./contracts/components/Product.sol";
73
+ import "./contracts/instance/access/Access.sol";
74
+ import "./contracts/instance/access/IAccess.sol";
75
+ import "./contracts/instance/component/ComponentModule.sol";
76
+ import "./contracts/instance/component/IComponent.sol";
77
+ import "./contracts/instance/IInstance.sol";
78
+ import "./contracts/instance/policy/IPolicy.sol";
79
+ import "./contracts/instance/policy/PolicyModule.sol";
80
+ import "./contracts/instance/product/IProductService.sol";
81
+ import "./contracts/instance/product/ProductService.sol";
82
+ import "./contracts/registry/IRegistry.sol";
83
+
84
+ import {Instance} from "./contracts/instance/Instance.sol";
85
+ import {Registry} from "./contracts/registry/Registry.sol";
86
+ import {DeployAll} from "./scripts/DeployAll.s.sol";
87
+ import {TestPool} from "./test_forge/mock/TestPool.sol";
88
+ import {TestProduct} from "./test_forge/mock/TestProduct.sol";
89
+
90
+ string memory instanceOwnerName = "instanceOwner";
91
+ address instanceOwner = vm.addr(uint256(keccak256(abi.encodePacked(instanceOwnerName))));
92
+
93
+ string memory productOwnerName = "productOwner";
94
+ address productOwner = vm.addr(uint256(keccak256(abi.encodePacked(productOwnerName))));
95
+
96
+ string memory poolOwnerName = "poolOwner";
97
+ address poolOwner = vm.addr(uint256(keccak256(abi.encodePacked(poolOwnerName))));
98
+
99
+ string memory customerName = "customer";
100
+ address customer = vm.addr(uint256(keccak256(abi.encodePacked(customerName))));
101
+
102
+ DeployAll deployer = new DeployAll();
103
+ (
104
+ Registry registry,
105
+ Instance instance,
106
+ TestProduct product,
107
+ TestPool pool
108
+ ) = deployer.run(
109
+ instanceOwner,
110
+ productOwner,
111
+ poolOwner);
112
+
113
+ ProductService ps = ProductService(address(registry));
114
+
115
+ uint256 bundleNftId = 99;
116
+ uint256 sumInsuredAmount = 1000*10**6;
117
+ uint256 premiumAmount = 110*10**6;
118
+ uint256 lifetime =365*24*3600;
119
+ uint256 policyNftId = ps.createApplicationForBundle(customer, bundleNftId, sumInsuredAmount, premiumAmount, lifetime);
120
+
28
121
  ```
29
122
 
123
+
30
124
  ### Documentation
31
125
 
32
126
  https://book.getfoundry.sh/reference/
33
127
 
128
+ ## Style Guide
129
+
130
+ Solidity code is to be written according to the [Solidity Style Guide](https://docs.soliditylang.org/en/latest/style-guide.html).
131
+
132
+ Documentation of the code should be written inline using [NatSpec](https://docs.soliditylang.org/en/latest/natspec-format.html).
133
+
134
+ ### Naming conventions
135
+
136
+ Additionally, we use the following naming conventions:
137
+
138
+ - 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.
139
+ - 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.
140
+ - 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/).
141
+
142
+ ### Automatic code formatting
143
+
144
+ We use prettier and the solidity plugin to format the code automatically.
145
+ The plugin is configured to use the style guide mentioned above.
146
+ To execute formatting run `npm run prettier`.
147
+
148
+ ### Linting
149
+
150
+ We use solhint to lint the code.
151
+ To execute linting run `npm run lint`.
@@ -0,0 +1,4 @@
1
+ {
2
+ "_format": "hh-sol-dbg-1",
3
+ "buildInfo": "../../../build-info/3a3729938a24cc51ff53b939871edb21.json"
4
+ }
@@ -0,0 +1,179 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "Component",
4
+ "sourceName": "contracts/components/Component.sol",
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": "deployer",
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": "NftId",
76
+ "name": "nftId",
77
+ "type": "uint96"
78
+ }
79
+ ],
80
+ "stateMutability": "view",
81
+ "type": "function"
82
+ },
83
+ {
84
+ "inputs": [],
85
+ "name": "getOwner",
86
+ "outputs": [
87
+ {
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": "NftId",
102
+ "name": "",
103
+ "type": "uint96"
104
+ }
105
+ ],
106
+ "stateMutability": "view",
107
+ "type": "function"
108
+ },
109
+ {
110
+ "inputs": [],
111
+ "name": "getRegistry",
112
+ "outputs": [
113
+ {
114
+ "internalType": "contract IRegistry",
115
+ "name": "registry",
116
+ "type": "address"
117
+ }
118
+ ],
119
+ "stateMutability": "view",
120
+ "type": "function"
121
+ },
122
+ {
123
+ "inputs": [],
124
+ "name": "getType",
125
+ "outputs": [
126
+ {
127
+ "internalType": "uint256",
128
+ "name": "objectType",
129
+ "type": "uint256"
130
+ }
131
+ ],
132
+ "stateMutability": "view",
133
+ "type": "function"
134
+ },
135
+ {
136
+ "inputs": [],
137
+ "name": "isRegisterable",
138
+ "outputs": [
139
+ {
140
+ "internalType": "bool",
141
+ "name": "",
142
+ "type": "bool"
143
+ }
144
+ ],
145
+ "stateMutability": "pure",
146
+ "type": "function"
147
+ },
148
+ {
149
+ "inputs": [],
150
+ "name": "isRegistered",
151
+ "outputs": [
152
+ {
153
+ "internalType": "bool",
154
+ "name": "",
155
+ "type": "bool"
156
+ }
157
+ ],
158
+ "stateMutability": "view",
159
+ "type": "function"
160
+ },
161
+ {
162
+ "inputs": [],
163
+ "name": "register",
164
+ "outputs": [
165
+ {
166
+ "internalType": "NftId",
167
+ "name": "componentId",
168
+ "type": "uint96"
169
+ }
170
+ ],
171
+ "stateMutability": "nonpayable",
172
+ "type": "function"
173
+ }
174
+ ],
175
+ "bytecode": "0x",
176
+ "deployedBytecode": "0x",
177
+ "linkReferences": {},
178
+ "deployedLinkReferences": {}
179
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "_format": "hh-sol-dbg-1",
3
+ "buildInfo": "../../../build-info/3a3729938a24cc51ff53b939871edb21.json"
4
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "InstanceLinked",
4
+ "sourceName": "contracts/components/Component.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "address",
10
+ "name": "instance",
11
+ "type": "address"
12
+ }
13
+ ],
14
+ "stateMutability": "nonpayable",
15
+ "type": "constructor"
16
+ },
17
+ {
18
+ "inputs": [],
19
+ "name": "getInstance",
20
+ "outputs": [
21
+ {
22
+ "internalType": "contract IInstance",
23
+ "name": "instance",
24
+ "type": "address"
25
+ }
26
+ ],
27
+ "stateMutability": "view",
28
+ "type": "function"
29
+ }
30
+ ],
31
+ "bytecode": "0x608060405234801561001057600080fd5b50604051610249380380610249833981810160405281019061003291906100db565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a88261007d565b9050919050565b6100b88161009d565b81146100c357600080fd5b50565b6000815190506100d5816100af565b92915050565b6000602082840312156100f1576100f0610078565b5b60006100ff848285016100c6565b91505092915050565b610132806101176000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063de7b5d1414602d575b600080fd5b60336047565b604051603e919060e3565b60405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060af60ab60a7846070565b6090565b6070565b9050919050565b600060bf82609a565b9050919050565b600060cf8260b6565b9050919050565b60dd8160c6565b82525050565b600060208201905060f6600083018460d6565b9291505056fea264697066735822122086522e9c2ed2b2e613631d0590bd89867aed7243fd1161d5ccf24b52ebc044c364736f6c63430008140033",
32
+ "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063de7b5d1414602d575b600080fd5b60336047565b604051603e919060e3565b60405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060af60ab60a7846070565b6090565b6070565b9050919050565b600060bf82609a565b9050919050565b600060cf8260b6565b9050919050565b60dd8160c6565b82525050565b600060208201905060f6600083018460d6565b9291505056fea264697066735822122086522e9c2ed2b2e613631d0590bd89867aed7243fd1161d5ccf24b52ebc044c364736f6c63430008140033",
33
+ "linkReferences": {},
34
+ "deployedLinkReferences": {}
35
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "_format": "hh-sol-dbg-1",
3
+ "buildInfo": "../../../build-info/3a3729938a24cc51ff53b939871edb21.json"
4
+ }
@@ -0,0 +1,179 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "IPoolComponent",
4
+ "sourceName": "contracts/components/IPool.sol",
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": "NftId",
76
+ "name": "nftId",
77
+ "type": "uint96"
78
+ }
79
+ ],
80
+ "stateMutability": "view",
81
+ "type": "function"
82
+ },
83
+ {
84
+ "inputs": [],
85
+ "name": "getOwner",
86
+ "outputs": [
87
+ {
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": "NftId",
102
+ "name": "parentNftId",
103
+ "type": "uint96"
104
+ }
105
+ ],
106
+ "stateMutability": "view",
107
+ "type": "function"
108
+ },
109
+ {
110
+ "inputs": [],
111
+ "name": "getRegistry",
112
+ "outputs": [
113
+ {
114
+ "internalType": "contract IRegistry",
115
+ "name": "registry",
116
+ "type": "address"
117
+ }
118
+ ],
119
+ "stateMutability": "view",
120
+ "type": "function"
121
+ },
122
+ {
123
+ "inputs": [],
124
+ "name": "getType",
125
+ "outputs": [
126
+ {
127
+ "internalType": "uint256",
128
+ "name": "objectType",
129
+ "type": "uint256"
130
+ }
131
+ ],
132
+ "stateMutability": "view",
133
+ "type": "function"
134
+ },
135
+ {
136
+ "inputs": [],
137
+ "name": "isRegisterable",
138
+ "outputs": [
139
+ {
140
+ "internalType": "bool",
141
+ "name": "",
142
+ "type": "bool"
143
+ }
144
+ ],
145
+ "stateMutability": "pure",
146
+ "type": "function"
147
+ },
148
+ {
149
+ "inputs": [],
150
+ "name": "isRegistered",
151
+ "outputs": [
152
+ {
153
+ "internalType": "bool",
154
+ "name": "",
155
+ "type": "bool"
156
+ }
157
+ ],
158
+ "stateMutability": "view",
159
+ "type": "function"
160
+ },
161
+ {
162
+ "inputs": [],
163
+ "name": "register",
164
+ "outputs": [
165
+ {
166
+ "internalType": "NftId",
167
+ "name": "nftId",
168
+ "type": "uint96"
169
+ }
170
+ ],
171
+ "stateMutability": "nonpayable",
172
+ "type": "function"
173
+ }
174
+ ],
175
+ "bytecode": "0x",
176
+ "deployedBytecode": "0x",
177
+ "linkReferences": {},
178
+ "deployedLinkReferences": {}
179
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "_format": "hh-sol-dbg-1",
3
+ "buildInfo": "../../../build-info/3a3729938a24cc51ff53b939871edb21.json"
4
+ }