@instadapp/interop-x 0.0.0-dev.ef78459 → 0.0.0-dev.ef7acff

Sign up to get free protection for your applications and to get access to all the features.
Files changed (306) hide show
  1. package/.env.example +2 -1
  2. package/.github/workflows/ci.yml +19 -0
  3. package/bin/interop-x +1 -1
  4. package/dist/package.json +77 -0
  5. package/dist/src/abi/connectors/index.js +36 -0
  6. package/dist/src/abi/connectors/v1/aave.js +148 -0
  7. package/dist/src/abi/connectors/v1/aave_claim.js +4 -0
  8. package/dist/src/abi/connectors/v1/aave_migrate.js +109 -0
  9. package/dist/src/abi/connectors/v1/aave_polygon_migrate.js +110 -0
  10. package/dist/src/abi/connectors/v1/aave_stake.js +4 -0
  11. package/dist/src/abi/connectors/v1/aave_v1_import.js +54 -0
  12. package/dist/src/abi/connectors/v1/aave_v2.js +230 -0
  13. package/dist/src/abi/connectors/v1/aave_v2_import.js +59 -0
  14. package/dist/src/abi/connectors/v1/authority.js +100 -0
  15. package/dist/src/abi/connectors/v1/basic.js +136 -0
  16. package/dist/src/abi/connectors/v1/chi.js +36 -0
  17. package/dist/src/abi/connectors/v1/comp.js +4 -0
  18. package/dist/src/abi/connectors/v1/compound.js +4 -0
  19. package/dist/src/abi/connectors/v1/compoundImport.js +69 -0
  20. package/dist/src/abi/connectors/v1/compoundImport_v2.js +4 -0
  21. package/dist/src/abi/connectors/v1/compound_old.js +448 -0
  22. package/dist/src/abi/connectors/v1/curve.js +140 -0
  23. package/dist/src/abi/connectors/v1/curve_claim.js +63 -0
  24. package/dist/src/abi/connectors/v1/curve_gauge.js +158 -0
  25. package/dist/src/abi/connectors/v1/curve_sbtc.js +140 -0
  26. package/dist/src/abi/connectors/v1/curve_susd.js +140 -0
  27. package/dist/src/abi/connectors/v1/curve_three.js +79 -0
  28. package/dist/src/abi/connectors/v1/curve_y.js +140 -0
  29. package/dist/src/abi/connectors/v1/dsa_migrate_v1_to_v2.js +4 -0
  30. package/dist/src/abi/connectors/v1/dydx.js +148 -0
  31. package/dist/src/abi/connectors/v1/dydx_flash.js +52 -0
  32. package/dist/src/abi/connectors/v1/fee.js +50 -0
  33. package/dist/src/abi/connectors/v1/gelato.js +1138 -0
  34. package/dist/src/abi/connectors/v1/index.js +58 -0
  35. package/dist/src/abi/connectors/v1/instapool.js +439 -0
  36. package/dist/src/abi/connectors/v1/instapool_v2.js +126 -0
  37. package/dist/src/abi/connectors/v1/kyber.js +117 -0
  38. package/dist/src/abi/connectors/v1/maker.js +480 -0
  39. package/dist/src/abi/connectors/v1/maker_old.js +300 -0
  40. package/dist/src/abi/connectors/v1/math.js +43 -0
  41. package/dist/src/abi/connectors/v1/migrate.js +46 -0
  42. package/dist/src/abi/connectors/v1/oasis.js +198 -0
  43. package/dist/src/abi/connectors/v1/oneInch.js +160 -0
  44. package/dist/src/abi/connectors/v1/polygon_bridge.js +4 -0
  45. package/dist/src/abi/connectors/v1/refinance.js +4 -0
  46. package/dist/src/abi/connectors/v1/staking.js +220 -0
  47. package/dist/src/abi/connectors/v1/swerve.js +179 -0
  48. package/dist/src/abi/connectors/v1/uniswap.js +297 -0
  49. package/dist/src/abi/connectors/v2/1INCH-A.js +4 -0
  50. package/dist/src/abi/connectors/v2/1INCH-B.js +4 -0
  51. package/dist/src/abi/connectors/v2/AAVE-CLAIM-A.js +4 -0
  52. package/dist/src/abi/connectors/v2/AAVE-CLAIM-B.js +166 -0
  53. package/dist/src/abi/connectors/v2/AAVE-STAKE-A.js +4 -0
  54. package/dist/src/abi/connectors/v2/AAVE-V1-A.js +130 -0
  55. package/dist/src/abi/connectors/v2/AAVE-V1-IMPORT-A.js +4 -0
  56. package/dist/src/abi/connectors/v2/AAVE-V2-A.js +230 -0
  57. package/dist/src/abi/connectors/v2/AAVE-V2-IMPORT-A.js +4 -0
  58. package/dist/src/abi/connectors/v2/AAVE-V2-IMPORT-B.js +225 -0
  59. package/dist/src/abi/connectors/v2/AUTHORITY-A.js +100 -0
  60. package/dist/src/abi/connectors/v2/B-COMPOUND-A.js +4 -0
  61. package/dist/src/abi/connectors/v2/B-LIQUITY-A.js +4 -0
  62. package/dist/src/abi/connectors/v2/B-MAKERDAO-A.js +4 -0
  63. package/dist/src/abi/connectors/v2/BASIC-A.js +136 -0
  64. package/dist/src/abi/connectors/v2/BASIC-B.js +4 -0
  65. package/dist/src/abi/connectors/v2/BASIC-C.js +4 -0
  66. package/dist/src/abi/connectors/v2/COMP-A.js +4 -0
  67. package/dist/src/abi/connectors/v2/COMPOUND-A.js +4 -0
  68. package/dist/src/abi/connectors/v2/COMPOUND-IMPORT-A.js +4 -0
  69. package/dist/src/abi/connectors/v2/COMPOUND-IMPORT-B.js +195 -0
  70. package/dist/src/abi/connectors/v2/G-UNISWAP-A.js +4 -0
  71. package/dist/src/abi/connectors/v2/GELATO-AAVE-A.js +4 -0
  72. package/dist/src/abi/connectors/v2/INST-A.js +4 -0
  73. package/dist/src/abi/connectors/v2/INST-LM-A.js +4 -0
  74. package/dist/src/abi/connectors/v2/INST-STAKING-A.js +4 -0
  75. package/dist/src/abi/connectors/v2/INST-STAKING-B.js +4 -0
  76. package/dist/src/abi/connectors/v2/INSTAPOOL-A.js +4 -0
  77. package/dist/src/abi/connectors/v2/LIQUITY-A.js +4 -0
  78. package/dist/src/abi/connectors/v2/MAKERDAO-A.js +4 -0
  79. package/dist/src/abi/connectors/v2/MAKERDAO-CLAIM-A.js +136 -0
  80. package/dist/src/abi/connectors/v2/PARASWAP-A.js +4 -0
  81. package/dist/src/abi/connectors/v2/POLYGON-BRIDGE-A.js +4 -0
  82. package/dist/src/abi/connectors/v2/REFINANCE-A.js +4 -0
  83. package/dist/src/abi/connectors/v2/REFLEXER-A.js +4 -0
  84. package/dist/src/abi/connectors/v2/STAKE-ERC20-A.js +4 -0
  85. package/dist/src/abi/connectors/v2/UNISWAP-A.js +297 -0
  86. package/dist/src/abi/connectors/v2/UNISWAP-V2-A.js +4 -0
  87. package/dist/src/abi/connectors/v2/UNISWAP-V3-A.js +4 -0
  88. package/dist/src/abi/connectors/v2/UNISWAP-V3-STAKE-A.js +4 -0
  89. package/dist/src/abi/connectors/v2/WETH-A.js +4 -0
  90. package/dist/src/abi/connectors/v2/YEARN-VAULT-A.js +4 -0
  91. package/dist/src/abi/connectors/v2/index.js +89 -0
  92. package/dist/src/abi/erc20.json +350 -0
  93. package/dist/src/abi/gnosisSafe.json +747 -0
  94. package/dist/src/abi/index.js +17 -0
  95. package/dist/src/abi/instList.json +232 -0
  96. package/dist/src/abi/interopX.json +1436 -0
  97. package/dist/src/alias.js +10 -0
  98. package/dist/src/api/index.js +43 -0
  99. package/dist/src/config/index.js +31 -0
  100. package/dist/src/constants/addresses.js +19 -0
  101. package/dist/src/constants/blockConfirmations.js +8 -0
  102. package/dist/{constants → src/constants}/index.js +2 -0
  103. package/dist/src/constants/tokens.js +130 -0
  104. package/dist/{db → src/db}/index.js +0 -0
  105. package/dist/{db → src/db}/models/index.js +1 -1
  106. package/dist/src/db/models/transaction.js +80 -0
  107. package/dist/{db → src/db}/sequelize.js +2 -1
  108. package/dist/src/errors/index.js +17 -0
  109. package/dist/src/gnosis/actions/aaveV2/index.js +11 -0
  110. package/dist/src/gnosis/actions/aaveV2/source.js +73 -0
  111. package/dist/src/gnosis/actions/aaveV2/target.js +86 -0
  112. package/dist/src/gnosis/actions/index.js +9 -0
  113. package/dist/src/gnosis/index.js +20 -0
  114. package/dist/src/index.js +119 -0
  115. package/dist/{logger → src/logger}/index.js +0 -0
  116. package/dist/{net → src/net}/index.js +0 -0
  117. package/dist/{net → src/net}/peer/index.js +8 -3
  118. package/dist/{net → src/net}/pool/index.js +32 -9
  119. package/dist/{net → src/net}/protocol/dial/BaseDialProtocol.js +0 -0
  120. package/dist/{net → src/net}/protocol/dial/SignatureDialProtocol.js +19 -12
  121. package/dist/src/net/protocol/dial/TransactionStatusDialProtocol.js +30 -0
  122. package/dist/{net → src/net}/protocol/index.js +54 -4
  123. package/dist/src/tasks/AutoUpdateTask.js +70 -0
  124. package/dist/{tasks → src/tasks}/BaseTask.js +13 -5
  125. package/dist/src/tasks/InteropX/ProcessSubmitEvents.js +192 -0
  126. package/dist/src/tasks/InteropX/ProcessValidateEvents.js +184 -0
  127. package/dist/src/tasks/InteropX/SyncLogExecuteEvents.js +112 -0
  128. package/dist/src/tasks/InteropX/SyncLogSubmitEvents.js +87 -0
  129. package/dist/src/tasks/InteropX/SyncLogValidateEvents.js +105 -0
  130. package/dist/src/tasks/Transactions/SyncTransactionStatusTask.js +58 -0
  131. package/dist/src/tasks/index.js +45 -0
  132. package/dist/src/typechain/Erc20.js +2 -0
  133. package/dist/src/typechain/GnosisSafe.js +2 -0
  134. package/dist/src/typechain/InstList.js +2 -0
  135. package/dist/src/typechain/InteropX.js +2 -0
  136. package/dist/src/typechain/common.js +2 -0
  137. package/dist/src/typechain/factories/Erc20__factory.js +367 -0
  138. package/dist/src/typechain/factories/GnosisSafe__factory.js +1174 -0
  139. package/dist/src/typechain/factories/InstList__factory.js +249 -0
  140. package/dist/src/typechain/factories/InteropX__factory.js +1928 -0
  141. package/dist/src/typechain/factories/index.js +14 -0
  142. package/dist/src/typechain/index.js +35 -0
  143. package/dist/{types.js → src/types.js} +0 -0
  144. package/dist/src/utils/async.js +18 -0
  145. package/dist/src/utils/dsa.js +24 -0
  146. package/dist/src/utils/formatting.js +17 -0
  147. package/dist/src/utils/gnosis.js +62 -0
  148. package/dist/src/utils/http.js +10 -0
  149. package/dist/src/utils/index.js +24 -0
  150. package/dist/src/utils/interop.js +16 -0
  151. package/dist/src/utils/validate.js +23 -0
  152. package/dist/src/utils/web3.js +92 -0
  153. package/package.json +32 -20
  154. package/patches/@ethersproject+properties+5.6.0.patch +13 -0
  155. package/src/abi/connectors/index.ts +14 -0
  156. package/src/abi/connectors/v1/aave.ts +147 -0
  157. package/src/abi/connectors/v1/aave_claim.ts +3 -0
  158. package/src/abi/connectors/v1/aave_migrate.ts +108 -0
  159. package/src/abi/connectors/v1/aave_polygon_migrate.ts +109 -0
  160. package/src/abi/connectors/v1/aave_stake.ts +3 -0
  161. package/src/abi/connectors/v1/aave_v1_import.ts +53 -0
  162. package/src/abi/connectors/v1/aave_v2.ts +229 -0
  163. package/src/abi/connectors/v1/aave_v2_import.ts +58 -0
  164. package/src/abi/connectors/v1/authority.ts +99 -0
  165. package/src/abi/connectors/v1/basic.ts +135 -0
  166. package/src/abi/connectors/v1/chi.ts +35 -0
  167. package/src/abi/connectors/v1/comp.ts +3 -0
  168. package/src/abi/connectors/v1/compound.ts +3 -0
  169. package/src/abi/connectors/v1/compoundImport.ts +68 -0
  170. package/src/abi/connectors/v1/compoundImport_v2.ts +3 -0
  171. package/src/abi/connectors/v1/compound_old.ts +447 -0
  172. package/src/abi/connectors/v1/curve.ts +139 -0
  173. package/src/abi/connectors/v1/curve_claim.ts +62 -0
  174. package/src/abi/connectors/v1/curve_gauge.ts +157 -0
  175. package/src/abi/connectors/v1/curve_sbtc.ts +139 -0
  176. package/src/abi/connectors/v1/curve_susd.ts +139 -0
  177. package/src/abi/connectors/v1/curve_three.ts +78 -0
  178. package/src/abi/connectors/v1/curve_y.ts +139 -0
  179. package/src/abi/connectors/v1/dsa_migrate_v1_to_v2.ts +3 -0
  180. package/src/abi/connectors/v1/dydx.ts +147 -0
  181. package/src/abi/connectors/v1/dydx_flash.ts +51 -0
  182. package/src/abi/connectors/v1/fee.ts +49 -0
  183. package/src/abi/connectors/v1/gelato.ts +1137 -0
  184. package/src/abi/connectors/v1/index.ts +42 -0
  185. package/src/abi/connectors/v1/instapool.ts +438 -0
  186. package/src/abi/connectors/v1/instapool_v2.ts +125 -0
  187. package/src/abi/connectors/v1/kyber.ts +116 -0
  188. package/src/abi/connectors/v1/maker.ts +479 -0
  189. package/src/abi/connectors/v1/maker_old.ts +299 -0
  190. package/src/abi/connectors/v1/math.ts +42 -0
  191. package/src/abi/connectors/v1/migrate.ts +45 -0
  192. package/src/abi/connectors/v1/oasis.ts +197 -0
  193. package/src/abi/connectors/v1/oneInch.ts +159 -0
  194. package/src/abi/connectors/v1/polygon_bridge.ts +3 -0
  195. package/src/abi/connectors/v1/refinance.ts +3 -0
  196. package/src/abi/connectors/v1/staking.ts +219 -0
  197. package/src/abi/connectors/v1/swerve.ts +178 -0
  198. package/src/abi/connectors/v1/uniswap.ts +297 -0
  199. package/src/abi/connectors/v2/1INCH-A.ts +3 -0
  200. package/src/abi/connectors/v2/1INCH-B.ts +3 -0
  201. package/src/abi/connectors/v2/AAVE-CLAIM-A.ts +3 -0
  202. package/src/abi/connectors/v2/AAVE-CLAIM-B.ts +165 -0
  203. package/src/abi/connectors/v2/AAVE-STAKE-A.ts +3 -0
  204. package/src/abi/connectors/v2/AAVE-V1-A.ts +130 -0
  205. package/src/abi/connectors/v2/AAVE-V1-IMPORT-A.ts +3 -0
  206. package/src/abi/connectors/v2/AAVE-V2-A.ts +229 -0
  207. package/src/abi/connectors/v2/AAVE-V2-IMPORT-A.ts +3 -0
  208. package/src/abi/connectors/v2/AAVE-V2-IMPORT-B.ts +224 -0
  209. package/src/abi/connectors/v2/AUTHORITY-A.ts +99 -0
  210. package/src/abi/connectors/v2/B-COMPOUND-A.ts +3 -0
  211. package/src/abi/connectors/v2/B-LIQUITY-A.ts +3 -0
  212. package/src/abi/connectors/v2/B-MAKERDAO-A.ts +3 -0
  213. package/src/abi/connectors/v2/BASIC-A.ts +135 -0
  214. package/src/abi/connectors/v2/BASIC-B.ts +3 -0
  215. package/src/abi/connectors/v2/BASIC-C.ts +3 -0
  216. package/src/abi/connectors/v2/COMP-A.ts +3 -0
  217. package/src/abi/connectors/v2/COMPOUND-A.ts +3 -0
  218. package/src/abi/connectors/v2/COMPOUND-IMPORT-A.ts +3 -0
  219. package/src/abi/connectors/v2/COMPOUND-IMPORT-B.ts +194 -0
  220. package/src/abi/connectors/v2/G-UNISWAP-A.ts +3 -0
  221. package/src/abi/connectors/v2/GELATO-AAVE-A.ts +3 -0
  222. package/src/abi/connectors/v2/INST-A.ts +3 -0
  223. package/src/abi/connectors/v2/INST-LM-A.ts +3 -0
  224. package/src/abi/connectors/v2/INST-STAKING-A.ts +3 -0
  225. package/src/abi/connectors/v2/INST-STAKING-B.ts +3 -0
  226. package/src/abi/connectors/v2/INSTAPOOL-A.ts +3 -0
  227. package/src/abi/connectors/v2/LIQUITY-A.ts +3 -0
  228. package/src/abi/connectors/v2/MAKERDAO-A.ts +3 -0
  229. package/src/abi/connectors/v2/MAKERDAO-CLAIM-A.ts +135 -0
  230. package/src/abi/connectors/v2/PARASWAP-A.ts +3 -0
  231. package/src/abi/connectors/v2/POLYGON-BRIDGE-A.ts +3 -0
  232. package/src/abi/connectors/v2/REFINANCE-A.ts +3 -0
  233. package/src/abi/connectors/v2/REFLEXER-A.ts +3 -0
  234. package/src/abi/connectors/v2/STAKE-ERC20-A.ts +3 -0
  235. package/src/abi/connectors/v2/UNISWAP-A.ts +297 -0
  236. package/src/abi/connectors/v2/UNISWAP-V2-A.ts +3 -0
  237. package/src/abi/connectors/v2/UNISWAP-V3-A.ts +3 -0
  238. package/src/abi/connectors/v2/UNISWAP-V3-STAKE-A.ts +3 -0
  239. package/src/abi/connectors/v2/WETH-A.ts +3 -0
  240. package/src/abi/connectors/v2/YEARN-VAULT-A.ts +3 -0
  241. package/src/abi/connectors/v2/index.ts +87 -0
  242. package/src/abi/erc20.json +350 -0
  243. package/src/abi/gnosisSafe.json +747 -0
  244. package/src/abi/index.ts +13 -0
  245. package/src/abi/instList.json +232 -0
  246. package/src/abi/interopX.json +1436 -0
  247. package/src/alias.ts +6 -0
  248. package/src/api/index.ts +44 -0
  249. package/src/config/index.ts +17 -1
  250. package/src/constants/addresses.ts +12 -6
  251. package/src/constants/blockConfirmations.ts +5 -0
  252. package/src/constants/index.ts +2 -0
  253. package/src/constants/tokens.ts +127 -0
  254. package/src/db/models/index.ts +1 -1
  255. package/src/db/models/transaction.ts +190 -0
  256. package/src/db/sequelize.ts +2 -1
  257. package/src/errors/index.ts +13 -0
  258. package/src/gnosis/actions/aaveV2/index.ts +9 -0
  259. package/src/gnosis/actions/aaveV2/source.ts +118 -0
  260. package/src/gnosis/actions/aaveV2/target.ts +141 -0
  261. package/src/gnosis/actions/index.ts +5 -0
  262. package/src/gnosis/index.ts +19 -0
  263. package/src/index.ts +109 -8
  264. package/src/net/peer/index.ts +9 -7
  265. package/src/net/pool/index.ts +41 -11
  266. package/src/net/protocol/dial/SignatureDialProtocol.ts +23 -15
  267. package/src/net/protocol/dial/TransactionStatusDialProtocol.ts +33 -0
  268. package/src/net/protocol/index.ts +70 -4
  269. package/src/tasks/AutoUpdateTask.ts +82 -0
  270. package/src/tasks/BaseTask.ts +15 -6
  271. package/src/tasks/InteropX/ProcessSubmitEvents.ts +280 -0
  272. package/src/tasks/InteropX/ProcessValidateEvents.ts +272 -0
  273. package/src/tasks/InteropX/SyncLogExecuteEvents.ts +160 -0
  274. package/src/tasks/InteropX/SyncLogSubmitEvents.ts +137 -0
  275. package/src/tasks/InteropX/SyncLogValidateEvents.ts +150 -0
  276. package/src/tasks/Transactions/SyncTransactionStatusTask.ts +70 -0
  277. package/src/tasks/index.ts +32 -2
  278. package/src/typechain/Erc20.ts +491 -0
  279. package/src/typechain/GnosisSafe.ts +1728 -0
  280. package/src/typechain/InstList.ts +402 -0
  281. package/src/typechain/InteropX.ts +1216 -0
  282. package/src/typechain/common.ts +44 -0
  283. package/src/typechain/factories/Erc20__factory.ts +368 -0
  284. package/src/typechain/factories/GnosisSafe__factory.ts +1178 -0
  285. package/src/typechain/factories/InstList__factory.ts +253 -0
  286. package/src/typechain/factories/InteropX__factory.ts +1932 -0
  287. package/src/typechain/factories/index.ts +7 -0
  288. package/src/typechain/index.ts +12 -0
  289. package/src/types.ts +1 -1
  290. package/src/utils/async.ts +22 -0
  291. package/src/utils/dsa.ts +30 -0
  292. package/src/utils/formatting.ts +15 -0
  293. package/src/utils/gnosis.ts +123 -0
  294. package/src/utils/http.ts +6 -0
  295. package/src/utils/index.ts +8 -116
  296. package/src/utils/interop.ts +28 -0
  297. package/src/utils/validate.ts +24 -0
  298. package/src/utils/web3.ts +131 -0
  299. package/tsconfig.json +7 -2
  300. package/dist/config/index.js +0 -17
  301. package/dist/constants/addresses.js +0 -13
  302. package/dist/db/models/execution.js +0 -38
  303. package/dist/index.js +0 -43
  304. package/dist/tasks/index.js +0 -19
  305. package/dist/utils/index.js +0 -89
  306. package/src/db/models/execution.ts +0 -57
