impermax-sdk 1.0.0

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 (103) hide show
  1. package/.idea/impermax-sdk.iml +12 -0
  2. package/.idea/misc.xml +6 -0
  3. package/.idea/modules.xml +8 -0
  4. package/.idea/workspace.xml +642 -0
  5. package/abis/ImpermaxABI.ts +3 -0
  6. package/abis/contracts/BAllowance.json +4735 -0
  7. package/abis/contracts/BDeployer.json +1195 -0
  8. package/abis/contracts/BInterestRateModel.json +10796 -0
  9. package/abis/contracts/BSetter.json +6219 -0
  10. package/abis/contracts/BStorage.json +2613 -0
  11. package/abis/contracts/Borrowable.json +19937 -0
  12. package/abis/contracts/CDeployer.json +1104 -0
  13. package/abis/contracts/CSetter.json +5094 -0
  14. package/abis/contracts/CStorage.json +516 -0
  15. package/abis/contracts/ClaimAggregator.json +2015 -0
  16. package/abis/contracts/Collateral.json +21615 -0
  17. package/abis/contracts/ERC20.json +819 -0
  18. package/abis/contracts/Factory.json +21986 -0
  19. package/abis/contracts/FarmingPool.json +8601 -0
  20. package/abis/contracts/IBDeployer.json +351 -0
  21. package/abis/contracts/IBorrowTracker.json +346 -0
  22. package/abis/contracts/IBorrowable.json +13207 -0
  23. package/abis/contracts/ICDeployer.json +294 -0
  24. package/abis/contracts/IClaimable.json +406 -0
  25. package/abis/contracts/ICollateral.json +8952 -0
  26. package/abis/contracts/IERC20.json +2376 -0
  27. package/abis/contracts/IFactory.json +3660 -0
  28. package/abis/contracts/IFarmingPool.json +3584 -0
  29. package/abis/contracts/IImpermaxCallee.json +679 -0
  30. package/abis/contracts/IMerkleDistributor.json +1134 -0
  31. package/abis/contracts/IPoolToken.json +5343 -0
  32. package/abis/contracts/IRouter01.json +6891 -0
  33. package/abis/contracts/IRouter02.json +7283 -0
  34. package/abis/contracts/ISimpleUniswapOracle.json +1469 -0
  35. package/abis/contracts/IStakedLPToken.json +7309 -0
  36. package/abis/contracts/IStakingRewards.json +1036 -0
  37. package/abis/contracts/IUniswapV2Callee.json +403 -0
  38. package/abis/contracts/IUniswapV2ERC20.json +3155 -0
  39. package/abis/contracts/IUniswapV2Factory.json +1690 -0
  40. package/abis/contracts/IUniswapV2Pair.json +6761 -0
  41. package/abis/contracts/IWETH.json +561 -0
  42. package/abis/contracts/ImpermaxChef.json +20945 -0
  43. package/abis/contracts/ImpermaxERC20.json +12095 -0
  44. package/abis/contracts/Math.json +1966 -0
  45. package/abis/contracts/MockERC20.json +8884 -0
  46. package/abis/contracts/PoolToken.json +10784 -0
  47. package/abis/contracts/Router01.json +43963 -0
  48. package/abis/contracts/SafeMath.json +6828 -0
  49. package/abis/contracts/SimpleUniswapOracle.json +9640 -0
  50. package/abis/contracts/TransferHelper.json +4875 -0
  51. package/abis/contracts/UQ112x112.json +1201 -0
  52. package/abis/contracts/UniswapV2ERC20.json +10969 -0
  53. package/abis/contracts/UniswapV2Factory.json +5521 -0
  54. package/abis/contracts/UniswapV2Library.json +13789 -0
  55. package/abis/contracts/UniswapV2Pair.json +30782 -0
  56. package/abis/contracts/WETH9.json +6613 -0
  57. package/config/amms.ts +199 -0
  58. package/config/contracts/claim-aggregators.ts +16 -0
  59. package/config/contracts/impermax-chef.ts +16 -0
  60. package/config/contracts/imxes.ts +16 -0
  61. package/config/contracts/merkle-distributors.ts +13 -0
  62. package/config/contracts/routers.ts +36 -0
  63. package/config/contracts/simple-uniswap-oracles.ts +33 -0
  64. package/config/contracts/weths.ts +18 -0
  65. package/config/debank-ids.ts +15 -0
  66. package/config/endpoints/merkle-distributors.ts +13 -0
  67. package/config/eth.ts +32 -0
  68. package/config/factories.ts +26 -0
  69. package/config/farms.ts +119 -0
  70. package/config/general.ts +8 -0
  71. package/config/subgraphs.ts +69 -0
  72. package/config/types.ts +81 -0
  73. package/impermax-router/Account.ts +123 -0
  74. package/impermax-router/AccountBorrowable.ts +110 -0
  75. package/impermax-router/AccountCollateral.ts +40 -0
  76. package/impermax-router/AccountLendingPool.ts +231 -0
  77. package/impermax-router/AccountPoolToken.ts +76 -0
  78. package/impermax-router/Borrowable.ts +86 -0
  79. package/impermax-router/Collateral.ts +26 -0
  80. package/impermax-router/ContractsHelper.ts +64 -0
  81. package/impermax-router/ImpermaxFactory.ts +47 -0
  82. package/impermax-router/Interactions.ts +94 -0
  83. package/impermax-router/InteractionsLendingPool.ts +129 -0
  84. package/impermax-router/InteractionsPoolToken.ts +187 -0
  85. package/impermax-router/LendingPool.ts +256 -0
  86. package/impermax-router/PoolToken.ts +112 -0
  87. package/impermax-router/index.ts +49 -0
  88. package/impermax-router/interfaces.ts +233 -0
  89. package/index.ts +5 -0
  90. package/package.json +23 -0
  91. package/subgraph/Account.ts +93 -0
  92. package/subgraph/AccountLendingPool.ts +60 -0
  93. package/subgraph/AccountPoolToken.ts +60 -0
  94. package/subgraph/LendingPool.ts +179 -0
  95. package/subgraph/PoolToken.ts +381 -0
  96. package/subgraph/PriceHelper.ts +150 -0
  97. package/subgraph/SolidexHelper.ts +54 -0
  98. package/subgraph/index.ts +166 -0
  99. package/subgraph/initializer.ts +509 -0
  100. package/subgraph/query.ts +224 -0
  101. package/tsconfig.json +16 -0
  102. package/utils/ether-utils.ts +22 -0
  103. package/utils/index.ts +12 -0
