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,294 @@
1
+ {
2
+ "contractName": "ICDeployer",
3
+ "abi": [
4
+ {
5
+ "constant": false,
6
+ "inputs": [
7
+ {
8
+ "internalType": "address",
9
+ "name": "uniswapV2Pair",
10
+ "type": "address"
11
+ }
12
+ ],
13
+ "name": "deployCollateral",
14
+ "outputs": [
15
+ {
16
+ "internalType": "address",
17
+ "name": "collateral",
18
+ "type": "address"
19
+ }
20
+ ],
21
+ "payable": false,
22
+ "stateMutability": "nonpayable",
23
+ "type": "function"
24
+ }
25
+ ],
26
+ "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"uniswapV2Pair\",\"type\":\"address\"}],\"name\":\"deployCollateral\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/C/Users/simor/Desktop/impermax-x-uniswapv2-periphery/test/Contracts/imx-univ2-core/interfaces/ICDeployer.sol\":\"ICDeployer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/C/Users/simor/Desktop/impermax-x-uniswapv2-periphery/test/Contracts/imx-univ2-core/interfaces/ICDeployer.sol\":{\"keccak256\":\"0x5bd521171c6ef60b554d88475d14fd55b3862a3e42e663434dce7c0a625d15dc\",\"urls\":[\"bzz-raw://a6cf5482d61f77ff6a1ca7974baa006b525e18d646ad766bed232ed420d88db3\",\"dweb:/ipfs/QmX9gUoD3V1fF2PyYsEXCyWxhmHEi6wcSbBpPvUgvSK9Zz\"]}},\"version\":1}",
27
+ "bytecode": "0x",
28
+ "deployedBytecode": "0x",
29
+ "sourceMap": "",
30
+ "deployedSourceMap": "",
31
+ "source": "pragma solidity >=0.5.0;\r\n\r\ninterface ICDeployer {\r\n\tfunction deployCollateral(address uniswapV2Pair) external returns (address collateral);\r\n}",
32
+ "sourcePath": "C:\\Users\\simor\\Desktop\\impermax-x-uniswapv2-periphery\\test\\Contracts\\imx-univ2-core\\interfaces\\ICDeployer.sol",
33
+ "ast": {
34
+ "absolutePath": "/C/Users/simor/Desktop/impermax-x-uniswapv2-periphery/test/Contracts/imx-univ2-core/interfaces/ICDeployer.sol",
35
+ "exportedSymbols": {
36
+ "ICDeployer": [
37
+ 5433
38
+ ]
39
+ },
40
+ "id": 5434,
41
+ "nodeType": "SourceUnit",
42
+ "nodes": [
43
+ {
44
+ "id": 5425,
45
+ "literals": [
46
+ "solidity",
47
+ ">=",
48
+ "0.5",
49
+ ".0"
50
+ ],
51
+ "nodeType": "PragmaDirective",
52
+ "src": "0:24:20"
53
+ },
54
+ {
55
+ "baseContracts": [],
56
+ "contractDependencies": [],
57
+ "contractKind": "interface",
58
+ "documentation": null,
59
+ "fullyImplemented": false,
60
+ "id": 5433,
61
+ "linearizedBaseContracts": [
62
+ 5433
63
+ ],
64
+ "name": "ICDeployer",
65
+ "nodeType": "ContractDefinition",
66
+ "nodes": [
67
+ {
68
+ "body": null,
69
+ "documentation": null,
70
+ "id": 5432,
71
+ "implemented": false,
72
+ "kind": "function",
73
+ "modifiers": [],
74
+ "name": "deployCollateral",
75
+ "nodeType": "FunctionDefinition",
76
+ "parameters": {
77
+ "id": 5428,
78
+ "nodeType": "ParameterList",
79
+ "parameters": [
80
+ {
81
+ "constant": false,
82
+ "id": 5427,
83
+ "name": "uniswapV2Pair",
84
+ "nodeType": "VariableDeclaration",
85
+ "scope": 5432,
86
+ "src": "79:21:20",
87
+ "stateVariable": false,
88
+ "storageLocation": "default",
89
+ "typeDescriptions": {
90
+ "typeIdentifier": "t_address",
91
+ "typeString": "address"
92
+ },
93
+ "typeName": {
94
+ "id": 5426,
95
+ "name": "address",
96
+ "nodeType": "ElementaryTypeName",
97
+ "src": "79:7:20",
98
+ "stateMutability": "nonpayable",
99
+ "typeDescriptions": {
100
+ "typeIdentifier": "t_address",
101
+ "typeString": "address"
102
+ }
103
+ },
104
+ "value": null,
105
+ "visibility": "internal"
106
+ }
107
+ ],
108
+ "src": "78:23:20"
109
+ },
110
+ "returnParameters": {
111
+ "id": 5431,
112
+ "nodeType": "ParameterList",
113
+ "parameters": [
114
+ {
115
+ "constant": false,
116
+ "id": 5430,
117
+ "name": "collateral",
118
+ "nodeType": "VariableDeclaration",
119
+ "scope": 5432,
120
+ "src": "120:18:20",
121
+ "stateVariable": false,
122
+ "storageLocation": "default",
123
+ "typeDescriptions": {
124
+ "typeIdentifier": "t_address",
125
+ "typeString": "address"
126
+ },
127
+ "typeName": {
128
+ "id": 5429,
129
+ "name": "address",
130
+ "nodeType": "ElementaryTypeName",
131
+ "src": "120:7:20",
132
+ "stateMutability": "nonpayable",
133
+ "typeDescriptions": {
134
+ "typeIdentifier": "t_address",
135
+ "typeString": "address"
136
+ }
137
+ },
138
+ "value": null,
139
+ "visibility": "internal"
140
+ }
141
+ ],
142
+ "src": "119:20:20"
143
+ },
144
+ "scope": 5433,
145
+ "src": "53:87:20",
146
+ "stateMutability": "nonpayable",
147
+ "superFunction": null,
148
+ "visibility": "external"
149
+ }
150
+ ],
151
+ "scope": 5434,
152
+ "src": "28:115:20"
153
+ }
154
+ ],
155
+ "src": "0:143:20"
156
+ },
157
+ "legacyAST": {
158
+ "absolutePath": "/C/Users/simor/Desktop/impermax-x-uniswapv2-periphery/test/Contracts/imx-univ2-core/interfaces/ICDeployer.sol",
159
+ "exportedSymbols": {
160
+ "ICDeployer": [
161
+ 5433
162
+ ]
163
+ },
164
+ "id": 5434,
165
+ "nodeType": "SourceUnit",
166
+ "nodes": [
167
+ {
168
+ "id": 5425,
169
+ "literals": [
170
+ "solidity",
171
+ ">=",
172
+ "0.5",
173
+ ".0"
174
+ ],
175
+ "nodeType": "PragmaDirective",
176
+ "src": "0:24:20"
177
+ },
178
+ {
179
+ "baseContracts": [],
180
+ "contractDependencies": [],
181
+ "contractKind": "interface",
182
+ "documentation": null,
183
+ "fullyImplemented": false,
184
+ "id": 5433,
185
+ "linearizedBaseContracts": [
186
+ 5433
187
+ ],
188
+ "name": "ICDeployer",
189
+ "nodeType": "ContractDefinition",
190
+ "nodes": [
191
+ {
192
+ "body": null,
193
+ "documentation": null,
194
+ "id": 5432,
195
+ "implemented": false,
196
+ "kind": "function",
197
+ "modifiers": [],
198
+ "name": "deployCollateral",
199
+ "nodeType": "FunctionDefinition",
200
+ "parameters": {
201
+ "id": 5428,
202
+ "nodeType": "ParameterList",
203
+ "parameters": [
204
+ {
205
+ "constant": false,
206
+ "id": 5427,
207
+ "name": "uniswapV2Pair",
208
+ "nodeType": "VariableDeclaration",
209
+ "scope": 5432,
210
+ "src": "79:21:20",
211
+ "stateVariable": false,
212
+ "storageLocation": "default",
213
+ "typeDescriptions": {
214
+ "typeIdentifier": "t_address",
215
+ "typeString": "address"
216
+ },
217
+ "typeName": {
218
+ "id": 5426,
219
+ "name": "address",
220
+ "nodeType": "ElementaryTypeName",
221
+ "src": "79:7:20",
222
+ "stateMutability": "nonpayable",
223
+ "typeDescriptions": {
224
+ "typeIdentifier": "t_address",
225
+ "typeString": "address"
226
+ }
227
+ },
228
+ "value": null,
229
+ "visibility": "internal"
230
+ }
231
+ ],
232
+ "src": "78:23:20"
233
+ },
234
+ "returnParameters": {
235
+ "id": 5431,
236
+ "nodeType": "ParameterList",
237
+ "parameters": [
238
+ {
239
+ "constant": false,
240
+ "id": 5430,
241
+ "name": "collateral",
242
+ "nodeType": "VariableDeclaration",
243
+ "scope": 5432,
244
+ "src": "120:18:20",
245
+ "stateVariable": false,
246
+ "storageLocation": "default",
247
+ "typeDescriptions": {
248
+ "typeIdentifier": "t_address",
249
+ "typeString": "address"
250
+ },
251
+ "typeName": {
252
+ "id": 5429,
253
+ "name": "address",
254
+ "nodeType": "ElementaryTypeName",
255
+ "src": "120:7:20",
256
+ "stateMutability": "nonpayable",
257
+ "typeDescriptions": {
258
+ "typeIdentifier": "t_address",
259
+ "typeString": "address"
260
+ }
261
+ },
262
+ "value": null,
263
+ "visibility": "internal"
264
+ }
265
+ ],
266
+ "src": "119:20:20"
267
+ },
268
+ "scope": 5433,
269
+ "src": "53:87:20",
270
+ "stateMutability": "nonpayable",
271
+ "superFunction": null,
272
+ "visibility": "external"
273
+ }
274
+ ],
275
+ "scope": 5434,
276
+ "src": "28:115:20"
277
+ }
278
+ ],
279
+ "src": "0:143:20"
280
+ },
281
+ "compiler": {
282
+ "name": "solc",
283
+ "version": "0.5.16+commit.9c3226ce.Emscripten.clang"
284
+ },
285
+ "networks": {},
286
+ "schemaVersion": "3.3.2",
287
+ "updatedAt": "2021-01-07T23:07:24.821Z",
288
+ "devdoc": {
289
+ "methods": {}
290
+ },
291
+ "userdoc": {
292
+ "methods": {}
293
+ }
294
+ }