impermax-sdk 1.0.1 → 1.0.3

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/package.json +9 -3
  2. package/.idea/impermax-sdk.iml +0 -12
  3. package/.idea/misc.xml +0 -6
  4. package/.idea/modules.xml +0 -8
  5. package/.idea/workspace.xml +0 -642
  6. package/abis/ImpermaxABI.ts +0 -3
  7. package/abis/contracts/BAllowance.json +0 -4735
  8. package/abis/contracts/BDeployer.json +0 -1195
  9. package/abis/contracts/BInterestRateModel.json +0 -10796
  10. package/abis/contracts/BSetter.json +0 -6219
  11. package/abis/contracts/BStorage.json +0 -2613
  12. package/abis/contracts/Borrowable.json +0 -19937
  13. package/abis/contracts/CDeployer.json +0 -1104
  14. package/abis/contracts/CSetter.json +0 -5094
  15. package/abis/contracts/CStorage.json +0 -516
  16. package/abis/contracts/ClaimAggregator.json +0 -2015
  17. package/abis/contracts/Collateral.json +0 -21615
  18. package/abis/contracts/ERC20.json +0 -819
  19. package/abis/contracts/Factory.json +0 -21986
  20. package/abis/contracts/FarmingPool.json +0 -8601
  21. package/abis/contracts/IBDeployer.json +0 -351
  22. package/abis/contracts/IBorrowTracker.json +0 -346
  23. package/abis/contracts/IBorrowable.json +0 -13207
  24. package/abis/contracts/ICDeployer.json +0 -294
  25. package/abis/contracts/IClaimable.json +0 -406
  26. package/abis/contracts/ICollateral.json +0 -8952
  27. package/abis/contracts/IERC20.json +0 -2376
  28. package/abis/contracts/IFactory.json +0 -3660
  29. package/abis/contracts/IFarmingPool.json +0 -3584
  30. package/abis/contracts/IImpermaxCallee.json +0 -679
  31. package/abis/contracts/IMerkleDistributor.json +0 -1134
  32. package/abis/contracts/IPoolToken.json +0 -5343
  33. package/abis/contracts/IRouter01.json +0 -6891
  34. package/abis/contracts/IRouter02.json +0 -7283
  35. package/abis/contracts/ISimpleUniswapOracle.json +0 -1469
  36. package/abis/contracts/IStakedLPToken.json +0 -7309
  37. package/abis/contracts/IStakingRewards.json +0 -1036
  38. package/abis/contracts/IUniswapV2Callee.json +0 -403
  39. package/abis/contracts/IUniswapV2ERC20.json +0 -3155
  40. package/abis/contracts/IUniswapV2Factory.json +0 -1690
  41. package/abis/contracts/IUniswapV2Pair.json +0 -6761
  42. package/abis/contracts/IWETH.json +0 -561
  43. package/abis/contracts/ImpermaxChef.json +0 -20945
  44. package/abis/contracts/ImpermaxERC20.json +0 -12095
  45. package/abis/contracts/Math.json +0 -1966
  46. package/abis/contracts/MockERC20.json +0 -8884
  47. package/abis/contracts/PoolToken.json +0 -10784
  48. package/abis/contracts/Router01.json +0 -43963
  49. package/abis/contracts/SafeMath.json +0 -6828
  50. package/abis/contracts/SimpleUniswapOracle.json +0 -9640
  51. package/abis/contracts/TransferHelper.json +0 -4875
  52. package/abis/contracts/UQ112x112.json +0 -1201
  53. package/abis/contracts/UniswapV2ERC20.json +0 -10969
  54. package/abis/contracts/UniswapV2Factory.json +0 -5521
  55. package/abis/contracts/UniswapV2Library.json +0 -13789
  56. package/abis/contracts/UniswapV2Pair.json +0 -30782
  57. package/abis/contracts/WETH9.json +0 -6613
  58. package/config/amms.ts +0 -199
  59. package/config/contracts/claim-aggregators.ts +0 -16
  60. package/config/contracts/impermax-chef.ts +0 -16
  61. package/config/contracts/imxes.ts +0 -16
  62. package/config/contracts/merkle-distributors.ts +0 -13
  63. package/config/contracts/routers.ts +0 -36
  64. package/config/contracts/simple-uniswap-oracles.ts +0 -33
  65. package/config/contracts/weths.ts +0 -18
  66. package/config/debank-ids.ts +0 -15
  67. package/config/endpoints/merkle-distributors.ts +0 -13
  68. package/config/eth.ts +0 -32
  69. package/config/factories.ts +0 -26
  70. package/config/farms.ts +0 -119
  71. package/config/general.ts +0 -8
  72. package/config/subgraphs.ts +0 -69
  73. package/config/types.ts +0 -81
  74. package/impermax-router/Account.ts +0 -123
  75. package/impermax-router/AccountBorrowable.ts +0 -110
  76. package/impermax-router/AccountCollateral.ts +0 -40
  77. package/impermax-router/AccountLendingPool.ts +0 -231
  78. package/impermax-router/AccountPoolToken.ts +0 -76
  79. package/impermax-router/Borrowable.ts +0 -86
  80. package/impermax-router/Collateral.ts +0 -26
  81. package/impermax-router/ContractsHelper.ts +0 -64
  82. package/impermax-router/ImpermaxFactory.ts +0 -47
  83. package/impermax-router/Interactions.ts +0 -94
  84. package/impermax-router/InteractionsLendingPool.ts +0 -129
  85. package/impermax-router/InteractionsPoolToken.ts +0 -187
  86. package/impermax-router/LendingPool.ts +0 -256
  87. package/impermax-router/PoolToken.ts +0 -112
  88. package/impermax-router/index.ts +0 -49
  89. package/impermax-router/interfaces.ts +0 -233
  90. package/index.ts +0 -5
  91. package/subgraph/Account.ts +0 -93
  92. package/subgraph/AccountLendingPool.ts +0 -60
  93. package/subgraph/AccountPoolToken.ts +0 -60
  94. package/subgraph/LendingPool.ts +0 -179
  95. package/subgraph/PoolToken.ts +0 -381
  96. package/subgraph/PriceHelper.ts +0 -150
  97. package/subgraph/SolidexHelper.ts +0 -54
  98. package/subgraph/index.ts +0 -166
  99. package/subgraph/initializer.ts +0 -509
  100. package/subgraph/query.ts +0 -224
  101. package/tsconfig.json +0 -16
  102. package/utils/ether-utils.ts +0 -22
  103. package/utils/index.ts +0 -12
