@etherisc/gif-next 0.0.2-b9b3e89 → 0.0.2-ed4dd55

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. package/artifacts/contracts/components/Component.sol/Component.dbg.json +1 -1
  2. package/artifacts/contracts/components/Component.sol/InstanceLinked.dbg.json +1 -1
  3. package/artifacts/contracts/components/Component.sol/InstanceLinked.json +2 -2
  4. package/artifacts/contracts/components/IPool.sol/IPoolComponent.dbg.json +1 -1
  5. package/artifacts/contracts/components/IProduct.sol/IProductComponent.dbg.json +1 -1
  6. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  7. package/artifacts/contracts/components/Pool.sol/Pool.json +2 -2
  8. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  9. package/artifacts/contracts/components/Product.sol/Product.json +2 -2
  10. package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +4 -0
  11. package/artifacts/contracts/experiment/inheritance/A.sol/A.json +128 -0
  12. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +4 -0
  13. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.json +42 -0
  14. package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +4 -0
  15. package/artifacts/contracts/experiment/inheritance/B.sol/B.json +76 -0
  16. package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +4 -0
  17. package/artifacts/contracts/experiment/inheritance/C.sol/C.json +89 -0
  18. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +4 -0
  19. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.json +128 -0
  20. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +4 -0
  21. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.json +37 -0
  22. package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +4 -0
  23. package/artifacts/contracts/experiment/inheritance/IB.sol/IB.json +50 -0
  24. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +4 -0
  25. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.json +63 -0
  26. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +4 -0
  27. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.json +10 -0
  28. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +4 -0
  29. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.json +10 -0
  30. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  31. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  32. package/artifacts/contracts/instance/Instance.sol/Instance.json +2 -2
  33. package/artifacts/contracts/instance/access/Access.sol/AccessModule.dbg.json +1 -1
  34. package/artifacts/contracts/instance/access/IAccess.sol/IAccess.dbg.json +1 -1
  35. package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.dbg.json +1 -1
  36. package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.dbg.json +1 -1
  37. package/artifacts/contracts/instance/access/IAccess.sol/IAccessModule.dbg.json +1 -1
  38. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.dbg.json +1 -1
  39. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.dbg.json +1 -1
  40. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.json +2 -2
  41. package/artifacts/contracts/instance/component/IComponent.sol/IComponent.dbg.json +1 -1
  42. package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.dbg.json +1 -1
  43. package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.dbg.json +1 -1
  44. package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.dbg.json +1 -1
  45. package/artifacts/contracts/instance/component/IComponent.sol/IInstanceLinked.dbg.json +1 -1
  46. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicy.dbg.json +1 -1
  47. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.dbg.json +1 -1
  48. package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.dbg.json +1 -1
  49. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPool.dbg.json +1 -1
  50. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.dbg.json +1 -1
  51. package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.dbg.json +1 -1
  52. package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.dbg.json +1 -1
  53. package/artifacts/contracts/instance/product/IProductService.sol/IProductService.dbg.json +1 -1
  54. package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.dbg.json +1 -1
  55. package/artifacts/contracts/instance/product/ProductService.sol/ProductService.dbg.json +1 -1
  56. package/artifacts/contracts/instance/product/ProductService.sol/ProductService.json +2 -2
  57. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +4 -0
  58. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +534 -0
  59. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +4 -0
  60. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.json +452 -0
  61. package/artifacts/contracts/registry/IRegistry.sol/IOwnable.dbg.json +1 -1
  62. package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.dbg.json +1 -1
  63. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  64. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +26 -18
  65. package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.dbg.json +1 -1
  66. package/artifacts/contracts/registry/Registry.sol/Registerable.dbg.json +1 -1
  67. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  68. package/artifacts/contracts/registry/Registry.sol/Registry.json +43 -27
  69. package/artifacts/contracts/registry/Registry.sol/RegistryLinked.dbg.json +1 -1
  70. package/artifacts/contracts/registry/Registry.sol/RegistryLinked.json +2 -2
  71. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +4 -0
  72. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.json +10 -0
  73. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +4 -0
  74. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +10 -0
  75. package/contracts/experiment/inheritance/A.sol +56 -0
  76. package/contracts/experiment/inheritance/B.sol +23 -0
  77. package/contracts/experiment/inheritance/C.sol +28 -0
  78. package/contracts/experiment/inheritance/IA.sol +18 -0
  79. package/contracts/experiment/inheritance/IB.sol +9 -0
  80. package/contracts/experiment/inheritance/IC.sol +11 -0
  81. package/contracts/experiment/types/TypeA.sol +42 -0
  82. package/contracts/experiment/types/TypeB.sol +24 -0
  83. package/contracts/instance/IInstance.sol +3 -3
  84. package/contracts/registry/ChainNft.sol +173 -0
  85. package/contracts/registry/IChainNft.sol +18 -0
  86. package/contracts/registry/IRegistry.sol +3 -1
  87. package/contracts/registry/Registry.sol +21 -42
  88. package/contracts/types/ChainId.sol +24 -0
  89. package/contracts/types/NftId.sol +25 -0
  90. package/package.json +1 -1
@@ -3,11 +3,6 @@
3
3
  "contractName": "Registry",
4
4
  "sourceName": "contracts/registry/Registry.sol",