@@ -0,0 +1,1134 @@
1
+ {
2
+ "contractName": "IMerkleDistributor",
3
+ "abi": [
4
+ {
5
+ "anonymous": false,
6
+ "inputs": [
7
+ {
8
+ "indexed": false,
9
+ "internalType": "uint256",
10
+ "name": "index",
11
+ "type": "uint256"
12
+ },
13
+ {
14
+ "indexed": false,
15
+ "internalType": "address",
16
+ "name": "account",
17
+ "type": "address"
18
+ },
19
+ {
20
+ "indexed": false,
21
+ "internalType": "uint256",
22
+ "name": "amount",
23
+ "type": "uint256"
24
+ }
25
+ ],
26
+ "name": "Claimed",
27
+ "type": "event"
28
+ },
29
+ {
30
+ "inputs": [],
31
+ "name": "token",
32
+ "outputs": [
33
+ {
34
+ "internalType": "address",
35
+ "name": "",
36
+ "type": "address"
37
+ }
38
+ ],
39
+ "stateMutability": "view",
40
+ "type": "function"
41
+ },
42
+ {
43
+ "inputs": [],
44
+ "name": "merkleRoot",
45
+ "outputs": [
46
+ {
47
+ "internalType": "bytes32",
48
+ "name": "",
49
+ "type": "bytes32"
50
+ }
51
+ ],
52
+ "stateMutability": "view",
53
+ "type": "function"
54
+ },
55
+ {
56
+ "inputs": [
57
+ {
58
+ "internalType": "uint256",
59
+ "name": "index",
60
+ "type": "uint256"
61
+ }
62
+ ],
63
+ "name": "isClaimed",
64
+ "outputs": [
65
+ {
66
+ "internalType": "bool",
67
+ "name": "",
68
+ "type": "bool"
69
+ }
70
+ ],
71
+ "stateMutability": "view",
72
+ "type": "function"
73
+ },
74
+ {
75
+ "inputs": [
76
+ {
77
+ "internalType": "uint256",
78
+ "name": "index",
79
+ "type": "uint256"
80
+ },
81
+ {
82
+ "internalType": "address",
83
+ "name": "account",
84
+ "type": "address"
85
+ },
86
+ {
87
+ "internalType": "uint256",
88
+ "name": "amount",
89
+ "type": "uint256"
90
+ },
91
+ {
92
+ "internalType": "bytes32[]",
93
+ "name": "merkleProof",
94
+ "type": "bytes32[]"
95
+ }
96
+ ],
97
+ "name": "claim",
98
+ "outputs": [],
99
+ "stateMutability": "nonpayable",
100
+ "type": "function"
101
+ }
102
+ ],
103
+ "metadata": "{\"compiler\":{\"version\":\"0.6.11+commit.5ef660b1\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"merkleProof\",\"type\":\"bytes32[]\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"isClaimed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"merkleRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/C/Users/simor/Desktop/merkle-distributor-master/contracts/interfaces/IMerkleDistributor.sol\":\"IMerkleDistributor\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"/C/Users/simor/Desktop/merkle-distributor-master/contracts/interfaces/IMerkleDistributor.sol\":{\"keccak256\":\"0x8cd6f78943994972a4c670ab91894a82bd9ed629c9381db6ca9d0483fe8b698f\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://621484f0c5e702f7fb421c968bda5cd8218c3915cc6d79956c2d68fb0887f280\",\"dweb:/ipfs/QmXftsLwy64Z4rFn1WoXY5cj1iuqPctA8HoeraLb3Wd4ES\"]}},\"version\":1}",
104
+ "bytecode": "0x",
105
+ "deployedBytecode": "0x",
106
+ "immutableReferences": {},
107
+ "sourceMap": "",
108
+ "deployedSourceMap": "",
109
+ "source": "// SPDX-License-Identifier: UNLICENSED\npragma solidity >=0.5.0;\n\n// Allows anyone to claim a token if they exist in a merkle root.\ninterface IMerkleDistributor {\n // Returns the address of the token distributed by this contract.\n function token() external view returns (address);\n // Returns the merkle root of the merkle tree containing account balances available to claim.\n function merkleRoot() external view returns (bytes32);\n // Returns true if the index has been marked claimed.\n function isClaimed(uint256 index) external view returns (bool);\n // Claim the given amount of the token to the given address. Reverts if the inputs are invalid.\n function claim(uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof) external;\n\n // This event is triggered whenever a call to #claim succeeds.\n event Claimed(uint256 index, address account, uint256 amount);\n}",
110
+ "sourcePath": "C:/Users/simor/Desktop/merkle-distributor-master/contracts/interfaces/IMerkleDistributor.sol",
111
+ "ast": {
112
+ "absolutePath": "/C/Users/simor/Desktop/merkle-distributor-master/contracts/interfaces/IMerkleDistributor.sol",
113
+ "exportedSymbols": {
114
+ "IMerkleDistributor": [
115
+ 391
116
+ ]
117
+ },
118
+ "id": 392,
119
+ "license": "UNLICENSED",
120
+ "nodeType": "SourceUnit",
121
+ "nodes": [
122
+ {
123
+ "id": 353,
124
+ "literals": [
125
+ "solidity",
126
+ ">=",
127
+ "0.5",
128
+ ".0"
129
+ ],
130
+ "nodeType": "PragmaDirective",
131
+ "src": "39:24:1"
132
+ },
133
+ {
134
+ "abstract": false,
135
+ "baseContracts": [],
136
+ "contractDependencies": [],
137
+ "contractKind": "interface",
138
+ "documentation": null,
139
+ "fullyImplemented": false,
140
+ "id": 391,
141
+ "linearizedBaseContracts": [
142
+ 391
143
+ ],
144
+ "name": "IMerkleDistributor",
145
+ "nodeType": "ContractDefinition",
146
+ "nodes": [
147
+ {
148
+ "body": null,
149
+ "documentation": null,
150
+ "functionSelector": "fc0c546a",
151
+ "id": 358,
152
+ "implemented": false,
153
+ "kind": "function",
154
+ "modifiers": [],
155
+ "name": "token",
156
+ "nodeType": "FunctionDefinition",
157
+ "overrides": null,
158
+ "parameters": {
159
+ "id": 354,
160
+ "nodeType": "ParameterList",
161
+ "parameters": [],
162
+ "src": "250:2:1"
163
+ },
164
+ "returnParameters": {
165
+ "id": 357,
166
+ "nodeType": "ParameterList",
167
+ "parameters": [
168
+ {
169
+ "constant": false,
170
+ "id": 356,
171
+ "mutability": "mutable",
172
+ "name": "",
173
+ "nodeType": "VariableDeclaration",
174
+ "overrides": null,
175
+ "scope": 358,
176
+ "src": "276:7:1",
177
+ "stateVariable": false,
178
+ "storageLocation": "default",
179
+ "typeDescriptions": {
180
+ "typeIdentifier": "t_address",
181
+ "typeString": "address"
182
+ },
183
+ "typeName": {
184
+ "id": 355,
185
+ "name": "address",
186
+ "nodeType": "ElementaryTypeName",
187
+ "src": "276:7:1",
188
+ "stateMutability": "nonpayable",
189
+ "typeDescriptions": {
190
+ "typeIdentifier": "t_address",
191
+ "typeString": "address"
192
+ }
193
+ },
194
+ "value": null,
195
+ "visibility": "internal"
196
+ }
197
+ ],
198
+ "src": "275:9:1"
199
+ },
200
+ "scope": 391,
201
+ "src": "236:49:1",
202
+ "stateMutability": "view",
203
+ "virtual": false,
204
+ "visibility": "external"
205
+ },
206
+ {
207
+ "body": null,
208
+ "documentation": null,
209
+ "functionSelector": "2eb4a7ab",
210
+ "id": 363,
211
+ "implemented": false,
212
+ "kind": "function",
213
+ "modifiers": [],
214
+ "name": "merkleRoot",
215
+ "nodeType": "FunctionDefinition",
216
+ "overrides": null,
217
+ "parameters": {
218
+ "id": 359,
219
+ "nodeType": "ParameterList",
220
+ "parameters": [],
221
+ "src": "407:2:1"
222
+ },
223
+ "returnParameters": {
224
+ "id": 362,
225
+ "nodeType": "ParameterList",
226
+ "parameters": [
227
+ {
228
+ "constant": false,
229
+ "id": 361,
230
+ "mutability": "mutable",
231
+ "name": "",
232
+ "nodeType": "VariableDeclaration",
233
+ "overrides": null,
234
+ "scope": 363,
235
+ "src": "433:7:1",
236
+ "stateVariable": false,
237
+ "storageLocation": "default",
238
+ "typeDescriptions": {
239
+ "typeIdentifier": "t_bytes32",
240
+ "typeString": "bytes32"
241
+ },
242
+ "typeName": {
243
+ "id": 360,
244
+ "name": "bytes32",
245
+ "nodeType": "ElementaryTypeName",
246
+ "src": "433:7:1",
247
+ "typeDescriptions": {
248
+ "typeIdentifier": "t_bytes32",
249
+ "typeString": "bytes32"
250
+ }
251
+ },
252
+ "value": null,
253
+ "visibility": "internal"
254
+ }
255
+ ],
256
+ "src": "432:9:1"
257
+ },
258
+ "scope": 391,
259
+ "src": "388:54:1",
260
+ "stateMutability": "view",
261
+ "virtual": false,
262
+ "visibility": "external"
263
+ },
264
+ {
265
+ "body": null,
266
+ "documentation": null,
267
+ "functionSelector": "9e34070f",
268
+ "id": 370,
269
+ "implemented": false,
270
+ "kind": "function",
271
+ "modifiers": [],
272
+ "name": "isClaimed",
273
+ "nodeType": "FunctionDefinition",
274
+ "overrides": null,
275
+ "parameters": {
276
+ "id": 366,
277
+ "nodeType": "ParameterList",
278
+ "parameters": [
279
+ {
280
+ "constant": false,
281
+ "id": 365,
282
+ "mutability": "mutable",
283
+ "name": "index",
284
+ "nodeType": "VariableDeclaration",
285
+ "overrides": null,
286
+ "scope": 370,
287
+ "src": "524:13:1",
288
+ "stateVariable": false,
289
+ "storageLocation": "default",
290
+ "typeDescriptions": {
291
+ "typeIdentifier": "t_uint256",
292
+ "typeString": "uint256"
293
+ },
294
+ "typeName": {
295
+ "id": 364,
296
+ "name": "uint256",
297
+ "nodeType": "ElementaryTypeName",
298
+ "src": "524:7:1",
299
+ "typeDescriptions": {
300
+ "typeIdentifier": "t_uint256",
301
+ "typeString": "uint256"
302
+ }
303
+ },
304
+ "value": null,
305
+ "visibility": "internal"
306
+ }
307
+ ],
308
+ "src": "523:15:1"
309
+ },
310
+ "returnParameters": {
311
+ "id": 369,
312
+ "nodeType": "ParameterList",
313
+ "parameters": [
314
+ {
315
+ "constant": false,
316
+ "id": 368,
317
+ "mutability": "mutable",
318
+ "name": "",
319
+ "nodeType": "VariableDeclaration",
320
+ "overrides": null,
321
+ "scope": 370,
322
+ "src": "562:4:1",
323
+ "stateVariable": false,
324
+ "storageLocation": "default",
325
+ "typeDescriptions": {
326
+ "typeIdentifier": "t_bool",
327
+ "typeString": "bool"
328
+ },
329
+ "typeName": {
330
+ "id": 367,
331
+ "name": "bool",
332
+ "nodeType": "ElementaryTypeName",
333
+ "src": "562:4:1",
334
+ "typeDescriptions": {
335
+ "typeIdentifier": "t_bool",
336
+ "typeString": "bool"
337
+ }
338
+ },
339
+ "value": null,
340
+ "visibility": "internal"
341
+ }
342
+ ],
343
+ "src": "561:6:1"
344
+ },
345
+ "scope": 391,
346
+ "src": "505:63:1",
347
+ "stateMutability": "view",
348
+ "virtual": false,
349
+ "visibility": "external"
350
+ },
351
+ {
352
+ "body": null,
353
+ "documentation": null,
354
+ "functionSelector": "2e7ba6ef",
355
+ "id": 382,
356
+ "implemented": false,
357
+ "kind": "function",
358
+ "modifiers": [],
359
+ "name": "claim",
360
+ "nodeType": "FunctionDefinition",
361
+ "overrides": null,
362
+ "parameters": {
363
+ "id": 380,
364
+ "nodeType": "ParameterList",
365
+ "parameters": [
366
+ {
367
+ "constant": false,
368
+ "id": 372,
369
+ "mutability": "mutable",
370
+ "name": "index",
371
+ "nodeType": "VariableDeclaration",
372
+ "overrides": null,
373
+ "scope": 382,
374
+ "src": "688:13:1",
375
+ "stateVariable": false,
376
+ "storageLocation": "default",
377
+ "typeDescriptions": {
378
+ "typeIdentifier": "t_uint256",
379
+ "typeString": "uint256"
380
+ },
381
+ "typeName": {
382
+ "id": 371,
383
+ "name": "uint256",
384
+ "nodeType": "ElementaryTypeName",
385
+ "src": "688:7:1",
386
+ "typeDescriptions": {
387
+ "typeIdentifier": "t_uint256",
388
+ "typeString": "uint256"
389
+ }
390
+ },
391
+ "value": null,
392
+ "visibility": "internal"
393
+ },
394
+ {
395
+ "constant": false,
396
+ "id": 374,
397
+ "mutability": "mutable",
398
+ "name": "account",
399
+ "nodeType": "VariableDeclaration",
400
+ "overrides": null,
401
+ "scope": 382,
402
+ "src": "703:15:1",
403
+ "stateVariable": false,
404
+ "storageLocation": "default",
405
+ "typeDescriptions": {
406
+ "typeIdentifier": "t_address",
407
+ "typeString": "address"
408
+ },
409
+ "typeName": {
410
+ "id": 373,
411
+ "name": "address",
412
+ "nodeType": "ElementaryTypeName",
413
+ "src": "703:7:1",
414
+ "stateMutability": "nonpayable",
415
+ "typeDescriptions": {
416
+ "typeIdentifier": "t_address",
417
+ "typeString": "address"
418
+ }
419
+ },
420
+ "value": null,
421
+ "visibility": "internal"
422
+ },
423
+ {
424
+ "constant": false,
425
+ "id": 376,
426
+ "mutability": "mutable",
427
+ "name": "amount",
428
+ "nodeType": "VariableDeclaration",
429
+ "overrides": null,
430
+ "scope": 382,
431
+ "src": "720:14:1",
432
+ "stateVariable": false,
433
+ "storageLocation": "default",
434
+ "typeDescriptions": {
435
+ "typeIdentifier": "t_uint256",
436
+ "typeString": "uint256"
437
+ },
438
+ "typeName": {
439
+ "id": 375,
440
+ "name": "uint256",
441
+ "nodeType": "ElementaryTypeName",
442
+ "src": "720:7:1",
443
+ "typeDescriptions": {
444
+ "typeIdentifier": "t_uint256",
445
+ "typeString": "uint256"
446
+ }
447
+ },
448
+ "value": null,
449
+ "visibility": "internal"
450
+ },
451
+ {
452
+ "constant": false,
453
+ "id": 379,
454
+ "mutability": "mutable",
455
+ "name": "merkleProof",
456
+ "nodeType": "VariableDeclaration",
457
+ "overrides": null,
458
+ "scope": 382,
459
+ "src": "736:30:1",
460
+ "stateVariable": false,
461
+ "storageLocation": "calldata",
462
+ "typeDescriptions": {
463
+ "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr",
464
+ "typeString": "bytes32[]"
465
+ },
466
+ "typeName": {
467
+ "baseType": {
468
+ "id": 377,
469
+ "name": "bytes32",
470
+ "nodeType": "ElementaryTypeName",
471
+ "src": "736:7:1",
472
+ "typeDescriptions": {
473
+ "typeIdentifier": "t_bytes32",
474
+ "typeString": "bytes32"
475
+ }
476
+ },
477
+ "id": 378,
478
+ "length": null,
479
+ "nodeType": "ArrayTypeName",
480
+ "src": "736:9:1",
481
+ "typeDescriptions": {
482
+ "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
483
+ "typeString": "bytes32[]"
484
+ }
485
+ },
486
+ "value": null,
487
+ "visibility": "internal"
488
+ }
489
+ ],
490
+ "src": "687:80:1"
491
+ },
492
+ "returnParameters": {
493
+ "id": 381,
494
+ "nodeType": "ParameterList",
495
+ "parameters": [],
496
+ "src": "776:0:1"
497
+ },
498
+ "scope": 391,
499
+ "src": "673:104:1",
500
+ "stateMutability": "nonpayable",
501
+ "virtual": false,
502
+ "visibility": "external"
503
+ },
504
+ {
505
+ "anonymous": false,
506
+ "documentation": null,
507
+ "id": 390,
508
+ "name": "Claimed",
509
+ "nodeType": "EventDefinition",
510
+ "parameters": {
511
+ "id": 389,
512
+ "nodeType": "ParameterList",
513
+ "parameters": [
514
+ {
515
+ "constant": false,
516
+ "id": 384,
517
+ "indexed": false,
518
+ "mutability": "mutable",
519
+ "name": "index",
520
+ "nodeType": "VariableDeclaration",
521
+ "overrides": null,
522
+ "scope": 390,
523
+ "src": "864:13:1",
524
+ "stateVariable": false,
525
+ "storageLocation": "default",
526
+ "typeDescriptions": {
527
+ "typeIdentifier": "t_uint256",
528
+ "typeString": "uint256"
529
+ },
530
+ "typeName": {
531
+ "id": 383,
532
+ "name": "uint256",
533
+ "nodeType": "ElementaryTypeName",
534
+ "src": "864:7:1",
535
+ "typeDescriptions": {
536
+ "typeIdentifier": "t_uint256",
537
+ "typeString": "uint256"
538
+ }
539
+ },
540
+ "value": null,
541
+ "visibility": "internal"
542
+ },
543
+ {
544
+ "constant": false,
545
+ "id": 386,
546
+ "indexed": false,
547
+ "mutability": "mutable",
548
+ "name": "account",
549
+ "nodeType": "VariableDeclaration",
550
+ "overrides": null,
551
+ "scope": 390,
552
+ "src": "879:15:1",
553
+ "stateVariable": false,
554
+ "storageLocation": "default",
555
+ "typeDescriptions": {
556
+ "typeIdentifier": "t_address",
557
+ "typeString": "address"
558
+ },
559
+ "typeName": {
560
+ "id": 385,
561
+ "name": "address",
562
+ "nodeType": "ElementaryTypeName",
563
+ "src": "879:7:1",
564
+ "stateMutability": "nonpayable",
565
+ "typeDescriptions": {
566
+ "typeIdentifier": "t_address",
567
+ "typeString": "address"
568
+ }
569
+ },
570
+ "value": null,
571
+ "visibility": "internal"
572
+ },
573
+ {
574
+ "constant": false,
575
+ "id": 388,
576
+ "indexed": false,
577
+ "mutability": "mutable",
578
+ "name": "amount",
579
+ "nodeType": "VariableDeclaration",
580
+ "overrides": null,
581
+ "scope": 390,
582
+ "src": "896:14:1",
583
+ "stateVariable": false,
584
+ "storageLocation": "default",
585
+ "typeDescriptions": {
586
+ "typeIdentifier": "t_uint256",
587
+ "typeString": "uint256"
588
+ },
589
+ "typeName": {
590
+ "id": 387,
591
+ "name": "uint256",
592
+ "nodeType": "ElementaryTypeName",
593
+ "src": "896:7:1",
594
+ "typeDescriptions": {
595
+ "typeIdentifier": "t_uint256",
596
+ "typeString": "uint256"
597
+ }
598
+ },
599
+ "value": null,
600
+ "visibility": "internal"
601
+ }
602
+ ],
603
+ "src": "863:48:1"
604
+ },
605
+ "src": "850:62:1"
606
+ }
607
+ ],
608
+ "scope": 392,
609
+ "src": "131:783:1"
610
+ }
611
+ ],
612
+ "src": "39:875:1"
613
+ },
614
+ "legacyAST": {
615
+ "absolutePath": "/C/Users/simor/Desktop/merkle-distributor-master/contracts/interfaces/IMerkleDistributor.sol",
616
+ "exportedSymbols": {
617
+ "IMerkleDistributor": [
618
+ 391
619
+ ]
620
+ },
621
+ "id": 392,
622
+ "license": "UNLICENSED",
623
+ "nodeType": "SourceUnit",
624
+ "nodes": [
625
+ {
626
+ "id": 353,
627
+ "literals": [
628
+ "solidity",
629
+ ">=",
630
+ "0.5",
631
+ ".0"
632
+ ],
633
+ "nodeType": "PragmaDirective",
634
+ "src": "39:24:1"
635
+ },
636
+ {
637
+ "abstract": false,
638
+ "baseContracts": [],
639
+ "contractDependencies": [],
640
+ "contractKind": "interface",
641
+ "documentation": null,
642
+ "fullyImplemented": false,
643
+ "id": 391,
644
+ "linearizedBaseContracts": [
645
+ 391
646
+ ],
647
+ "name": "IMerkleDistributor",
648
+ "nodeType": "ContractDefinition",
649
+ "nodes": [
650
+ {
651
+ "body": null,
652
+ "documentation": null,
653
+ "functionSelector": "fc0c546a",
654
+ "id": 358,
655
+ "implemented": false,
656
+ "kind": "function",
657
+ "modifiers": [],
658
+ "name": "token",
659
+ "nodeType": "FunctionDefinition",
660
+ "overrides": null,
661
+ "parameters": {
662
+ "id": 354,
663
+ "nodeType": "ParameterList",
664
+ "parameters": [],
665
+ "src": "250:2:1"
666
+ },
667
+ "returnParameters": {
668
+ "id": 357,
669
+ "nodeType": "ParameterList",
670
+ "parameters": [
671
+ {
672
+ "constant": false,
673
+ "id": 356,
674
+ "mutability": "mutable",
675
+ "name": "",
676
+ "nodeType": "VariableDeclaration",
677
+ "overrides": null,
678
+ "scope": 358,
679
+ "src": "276:7:1",
680
+ "stateVariable": false,
681
+ "storageLocation": "default",
682
+ "typeDescriptions": {
683
+ "typeIdentifier": "t_address",
684
+ "typeString": "address"
685
+ },
686
+ "typeName": {
687
+ "id": 355,
688
+ "name": "address",
689
+ "nodeType": "ElementaryTypeName",
690
+ "src": "276:7:1",
691
+ "stateMutability": "nonpayable",
692
+ "typeDescriptions": {
693
+ "typeIdentifier": "t_address",
694
+ "typeString": "address"
695
+ }
696
+ },
697
+ "value": null,
698
+ "visibility": "internal"
699
+ }
700
+ ],
701
+ "src": "275:9:1"
702
+ },
703
+ "scope": 391,
704
+ "src": "236:49:1",
705
+ "stateMutability": "view",
706
+ "virtual": false,
707
+ "visibility": "external"
708
+ },
709
+ {
710
+ "body": null,
711
+ "documentation": null,
712
+ "functionSelector": "2eb4a7ab",
713
+ "id": 363,
714
+ "implemented": false,
715
+ "kind": "function",
716
+ "modifiers": [],
717
+ "name": "merkleRoot",
718
+ "nodeType": "FunctionDefinition",
719
+ "overrides": null,
720
+ "parameters": {
721
+ "id": 359,
722
+ "nodeType": "ParameterList",
723
+ "parameters": [],
724
+ "src": "407:2:1"
725
+ },
726
+ "returnParameters": {
727
+ "id": 362,
728
+ "nodeType": "ParameterList",
729
+ "parameters": [
730
+ {
731
+ "constant": false,
732
+ "id": 361,
733
+ "mutability": "mutable",
734
+ "name": "",
735
+ "nodeType": "VariableDeclaration",
736
+ "overrides": null,
737
+ "scope": 363,
738
+ "src": "433:7:1",
739
+ "stateVariable": false,
740
+ "storageLocation": "default",
741
+ "typeDescriptions": {
742
+ "typeIdentifier": "t_bytes32",
743
+ "typeString": "bytes32"
744
+ },
745
+ "typeName": {
746
+ "id": 360,
747
+ "name": "bytes32",
748
+ "nodeType": "ElementaryTypeName",
749
+ "src": "433:7:1",
750
+ "typeDescriptions": {
751
+ "typeIdentifier": "t_bytes32",
752
+ "typeString": "bytes32"
753
+ }
754
+ },
755
+ "value": null,
756
+ "visibility": "internal"
757
+ }
758
+ ],
759
+ "src": "432:9:1"
760
+ },
761
+ "scope": 391,
762
+ "src": "388:54:1",
763
+ "stateMutability": "view",
764
+ "virtual": false,
765
+ "visibility": "external"
766
+ },
767
+ {
768
+ "body": null,
769
+ "documentation": null,
770
+ "functionSelector": "9e34070f",
771
+ "id": 370,
772
+ "implemented": false,
773
+ "kind": "function",
774
+ "modifiers": [],
775
+ "name": "isClaimed",
776
+ "nodeType": "FunctionDefinition",
777
+ "overrides": null,
778
+ "parameters": {
779
+ "id": 366,
780
+ "nodeType": "ParameterList",
781
+ "parameters": [
782
+ {
783
+ "constant": false,
784
+ "id": 365,
785
+ "mutability": "mutable",
786
+ "name": "index",
787
+ "nodeType": "VariableDeclaration",
788
+ "overrides": null,
789
+ "scope": 370,
790
+ "src": "524:13:1",
791
+ "stateVariable": false,
792
+ "storageLocation": "default",
793
+ "typeDescriptions": {
794
+ "typeIdentifier": "t_uint256",
795
+ "typeString": "uint256"
796
+ },
797
+ "typeName": {
798
+ "id": 364,
799
+ "name": "uint256",
800
+ "nodeType": "ElementaryTypeName",
801
+ "src": "524:7:1",
802
+ "typeDescriptions": {
803
+ "typeIdentifier": "t_uint256",
804
+ "typeString": "uint256"
805
+ }
806
+ },
807
+ "value": null,
808
+ "visibility": "internal"
809
+ }
810
+ ],
811
+ "src": "523:15:1"
812
+ },
813
+ "returnParameters": {
814
+ "id": 369,
815
+ "nodeType": "ParameterList",
816
+ "parameters": [
817
+ {
818
+ "constant": false,
819
+ "id": 368,
820
+ "mutability": "mutable",
821
+ "name": "",
822
+ "nodeType": "VariableDeclaration",
823
+ "overrides": null,
824
+ "scope": 370,
825
+ "src": "562:4:1",
826
+ "stateVariable": false,
827
+ "storageLocation": "default",
828
+ "typeDescriptions": {
829
+ "typeIdentifier": "t_bool",
830
+ "typeString": "bool"
831
+ },
832
+ "typeName": {
833
+ "id": 367,
834
+ "name": "bool",
835
+ "nodeType": "ElementaryTypeName",
836
+ "src": "562:4:1",
837
+ "typeDescriptions": {
838
+ "typeIdentifier": "t_bool",
839
+ "typeString": "bool"
840
+ }
841
+ },
842
+ "value": null,
843
+ "visibility": "internal"
844
+ }
845
+ ],
846
+ "src": "561:6:1"
847
+ },
848
+ "scope": 391,
849
+ "src": "505:63:1",
850
+ "stateMutability": "view",
851
+ "virtual": false,
852
+ "visibility": "external"
853
+ },
854
+ {
855
+ "body": null,
856
+ "documentation": null,
857
+ "functionSelector": "2e7ba6ef",
858
+ "id": 382,
859
+ "implemented": false,
860
+ "kind": "function",
861
+ "modifiers": [],
862
+ "name": "claim",
863
+ "nodeType": "FunctionDefinition",
864
+ "overrides": null,
865
+ "parameters": {
866
+ "id": 380,
867
+ "nodeType": "ParameterList",
868
+ "parameters": [
869
+ {
870
+ "constant": false,
871
+ "id": 372,
872
+ "mutability": "mutable",
873
+ "name": "index",
874
+ "nodeType": "VariableDeclaration",
875
+ "overrides": null,
876
+ "scope": 382,
877
+ "src": "688:13:1",
878
+ "stateVariable": false,
879
+ "storageLocation": "default",
880
+ "typeDescriptions": {
881
+ "typeIdentifier": "t_uint256",
882
+ "typeString": "uint256"
883
+ },
884
+ "typeName": {
885
+ "id": 371,
886
+ "name": "uint256",
887
+ "nodeType": "ElementaryTypeName",
888
+ "src": "688:7:1",
889
+ "typeDescriptions": {
890
+ "typeIdentifier": "t_uint256",
891
+ "typeString": "uint256"
892
+ }
893
+ },
894
+ "value": null,
895
+ "visibility": "internal"
896
+ },
897
+ {
898
+ "constant": false,
899
+ "id": 374,
900
+ "mutability": "mutable",
901
+ "name": "account",
902
+ "nodeType": "VariableDeclaration",
903
+ "overrides": null,
904
+ "scope": 382,
905
+ "src": "703:15:1",
906
+ "stateVariable": false,
907
+ "storageLocation": "default",
908
+ "typeDescriptions": {
909
+ "typeIdentifier": "t_address",
910
+ "typeString": "address"
911
+ },
912
+ "typeName": {
913
+ "id": 373,
914
+ "name": "address",
915
+ "nodeType": "ElementaryTypeName",
916
+ "src": "703:7:1",
917
+ "stateMutability": "nonpayable",
918
+ "typeDescriptions": {
919
+ "typeIdentifier": "t_address",
920
+ "typeString": "address"
921
+ }
922
+ },
923
+ "value": null,
924
+ "visibility": "internal"
925
+ },
926
+ {
927
+ "constant": false,
928
+ "id": 376,
929
+ "mutability": "mutable",
930
+ "name": "amount",
931
+ "nodeType": "VariableDeclaration",
932
+ "overrides": null,
933
+ "scope": 382,
934
+ "src": "720:14:1",
935
+ "stateVariable": false,
936
+ "storageLocation": "default",
937
+ "typeDescriptions": {
938
+ "typeIdentifier": "t_uint256",
939
+ "typeString": "uint256"
940
+ },
941
+ "typeName": {
942
+ "id": 375,
943
+ "name": "uint256",
944
+ "nodeType": "ElementaryTypeName",
945
+ "src": "720:7:1",
946
+ "typeDescriptions": {
947
+ "typeIdentifier": "t_uint256",
948
+ "typeString": "uint256"
949
+ }
950
+ },
951
+ "value": null,
952
+ "visibility": "internal"
953
+ },
954
+ {
955
+ "constant": false,
956
+ "id": 379,
957
+ "mutability": "mutable",
958
+ "name": "merkleProof",
959
+ "nodeType": "VariableDeclaration",
960
+ "overrides": null,
961
+ "scope": 382,
962
+ "src": "736:30:1",
963
+ "stateVariable": false,
964
+ "storageLocation": "calldata",
965
+ "typeDescriptions": {
966
+ "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr",
967
+ "typeString": "bytes32[]"
968
+ },
969
+ "typeName": {
970
+ "baseType": {
971
+ "id": 377,
972
+ "name": "bytes32",
973
+ "nodeType": "ElementaryTypeName",
974
+ "src": "736:7:1",
975
+ "typeDescriptions": {
976
+ "typeIdentifier": "t_bytes32",
977
+ "typeString": "bytes32"
978
+ }
979
+ },
980
+ "id": 378,
981
+ "length": null,
982
+ "nodeType": "ArrayTypeName",
983
+ "src": "736:9:1",
984
+ "typeDescriptions": {
985
+ "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
986
+ "typeString": "bytes32[]"
987
+ }
988
+ },
989
+ "value": null,
990
+ "visibility": "internal"
991
+ }
992
+ ],
993
+ "src": "687:80:1"
994
+ },
995
+ "returnParameters": {
996
+ "id": 381,
997
+ "nodeType": "ParameterList",
998
+ "parameters": [],
999
+ "src": "776:0:1"
1000
+ },
1001
+ "scope": 391,
1002
+ "src": "673:104:1",
1003
+ "stateMutability": "nonpayable",
1004
+ "virtual": false,
1005
+ "visibility": "external"
1006
+ },
1007
+ {
1008
+ "anonymous": false,
1009
+ "documentation": null,
1010
+ "id": 390,
1011
+ "name": "Claimed",
1012
+ "nodeType": "EventDefinition",
1013
+ "parameters": {
1014
+ "id": 389,
1015
+ "nodeType": "ParameterList",
1016
+ "parameters": [
1017
+ {
1018
+ "constant": false,
1019
+ "id": 384,
1020
+ "indexed": false,
1021
+ "mutability": "mutable",
1022
+ "name": "index",
1023
+ "nodeType": "VariableDeclaration",
1024
+ "overrides": null,
1025
+ "scope": 390,
1026
+ "src": "864:13:1",
1027
+ "stateVariable": false,
1028
+ "storageLocation": "default",
1029
+ "typeDescriptions": {
1030
+ "typeIdentifier": "t_uint256",
1031
+ "typeString": "uint256"
1032
+ },
1033
+ "typeName": {
1034
+ "id": 383,
1035
+ "name": "uint256",
1036
+ "nodeType": "ElementaryTypeName",
1037
+ "src": "864:7:1",
1038
+ "typeDescriptions": {
1039
+ "typeIdentifier": "t_uint256",
1040
+ "typeString": "uint256"
1041
+ }
1042
+ },
1043
+ "value": null,
1044
+ "visibility": "internal"
1045
+ },
1046
+ {
1047
+ "constant": false,
1048
+ "id": 386,
1049
+ "indexed": false,
1050
+ "mutability": "mutable",
1051
+ "name": "account",
1052
+ "nodeType": "VariableDeclaration",
1053
+ "overrides": null,
1054
+ "scope": 390,
1055
+ "src": "879:15:1",
1056
+ "stateVariable": false,
1057
+ "storageLocation": "default",
1058
+ "typeDescriptions": {
1059
+ "typeIdentifier": "t_address",
1060
+ "typeString": "address"
1061
+ },
1062
+ "typeName": {
1063
+ "id": 385,
1064
+ "name": "address",
1065
+ "nodeType": "ElementaryTypeName",
1066
+ "src": "879:7:1",
1067
+ "stateMutability": "nonpayable",
1068
+ "typeDescriptions": {
1069
+ "typeIdentifier": "t_address",
1070
+ "typeString": "address"
1071
+ }
1072
+ },
1073
+ "value": null,
1074
+ "visibility": "internal"
1075
+ },
1076
+ {
1077
+ "constant": false,
1078
+ "id": 388,
1079
+ "indexed": false,
1080
+ "mutability": "mutable",
1081
+ "name": "amount",
1082
+ "nodeType": "VariableDeclaration",
1083
+ "overrides": null,
1084
+ "scope": 390,
1085
+ "src": "896:14:1",
1086
+ "stateVariable": false,
1087
+ "storageLocation": "default",
1088
+ "typeDescriptions": {
1089
+ "typeIdentifier": "t_uint256",
1090
+ "typeString": "uint256"
1091
+ },
1092
+ "typeName": {
1093
+ "id": 387,
1094
+ "name": "uint256",
1095
+ "nodeType": "ElementaryTypeName",
1096
+ "src": "896:7:1",
1097
+ "typeDescriptions": {
1098
+ "typeIdentifier": "t_uint256",
1099
+ "typeString": "uint256"
1100
+ }
1101
+ },
1102
+ "value": null,
1103
+ "visibility": "internal"
1104
+ }
1105
+ ],
1106
+ "src": "863:48:1"
1107
+ },
1108
+ "src": "850:62:1"
1109
+ }
1110
+ ],
1111
+ "scope": 392,
1112
+ "src": "131:783:1"
1113
+ }
1114
+ ],
1115
+ "src": "39:875:1"
1116
+ },
1117
+ "compiler": {
1118
+ "name": "solc",
1119
+ "version": "0.6.11+commit.5ef660b1.Emscripten.clang"
1120
+ },
1121
+ "networks": {},
1122
+ "schemaVersion": "3.3.2",
1123
+ "updatedAt": "2021-03-15T18:03:06.218Z",
1124
+ "devdoc": {
1125
+ "kind": "dev",
1126
+ "methods": {},
1127
+ "version": 1
1128
+ },
1129
+ "userdoc": {
1130
+ "kind": "user",
1131
+ "methods": {},
1132
+ "version": 1
1133
+ }
1134
+ }