@@ -0,0 +1,42 @@
1
+ export * from './oneInch'
2
+ export * from './aave'
3
+ export * from './aave_migrate'
4
+ export * from './aave_claim'
5
+ export * from './aave_stake'
6
+ export * from './aave_polygon_migrate'
7
+ export * from './aave_v1_import'
8
+ export * from './aave_v2_import'
9
+ export * from './aave_v2'
10
+ export * from './authority'
11
+ export * from './basic'
12
+ export * from './chi'
13
+ export * from './comp'
14
+ export * from './compound_old'
15
+ export * from './compound'
16
+ export * from './compoundImport'
17
+ export * from './compoundImport_v2'
18
+ export * from './curve'
19
+ export * from './curve_y'
20
+ export * from './curve_sbtc'
21
+ export * from './curve_susd'
22
+ export * from './curve_claim'
23
+ export * from './curve_gauge'
24
+ export * from './curve_three'
25
+ export * from './dydx'
26
+ export * from './dydx_flash'
27
+ export * from './fee'
28
+ export * from './gelato'
29
+ export * from './math'
30
+ export * from './instapool'
31
+ export * from './instapool_v2'
32
+ export * from './kyber'
33
+ export * from './maker'
34
+ export * from './maker_old'
35
+ export * from './migrate'
36
+ export * from './oasis'
37
+ export * from './refinance'
38
+ export * from './staking'
39
+ export * from './swerve'
40
+ export * from './polygon_bridge'
41
+ export * from './uniswap'
42
+ export * from './dsa_migrate_v1_to_v2'
@@ -0,0 +1,438 @@
1
+ import { AbiItem } from 'web3-utils'
2
+
3
+ export const instapool: AbiItem[] = [
4
+ {
5
+ inputs: [
6
+ {
7
+ internalType: 'address',
8
+ name: 'token',
9
+ type: 'address',
10
+ },
11
+ {
12
+ internalType: 'uint256',
13
+ name: 'amt',
14
+ type: 'uint256',
15
+ },
16
+ {
17
+ internalType: 'uint256',
18
+ name: 'getId',
19
+ type: 'uint256',
20
+ },
21
+ {
22
+ internalType: 'uint256',
23
+ name: 'setId',
24
+ type: 'uint256',
25
+ },
26
+ ],
27
+ name: 'addFeeAmount',
28
+ outputs: [],
29
+ stateMutability: 'payable',
30
+ type: 'function',
31
+ },
32
+ {
33
+ inputs: [
34
+ {
35
+ internalType: 'address',
36
+ name: 'token',
37
+ type: 'address',
38
+ },
39
+ {
40
+ internalType: 'uint256',
41
+ name: 'amt',
42
+ type: 'uint256',
43
+ },
44
+ {
45
+ internalType: 'uint256',
46
+ name: 'getId',
47
+ type: 'uint256',
48
+ },
49
+ {
50
+ internalType: 'uint256',
51
+ name: 'setId',
52
+ type: 'uint256',
53
+ },
54
+ ],
55
+ name: 'deposit',
56
+ outputs: [],
57
+ stateMutability: 'payable',
58
+ type: 'function',
59
+ },
60
+ {
61
+ inputs: [
62
+ {
63
+ internalType: 'address',
64
+ name: 'token',
65
+ type: 'address',
66
+ },
67
+ {
68
+ internalType: 'uint256',
69
+ name: 'amt',
70
+ type: 'uint256',
71
+ },
72
+ {
73
+ internalType: 'uint256',
74
+ name: 'getId',
75
+ type: 'uint256',
76
+ },
77
+ {
78
+ internalType: 'uint256',
79
+ name: 'setId',
80
+ type: 'uint256',
81
+ },
82
+ ],
83
+ name: 'flashBorrow',
84
+ outputs: [],
85
+ stateMutability: 'payable',
86
+ type: 'function',
87
+ },
88
+ {
89
+ inputs: [
90
+ {
91
+ internalType: 'address[]',
92
+ name: 'tokens',
93
+ type: 'address[]',
94
+ },
95
+ {
96
+ internalType: 'uint256[]',
97
+ name: 'amts',
98
+ type: 'uint256[]',
99
+ },
100
+ {
101
+ internalType: 'uint256[]',
102
+ name: 'getId',
103
+ type: 'uint256[]',
104
+ },
105
+ {
106
+ internalType: 'uint256[]',
107
+ name: 'setId',
108
+ type: 'uint256[]',
109
+ },
110
+ ],
111
+ name: 'flashMultiBorrow',
112
+ outputs: [],
113
+ stateMutability: 'payable',
114
+ type: 'function',
115
+ },
116
+ {
117
+ inputs: [
118
+ {
119
+ internalType: 'address[]',
120
+ name: 'tokens',
121
+ type: 'address[]',
122
+ },
123
+ {
124
+ internalType: 'uint256[]',
125
+ name: 'getId',
126
+ type: 'uint256[]',
127
+ },
128
+ {
129
+ internalType: 'uint256[]',
130
+ name: 'setId',
131
+ type: 'uint256[]',
132
+ },
133
+ ],
134
+ name: 'flashMultiPayback',
135
+ outputs: [],
136
+ stateMutability: 'payable',
137
+ type: 'function',
138
+ },
139
+ {
140
+ inputs: [
141
+ {
142
+ internalType: 'address',
143
+ name: 'origin',
144
+ type: 'address',
145
+ },
146
+ {
147
+ internalType: 'address[]',
148
+ name: 'tokens',
149
+ type: 'address[]',
150
+ },
151
+ {
152
+ internalType: 'uint256[]',
153
+ name: 'getId',
154
+ type: 'uint256[]',
155
+ },
156
+ {
157
+ internalType: 'uint256[]',
158
+ name: 'setId',
159
+ type: 'uint256[]',
160
+ },
161
+ ],
162
+ name: 'flashMultiPaybackOrigin',
163
+ outputs: [],
164
+ stateMutability: 'payable',
165
+ type: 'function',
166
+ },
167
+ {
168
+ inputs: [
169
+ {
170
+ internalType: 'address',
171
+ name: 'token',
172
+ type: 'address',
173
+ },
174
+ {
175
+ internalType: 'uint256',
176
+ name: 'getId',
177
+ type: 'uint256',
178
+ },
179
+ {
180
+ internalType: 'uint256',
181
+ name: 'setId',
182
+ type: 'uint256',
183
+ },
184
+ ],
185
+ name: 'flashPayback',
186
+ outputs: [],
187
+ stateMutability: 'payable',
188
+ type: 'function',
189
+ },
190
+ {
191
+ inputs: [
192
+ {
193
+ internalType: 'address',
194
+ name: 'origin',
195
+ type: 'address',
196
+ },
197
+ {
198
+ internalType: 'address',
199
+ name: 'token',
200
+ type: 'address',
201
+ },
202
+ {
203
+ internalType: 'uint256',
204
+ name: 'getId',
205
+ type: 'uint256',
206
+ },
207
+ {
208
+ internalType: 'uint256',
209
+ name: 'setId',
210
+ type: 'uint256',
211
+ },
212
+ ],
213
+ name: 'flashPaybackOrigin',
214
+ outputs: [],
215
+ stateMutability: 'payable',
216
+ type: 'function',
217
+ },
218
+ {
219
+ anonymous: false,
220
+ inputs: [
221
+ {
222
+ indexed: true,
223
+ internalType: 'address',
224
+ name: 'token',
225
+ type: 'address',
226
+ },
227
+ {
228
+ indexed: false,
229
+ internalType: 'uint256',
230
+ name: 'tokenAmt',
231
+ type: 'uint256',
232
+ },
233
+ {
234
+ indexed: false,
235
+ internalType: 'uint256',
236
+ name: 'getId',
237
+ type: 'uint256',
238
+ },
239
+ {
240
+ indexed: false,
241
+ internalType: 'uint256',
242
+ name: 'setId',
243
+ type: 'uint256',
244
+ },
245
+ ],
246
+ name: 'LogDepositLiquidity',
247
+ type: 'event',
248
+ },
249
+ {
250
+ anonymous: false,
251
+ inputs: [
252
+ {
253
+ indexed: true,
254
+ internalType: 'address',
255
+ name: 'token',
256
+ type: 'address',
257
+ },
258
+ {
259
+ indexed: false,
260
+ internalType: 'uint256',
261
+ name: 'tokenAmt',
262
+ type: 'uint256',
263
+ },
264
+ {
265
+ indexed: false,
266
+ internalType: 'uint256',
267
+ name: 'getId',
268
+ type: 'uint256',
269
+ },
270
+ {
271
+ indexed: false,
272
+ internalType: 'uint256',
273
+ name: 'setId',
274
+ type: 'uint256',
275
+ },
276
+ ],
277
+ name: 'LogFlashBorrow',
278
+ type: 'event',
279
+ },
280
+ {
281
+ anonymous: false,
282
+ inputs: [
283
+ {
284
+ indexed: true,
285
+ internalType: 'address',
286
+ name: 'token',
287
+ type: 'address',
288
+ },
289
+ {
290
+ indexed: false,
291
+ internalType: 'uint256',
292
+ name: 'tokenAmt',
293
+ type: 'uint256',
294
+ },
295
+ {
296
+ indexed: false,
297
+ internalType: 'uint256',
298
+ name: 'feeCollected',
299
+ type: 'uint256',
300
+ },
301
+ {
302
+ indexed: false,
303
+ internalType: 'uint256',
304
+ name: 'getId',
305
+ type: 'uint256',
306
+ },
307
+ {
308
+ indexed: false,
309
+ internalType: 'uint256',
310
+ name: 'setId',
311
+ type: 'uint256',
312
+ },
313
+ ],
314
+ name: 'LogFlashPayback',
315
+ type: 'event',
316
+ },
317
+ {
318
+ anonymous: false,
319
+ inputs: [
320
+ {
321
+ indexed: true,
322
+ internalType: 'address',
323
+ name: 'origin',
324
+ type: 'address',
325
+ },
326
+ {
327
+ indexed: true,
328
+ internalType: 'address',
329
+ name: 'token',
330
+ type: 'address',
331
+ },
332
+ {
333
+ indexed: false,
334
+ internalType: 'uint256',
335
+ name: 'tokenAmt',
336
+ type: 'uint256',
337
+ },
338
+ {
339
+ indexed: false,
340
+ internalType: 'uint256',
341
+ name: 'originFeeAmt',
342
+ type: 'uint256',
343
+ },
344
+ ],
345
+ name: 'LogOriginFeeCollected',
346
+ type: 'event',
347
+ },
348
+ {
349
+ anonymous: false,
350
+ inputs: [
351
+ {
352
+ indexed: true,
353
+ internalType: 'address',
354
+ name: 'token',
355
+ type: 'address',
356
+ },
357
+ {
358
+ indexed: false,
359
+ internalType: 'uint256',
360
+ name: 'tokenAmt',
361
+ type: 'uint256',
362
+ },
363
+ {
364
+ indexed: false,
365
+ internalType: 'uint256',
366
+ name: 'getId',
367
+ type: 'uint256',
368
+ },
369
+ {
370
+ indexed: false,
371
+ internalType: 'uint256',
372
+ name: 'setId',
373
+ type: 'uint256',
374
+ },
375
+ ],
376
+ name: 'LogWithdrawLiquidity',
377
+ type: 'event',
378
+ },
379
+ {
380
+ inputs: [
381
+ {
382
+ internalType: 'address',
383
+ name: 'token',
384
+ type: 'address',
385
+ },
386
+ {
387
+ internalType: 'uint256',
388
+ name: 'amt',
389
+ type: 'uint256',
390
+ },
391
+ {
392
+ internalType: 'uint256',
393
+ name: 'getId',
394
+ type: 'uint256',
395
+ },
396
+ {
397
+ internalType: 'uint256',
398
+ name: 'setId',
399
+ type: 'uint256',
400
+ },
401
+ ],
402
+ name: 'withdraw',
403
+ outputs: [],
404
+ stateMutability: 'payable',
405
+ type: 'function',
406
+ },
407
+ {
408
+ inputs: [],
409
+ name: 'connectorID',
410
+ outputs: [
411
+ {
412
+ internalType: 'uint256',
413
+ name: '_type',
414
+ type: 'uint256',
415
+ },
416
+ {
417
+ internalType: 'uint256',
418
+ name: '_id',
419
+ type: 'uint256',
420
+ },
421
+ ],
422
+ stateMutability: 'pure',
423
+ type: 'function',
424
+ },
425
+ {
426
+ inputs: [],
427
+ name: 'name',
428
+ outputs: [
429
+ {
430
+ internalType: 'string',
431
+ name: '',
432
+ type: 'string',
433
+ },
434
+ ],
435
+ stateMutability: 'view',
436
+ type: 'function',
437
+ },
438
+ ]
@@ -0,0 +1,125 @@
1
+ import { AbiItem } from 'web3-utils'
2
+
3
+ export const instapool_v2: AbiItem[] = [
4
+ {
5
+ anonymous: false,
6
+ inputs: [
7
+ {
8
+ indexed: false,
9
+ internalType: 'address[]',
10
+ name: 'token',
11
+ type: 'address[]',
12
+ },
13
+ {
14
+ indexed: false,
15
+ internalType: 'uint256[]',
16
+ name: 'tokenAmt',
17
+ type: 'uint256[]',
18
+ },
19
+ ],
20
+ name: 'LogDydxFlashBorrow',
21
+ type: 'event',
22
+ },
23
+ {
24
+ anonymous: false,
25
+ inputs: [
26
+ {
27
+ indexed: false,
28
+ internalType: 'address[]',
29
+ name: 'token',
30
+ type: 'address[]',
31
+ },
32
+ {
33
+ indexed: false,
34
+ internalType: 'uint256[]',
35
+ name: 'tokenAmt',
36
+ type: 'uint256[]',
37
+ },
38
+ {
39
+ indexed: false,
40
+ internalType: 'uint256[]',
41
+ name: 'totalAmtFee',
42
+ type: 'uint256[]',
43
+ },
44
+ ],
45
+ name: 'LogDydxFlashPayback',
46
+ type: 'event',
47
+ },
48
+ {
49
+ inputs: [
50
+ { internalType: 'uint256', name: 'flashAmt', type: 'uint256' },
51
+ { internalType: 'uint256', name: 'amt', type: 'uint256' },
52
+ { internalType: 'uint256', name: 'getId', type: 'uint256' },
53
+ { internalType: 'uint256', name: 'setId', type: 'uint256' },
54
+ ],
55
+ name: 'addFeeAmount',
56
+ outputs: [],
57
+ stateMutability: 'payable',
58
+ type: 'function',
59
+ },
60
+ {
61
+ inputs: [],
62
+ name: 'connectorID',
63
+ outputs: [
64
+ { internalType: 'uint256', name: '_type', type: 'uint256' },
65
+ { internalType: 'uint256', name: '_id', type: 'uint256' },
66
+ ],
67
+ stateMutability: 'pure',
68
+ type: 'function',
69
+ },
70
+ {
71
+ inputs: [
72
+ { internalType: 'address', name: 'token', type: 'address' },
73
+ { internalType: 'uint256', name: 'amt', type: 'uint256' },
74
+ { internalType: 'uint256', name: 'route', type: 'uint256' },
75
+ { internalType: 'bytes', name: 'data', type: 'bytes' },
76
+ ],
77
+ name: 'flashBorrowAndCast',
78
+ outputs: [],
79
+ stateMutability: 'payable',
80
+ type: 'function',
81
+ },
82
+ {
83
+ inputs: [
84
+ { internalType: 'address[]', name: 'tokens', type: 'address[]' },
85
+ { internalType: 'uint256[]', name: 'amts', type: 'uint256[]' },
86
+ { internalType: 'uint256', name: 'route', type: 'uint256' },
87
+ { internalType: 'bytes', name: 'data', type: 'bytes' },
88
+ ],
89
+ name: 'flashMultiBorrowAndCast',
90
+ outputs: [],
91
+ stateMutability: 'payable',
92
+ type: 'function',
93
+ },
94
+ {
95
+ inputs: [
96
+ { internalType: 'address[]', name: 'tokens', type: 'address[]' },
97
+ { internalType: 'uint256[]', name: 'amts', type: 'uint256[]' },
98
+ { internalType: 'uint256[]', name: 'getId', type: 'uint256[]' },
99
+ { internalType: 'uint256[]', name: 'setId', type: 'uint256[]' },
100
+ ],
101
+ name: 'flashMultiPayback',
102
+ outputs: [],
103
+ stateMutability: 'payable',
104
+ type: 'function',
105
+ },
106
+ {
107
+ inputs: [
108
+ { internalType: 'address', name: 'token', type: 'address' },
109
+ { internalType: 'uint256', name: 'amt', type: 'uint256' },
110
+ { internalType: 'uint256', name: 'getId', type: 'uint256' },
111
+ { internalType: 'uint256', name: 'setId', type: 'uint256' },
112
+ ],
113
+ name: 'flashPayback',
114
+ outputs: [],
115
+ stateMutability: 'payable',
116
+ type: 'function',
117
+ },
118
+ {
119
+ inputs: [],
120
+ name: 'name',
121
+ outputs: [{ internalType: 'string', name: '', type: 'string' }],
122
+ stateMutability: 'view',
123
+ type: 'function',
124
+ },
125
+ ]
@@ -0,0 +1,116 @@
1
+ import { AbiItem } from 'web3-utils'
2
+
3
+ export const kyber: AbiItem[] = [
4
+ {
5
+ anonymous: false,
6
+ inputs: [
7
+ {
8
+ indexed: true,
9
+ internalType: 'address',
10
+ name: 'buyToken',
11
+ type: 'address',
12
+ },
13
+ {
14
+ indexed: true,
15
+ internalType: 'address',
16
+ name: 'sellToken',
17
+ type: 'address',
18
+ },
19
+ {
20
+ indexed: false,
21
+ internalType: 'uint256',
22
+ name: 'buyAmt',
23
+ type: 'uint256',
24
+ },
25
+ {
26
+ indexed: false,
27
+ internalType: 'uint256',
28
+ name: 'sellAmt',
29
+ type: 'uint256',
30
+ },
31
+ {
32
+ indexed: false,
33
+ internalType: 'uint256',
34
+ name: 'getId',
35
+ type: 'uint256',
36
+ },
37
+ {
38
+ indexed: false,
39
+ internalType: 'uint256',
40
+ name: 'setId',
41
+ type: 'uint256',
42
+ },
43
+ ],
44
+ name: 'LogSell',
45
+ type: 'event',
46
+ },
47
+ {
48
+ inputs: [],
49
+ name: 'connectorID',
50
+ outputs: [
51
+ {
52
+ internalType: 'uint256',
53
+ name: 'model',
54
+ type: 'uint256',
55
+ },
56
+ {
57
+ internalType: 'uint256',
58
+ name: 'id',
59
+ type: 'uint256',
60
+ },
61
+ ],
62
+ stateMutability: 'pure',
63
+ type: 'function',
64
+ },
65
+ {
66
+ inputs: [],
67
+ name: 'name',
68
+ outputs: [
69
+ {
70
+ internalType: 'string',
71
+ name: '',
72
+ type: 'string',
73
+ },
74
+ ],
75
+ stateMutability: 'view',
76
+ type: 'function',
77
+ },
78
+ {
79
+ inputs: [
80
+ {
81
+ internalType: 'address',
82
+ name: 'buyAddr',
83
+ type: 'address',
84
+ },
85
+ {
86
+ internalType: 'address',
87
+ name: 'sellAddr',
88
+ type: 'address',
89
+ },
90
+ {
91
+ internalType: 'uint256',
92
+ name: 'sellAmt',
93
+ type: 'uint256',
94
+ },
95
+ {
96
+ internalType: 'uint256',
97
+ name: 'unitAmt',
98
+ type: 'uint256',
99
+ },
100
+ {
101
+ internalType: 'uint256',
102
+ name: 'getId',
103
+ type: 'uint256',
104
+ },
105
+ {
106
+ internalType: 'uint256',
107
+ name: 'setId',
108
+ type: 'uint256',
109
+ },
110
+ ],
111
+ name: 'sell',
112
+ outputs: [],
113
+ stateMutability: 'payable',
114
+ type: 'function',
115
+ },
116
+ ]