5
5
  "abi": [
6
- {
7
- "inputs": [],
8
- "stateMutability": "nonpayable",
9
- "type": "constructor"
10
- },
11
6
  {
12
7
  "inputs": [],
13
8
  "name": "BUNDLE",
@@ -21,6 +16,19 @@
21
16
  "stateMutability": "pure",
22
17
  "type": "function"
23
18
  },
19
+ {
20
+ "inputs": [],
21
+ "name": "EMPTY_URI",
22
+ "outputs": [
23
+ {
24
+ "internalType": "string",
25
+ "name": "",
26
+ "type": "string"
27
+ }
28
+ ],
29
+ "stateMutability": "view",
30
+ "type": "function"
31
+ },
24
32
  {
25
33
  "inputs": [],
26
34
  "name": "INSTANCE",
@@ -103,7 +111,7 @@
103
111
  "inputs": [
104
112
  {
105
113
  "internalType": "uint256",
106
- "name": "id",
114
+ "name": "nftId",
107
115
  "type": "uint256"
108
116
  }
109
117
  ],
@@ -145,6 +153,19 @@
145
153
  "stateMutability": "view",
146
154
  "type": "function"
147
155
  },
156
+ {
157
+ "inputs": [],
158
+ "name": "getNftAddress",
159
+ "outputs": [
160
+ {
161
+ "internalType": "address",
162
+ "name": "nft",
163
+ "type": "address"
164
+ }
165
+ ],
166
+ "stateMutability": "view",
167
+ "type": "function"
168
+ },
148
169
  {
149
170
  "inputs": [
150
171
  {
@@ -181,7 +202,7 @@
181
202
  "inputs": [
182
203
  {
183
204
  "internalType": "uint256",
184
- "name": "id",
205
+ "name": "nftId",
185
206
  "type": "uint256"
186
207
  }
187
208
  ],
@@ -196,6 +217,19 @@
196
217
  "stateMutability": "view",
197
218
  "type": "function"
198
219
  },
220
+ {
221
+ "inputs": [
222
+ {
223
+ "internalType": "address",
224
+ "name": "chainNft",
225
+ "type": "address"
226
+ }
227
+ ],
228
+ "name": "initialize",
229
+ "outputs": [],
230
+ "stateMutability": "nonpayable",
231
+ "type": "function"
232
+ },
199
233
  {
200
234
  "inputs": [
201
235
  {
@@ -262,28 +296,10 @@
262
296
  ],
263
297
  "stateMutability": "nonpayable",
264
298
  "type": "function"
265
- },
266
- {
267
- "inputs": [
268
- {
269
- "internalType": "uint256",
270
- "name": "id",
271
- "type": "uint256"
272
- },
273
- {
274
- "internalType": "address",
275
- "name": "newOwner",
276
- "type": "address"
277
- }
278
- ],
279
- "name": "transfer",
280
- "outputs": [],
281
- "stateMutability": "nonpayable",
282
- "type": "function"
283
299
  }
284
300
  ],
285
- "bytecode": "0x608060405234801561001057600080fd5b506000600481905550611596806100286000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806382bfefc811610097578063c41a360a11610066578063c41a360a1461028a578063d15db8b4146102ba578063d272ac1e146102d8578063dadbccee14610308576100f5565b806382bfefc8146101f0578063ab10b8ec1461020e578063b7760c8f1461023e578063c3c5a5471461025a576100f5565b806338013f02116100d357806338013f02146101665780634420e4861461018457806353bed7c3146101b45780637535d246146101d2576100f5565b80631a3cd59a146100fa5780631a848cfb1461012a57806325425a9114610148575b600080fd5b610114600480360381019061010f9190610f69565b610326565b604051610121919061104e565b60405180910390f35b61013261041c565b60405161013f9190611078565b60405180910390f35b610150610429565b60405161015d9190611078565b60405180910390f35b61016e610432565b60405161017b9190611078565b60405180910390f35b61019e600480360381019061019991906110bf565b61043b565b6040516101ab9190611078565b60405180910390f35b6101bc610ab6565b6040516101c99190611078565b60405180910390f35b6101da610abf565b6040516101e79190611078565b60405180910390f35b6101f8610ac8565b6040516102059190611078565b60405180910390f35b610228600480360381019061022391906110ec565b610ad1565b6040516102359190611078565b60405180910390f35b6102586004803603810190610253919061113f565b610c5a565b005b610274600480360381019061026f91906110bf565b610d51565b604051610281919061119a565b60405180910390f35b6102a4600480360381019061029f9190610f69565b610d9c565b6040516102b191906111c4565b60405180910390f35b6102c2610dd9565b6040516102cf9190611078565b60405180910390f35b6102f260048036038101906102ed91906110bf565b610de2565b6040516102ff9190611078565b60405180910390f35b610310610e2b565b60405161031d9190611078565b60405180910390f35b61032e610ed3565b6000808381526020019081526020016000206040518060a00160405290816000820154815260200160018201548152602001600282015481526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050919050565b6000600380549050905090565b60006032905090565b6000603c905090565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146104be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104b59061123c565b60405180910390fd5b60008290508073ffffffffffffffffffffffffffffffffffffffff166379e829d06040518163ffffffff1660e01b8152600401602060405180830381865afa15801561050e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105329190611288565b610571576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056890611301565b60405180910390fd5b610579610dd9565b8173ffffffffffffffffffffffffffffffffffffffff166315dae03e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e89190611336565b1461078f5760008060008373ffffffffffffffffffffffffffffffffffffffff166331b62a3b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561063d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106619190611336565b81526020019081526020016000206040518060a00160405290816000820154815260200160018201548152602001600282015481526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050600081600001511161078d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610784906113af565b60405180910390fd5b505b6108068173ffffffffffffffffffffffffffffffffffffffff1663fb2cb1016040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107dd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080191906113e4565b610e34565b915060006040518060a001604052808481526020018373ffffffffffffffffffffffffffffffffffffffff166331b62a3b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610866573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088a9190611336565b81526020018373ffffffffffffffffffffffffffffffffffffffff166315dae03e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108fe9190611336565b81526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1663fb2cb1016040518163ffffffff1660e01b8152600401602060405180830381865afa15801561096a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061098e91906113e4565b73ffffffffffffffffffffffffffffffffffffffff1681525090508060008085815260200190815260200160002060008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555090505082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050919050565b6000605a905090565b60006046905090565b6000601e905090565b6000610adb610e2b565b831480610aee5750610aeb610ab6565b83145b610b2d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b249061145d565b60405180910390fd5b610b3682610e34565b905060006040518060a00160405280838152602001868152602001858152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1681525090508060008084815260200190815260200160002060008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050509392505050565b6001600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610cfb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cf2906114c9565b60405180910390fd5b806001600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054119050919050565b60006001600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006028905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60006050905090565b600060046000815480929190610e4990611518565b91905055506004549050816001600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506003819080600181540180825580915050600190039060005260206000200160009091909190915055919050565b6040518060a00160405280600081526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b600080fd5b6000819050919050565b610f4681610f33565b8114610f5157600080fd5b50565b600081359050610f6381610f3d565b92915050565b600060208284031215610f7f57610f7e610f2e565b5b6000610f8d84828501610f54565b91505092915050565b610f9f81610f33565b82525050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610fd082610fa5565b9050919050565b610fe081610fc5565b82525050565b60a082016000820151610ffc6000850182610f96565b50602082015161100f6020850182610f96565b5060408201516110226040850182610f96565b5060608201516110356060850182610fd7565b5060808201516110486080850182610fd7565b50505050565b600060a0820190506110636000830184610fe6565b92915050565b61107281610f33565b82525050565b600060208201905061108d6000830184611069565b92915050565b61109c81610fc5565b81146110a757600080fd5b50565b6000813590506110b981611093565b92915050565b6000602082840312156110d5576110d4610f2e565b5b60006110e3848285016110aa565b91505092915050565b60008060006060848603121561110557611104610f2e565b5b600061111386828701610f54565b935050602061112486828701610f54565b9250506040611135868287016110aa565b9150509250925092565b6000806040838503121561115657611155610f2e565b5b600061116485828601610f54565b9250506020611175858286016110aa565b9150509250929050565b60008115159050919050565b6111948161117f565b82525050565b60006020820190506111af600083018461118b565b92915050565b6111be81610fc5565b82525050565b60006020820190506111d960008301846111b5565b92915050565b600082825260208201905092915050565b7f4552524f523a5245472d3030313a414c52454144595f52454749535445524544600082015250565b60006112266020836111df565b9150611231826111f0565b602082019050919050565b6000602082019050818103600083015261125581611219565b9050919050565b6112658161117f565b811461127057600080fd5b50565b6000815190506112828161125c565b92915050565b60006020828403121561129e5761129d610f2e565b5b60006112ac84828501611273565b91505092915050565b7f4552524f523a5245472d3030323a4e4f545f524547495354455241424c450000600082015250565b60006112eb601e836111df565b91506112f6826112b5565b602082019050919050565b6000602082019050818103600083015261131a816112de565b9050919050565b60008151905061133081610f3d565b92915050565b60006020828403121561134c5761134b610f2e565b5b600061135a84828501611321565b91505092915050565b7f4552524f523a5245472d3030333a504152454e545f4e4f545f464f554e440000600082015250565b6000611399601e836111df565b91506113a482611363565b602082019050919050565b600060208201905081810360008301526113c88161138c565b9050919050565b6000815190506113de81611093565b92915050565b6000602082840312156113fa576113f9610f2e565b5b6000611408848285016113cf565b91505092915050565b7f4552524f523a5245472d3030353a545950455f494e56414c4944000000000000600082015250565b6000611447601a836111df565b915061145282611411565b602082019050919050565b600060208201905081810360008301526114768161143a565b9050919050565b7f4552524f523a5245472d3031303a4e4f545f4f574e4552000000000000000000600082015250565b60006114b36017836111df565b91506114be8261147d565b602082019050919050565b600060208201905081810360008301526114e2816114a6565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061152382610f33565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611555576115546114e9565b5b60018201905091905056fea26469706673582212203fde97cde480e7aab92fcfa885a1fe75694f7308dda0d145a1b0f71b6a14c3c664736f6c63430008140033",
286
- "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100f55760003560e01c806382bfefc811610097578063c41a360a11610066578063c41a360a1461028a578063d15db8b4146102ba578063d272ac1e146102d8578063dadbccee14610308576100f5565b806382bfefc8146101f0578063ab10b8ec1461020e578063b7760c8f1461023e578063c3c5a5471461025a576100f5565b806338013f02116100d357806338013f02146101665780634420e4861461018457806353bed7c3146101b45780637535d246146101d2576100f5565b80631a3cd59a146100fa5780631a848cfb1461012a57806325425a9114610148575b600080fd5b610114600480360381019061010f9190610f69565b610326565b604051610121919061104e565b60405180910390f35b61013261041c565b60405161013f9190611078565b60405180910390f35b610150610429565b60405161015d9190611078565b60405180910390f35b61016e610432565b60405161017b9190611078565b60405180910390f35b61019e600480360381019061019991906110bf565b61043b565b6040516101ab9190611078565b60405180910390f35b6101bc610ab6565b6040516101c99190611078565b60405180910390f35b6101da610abf565b6040516101e79190611078565b60405180910390f35b6101f8610ac8565b6040516102059190611078565b60405180910390f35b610228600480360381019061022391906110ec565b610ad1565b6040516102359190611078565b60405180910390f35b6102586004803603810190610253919061113f565b610c5a565b005b610274600480360381019061026f91906110bf565b610d51565b604051610281919061119a565b60405180910390f35b6102a4600480360381019061029f9190610f69565b610d9c565b6040516102b191906111c4565b60405180910390f35b6102c2610dd9565b6040516102cf9190611078565b60405180910390f35b6102f260048036038101906102ed91906110bf565b610de2565b6040516102ff9190611078565b60405180910390f35b610310610e2b565b60405161031d9190611078565b60405180910390f35b61032e610ed3565b6000808381526020019081526020016000206040518060a00160405290816000820154815260200160018201548152602001600282015481526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050919050565b6000600380549050905090565b60006032905090565b6000603c905090565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146104be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104b59061123c565b60405180910390fd5b60008290508073ffffffffffffffffffffffffffffffffffffffff166379e829d06040518163ffffffff1660e01b8152600401602060405180830381865afa15801561050e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105329190611288565b610571576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056890611301565b60405180910390fd5b610579610dd9565b8173ffffffffffffffffffffffffffffffffffffffff166315dae03e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e89190611336565b1461078f5760008060008373ffffffffffffffffffffffffffffffffffffffff166331b62a3b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561063d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106619190611336565b81526020019081526020016000206040518060a00160405290816000820154815260200160018201548152602001600282015481526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050600081600001511161078d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610784906113af565b60405180910390fd5b505b6108068173ffffffffffffffffffffffffffffffffffffffff1663fb2cb1016040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107dd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080191906113e4565b610e34565b915060006040518060a001604052808481526020018373ffffffffffffffffffffffffffffffffffffffff166331b62a3b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610866573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088a9190611336565b81526020018373ffffffffffffffffffffffffffffffffffffffff166315dae03e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108fe9190611336565b81526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1663fb2cb1016040518163ffffffff1660e01b8152600401602060405180830381865afa15801561096a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061098e91906113e4565b73ffffffffffffffffffffffffffffffffffffffff1681525090508060008085815260200190815260200160002060008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555090505082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050919050565b6000605a905090565b60006046905090565b6000601e905090565b6000610adb610e2b565b831480610aee5750610aeb610ab6565b83145b610b2d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b249061145d565b60405180910390fd5b610b3682610e34565b905060006040518060a00160405280838152602001868152602001858152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1681525090508060008084815260200190815260200160002060008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050509392505050565b6001600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610cfb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cf2906114c9565b60405180910390fd5b806001600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054119050919050565b60006001600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006028905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60006050905090565b600060046000815480929190610e4990611518565b91905055506004549050816001600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506003819080600181540180825580915050600190039060005260206000200160009091909190915055919050565b6040518060a00160405280600081526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b600080fd5b6000819050919050565b610f4681610f33565b8114610f5157600080fd5b50565b600081359050610f6381610f3d565b92915050565b600060208284031215610f7f57610f7e610f2e565b5b6000610f8d84828501610f54565b91505092915050565b610f9f81610f33565b82525050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610fd082610fa5565b9050919050565b610fe081610fc5565b82525050565b60a082016000820151610ffc6000850182610f96565b50602082015161100f6020850182610f96565b5060408201516110226040850182610f96565b5060608201516110356060850182610fd7565b5060808201516110486080850182610fd7565b50505050565b600060a0820190506110636000830184610fe6565b92915050565b61107281610f33565b82525050565b600060208201905061108d6000830184611069565b92915050565b61109c81610fc5565b81146110a757600080fd5b50565b6000813590506110b981611093565b92915050565b6000602082840312156110d5576110d4610f2e565b5b60006110e3848285016110aa565b91505092915050565b60008060006060848603121561110557611104610f2e565b5b600061111386828701610f54565b935050602061112486828701610f54565b9250506040611135868287016110aa565b9150509250925092565b6000806040838503121561115657611155610f2e565b5b600061116485828601610f54565b9250506020611175858286016110aa565b9150509250929050565b60008115159050919050565b6111948161117f565b82525050565b60006020820190506111af600083018461118b565b92915050565b6111be81610fc5565b82525050565b60006020820190506111d960008301846111b5565b92915050565b600082825260208201905092915050565b7f4552524f523a5245472d3030313a414c52454144595f52454749535445524544600082015250565b60006112266020836111df565b9150611231826111f0565b602082019050919050565b6000602082019050818103600083015261125581611219565b9050919050565b6112658161117f565b811461127057600080fd5b50565b6000815190506112828161125c565b92915050565b60006020828403121561129e5761129d610f2e565b5b60006112ac84828501611273565b91505092915050565b7f4552524f523a5245472d3030323a4e4f545f524547495354455241424c450000600082015250565b60006112eb601e836111df565b91506112f6826112b5565b602082019050919050565b6000602082019050818103600083015261131a816112de565b9050919050565b60008151905061133081610f3d565b92915050565b60006020828403121561134c5761134b610f2e565b5b600061135a84828501611321565b91505092915050565b7f4552524f523a5245472d3030333a504152454e545f4e4f545f464f554e440000600082015250565b6000611399601e836111df565b91506113a482611363565b602082019050919050565b600060208201905081810360008301526113c88161138c565b9050919050565b6000815190506113de81611093565b92915050565b6000602082840312156113fa576113f9610f2e565b5b6000611408848285016113cf565b91505092915050565b7f4552524f523a5245472d3030353a545950455f494e56414c4944000000000000600082015250565b6000611447601a836111df565b915061145282611411565b602082019050919050565b600060208201905081810360008301526114768161143a565b9050919050565b7f4552524f523a5245472d3031303a4e4f545f4f574e4552000000000000000000600082015250565b60006114b36017836111df565b91506114be8261147d565b602082019050919050565b600060208201905081810360008301526114e2816114a6565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061152382610f33565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611555576115546114e9565b5b60018201905091905056fea26469706673582212203fde97cde480e7aab92fcfa885a1fe75694f7308dda0d145a1b0f71b6a14c3c664736f6c63430008140033",
301
+ "bytecode": "0x608060405234801561001057600080fd5b506117e3806100206000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c806382bfefc8116100a2578063c41a360a11610071578063c41a360a146102c0578063c4d66de8146102f0578063d15db8b41461030c578063d272ac1e1461032a578063dadbccee1461035a5761010b565b806382bfefc814610224578063ab10b8ec14610242578063be9a71bd14610272578063c3c5a547146102905761010b565b80633fe9300e116100de5780633fe9300e1461019a5780634420e486146101b857806353bed7c3146101e85780637535d246146102065761010b565b80631a3cd59a146101105780631a848cfb1461014057806325425a911461015e57806338013f021461017c575b600080fd5b61012a60048036038101906101259190611176565b610378565b604051610137919061125b565b60405180910390f35b61014861046e565b6040516101559190611285565b60405180910390f35b610166610506565b6040516101739190611285565b60405180910390f35b61018461050f565b6040516101919190611285565b60405180910390f35b6101a2610518565b6040516101af9190611330565b60405180910390f35b6101d260048036038101906101cd919061137e565b61052b565b6040516101df9190611285565b60405180910390f35b6101f0610c4c565b6040516101fd9190611285565b60405180910390f35b61020e610c55565b60405161021b9190611285565b60405180910390f35b61022c610c5e565b6040516102399190611285565b60405180910390f35b61025c600480360381019061025791906113ab565b610c67565b6040516102699190611285565b60405180910390f35b61027a610e96565b604051610287919061140d565b60405180910390f35b6102aa60048036038101906102a5919061137e565b610ec0565b6040516102b79190611443565b60405180910390f35b6102da60048036038101906102d59190611176565b610f0b565b6040516102e7919061140d565b60405180910390f35b61030a6004803603810190610305919061137e565b610fb0565b005b610314611085565b6040516103219190611285565b60405180910390f35b610344600480360381019061033f919061137e565b61108e565b6040516103519190611285565b60405180910390f35b6103626110d7565b60405161036f9190611285565b60405180910390f35b6103806110e0565b6000808381526020019081526020016000206040518060a00160405290816000820154815260200160018201548152602001600282015481526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105019190611473565b905090565b60006032905090565b6000603c905090565b6040518060200160405280600081525081565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146105ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105a5906114ec565b60405180910390fd5b60008290508073ffffffffffffffffffffffffffffffffffffffff166379e829d06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106229190611538565b610661576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610658906115b1565b60405180910390fd5b610669611085565b8173ffffffffffffffffffffffffffffffffffffffff166315dae03e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d89190611473565b1461087f5760008060008373ffffffffffffffffffffffffffffffffffffffff166331b62a3b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561072d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107519190611473565b81526020019081526020016000206040518060a00160405290816000820154815260200160018201548152602001600282015481526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050600081600001511161087d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108749061161d565b60405180910390fd5b505b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0def5218273ffffffffffffffffffffffffffffffffffffffff1663fb2cb1016040518163ffffffff1660e01b8152600401602060405180830381865afa158015610908573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092c9190611652565b604051806020016040528060008152506040518363ffffffff1660e01b815260040161095992919061167f565b6020604051808303816000875af1158015610978573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099c9190611473565b915060006040518060a001604052808481526020018373ffffffffffffffffffffffffffffffffffffffff166331b62a3b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109fc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a209190611473565b81526020018373ffffffffffffffffffffffffffffffffffffffff166315dae03e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a949190611473565b81526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1663fb2cb1016040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b249190611652565b73ffffffffffffffffffffffffffffffffffffffff1681525090508060008085815260200190815260200160002060008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555090505082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050919050565b6000605a905090565b60006046905090565b6000601e905090565b6000610c716110d7565b831480610c845750610c81610c4c565b83145b610cc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cba906116fb565b60405180910390fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0def52183604051806020016040528060008152506040518363ffffffff1660e01b8152600401610d2f92919061167f565b6020604051808303816000875af1158015610d4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d729190611473565b905060006040518060a00160405280838152602001868152602001858152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1681525090508060008084815260200190815260200160002060008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050509392505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054119050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b8152600401610f689190611285565b602060405180830381865afa158015610f85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa99190611652565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611041576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110389061178d565b60405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60006028905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60006050905090565b6040518060a00160405280600081526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b600080fd5b6000819050919050565b61115381611140565b811461115e57600080fd5b50565b6000813590506111708161114a565b92915050565b60006020828403121561118c5761118b61113b565b5b600061119a84828501611161565b91505092915050565b6111ac81611140565b82525050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006111dd826111b2565b9050919050565b6111ed816111d2565b82525050565b60a08201600082015161120960008501826111a3565b50602082015161121c60208501826111a3565b50604082015161122f60408501826111a3565b50606082015161124260608501826111e4565b50608082015161125560808501826111e4565b50505050565b600060a08201905061127060008301846111f3565b92915050565b61127f81611140565b82525050565b600060208201905061129a6000830184611276565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156112da5780820151818401526020810190506112bf565b60008484015250505050565b6000601f19601f8301169050919050565b6000611302826112a0565b61130c81856112ab565b935061131c8185602086016112bc565b611325816112e6565b840191505092915050565b6000602082019050818103600083015261134a81846112f7565b905092915050565b61135b816111d2565b811461136657600080fd5b50565b60008135905061137881611352565b92915050565b6000602082840312156113945761139361113b565b5b60006113a284828501611369565b91505092915050565b6000806000606084860312156113c4576113c361113b565b5b60006113d286828701611161565b93505060206113e386828701611161565b92505060406113f486828701611369565b9150509250925092565b611407816111d2565b82525050565b600060208201905061142260008301846113fe565b92915050565b60008115159050919050565b61143d81611428565b82525050565b60006020820190506114586000830184611434565b92915050565b60008151905061146d8161114a565b92915050565b6000602082840312156114895761148861113b565b5b60006114978482850161145e565b91505092915050565b7f4552524f523a5245472d3030313a414c52454144595f52454749535445524544600082015250565b60006114d66020836112ab565b91506114e1826114a0565b602082019050919050565b60006020820190508181036000830152611505816114c9565b9050919050565b61151581611428565b811461152057600080fd5b50565b6000815190506115328161150c565b92915050565b60006020828403121561154e5761154d61113b565b5b600061155c84828501611523565b91505092915050565b7f4552524f523a5245472d3030323a4e4f545f524547495354455241424c450000600082015250565b600061159b601e836112ab565b91506115a682611565565b602082019050919050565b600060208201905081810360008301526115ca8161158e565b9050919050565b7f4552524f523a5245472d3030333a504152454e545f4e4f545f464f554e440000600082015250565b6000611607601e836112ab565b9150611612826115d1565b602082019050919050565b60006020820190508181036000830152611636816115fa565b9050919050565b60008151905061164c81611352565b92915050565b6000602082840312156116685761166761113b565b5b60006116768482850161163d565b91505092915050565b600060408201905061169460008301856113fe565b81810360208301526116a681846112f7565b90509392505050565b7f4552524f523a5245472d3030353a545950455f494e56414c4944000000000000600082015250565b60006116e5601a836112ab565b91506116f0826116af565b602082019050919050565b60006020820190508181036000830152611714816116d8565b9050919050565b7f4552524f523a5245472d3030313a414c52454144595f494e495449414c495a4560008201527f4400000000000000000000000000000000000000000000000000000000000000602082015250565b60006117776021836112ab565b91506117828261171b565b604082019050919050565b600060208201905081810360008301526117a68161176a565b905091905056fea2646970667358221220b3d9bb8f0008c6333b80dd7514f21858c42aca09341fe2aa6324e61e9e75084864736f6c63430008140033",
302
+ "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061010b5760003560e01c806382bfefc8116100a2578063c41a360a11610071578063c41a360a146102c0578063c4d66de8146102f0578063d15db8b41461030c578063d272ac1e1461032a578063dadbccee1461035a5761010b565b806382bfefc814610224578063ab10b8ec14610242578063be9a71bd14610272578063c3c5a547146102905761010b565b80633fe9300e116100de5780633fe9300e1461019a5780634420e486146101b857806353bed7c3146101e85780637535d246146102065761010b565b80631a3cd59a146101105780631a848cfb1461014057806325425a911461015e57806338013f021461017c575b600080fd5b61012a60048036038101906101259190611176565b610378565b604051610137919061125b565b60405180910390f35b61014861046e565b6040516101559190611285565b60405180910390f35b610166610506565b6040516101739190611285565b60405180910390f35b61018461050f565b6040516101919190611285565b60405180910390f35b6101a2610518565b6040516101af9190611330565b60405180910390f35b6101d260048036038101906101cd919061137e565b61052b565b6040516101df9190611285565b60405180910390f35b6101f0610c4c565b6040516101fd9190611285565b60405180910390f35b61020e610c55565b60405161021b9190611285565b60405180910390f35b61022c610c5e565b6040516102399190611285565b60405180910390f35b61025c600480360381019061025791906113ab565b610c67565b6040516102699190611285565b60405180910390f35b61027a610e96565b604051610287919061140d565b60405180910390f35b6102aa60048036038101906102a5919061137e565b610ec0565b6040516102b79190611443565b60405180910390f35b6102da60048036038101906102d59190611176565b610f0b565b6040516102e7919061140d565b60405180910390f35b61030a6004803603810190610305919061137e565b610fb0565b005b610314611085565b6040516103219190611285565b60405180910390f35b610344600480360381019061033f919061137e565b61108e565b6040516103519190611285565b60405180910390f35b6103626110d7565b60405161036f9190611285565b60405180910390f35b6103806110e0565b6000808381526020019081526020016000206040518060a00160405290816000820154815260200160018201548152602001600282015481526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105019190611473565b905090565b60006032905090565b6000603c905090565b6040518060200160405280600081525081565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146105ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105a5906114ec565b60405180910390fd5b60008290508073ffffffffffffffffffffffffffffffffffffffff166379e829d06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106229190611538565b610661576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610658906115b1565b60405180910390fd5b610669611085565b8173ffffffffffffffffffffffffffffffffffffffff166315dae03e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d89190611473565b1461087f5760008060008373ffffffffffffffffffffffffffffffffffffffff166331b62a3b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561072d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107519190611473565b81526020019081526020016000206040518060a00160405290816000820154815260200160018201548152602001600282015481526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050600081600001511161087d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108749061161d565b60405180910390fd5b505b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0def5218273ffffffffffffffffffffffffffffffffffffffff1663fb2cb1016040518163ffffffff1660e01b8152600401602060405180830381865afa158015610908573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092c9190611652565b604051806020016040528060008152506040518363ffffffff1660e01b815260040161095992919061167f565b6020604051808303816000875af1158015610978573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099c9190611473565b915060006040518060a001604052808481526020018373ffffffffffffffffffffffffffffffffffffffff166331b62a3b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109fc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a209190611473565b81526020018373ffffffffffffffffffffffffffffffffffffffff166315dae03e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a949190611473565b81526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1663fb2cb1016040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b249190611652565b73ffffffffffffffffffffffffffffffffffffffff1681525090508060008085815260200190815260200160002060008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555090505082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050919050565b6000605a905090565b60006046905090565b6000601e905090565b6000610c716110d7565b831480610c845750610c81610c4c565b83145b610cc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cba906116fb565b60405180910390fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0def52183604051806020016040528060008152506040518363ffffffff1660e01b8152600401610d2f92919061167f565b6020604051808303816000875af1158015610d4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d729190611473565b905060006040518060a00160405280838152602001868152602001858152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1681525090508060008084815260200190815260200160002060008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050509392505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054119050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b8152600401610f689190611285565b602060405180830381865afa158015610f85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa99190611652565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611041576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110389061178d565b60405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60006028905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60006050905090565b6040518060a00160405280600081526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b600080fd5b6000819050919050565b61115381611140565b811461115e57600080fd5b50565b6000813590506111708161114a565b92915050565b60006020828403121561118c5761118b61113b565b5b600061119a84828501611161565b91505092915050565b6111ac81611140565b82525050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006111dd826111b2565b9050919050565b6111ed816111d2565b82525050565b60a08201600082015161120960008501826111a3565b50602082015161121c60208501826111a3565b50604082015161122f60408501826111a3565b50606082015161124260608501826111e4565b50608082015161125560808501826111e4565b50505050565b600060a08201905061127060008301846111f3565b92915050565b61127f81611140565b82525050565b600060208201905061129a6000830184611276565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156112da5780820151818401526020810190506112bf565b60008484015250505050565b6000601f19601f8301169050919050565b6000611302826112a0565b61130c81856112ab565b935061131c8185602086016112bc565b611325816112e6565b840191505092915050565b6000602082019050818103600083015261134a81846112f7565b905092915050565b61135b816111d2565b811461136657600080fd5b50565b60008135905061137881611352565b92915050565b6000602082840312156113945761139361113b565b5b60006113a284828501611369565b91505092915050565b6000806000606084860312156113c4576113c361113b565b5b60006113d286828701611161565b93505060206113e386828701611161565b92505060406113f486828701611369565b9150509250925092565b611407816111d2565b82525050565b600060208201905061142260008301846113fe565b92915050565b60008115159050919050565b61143d81611428565b82525050565b60006020820190506114586000830184611434565b92915050565b60008151905061146d8161114a565b92915050565b6000602082840312156114895761148861113b565b5b60006114978482850161145e565b91505092915050565b7f4552524f523a5245472d3030313a414c52454144595f52454749535445524544600082015250565b60006114d66020836112ab565b91506114e1826114a0565b602082019050919050565b60006020820190508181036000830152611505816114c9565b9050919050565b61151581611428565b811461152057600080fd5b50565b6000815190506115328161150c565b92915050565b60006020828403121561154e5761154d61113b565b5b600061155c84828501611523565b91505092915050565b7f4552524f523a5245472d3030323a4e4f545f524547495354455241424c450000600082015250565b600061159b601e836112ab565b91506115a682611565565b602082019050919050565b600060208201905081810360008301526115ca8161158e565b9050919050565b7f4552524f523a5245472d3030333a504152454e545f4e4f545f464f554e440000600082015250565b6000611607601e836112ab565b9150611612826115d1565b602082019050919050565b60006020820190508181036000830152611636816115fa565b9050919050565b60008151905061164c81611352565b92915050565b6000602082840312156116685761166761113b565b5b60006116768482850161163d565b91505092915050565b600060408201905061169460008301856113fe565b81810360208301526116a681846112f7565b90509392505050565b7f4552524f523a5245472d3030353a545950455f494e56414c4944000000000000600082015250565b60006116e5601a836112ab565b91506116f0826116af565b602082019050919050565b60006020820190508181036000830152611714816116d8565b9050919050565b7f4552524f523a5245472d3030313a414c52454144595f494e495449414c495a4560008201527f4400000000000000000000000000000000000000000000000000000000000000602082015250565b60006117776021836112ab565b91506117828261171b565b604082019050919050565b600060208201905081810360008301526117a68161176a565b905091905056fea2646970667358221220b3d9bb8f0008c6333b80dd7514f21858c42aca09341fe2aa6324e61e9e75084864736f6c63430008140033",
287
303
  "linkReferences": {},
288
304
  "deployedLinkReferences": {}
289
305
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/c2b99ddc284901467151c1af2e33d9be.json"
3
+ "buildInfo": "../../../build-info/ed3ef11345a2570c641488ff5c975aca.json"
4
4
  }
@@ -53,8 +53,8 @@
53
53
  "type": "function"
54
54
  }
55
55
  ],