@@ -1,561 +0,0 @@
1
- {
2
- "contractName": "IWETH",
3
- "abi": [
4
- {
5
- "inputs": [],
6
- "name": "deposit",
7
- "outputs": [],
8
- "stateMutability": "payable",
9
- "type": "function"
10
- },
11
- {
12
- "inputs": [
13
- {
14
- "internalType": "address",
15
- "name": "to",
16
- "type": "address"
17
- },
18
- {
19
- "internalType": "uint256",
20
- "name": "value",
21
- "type": "uint256"
22
- }
23
- ],
24
- "name": "transfer",
25
- "outputs": [
26
- {
27
- "internalType": "bool",
28
- "name": "",
29
- "type": "bool"
30
- }
31
- ],
32
- "stateMutability": "nonpayable",
33
- "type": "function"
34
- },
35
- {
36
- "inputs": [
37
- {
38
- "internalType": "uint256",
39
- "name": "",
40
- "type": "uint256"
41
- }
42
- ],
43
- "name": "withdraw",
44
- "outputs": [],
45
- "stateMutability": "nonpayable",
46
- "type": "function"
47
- }
48
- ],
49
- "metadata": "{\"compiler\":{\"version\":\"0.6.6+commit.6c089d02\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/C/Users/simor/Desktop/impermax-x-uniswapv2-periphery/contracts/interfaces/IWETH.sol\":\"IWETH\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/C/Users/simor/Desktop/impermax-x-uniswapv2-periphery/contracts/interfaces/IWETH.sol\":{\"keccak256\":\"0x84c9fb939b3e46d22a48c459785f060d03b8a26bbfedc671ab329c744b50607a\",\"urls\":[\"bzz-raw://30447954780f2a8a23dd9e6690761692cb28b0a66aef26c33afaeb2eba60df88\",\"dweb:/ipfs/QmT9BsNqJvaZYQtpnXSx37kdDfPvcTAoL59o291kqjH358\"]}},\"version\":1}",
50
- "bytecode": "0x",
51
- "deployedBytecode": "0x",
52
- "immutableReferences": {},
53
- "sourceMap": "",
54
- "deployedSourceMap": "",
55
- "source": "pragma solidity >=0.5.0;\r\n\r\ninterface IWETH {\r\n function deposit() external payable;\r\n function transfer(address to, uint value) external returns (bool);\r\n function withdraw(uint) external;\r\n}",
56
- "sourcePath": "C:\\Users\\simor\\Desktop\\impermax-x-uniswapv2-periphery\\contracts\\interfaces\\IWETH.sol",
57
- "ast": {
58
- "absolutePath": "/C/Users/simor/Desktop/impermax-x-uniswapv2-periphery/contracts/interfaces/IWETH.sol",
59
- "exportedSymbols": {
60
- "IWETH": [
61
- 3127
62
- ]
63
- },
64
- "id": 3128,
65
- "nodeType": "SourceUnit",
66
- "nodes": [
67
- {
68
- "id": 3109,
69
- "literals": [
70
- "solidity",
71
- ">=",
72
- "0.5",
73
- ".0"
74
- ],
75
- "nodeType": "PragmaDirective",
76
- "src": "0:24:8"
77
- },
78
- {
79
- "abstract": false,
80
- "baseContracts": [],
81
- "contractDependencies": [],
82
- "contractKind": "interface",
83
- "documentation": null,
84
- "fullyImplemented": false,
85
- "id": 3127,
86
- "linearizedBaseContracts": [
87
- 3127
88
- ],
89
- "name": "IWETH",
90
- "nodeType": "ContractDefinition",
91
- "nodes": [
92
- {
93
- "body": null,
94
- "documentation": null,
95
- "functionSelector": "d0e30db0",
96
- "id": 3112,
97
- "implemented": false,
98
- "kind": "function",
99
- "modifiers": [],
100
- "name": "deposit",
101
- "nodeType": "FunctionDefinition",
102
- "overrides": null,
103
- "parameters": {
104
- "id": 3110,
105
- "nodeType": "ParameterList",
106
- "parameters": [],
107
- "src": "67:2:8"
108
- },
109
- "returnParameters": {
110
- "id": 3111,
111
- "nodeType": "ParameterList",
112
- "parameters": [],
113
- "src": "86:0:8"
114
- },
115
- "scope": 3127,
116
- "src": "51:36:8",
117
- "stateMutability": "payable",
118
- "virtual": false,
119
- "visibility": "external"
120
- },
121
- {
122
- "body": null,
123
- "documentation": null,
124
- "functionSelector": "a9059cbb",
125
- "id": 3121,
126
- "implemented": false,
127
- "kind": "function",
128
- "modifiers": [],
129
- "name": "transfer",
130
- "nodeType": "FunctionDefinition",
131
- "overrides": null,
132
- "parameters": {
133
- "id": 3117,
134
- "nodeType": "ParameterList",
135
- "parameters": [
136
- {
137
- "constant": false,
138
- "id": 3114,
139
- "mutability": "mutable",
140
- "name": "to",
141
- "nodeType": "VariableDeclaration",
142
- "overrides": null,
143
- "scope": 3121,
144
- "src": "111:10:8",
145
- "stateVariable": false,
146
- "storageLocation": "default",
147
- "typeDescriptions": {
148
- "typeIdentifier": "t_address",
149
- "typeString": "address"
150
- },
151
- "typeName": {
152
- "id": 3113,
153
- "name": "address",
154
- "nodeType": "ElementaryTypeName",
155
- "src": "111:7:8",
156
- "stateMutability": "nonpayable",
157
- "typeDescriptions": {
158
- "typeIdentifier": "t_address",
159
- "typeString": "address"
160
- }
161
- },
162
- "value": null,
163
- "visibility": "internal"
164
- },
165
- {
166
- "constant": false,
167
- "id": 3116,
168
- "mutability": "mutable",
169
- "name": "value",
170
- "nodeType": "VariableDeclaration",
171
- "overrides": null,
172
- "scope": 3121,
173
- "src": "123:10:8",
174
- "stateVariable": false,
175
- "storageLocation": "default",
176
- "typeDescriptions": {
177
- "typeIdentifier": "t_uint256",
178
- "typeString": "uint256"
179
- },
180
- "typeName": {
181
- "id": 3115,
182
- "name": "uint",
183
- "nodeType": "ElementaryTypeName",
184
- "src": "123:4:8",
185
- "typeDescriptions": {
186
- "typeIdentifier": "t_uint256",
187
- "typeString": "uint256"
188
- }
189
- },
190
- "value": null,
191
- "visibility": "internal"
192
- }
193
- ],
194
- "src": "110:24:8"
195
- },
196
- "returnParameters": {
197
- "id": 3120,
198
- "nodeType": "ParameterList",
199
- "parameters": [
200
- {
201
- "constant": false,
202
- "id": 3119,
203
- "mutability": "mutable",
204
- "name": "",
205
- "nodeType": "VariableDeclaration",
206
- "overrides": null,
207
- "scope": 3121,
208
- "src": "153:4:8",
209
- "stateVariable": false,
210
- "storageLocation": "default",
211
- "typeDescriptions": {
212
- "typeIdentifier": "t_bool",
213
- "typeString": "bool"
214
- },
215
- "typeName": {
216
- "id": 3118,
217
- "name": "bool",
218
- "nodeType": "ElementaryTypeName",
219
- "src": "153:4:8",
220
- "typeDescriptions": {
221
- "typeIdentifier": "t_bool",
222
- "typeString": "bool"
223
- }
224
- },
225
- "value": null,
226
- "visibility": "internal"
227
- }
228
- ],
229
- "src": "152:6:8"
230
- },
231
- "scope": 3127,
232
- "src": "93:66:8",
233
- "stateMutability": "nonpayable",
234
- "virtual": false,
235
- "visibility": "external"
236
- },
237
- {
238
- "body": null,
239
- "documentation": null,
240
- "functionSelector": "2e1a7d4d",
241
- "id": 3126,
242
- "implemented": false,
243
- "kind": "function",
244
- "modifiers": [],
245
- "name": "withdraw",
246
- "nodeType": "FunctionDefinition",
247
- "overrides": null,
248
- "parameters": {
249
- "id": 3124,
250
- "nodeType": "ParameterList",
251
- "parameters": [
252
- {
253
- "constant": false,
254
- "id": 3123,
255
- "mutability": "mutable",
256
- "name": "",
257
- "nodeType": "VariableDeclaration",
258
- "overrides": null,
259
- "scope": 3126,
260
- "src": "183:4:8",
261
- "stateVariable": false,
262
- "storageLocation": "default",
263
- "typeDescriptions": {
264
- "typeIdentifier": "t_uint256",
265
- "typeString": "uint256"
266
- },
267
- "typeName": {
268
- "id": 3122,
269
- "name": "uint",
270
- "nodeType": "ElementaryTypeName",
271
- "src": "183:4:8",
272
- "typeDescriptions": {
273
- "typeIdentifier": "t_uint256",
274
- "typeString": "uint256"
275
- }
276
- },
277
- "value": null,
278
- "visibility": "internal"
279
- }
280
- ],
281
- "src": "182:6:8"
282
- },
283
- "returnParameters": {
284
- "id": 3125,
285
- "nodeType": "ParameterList",
286
- "parameters": [],
287
- "src": "197:0:8"
288
- },
289
- "scope": 3127,
290
- "src": "165:33:8",
291
- "stateMutability": "nonpayable",
292
- "virtual": false,
293
- "visibility": "external"
294
- }
295
- ],
296
- "scope": 3128,
297
- "src": "28:173:8"
298
- }
299
- ],
300
- "src": "0:201:8"
301
- },
302
- "legacyAST": {
303
- "absolutePath": "/C/Users/simor/Desktop/impermax-x-uniswapv2-periphery/contracts/interfaces/IWETH.sol",
304
- "exportedSymbols": {
305
- "IWETH": [
306
- 3127
307
- ]
308
- },
309
- "id": 3128,
310
- "nodeType": "SourceUnit",
311
- "nodes": [
312
- {
313
- "id": 3109,
314
- "literals": [
315
- "solidity",
316
- ">=",
317
- "0.5",
318
- ".0"
319
- ],
320
- "nodeType": "PragmaDirective",
321
- "src": "0:24:8"
322
- },
323
- {
324
- "abstract": false,
325
- "baseContracts": [],
326
- "contractDependencies": [],
327
- "contractKind": "interface",
328
- "documentation": null,
329
- "fullyImplemented": false,
330
- "id": 3127,
331
- "linearizedBaseContracts": [
332
- 3127
333
- ],
334
- "name": "IWETH",
335
- "nodeType": "ContractDefinition",
336
- "nodes": [
337
- {
338
- "body": null,
339
- "documentation": null,
340
- "functionSelector": "d0e30db0",
341
- "id": 3112,
342
- "implemented": false,
343
- "kind": "function",
344
- "modifiers": [],
345
- "name": "deposit",
346
- "nodeType": "FunctionDefinition",
347
- "overrides": null,
348
- "parameters": {
349
- "id": 3110,
350
- "nodeType": "ParameterList",
351
- "parameters": [],
352
- "src": "67:2:8"
353
- },
354
- "returnParameters": {
355
- "id": 3111,
356
- "nodeType": "ParameterList",
357
- "parameters": [],
358
- "src": "86:0:8"
359
- },
360
- "scope": 3127,
361
- "src": "51:36:8",
362
- "stateMutability": "payable",
363
- "virtual": false,
364
- "visibility": "external"
365
- },
366
- {
367
- "body": null,
368
- "documentation": null,
369
- "functionSelector": "a9059cbb",
370
- "id": 3121,
371
- "implemented": false,
372
- "kind": "function",
373
- "modifiers": [],
374
- "name": "transfer",
375
- "nodeType": "FunctionDefinition",
376
- "overrides": null,
377
- "parameters": {
378
- "id": 3117,
379
- "nodeType": "ParameterList",
380
- "parameters": [
381
- {
382
- "constant": false,
383
- "id": 3114,
384
- "mutability": "mutable",
385
- "name": "to",
386
- "nodeType": "VariableDeclaration",
387
- "overrides": null,
388
- "scope": 3121,
389
- "src": "111:10:8",
390
- "stateVariable": false,
391
- "storageLocation": "default",
392
- "typeDescriptions": {
393
- "typeIdentifier": "t_address",
394
- "typeString": "address"
395
- },
396
- "typeName": {
397
- "id": 3113,
398
- "name": "address",
399
- "nodeType": "ElementaryTypeName",
400
- "src": "111:7:8",
401
- "stateMutability": "nonpayable",
402
- "typeDescriptions": {
403
- "typeIdentifier": "t_address",
404
- "typeString": "address"
405
- }
406
- },
407
- "value": null,
408
- "visibility": "internal"
409
- },
410
- {
411
- "constant": false,
412
- "id": 3116,
413
- "mutability": "mutable",
414
- "name": "value",
415
- "nodeType": "VariableDeclaration",
416
- "overrides": null,
417
- "scope": 3121,
418
- "src": "123:10:8",
419
- "stateVariable": false,
420
- "storageLocation": "default",
421
- "typeDescriptions": {
422
- "typeIdentifier": "t_uint256",
423
- "typeString": "uint256"
424
- },
425
- "typeName": {
426
- "id": 3115,
427
- "name": "uint",
428
- "nodeType": "ElementaryTypeName",
429
- "src": "123:4:8",
430
- "typeDescriptions": {
431
- "typeIdentifier": "t_uint256",
432
- "typeString": "uint256"
433
- }
434
- },
435
- "value": null,
436
- "visibility": "internal"
437
- }
438
- ],
439
- "src": "110:24:8"
440
- },
441
- "returnParameters": {
442
- "id": 3120,
443
- "nodeType": "ParameterList",
444
- "parameters": [
445
- {
446
- "constant": false,
447
- "id": 3119,
448
- "mutability": "mutable",
449
- "name": "",
450
- "nodeType": "VariableDeclaration",
451
- "overrides": null,
452
- "scope": 3121,
453
- "src": "153:4:8",
454
- "stateVariable": false,
455
- "storageLocation": "default",
456
- "typeDescriptions": {
457
- "typeIdentifier": "t_bool",
458
- "typeString": "bool"
459
- },
460
- "typeName": {
461
- "id": 3118,
462
- "name": "bool",
463
- "nodeType": "ElementaryTypeName",
464
- "src": "153:4:8",
465
- "typeDescriptions": {
466
- "typeIdentifier": "t_bool",
467
- "typeString": "bool"
468
- }
469
- },
470
- "value": null,
471
- "visibility": "internal"
472
- }
473
- ],
474
- "src": "152:6:8"
475
- },
476
- "scope": 3127,
477
- "src": "93:66:8",
478
- "stateMutability": "nonpayable",
479
- "virtual": false,
480
- "visibility": "external"
481
- },
482
- {
483
- "body": null,
484
- "documentation": null,
485
- "functionSelector": "2e1a7d4d",
486
- "id": 3126,
487
- "implemented": false,
488
- "kind": "function",
489
- "modifiers": [],
490
- "name": "withdraw",
491
- "nodeType": "FunctionDefinition",
492
- "overrides": null,
493
- "parameters": {
494
- "id": 3124,
495
- "nodeType": "ParameterList",
496
- "parameters": [
497
- {
498
- "constant": false,
499
- "id": 3123,
500
- "mutability": "mutable",
501
- "name": "",
502
- "nodeType": "VariableDeclaration",
503
- "overrides": null,
504
- "scope": 3126,
505
- "src": "183:4:8",
506
- "stateVariable": false,
507
- "storageLocation": "default",
508
- "typeDescriptions": {
509
- "typeIdentifier": "t_uint256",
510
- "typeString": "uint256"
511
- },
512
- "typeName": {
513
- "id": 3122,
514
- "name": "uint",
515
- "nodeType": "ElementaryTypeName",
516
- "src": "183:4:8",
517
- "typeDescriptions": {
518
- "typeIdentifier": "t_uint256",
519
- "typeString": "uint256"
520
- }
521
- },
522
- "value": null,
523
- "visibility": "internal"
524
- }
525
- ],
526
- "src": "182:6:8"
527
- },
528
- "returnParameters": {
529
- "id": 3125,
530
- "nodeType": "ParameterList",
531
- "parameters": [],
532
- "src": "197:0:8"
533
- },
534
- "scope": 3127,
535
- "src": "165:33:8",
536
- "stateMutability": "nonpayable",
537
- "virtual": false,
538
- "visibility": "external"
539
- }
540
- ],
541
- "scope": 3128,
542
- "src": "28:173:8"
543
- }
544
- ],
545
- "src": "0:201:8"
546
- },
547
- "compiler": {
548
- "name": "solc",
549
- "version": "0.6.6+commit.6c089d02.Emscripten.clang"
550
- },
551
- "networks": {},
552
- "schemaVersion": "3.3.2",
553
- "updatedAt": "2021-01-09T21:19:45.649Z",
554
- "networkType": "ethereum",
555
- "devdoc": {
556
- "methods": {}
557
- },
558
- "userdoc": {
559
- "methods": {}
560
- }
561
- }