56
- "bytecode": "0x608060405234801561001057600080fd5b50604051610249380380610249833981810160405281019061003291906100db565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a88261007d565b9050919050565b6100b88161009d565b81146100c357600080fd5b50565b6000815190506100d5816100af565b92915050565b6000602082840312156100f1576100f0610078565b5b60006100ff848285016100c6565b91505092915050565b610132806101176000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80635ab1bd5314602d575b600080fd5b60336047565b604051603e919060e3565b60405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060af60ab60a7846070565b6090565b6070565b9050919050565b600060bf82609a565b9050919050565b600060cf8260b6565b9050919050565b60dd8160c6565b82525050565b600060208201905060f6600083018460d6565b9291505056fea264697066735822122044fdfef7cc7f2534fb92ca6943c35e3562c1041e7665a689cecd602075a8a3cc64736f6c63430008140033",
57
- "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c80635ab1bd5314602d575b600080fd5b60336047565b604051603e919060e3565b60405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060af60ab60a7846070565b6090565b6070565b9050919050565b600060bf82609a565b9050919050565b600060cf8260b6565b9050919050565b60dd8160c6565b82525050565b600060208201905060f6600083018460d6565b9291505056fea264697066735822122044fdfef7cc7f2534fb92ca6943c35e3562c1041e7665a689cecd602075a8a3cc64736f6c63430008140033",
56
+ "bytecode": "0x608060405234801561001057600080fd5b50604051610249380380610249833981810160405281019061003291906100db565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a88261007d565b9050919050565b6100b88161009d565b81146100c357600080fd5b50565b6000815190506100d5816100af565b92915050565b6000602082840312156100f1576100f0610078565b5b60006100ff848285016100c6565b91505092915050565b610132806101176000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80635ab1bd5314602d575b600080fd5b60336047565b604051603e919060e3565b60405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060af60ab60a7846070565b6090565b6070565b9050919050565b600060bf82609a565b9050919050565b600060cf8260b6565b9050919050565b60dd8160c6565b82525050565b600060208201905060f6600083018460d6565b9291505056fea26469706673582212205e251c6161feb424ce832a043a415b134612284e0cb9aa598bbde829849d4d0364736f6c63430008140033",
57
+ "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c80635ab1bd5314602d575b600080fd5b60336047565b604051603e919060e3565b60405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060af60ab60a7846070565b6090565b6070565b9050919050565b600060bf82609a565b9050919050565b600060cf8260b6565b9050919050565b60dd8160c6565b82525050565b600060208201905060f6600083018460d6565b9291505056fea26469706673582212205e251c6161feb424ce832a043a415b134612284e0cb9aa598bbde829849d4d0364736f6c63430008140033",
58
58
  "linkReferences": {},
59
59
  "deployedLinkReferences": {}
60
60
  }
@@ -0,0 +1,4 @@
1
+ {
2
+ "_format": "hh-sol-dbg-1",
3
+ "buildInfo": "../../../build-info/ed3ef11345a2570c641488ff5c975aca.json"
4
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "ChainIdLib",
4
+ "sourceName": "contracts/types/ChainId.sol",
5
+ "abi": [],
6
+ "bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220dd3f9a8ead123d3fb63286326c7c66922df2a931f4f9084bb2d119acb033596d64736f6c63430008140033",
7
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220dd3f9a8ead123d3fb63286326c7c66922df2a931f4f9084bb2d119acb033596d64736f6c63430008140033",
8
+ "linkReferences": {},
9
+ "deployedLinkReferences": {}
10
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "_format": "hh-sol-dbg-1",
3
+ "buildInfo": "../../../build-info/ed3ef11345a2570c641488ff5c975aca.json"
4
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "NftIdLib",
4
+ "sourceName": "contracts/types/NftId.sol",
5
+ "abi": [],
6
+ "bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220032da13230c796286a3fa1acdd6b13903f9e4b1e749979d71d48a4930b7159c564736f6c63430008140033",
7
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220032da13230c796286a3fa1acdd6b13903f9e4b1e749979d71d48a4930b7159c564736f6c63430008140033",
8
+ "linkReferences": {},
9
+ "deployedLinkReferences": {}
10
+ }
@@ -0,0 +1,56 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ pragma solidity ^0.8.19;
3
+
4
+ import {IA, ISharedA} from "./IA.sol";
5
+ import {B} from "./B.sol";
6
+ import {C} from "./C.sol";
7
+
8
+ /*
9
+
10
+ # dependency graph
11
+
12
+ B <...+
13
+ ^ |
14
+ | |
15
+ A --> C
16
+
17
+ - A is the main contract
18
+ - A provides functionality implemented by modules B and C
19
+ - B and C rely on functionality shared by A
20
+ - C accesses functionality of module B
21
+
22
+ # chisel session
23
+
24
+ import {A} from "./contracts/experiment/A.sol";
25
+ A a = new A();
26
+ uint(a.getA())
27
+ uint(a.getB()))
28
+ uint(a.getC())
29
+ uint(a.getAfromB())
30
+ uint(a.getAfromC())
31
+ uint(a.getBfromC())
32
+ a.setA(100);
33
+ a.setB(10);
34
+ a.setC(20);
35
+ */
36
+
37
+ contract AShared is ISharedA {
38
+
39
+ uint256 private _x;
40
+
41
+ constructor() {
42
+ _x = 42;
43
+ }
44
+
45
+ function getA() external view override returns(uint256) { return _x; }
46
+ function setA(uint256 newA) external override { _x = newA; }
47
+ }
48
+
49
+ contract A is
50
+ AShared,
51
+ B,
52
+ C,
53
+ IA
54
+ {
55
+
56
+ }
@@ -0,0 +1,23 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ pragma solidity ^0.8.19;
3
+
4
+ import {ISharedA} from "./IA.sol";
5
+ import {IB} from "./IB.sol";
6
+
7
+ abstract contract B is ISharedA, IB {
8
+
9
+ // names of private variables can be re-used in inheritance
10
+ uint256 private _x;
11
+
12
+ constructor() {
13
+ _x = 1;
14
+ }
15
+
16
+ // access own state
17
+ function getB() external view override returns(uint256) { return _x; }
18
+ function setB(uint256 newB) external override { _x = newB; }
19
+
20
+ // access state from parent contract A
21
+ function getAfromB() external view override returns(uint256) { return this.getA(); }
22
+
23
+ }
@@ -0,0 +1,28 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ pragma solidity ^0.8.19;
3
+
4
+ import {ISharedA} from "./IA.sol";
5
+ import {IB} from "./IB.sol";
6
+ import {IC} from "./IC.sol";
7
+
8
+ abstract contract C is ISharedA, IC {
9
+
10
+ uint256 private _x;
11
+
12
+ constructor() {
13
+ _x = 2;
14
+ }
15
+
16
+ // access own state
17
+ function getC() external view override returns(uint256) { return _x; }
18
+ function setC(uint256 newC) external override { _x = newC; }
19
+
20
+ // access state from parent contract A
21
+ function getAfromC() external view override returns(uint256) { return this.getA(); }
22
+
23
+ // access state from other module B
24
+ function getBfromC() external view override returns(uint256) {
25
+ IB b = IB(address(this));
26
+ return b.getB();
27
+ }
28
+ }
@@ -0,0 +1,18 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ pragma solidity ^0.8.19;
3
+
4
+ import {IB} from "./IB.sol";
5
+ import {IC} from "./IC.sol";
6
+
7
+ interface ISharedA {
8
+
9
+ function getA() external view returns(uint256);
10
+ function setA(uint256 newA) external;
11
+ }
12
+
13
+ interface IA is
14
+ ISharedA,
15
+ IB,
16
+ IC
17
+ {
18
+ }
@@ -0,0 +1,9 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ pragma solidity ^0.8.19;
3
+
4
+ interface IB {
5
+
6
+ function getAfromB() external view returns(uint256);
7
+ function getB() external view returns(uint256);
8
+ function setB(uint256 newA) external;
9
+ }
@@ -0,0 +1,11 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ pragma solidity ^0.8.19;
3
+
4
+ interface IC {
5
+
6
+ function getAfromC() external view returns(uint256);
7
+ function getBfromC() external view returns(uint256);
8
+
9
+ function getC() external view returns(uint256);
10
+ function setC(uint256 newA) external;
11
+ }
@@ -0,0 +1,42 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ pragma solidity ^0.8.19;
3
+
4
+ /*
5
+ # chisel session for user defined types
6
+
7
+ import {TypeA, toTypeA} from "./contracts/experiment/types/TypeA.sol";
8
+ TypeA a = toTypeA(1);
9
+ TypeA b = toTypeA(2);
10
+ uint(a.toInt())
11
+ uint(b.toInt())
12
+ a == b
13
+ a != b
14
+
15
+ import {TypeB, toTypeB} from "./contracts/experiment/types/TypeB.sol";
16
+ TypeB x = toTypeB(33);
17
+ uint(x.toInt())
18
+ a == x; // -> error
19
+ a.toInt() == x.toInt() // -> no error
20
+ */
21
+
22
+ // bytes5 allows for chain ids up to 13 digits
23
+ type TypeA is uint248;
24
+
25
+ // type bindings
26
+ using {
27
+ eqTypeA as ==,
28
+ neTypeA as !=,
29
+ TypeALib.toInt
30
+ } for TypeA global;
31
+
32
+ // general pure free functions
33
+ function toTypeA(uint256 typeA) pure returns(TypeA) { return TypeA.wrap(uint248(typeA)); }
34
+
35
+ // pure free functions for operators
36
+ function eqTypeA(TypeA a, TypeA b) pure returns(bool isSame) { return TypeA.unwrap(a) == TypeA.unwrap(b); }
37
+ function neTypeA(TypeA a, TypeA b) pure returns(bool isDifferent) { return TypeA.unwrap(a) != TypeA.unwrap(b); }
38
+
39
+ // library functions that operate on user defined type
40
+ library TypeALib {
41
+ function toInt(TypeA typeA) internal pure returns(uint256) { return uint256(TypeA.unwrap(typeA)); }
42
+ }
@@ -0,0 +1,24 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ pragma solidity ^0.8.19;
3
+
4
+ // bytes5 allows for chain ids up to 13 digits
5
+ type TypeB is uint248;
6
+
7
+ // type bindings
8
+ using {
9
+ eqTypeB as ==,
10
+ addTypeB as +,
11
+ TypeBLib.toInt
12
+ } for TypeB global;
13
+
14
+ // general pure free functions
15
+ function toTypeB(uint256 x) pure returns(TypeB) { return TypeB.wrap(uint248(x)); }
16
+
17
+ // pure free functions for operators
18
+ function eqTypeB(TypeB a, TypeB b) pure returns(bool isSame) { return TypeB.unwrap(a) == TypeB.unwrap(b); }
19
+ function addTypeB(TypeB a, TypeB b) pure returns(TypeB sum) { return TypeB.wrap(TypeB.unwrap(a) + TypeB.unwrap(b)); }
20
+
21
+ // library functions that operate on user defined type
22
+ library TypeBLib {
23
+ function toInt(TypeB b) internal pure returns(uint256) { return uint256(TypeB.unwrap(b)); }
24
+ }
@@ -12,9 +12,9 @@ import {IPoolModule} from "./pool/IPoolModule.sol";
12
12
  interface IInstance is
13
13
  IRegisterable,
14
14
  IAccessModule,
15
- IComponentModule,
16
- IProductModule,
17
15
  IPolicyModule,
18
- IPoolModule
16
+ IPoolModule,
17
+ IComponentModule,
18
+ IProductModule
19
19
  { }
20
20