@instadapp/interop-x 0.0.0-dev.e53015f → 0.0.0-dev.ea4acf6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (326) hide show
  1. package/.github/workflows/ci.yml +19 -0
  2. package/dist/package.json +23 -13
  3. package/dist/src/abi/aaveV2Resolver.json +832 -0
  4. package/dist/src/abi/aaveV3Resolver.json +628 -0
  5. package/dist/src/abi/balanceResolver.json +211 -0
  6. package/dist/src/abi/connectors/index.js +36 -0
  7. package/dist/src/abi/connectors/v1/aave.js +148 -0
  8. package/dist/src/abi/connectors/v1/aave_claim.js +4 -0
  9. package/dist/src/abi/connectors/v1/aave_migrate.js +109 -0
  10. package/dist/src/abi/connectors/v1/aave_polygon_migrate.js +110 -0
  11. package/dist/src/abi/connectors/v1/aave_stake.js +4 -0
  12. package/dist/src/abi/connectors/v1/aave_v1_import.js +54 -0
  13. package/dist/src/abi/connectors/v1/aave_v2.js +230 -0
  14. package/dist/src/abi/connectors/v1/aave_v2_import.js +59 -0
  15. package/dist/src/abi/connectors/v1/authority.js +100 -0
  16. package/dist/src/abi/connectors/v1/basic.js +136 -0
  17. package/dist/src/abi/connectors/v1/chi.js +36 -0
  18. package/dist/src/abi/connectors/v1/comp.js +4 -0
  19. package/dist/src/abi/connectors/v1/compound.js +4 -0
  20. package/dist/src/abi/connectors/v1/compoundImport.js +69 -0
  21. package/dist/src/abi/connectors/v1/compoundImport_v2.js +4 -0
  22. package/dist/src/abi/connectors/v1/compound_old.js +448 -0
  23. package/dist/src/abi/connectors/v1/curve.js +140 -0
  24. package/dist/src/abi/connectors/v1/curve_claim.js +63 -0
  25. package/dist/src/abi/connectors/v1/curve_gauge.js +158 -0
  26. package/dist/src/abi/connectors/v1/curve_sbtc.js +140 -0
  27. package/dist/src/abi/connectors/v1/curve_susd.js +140 -0
  28. package/dist/src/abi/connectors/v1/curve_three.js +79 -0
  29. package/dist/src/abi/connectors/v1/curve_y.js +140 -0
  30. package/dist/src/abi/connectors/v1/dsa_migrate_v1_to_v2.js +4 -0
  31. package/dist/src/abi/connectors/v1/dydx.js +148 -0
  32. package/dist/src/abi/connectors/v1/dydx_flash.js +52 -0
  33. package/dist/src/abi/connectors/v1/fee.js +50 -0
  34. package/dist/src/abi/connectors/v1/gelato.js +1138 -0
  35. package/dist/src/abi/connectors/v1/index.js +58 -0
  36. package/dist/src/abi/connectors/v1/instapool.js +439 -0
  37. package/dist/src/abi/connectors/v1/instapool_v2.js +126 -0
  38. package/dist/src/abi/connectors/v1/kyber.js +117 -0
  39. package/dist/src/abi/connectors/v1/maker.js +480 -0
  40. package/dist/src/abi/connectors/v1/maker_old.js +300 -0
  41. package/dist/src/abi/connectors/v1/math.js +43 -0
  42. package/dist/src/abi/connectors/v1/migrate.js +46 -0
  43. package/dist/src/abi/connectors/v1/oasis.js +198 -0
  44. package/dist/src/abi/connectors/v1/oneInch.js +160 -0
  45. package/dist/src/abi/connectors/v1/polygon_bridge.js +4 -0
  46. package/dist/src/abi/connectors/v1/refinance.js +4 -0
  47. package/dist/src/abi/connectors/v1/staking.js +220 -0
  48. package/dist/src/abi/connectors/v1/swerve.js +179 -0
  49. package/dist/src/abi/connectors/v1/uniswap.js +297 -0
  50. package/dist/src/abi/connectors/v2/1INCH-A.js +4 -0
  51. package/dist/src/abi/connectors/v2/1INCH-B.js +4 -0
  52. package/dist/src/abi/connectors/v2/AAVE-CLAIM-A.js +4 -0
  53. package/dist/src/abi/connectors/v2/AAVE-CLAIM-B.js +166 -0
  54. package/dist/src/abi/connectors/v2/AAVE-STAKE-A.js +4 -0
  55. package/dist/src/abi/connectors/v2/AAVE-V1-A.js +130 -0
  56. package/dist/src/abi/connectors/v2/AAVE-V1-IMPORT-A.js +4 -0
  57. package/dist/src/abi/connectors/v2/AAVE-V2-A.js +230 -0
  58. package/dist/src/abi/connectors/v2/AAVE-V2-IMPORT-A.js +4 -0
  59. package/dist/src/abi/connectors/v2/AAVE-V2-IMPORT-B.js +225 -0
  60. package/dist/src/abi/connectors/v2/AUTHORITY-A.js +100 -0
  61. package/dist/src/abi/connectors/v2/B-COMPOUND-A.js +4 -0
  62. package/dist/src/abi/connectors/v2/B-LIQUITY-A.js +4 -0
  63. package/dist/src/abi/connectors/v2/B-MAKERDAO-A.js +4 -0
  64. package/dist/src/abi/connectors/v2/BASIC-A.js +136 -0
  65. package/dist/src/abi/connectors/v2/BASIC-B.js +4 -0
  66. package/dist/src/abi/connectors/v2/BASIC-C.js +4 -0
  67. package/dist/src/abi/connectors/v2/COMP-A.js +4 -0
  68. package/dist/src/abi/connectors/v2/COMPOUND-A.js +4 -0
  69. package/dist/src/abi/connectors/v2/COMPOUND-IMPORT-A.js +4 -0
  70. package/dist/src/abi/connectors/v2/COMPOUND-IMPORT-B.js +195 -0
  71. package/dist/src/abi/connectors/v2/G-UNISWAP-A.js +4 -0
  72. package/dist/src/abi/connectors/v2/GELATO-AAVE-A.js +4 -0
  73. package/dist/src/abi/connectors/v2/INST-A.js +4 -0
  74. package/dist/src/abi/connectors/v2/INST-LM-A.js +4 -0
  75. package/dist/src/abi/connectors/v2/INST-STAKING-A.js +4 -0
  76. package/dist/src/abi/connectors/v2/INST-STAKING-B.js +4 -0
  77. package/dist/src/abi/connectors/v2/INSTAPOOL-A.js +4 -0
  78. package/dist/src/abi/connectors/v2/LIQUITY-A.js +4 -0
  79. package/dist/src/abi/connectors/v2/MAKERDAO-A.js +4 -0
  80. package/dist/src/abi/connectors/v2/MAKERDAO-CLAIM-A.js +136 -0
  81. package/dist/src/abi/connectors/v2/PARASWAP-A.js +4 -0
  82. package/dist/src/abi/connectors/v2/POLYGON-BRIDGE-A.js +4 -0
  83. package/dist/src/abi/connectors/v2/REFINANCE-A.js +4 -0
  84. package/dist/src/abi/connectors/v2/REFLEXER-A.js +4 -0
  85. package/dist/src/abi/connectors/v2/STAKE-ERC20-A.js +4 -0
  86. package/dist/src/abi/connectors/v2/UNISWAP-A.js +297 -0
  87. package/dist/src/abi/connectors/v2/UNISWAP-V2-A.js +4 -0
  88. package/dist/src/abi/connectors/v2/UNISWAP-V3-A.js +4 -0
  89. package/dist/src/abi/connectors/v2/UNISWAP-V3-STAKE-A.js +4 -0
  90. package/dist/src/abi/connectors/v2/WETH-A.js +4 -0
  91. package/dist/src/abi/connectors/v2/YEARN-VAULT-A.js +4 -0
  92. package/dist/src/abi/connectors/v2/index.js +89 -0
  93. package/dist/src/abi/index.js +12 -4
  94. package/dist/src/abi/instList.json +232 -0
  95. package/dist/src/abi/interopX.json +1436 -0
  96. package/dist/src/alias.js +10 -0
  97. package/dist/src/api/index.js +10 -0
  98. package/dist/src/constants/addresses.js +12 -7
  99. package/dist/src/constants/blockConfirmations.js +8 -0
  100. package/dist/src/constants/capPerChain.js +8 -0
  101. package/dist/src/constants/index.js +3 -1
  102. package/dist/src/constants/tokens.js +30 -7
  103. package/dist/src/constants/wrappedNativeToken.js +8 -0
  104. package/dist/src/crons/index.js +3 -0
  105. package/dist/src/crons/prices.js +16 -0
  106. package/dist/src/db/models/transaction.js +42 -16
  107. package/dist/src/errors/index.js +30 -0
  108. package/dist/src/gnosis/actions/aaveV2/index.js +11 -0
  109. package/dist/src/gnosis/actions/aaveV2/source.js +98 -0
  110. package/dist/src/gnosis/actions/aaveV2/target.js +100 -0
  111. package/dist/src/gnosis/actions/aaveV3/index.js +11 -0
  112. package/dist/src/gnosis/actions/aaveV3/source.js +74 -0
  113. package/dist/src/gnosis/actions/aaveV3/target.js +87 -0
  114. package/dist/src/gnosis/actions/index.js +11 -0
  115. package/dist/src/gnosis/index.js +20 -0
  116. package/dist/src/index.js +24 -22
  117. package/dist/src/net/protocol/dial/SignatureDialProtocol.js +9 -10
  118. package/dist/src/net/protocol/dial/{SignatureDialProtocol.1.js → TransactionStatusDialProtocol.js} +2 -0
  119. package/dist/src/net/protocol/index.js +17 -7
  120. package/dist/src/providers/index.js +17 -0
  121. package/dist/src/providers/retry-provider.js +45 -0
  122. package/dist/src/services/Prices.js +74 -0
  123. package/dist/src/services/index.js +8 -0
  124. package/dist/src/tasks/AutoUpdateTask.js +6 -2
  125. package/dist/src/tasks/InteropX/ProcessSubmitEvents.js +273 -0
  126. package/dist/src/tasks/InteropX/ProcessValidateEvents.js +203 -0
  127. package/dist/src/tasks/InteropX/SyncLogExecuteEvents.js +113 -0
  128. package/dist/src/tasks/InteropX/SyncLogSubmitEvents.js +88 -0
  129. package/dist/src/tasks/InteropX/SyncLogValidateEvents.js +106 -0
  130. package/dist/src/tasks/Transactions/SyncTransactionStatusTask.js +8 -3
  131. package/dist/src/tasks/index.js +20 -19
  132. package/dist/src/typechain/{InteropBridgeToken.js → AaveV2Resolver.js} +0 -0
  133. package/dist/src/typechain/{InteropXGateway.js → AaveV3Resolver.js} +0 -0
  134. package/dist/src/typechain/BalanceResolver.js +2 -0
  135. package/dist/src/typechain/InstList.js +2 -0
  136. package/dist/src/typechain/InteropX.js +2 -0
  137. package/dist/src/typechain/factories/AaveV2Resolver__factory.js +1191 -0
  138. package/dist/src/typechain/factories/AaveV3Resolver__factory.js +887 -0
  139. package/dist/src/typechain/factories/BalanceResolver__factory.js +228 -0
  140. package/dist/src/typechain/factories/InstList__factory.js +249 -0
  141. package/dist/src/typechain/factories/InteropX__factory.js +1928 -0
  142. package/dist/src/typechain/factories/index.js +11 -5
  143. package/dist/src/typechain/index.js +11 -5
  144. package/dist/src/utils/async.js +18 -0
  145. package/dist/src/utils/dsa.js +36 -0
  146. package/dist/src/utils/formatting.js +67 -0
  147. package/dist/src/utils/gnosis.js +87 -0
  148. package/dist/src/utils/http.js +10 -0
  149. package/dist/src/utils/index.js +22 -235
  150. package/dist/src/utils/interop.js +16 -0
  151. package/dist/src/utils/tokens.js +22 -0
  152. package/dist/src/utils/validate.js +111 -0
  153. package/dist/src/utils/web3.js +93 -0
  154. package/package.json +23 -13
  155. package/src/abi/aaveV2Resolver.json +832 -0
  156. package/src/abi/aaveV3Resolver.json +628 -0
  157. package/src/abi/balanceResolver.json +211 -0
  158. package/src/abi/connectors/index.ts +14 -0
  159. package/src/abi/connectors/v1/aave.ts +147 -0
  160. package/src/abi/connectors/v1/aave_claim.ts +3 -0
  161. package/src/abi/connectors/v1/aave_migrate.ts +108 -0
  162. package/src/abi/connectors/v1/aave_polygon_migrate.ts +109 -0
  163. package/src/abi/connectors/v1/aave_stake.ts +3 -0
  164. package/src/abi/connectors/v1/aave_v1_import.ts +53 -0
  165. package/src/abi/connectors/v1/aave_v2.ts +229 -0
  166. package/src/abi/connectors/v1/aave_v2_import.ts +58 -0
  167. package/src/abi/connectors/v1/authority.ts +99 -0
  168. package/src/abi/connectors/v1/basic.ts +135 -0
  169. package/src/abi/connectors/v1/chi.ts +35 -0
  170. package/src/abi/connectors/v1/comp.ts +3 -0
  171. package/src/abi/connectors/v1/compound.ts +3 -0
  172. package/src/abi/connectors/v1/compoundImport.ts +68 -0
  173. package/src/abi/connectors/v1/compoundImport_v2.ts +3 -0
  174. package/src/abi/connectors/v1/compound_old.ts +447 -0
  175. package/src/abi/connectors/v1/curve.ts +139 -0
  176. package/src/abi/connectors/v1/curve_claim.ts +62 -0
  177. package/src/abi/connectors/v1/curve_gauge.ts +157 -0
  178. package/src/abi/connectors/v1/curve_sbtc.ts +139 -0
  179. package/src/abi/connectors/v1/curve_susd.ts +139 -0
  180. package/src/abi/connectors/v1/curve_three.ts +78 -0
  181. package/src/abi/connectors/v1/curve_y.ts +139 -0
  182. package/src/abi/connectors/v1/dsa_migrate_v1_to_v2.ts +3 -0
  183. package/src/abi/connectors/v1/dydx.ts +147 -0
  184. package/src/abi/connectors/v1/dydx_flash.ts +51 -0
  185. package/src/abi/connectors/v1/fee.ts +49 -0
  186. package/src/abi/connectors/v1/gelato.ts +1137 -0
  187. package/src/abi/connectors/v1/index.ts +42 -0
  188. package/src/abi/connectors/v1/instapool.ts +438 -0
  189. package/src/abi/connectors/v1/instapool_v2.ts +125 -0
  190. package/src/abi/connectors/v1/kyber.ts +116 -0
  191. package/src/abi/connectors/v1/maker.ts +479 -0
  192. package/src/abi/connectors/v1/maker_old.ts +299 -0
  193. package/src/abi/connectors/v1/math.ts +42 -0
  194. package/src/abi/connectors/v1/migrate.ts +45 -0
  195. package/src/abi/connectors/v1/oasis.ts +197 -0
  196. package/src/abi/connectors/v1/oneInch.ts +159 -0
  197. package/src/abi/connectors/v1/polygon_bridge.ts +3 -0
  198. package/src/abi/connectors/v1/refinance.ts +3 -0
  199. package/src/abi/connectors/v1/staking.ts +219 -0
  200. package/src/abi/connectors/v1/swerve.ts +178 -0
  201. package/src/abi/connectors/v1/uniswap.ts +297 -0
  202. package/src/abi/connectors/v2/1INCH-A.ts +3 -0
  203. package/src/abi/connectors/v2/1INCH-B.ts +3 -0
  204. package/src/abi/connectors/v2/AAVE-CLAIM-A.ts +3 -0
  205. package/src/abi/connectors/v2/AAVE-CLAIM-B.ts +165 -0
  206. package/src/abi/connectors/v2/AAVE-STAKE-A.ts +3 -0
  207. package/src/abi/connectors/v2/AAVE-V1-A.ts +130 -0
  208. package/src/abi/connectors/v2/AAVE-V1-IMPORT-A.ts +3 -0
  209. package/src/abi/connectors/v2/AAVE-V2-A.ts +229 -0
  210. package/src/abi/connectors/v2/AAVE-V2-IMPORT-A.ts +3 -0
  211. package/src/abi/connectors/v2/AAVE-V2-IMPORT-B.ts +224 -0
  212. package/src/abi/connectors/v2/AUTHORITY-A.ts +99 -0
  213. package/src/abi/connectors/v2/B-COMPOUND-A.ts +3 -0
  214. package/src/abi/connectors/v2/B-LIQUITY-A.ts +3 -0
  215. package/src/abi/connectors/v2/B-MAKERDAO-A.ts +3 -0
  216. package/src/abi/connectors/v2/BASIC-A.ts +135 -0
  217. package/src/abi/connectors/v2/BASIC-B.ts +3 -0
  218. package/src/abi/connectors/v2/BASIC-C.ts +3 -0
  219. package/src/abi/connectors/v2/COMP-A.ts +3 -0
  220. package/src/abi/connectors/v2/COMPOUND-A.ts +3 -0
  221. package/src/abi/connectors/v2/COMPOUND-IMPORT-A.ts +3 -0
  222. package/src/abi/connectors/v2/COMPOUND-IMPORT-B.ts +194 -0
  223. package/src/abi/connectors/v2/G-UNISWAP-A.ts +3 -0
  224. package/src/abi/connectors/v2/GELATO-AAVE-A.ts +3 -0
  225. package/src/abi/connectors/v2/INST-A.ts +3 -0
  226. package/src/abi/connectors/v2/INST-LM-A.ts +3 -0
  227. package/src/abi/connectors/v2/INST-STAKING-A.ts +3 -0
  228. package/src/abi/connectors/v2/INST-STAKING-B.ts +3 -0
  229. package/src/abi/connectors/v2/INSTAPOOL-A.ts +3 -0
  230. package/src/abi/connectors/v2/LIQUITY-A.ts +3 -0
  231. package/src/abi/connectors/v2/MAKERDAO-A.ts +3 -0
  232. package/src/abi/connectors/v2/MAKERDAO-CLAIM-A.ts +135 -0
  233. package/src/abi/connectors/v2/PARASWAP-A.ts +3 -0
  234. package/src/abi/connectors/v2/POLYGON-BRIDGE-A.ts +3 -0
  235. package/src/abi/connectors/v2/REFINANCE-A.ts +3 -0
  236. package/src/abi/connectors/v2/REFLEXER-A.ts +3 -0
  237. package/src/abi/connectors/v2/STAKE-ERC20-A.ts +3 -0
  238. package/src/abi/connectors/v2/UNISWAP-A.ts +297 -0
  239. package/src/abi/connectors/v2/UNISWAP-V2-A.ts +3 -0
  240. package/src/abi/connectors/v2/UNISWAP-V3-A.ts +3 -0
  241. package/src/abi/connectors/v2/UNISWAP-V3-STAKE-A.ts +3 -0
  242. package/src/abi/connectors/v2/WETH-A.ts +3 -0
  243. package/src/abi/connectors/v2/YEARN-VAULT-A.ts +3 -0
  244. package/src/abi/connectors/v2/index.ts +87 -0
  245. package/src/abi/index.ts +15 -7
  246. package/src/abi/instList.json +232 -0
  247. package/src/abi/interopX.json +1436 -0
  248. package/src/alias.ts +6 -0
  249. package/src/api/index.ts +11 -0
  250. package/src/constants/addresses.ts +24 -8
  251. package/src/constants/blockConfirmations.ts +5 -0
  252. package/src/constants/capPerChain.ts +5 -0
  253. package/src/constants/index.ts +3 -1
  254. package/src/constants/tokens.ts +31 -8
  255. package/src/constants/wrappedNativeToken.ts +5 -0
  256. package/src/crons/index.ts +1 -0
  257. package/src/crons/prices.ts +12 -0
  258. package/src/db/models/transaction.ts +160 -66
  259. package/src/errors/index.ts +26 -0
  260. package/src/gnosis/actions/aaveV2/index.ts +9 -0
  261. package/src/gnosis/actions/aaveV2/source.ts +171 -0
  262. package/src/gnosis/actions/aaveV2/target.ts +160 -0
  263. package/src/gnosis/actions/aaveV3/index.ts +9 -0
  264. package/src/gnosis/actions/aaveV3/source.ts +119 -0
  265. package/src/gnosis/actions/aaveV3/target.ts +142 -0
  266. package/src/gnosis/actions/index.ts +7 -0
  267. package/src/gnosis/index.ts +19 -0
  268. package/src/index.ts +31 -23
  269. package/src/net/protocol/dial/SignatureDialProtocol.ts +12 -13
  270. package/src/net/protocol/dial/{SignatureDialProtocol.1.ts → TransactionStatusDialProtocol.ts} +3 -1
  271. package/src/net/protocol/index.ts +17 -7
  272. package/src/providers/index.ts +1 -0
  273. package/src/providers/retry-provider.ts +51 -0
  274. package/src/services/Prices.ts +89 -0
  275. package/src/services/index.ts +1 -0
  276. package/src/tasks/AutoUpdateTask.ts +12 -9
  277. package/src/tasks/InteropX/ProcessSubmitEvents.ts +384 -0
  278. package/src/tasks/InteropX/ProcessValidateEvents.ts +297 -0
  279. package/src/tasks/InteropX/SyncLogExecuteEvents.ts +161 -0
  280. package/src/tasks/InteropX/SyncLogSubmitEvents.ts +138 -0
  281. package/src/tasks/InteropX/SyncLogValidateEvents.ts +151 -0
  282. package/src/tasks/Transactions/SyncTransactionStatusTask.ts +8 -3
  283. package/src/tasks/index.ts +25 -20
  284. package/src/typechain/AaveV2Resolver.ts +1017 -0
  285. package/src/typechain/AaveV3Resolver.ts +935 -0
  286. package/src/typechain/BalanceResolver.ts +266 -0
  287. package/src/typechain/InstList.ts +402 -0
  288. package/src/typechain/InteropX.ts +1216 -0
  289. package/src/typechain/factories/AaveV2Resolver__factory.ts +1198 -0
  290. package/src/typechain/factories/AaveV3Resolver__factory.ts +894 -0
  291. package/src/typechain/factories/BalanceResolver__factory.ts +235 -0
  292. package/src/typechain/factories/InstList__factory.ts +253 -0
  293. package/src/typechain/factories/InteropX__factory.ts +1932 -0
  294. package/src/typechain/factories/index.ts +5 -2
  295. package/src/typechain/index.ts +10 -4
  296. package/src/utils/async.ts +22 -0
  297. package/src/utils/dsa.ts +56 -0
  298. package/src/utils/formatting.ts +68 -0
  299. package/src/utils/gnosis.ts +166 -0
  300. package/src/utils/http.ts +6 -0
  301. package/src/utils/index.ts +9 -319
  302. package/src/utils/interop.ts +28 -0
  303. package/src/utils/tokens.ts +21 -0
  304. package/src/utils/validate.ts +179 -0
  305. package/src/utils/web3.ts +132 -0
  306. package/tsconfig.json +7 -2
  307. package/dist/src/abi/interopBridgeToken.json +0 -286
  308. package/dist/src/abi/interopXGateway.json +0 -184
  309. package/dist/src/constants/itokens.js +0 -13
  310. package/dist/src/tasks/InteropBridge/ProcessWithdrawEvents.js +0 -146
  311. package/dist/src/tasks/InteropBridge/SyncWithdrawEvents.js +0 -69
  312. package/dist/src/tasks/InteropXGateway/ProcessDepositEvents.js +0 -149
  313. package/dist/src/tasks/InteropXGateway/SyncDepositEvents.js +0 -74
  314. package/dist/src/typechain/factories/InteropBridgeToken__factory.js +0 -459
  315. package/dist/src/typechain/factories/InteropXGateway__factory.js +0 -265
  316. package/src/abi/interopBridgeToken.json +0 -286
  317. package/src/abi/interopXGateway.json +0 -184
  318. package/src/constants/itokens.ts +0 -10
  319. package/src/tasks/InteropBridge/ProcessWithdrawEvents.ts +0 -231
  320. package/src/tasks/InteropBridge/SyncWithdrawEvents.ts +0 -119
  321. package/src/tasks/InteropXGateway/ProcessDepositEvents.ts +0 -243
  322. package/src/tasks/InteropXGateway/SyncDepositEvents.ts +0 -124
  323. package/src/typechain/InteropBridgeToken.ts +0 -686
  324. package/src/typechain/InteropXGateway.ts +0 -407
  325. package/src/typechain/factories/InteropBridgeToken__factory.ts +0 -466
  326. package/src/typechain/factories/InteropXGateway__factory.ts +0 -272
@@ -0,0 +1,894 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import { Contract, Signer, utils } from "ethers";
6
+ import type { Provider } from "@ethersproject/providers";
7
+ import type {
8
+ AaveV3Resolver,
9
+ AaveV3ResolverInterface,
10
+ } from "../AaveV3Resolver";
11
+
12
+ const _abi = [
13
+ {
14
+ inputs: [
15
+ {
16
+ internalType: "address",
17
+ name: "_aavePoolAddressesProvider",
18
+ type: "address",
19
+ },
20
+ {
21
+ internalType: "address",
22
+ name: "_aavePoolDataProvider",
23
+ type: "address",
24
+ },
25
+ {
26
+ internalType: "address",
27
+ name: "_aaveUiDataProvider",
28
+ type: "address",
29
+ },
30
+ {
31
+ internalType: "address",
32
+ name: "_chainLinkFeed",
33
+ type: "address",
34
+ },
35
+ {
36
+ internalType: "address",
37
+ name: "_instaIndex",
38
+ type: "address",
39
+ },
40
+ {
41
+ internalType: "address",
42
+ name: "_wnativeToken",
43
+ type: "address",
44
+ },
45
+ ],
46
+ stateMutability: "nonpayable",
47
+ type: "constructor",
48
+ },
49
+ {
50
+ inputs: [],
51
+ name: "aavePoolAddressesProvider",
52
+ outputs: [
53
+ {
54
+ internalType: "contract AaveLendingPoolProviderInterface",
55
+ name: "",
56
+ type: "address",
57
+ },
58
+ ],
59
+ stateMutability: "view",
60
+ type: "function",
61
+ },
62
+ {
63
+ inputs: [],
64
+ name: "aavePoolDataProvider",
65
+ outputs: [
66
+ {
67
+ internalType: "contract AaveDataProviderInterface",
68
+ name: "",
69
+ type: "address",
70
+ },
71
+ ],
72
+ stateMutability: "view",
73
+ type: "function",
74
+ },
75
+ {
76
+ inputs: [],
77
+ name: "chainLinkFeed",
78
+ outputs: [
79
+ {
80
+ internalType: "address",
81
+ name: "",
82
+ type: "address",
83
+ },
84
+ ],
85
+ stateMutability: "view",
86
+ type: "function",
87
+ },
88
+ {
89
+ inputs: [
90
+ {
91
+ internalType: "address",
92
+ name: "userAddress",
93
+ type: "address",
94
+ },
95
+ {
96
+ components: [
97
+ {
98
+ components: [
99
+ {
100
+ internalType: "address",
101
+ name: "sourceToken",
102
+ type: "address",
103
+ },
104
+ {
105
+ internalType: "address",
106
+ name: "targetToken",
107
+ type: "address",
108
+ },
109
+ {
110
+ internalType: "uint256",
111
+ name: "amount",
112
+ type: "uint256",
113
+ },
114
+ ],
115
+ internalType: "struct Variables.TokenInfo[]",
116
+ name: "supply",
117
+ type: "tuple[]",
118
+ },
119
+ {
120
+ components: [
121
+ {
122
+ internalType: "address",
123
+ name: "sourceToken",
124
+ type: "address",
125
+ },
126
+ {
127
+ internalType: "address",
128
+ name: "targetToken",
129
+ type: "address",
130
+ },
131
+ {
132
+ internalType: "uint256",
133
+ name: "amount",
134
+ type: "uint256",
135
+ },
136
+ ],
137
+ internalType: "struct Variables.TokenInfo[]",
138
+ name: "withdraw",
139
+ type: "tuple[]",
140
+ },
141
+ ],
142
+ internalType: "struct Variables.Position",
143
+ name: "position",
144
+ type: "tuple",
145
+ },
146
+ {
147
+ internalType: "uint256",
148
+ name: "safeRatioPercentage",
149
+ type: "uint256",
150
+ },
151
+ {
152
+ internalType: "bool",
153
+ name: "isTarget",
154
+ type: "bool",
155
+ },
156
+ ],
157
+ name: "checkAaveV3Position",
158
+ outputs: [
159
+ {
160
+ components: [
161
+ {
162
+ internalType: "bool",
163
+ name: "isOk",
164
+ type: "bool",
165
+ },
166
+ {
167
+ internalType: "uint256",
168
+ name: "ratio",
169
+ type: "uint256",
170
+ },
171
+ {
172
+ internalType: "uint256",
173
+ name: "maxRatio",
174
+ type: "uint256",
175
+ },
176
+ {
177
+ internalType: "uint256",
178
+ name: "maxLiquidationRatio",
179
+ type: "uint256",
180
+ },
181
+ {
182
+ internalType: "uint256",
183
+ name: "ltv",
184
+ type: "uint256",
185
+ },
186
+ {
187
+ internalType: "uint256",
188
+ name: "currentLiquidationThreshold",
189
+ type: "uint256",
190
+ },
191
+ {
192
+ internalType: "uint256",
193
+ name: "totalSupply",
194
+ type: "uint256",
195
+ },
196
+ {
197
+ internalType: "uint256",
198
+ name: "totalBorrow",
199
+ type: "uint256",
200
+ },
201
+ {
202
+ internalType: "uint256",
203
+ name: "price",
204
+ type: "uint256",
205
+ },
206
+ {
207
+ internalType: "bool",
208
+ name: "isDsa",
209
+ type: "bool",
210
+ },
211
+ ],
212
+ internalType: "struct Helpers.PositionData",
213
+ name: "p",
214
+ type: "tuple",
215
+ },
216
+ ],
217
+ stateMutability: "view",
218
+ type: "function",
219
+ },
220
+ {
221
+ inputs: [
222
+ {
223
+ internalType: "address",
224
+ name: "userAddress",
225
+ type: "address",
226
+ },
227
+ {
228
+ components: [
229
+ {
230
+ internalType: "address",
231
+ name: "targetDsa",
232
+ type: "address",
233
+ },
234
+ {
235
+ internalType: "uint256[]",
236
+ name: "supplyAmts",
237
+ type: "uint256[]",
238
+ },
239
+ {
240
+ internalType: "uint256[]",
241
+ name: "borrowAmts",
242
+ type: "uint256[]",
243
+ },
244
+ {
245
+ internalType: "address[]",
246
+ name: "supplyTokens",
247
+ type: "address[]",
248
+ },
249
+ {
250
+ internalType: "address[]",
251
+ name: "borrowTokens",
252
+ type: "address[]",
253
+ },
254
+ ],
255
+ internalType: "struct Variables.AaveData",
256
+ name: "data",
257
+ type: "tuple",
258
+ },
259
+ {
260
+ internalType: "bool",
261
+ name: "isTarget",
262
+ type: "bool",
263
+ },
264
+ {
265
+ internalType: "uint8",
266
+ name: "emodeId",
267
+ type: "uint8",
268
+ },
269
+ ],
270
+ name: "checkBorrowToken",
271
+ outputs: [
272
+ {
273
+ internalType: "uint256",
274
+ name: "totalBorrow",
275
+ type: "uint256",
276
+ },
277
+ {
278
+ internalType: "bool",
279
+ name: "isOk",
280
+ type: "bool",
281
+ },
282
+ ],
283
+ stateMutability: "view",
284
+ type: "function",
285
+ },
286
+ {
287
+ inputs: [
288
+ {
289
+ internalType: "address",
290
+ name: "userAddress",
291
+ type: "address",
292
+ },
293
+ {
294
+ components: [
295
+ {
296
+ components: [
297
+ {
298
+ internalType: "address",
299
+ name: "sourceToken",
300
+ type: "address",
301
+ },
302
+ {
303
+ internalType: "address",
304
+ name: "targetToken",
305
+ type: "address",
306
+ },
307
+ {
308
+ internalType: "uint256",
309
+ name: "amount",
310
+ type: "uint256",
311
+ },
312
+ ],
313
+ internalType: "struct Variables.TokenInfo[]",
314
+ name: "supply",
315
+ type: "tuple[]",
316
+ },
317
+ {
318
+ components: [
319
+ {
320
+ internalType: "address",
321
+ name: "sourceToken",
322
+ type: "address",
323
+ },
324
+ {
325
+ internalType: "address",
326
+ name: "targetToken",
327
+ type: "address",
328
+ },
329
+ {
330
+ internalType: "uint256",
331
+ name: "amount",
332
+ type: "uint256",
333
+ },
334
+ ],
335
+ internalType: "struct Variables.TokenInfo[]",
336
+ name: "withdraw",
337
+ type: "tuple[]",
338
+ },
339
+ ],
340
+ internalType: "struct Variables.Position",
341
+ name: "position",
342
+ type: "tuple",
343
+ },
344
+ {
345
+ internalType: "uint256",
346
+ name: "safeRatioPercentage",
347
+ type: "uint256",
348
+ },
349
+ {
350
+ internalType: "bool",
351
+ name: "isTarget",
352
+ type: "bool",
353
+ },
354
+ {
355
+ internalType: "uint8",
356
+ name: "emodeId",
357
+ type: "uint8",
358
+ },
359
+ ],
360
+ name: "checkPositionBeforeMigration",
361
+ outputs: [
362
+ {
363
+ components: [
364
+ {
365
+ internalType: "bool",
366
+ name: "isOk",
367
+ type: "bool",
368
+ },
369
+ {
370
+ internalType: "uint256",
371
+ name: "ratio",
372
+ type: "uint256",
373
+ },
374
+ {
375
+ internalType: "uint256",
376
+ name: "maxRatio",
377
+ type: "uint256",
378
+ },
379
+ {
380
+ internalType: "uint256",
381
+ name: "maxLiquidationRatio",
382
+ type: "uint256",
383
+ },
384
+ {
385
+ internalType: "uint256",
386
+ name: "ltv",
387
+ type: "uint256",
388
+ },
389
+ {
390
+ internalType: "uint256",
391
+ name: "currentLiquidationThreshold",
392
+ type: "uint256",
393
+ },
394
+ {
395
+ internalType: "uint256",
396
+ name: "totalSupply",
397
+ type: "uint256",
398
+ },
399
+ {
400
+ internalType: "uint256",
401
+ name: "totalBorrow",
402
+ type: "uint256",
403
+ },
404
+ {
405
+ internalType: "uint256",
406
+ name: "price",
407
+ type: "uint256",
408
+ },
409
+ {
410
+ internalType: "bool",
411
+ name: "isDsa",
412
+ type: "bool",
413
+ },
414
+ ],
415
+ internalType: "struct Helpers.PositionData",
416
+ name: "positionData",
417
+ type: "tuple",
418
+ },
419
+ ],
420
+ stateMutability: "view",
421
+ type: "function",
422
+ },
423
+ {
424
+ inputs: [
425
+ {
426
+ internalType: "address",
427
+ name: "userAddress",
428
+ type: "address",
429
+ },
430
+ {
431
+ components: [
432
+ {
433
+ internalType: "address",
434
+ name: "targetDsa",
435
+ type: "address",
436
+ },
437
+ {
438
+ internalType: "uint256[]",
439
+ name: "supplyAmts",
440
+ type: "uint256[]",
441
+ },
442
+ {
443
+ internalType: "uint256[]",
444
+ name: "borrowAmts",
445
+ type: "uint256[]",
446
+ },
447
+ {
448
+ internalType: "address[]",
449
+ name: "supplyTokens",
450
+ type: "address[]",
451
+ },
452
+ {
453
+ internalType: "address[]",
454
+ name: "borrowTokens",
455
+ type: "address[]",
456
+ },
457
+ ],
458
+ internalType: "struct Variables.AaveData",
459
+ name: "data",
460
+ type: "tuple",
461
+ },
462
+ {
463
+ internalType: "bool",
464
+ name: "isTarget",
465
+ type: "bool",
466
+ },
467
+ {
468
+ internalType: "uint8",
469
+ name: "emodeId",
470
+ type: "uint8",
471
+ },
472
+ ],
473
+ name: "checkSupplyToken",
474
+ outputs: [
475
+ {
476
+ internalType: "uint256",
477
+ name: "totalSupply",
478
+ type: "uint256",
479
+ },
480
+ {
481
+ internalType: "uint256",
482
+ name: "totalMaxBorrow",
483
+ type: "uint256",
484
+ },
485
+ {
486
+ internalType: "uint256",
487
+ name: "totalMaxLiquidation",
488
+ type: "uint256",
489
+ },
490
+ {
491
+ internalType: "bool",
492
+ name: "isOk",
493
+ type: "bool",
494
+ },
495
+ ],
496
+ stateMutability: "view",
497
+ type: "function",
498
+ },
499
+ {
500
+ inputs: [
501
+ {
502
+ internalType: "address",
503
+ name: "user",
504
+ type: "address",
505
+ },
506
+ {
507
+ internalType: "uint256",
508
+ name: "totalBorrowMove",
509
+ type: "uint256",
510
+ },
511
+ {
512
+ internalType: "uint256",
513
+ name: "totalMaxLiquidationMove",
514
+ type: "uint256",
515
+ },
516
+ ],
517
+ name: "checkUserPositionAfterMigration",
518
+ outputs: [
519
+ {
520
+ internalType: "bool",
521
+ name: "isOk",
522
+ type: "bool",
523
+ },
524
+ ],
525
+ stateMutability: "view",
526
+ type: "function",
527
+ },
528
+ {
529
+ inputs: [],
530
+ name: "getBaseCurrencyInfo",
531
+ outputs: [
532
+ {
533
+ components: [
534
+ {
535
+ internalType: "uint256",
536
+ name: "marketReferenceCurrencyUnit",
537
+ type: "uint256",
538
+ },
539
+ {
540
+ internalType: "int256",
541
+ name: "marketReferenceCurrencyPriceInUsd",
542
+ type: "int256",
543
+ },
544
+ {
545
+ internalType: "int256",
546
+ name: "networkBaseTokenPriceInUsd",
547
+ type: "int256",
548
+ },
549
+ {
550
+ internalType: "uint8",
551
+ name: "networkBaseTokenPriceDecimals",
552
+ type: "uint8",
553
+ },
554
+ ],
555
+ internalType: "struct BaseCurrencyInfo",
556
+ name: "baseCurrencyInfo",
557
+ type: "tuple",
558
+ },
559
+ ],
560
+ stateMutability: "view",
561
+ type: "function",
562
+ },
563
+ {
564
+ inputs: [
565
+ {
566
+ internalType: "address[]",
567
+ name: "_tokens",
568
+ type: "address[]",
569
+ },
570
+ {
571
+ internalType: "uint8",
572
+ name: "emodeId",
573
+ type: "uint8",
574
+ },
575
+ ],
576
+ name: "getTokenInfos",
577
+ outputs: [
578
+ {
579
+ components: [
580
+ {
581
+ internalType: "uint256",
582
+ name: "decimals",
583
+ type: "uint256",
584
+ },
585
+ {
586
+ internalType: "uint256",
587
+ name: "ltv",
588
+ type: "uint256",
589
+ },
590
+ {
591
+ internalType: "uint256",
592
+ name: "tl",
593
+ type: "uint256",
594
+ },
595
+ {
596
+ internalType: "bool",
597
+ name: "enabledAsCollateral",
598
+ type: "bool",
599
+ },
600
+ {
601
+ internalType: "bool",
602
+ name: "borrowingEnabled",
603
+ type: "bool",
604
+ },
605
+ {
606
+ internalType: "bool",
607
+ name: "isActive",
608
+ type: "bool",
609
+ },
610
+ {
611
+ internalType: "bool",
612
+ name: "isFrozen",
613
+ type: "bool",
614
+ },
615
+ {
616
+ internalType: "uint256",
617
+ name: "availableLiquidity",
618
+ type: "uint256",
619
+ },
620
+ {
621
+ internalType: "uint256",
622
+ name: "totalOverallDebt",
623
+ type: "uint256",
624
+ },
625
+ ],
626
+ internalType: "struct Helpers.ReserveConfigData[]",
627
+ name: "reserveConfigData",
628
+ type: "tuple[]",
629
+ },
630
+ ],
631
+ stateMutability: "view",
632
+ type: "function",
633
+ },
634
+ {
635
+ inputs: [
636
+ {
637
+ internalType: "address[]",
638
+ name: "tokens",
639
+ type: "address[]",
640
+ },
641
+ ],
642
+ name: "getTokensPrices",
643
+ outputs: [
644
+ {
645
+ internalType: "uint256[]",
646
+ name: "tokenPricesInEth",
647
+ type: "uint256[]",
648
+ },
649
+ ],
650
+ stateMutability: "view",
651
+ type: "function",
652
+ },
653
+ {
654
+ inputs: [],
655
+ name: "instaIndex",
656
+ outputs: [
657
+ {
658
+ internalType: "contract IndexInterface",
659
+ name: "",
660
+ type: "address",
661
+ },
662
+ ],
663
+ stateMutability: "view",
664
+ type: "function",
665
+ },
666
+ {
667
+ inputs: [],
668
+ name: "instaList",
669
+ outputs: [
670
+ {
671
+ internalType: "contract ListInterface",
672
+ name: "",
673
+ type: "address",
674
+ },
675
+ ],
676
+ stateMutability: "view",
677
+ type: "function",
678
+ },
679
+ {
680
+ inputs: [
681
+ {
682
+ internalType: "address",
683
+ name: "user",
684
+ type: "address",
685
+ },
686
+ ],
687
+ name: "isPositionInEmode",
688
+ outputs: [
689
+ {
690
+ internalType: "uint8",
691
+ name: "",
692
+ type: "uint8",
693
+ },
694
+ ],
695
+ stateMutability: "view",
696
+ type: "function",
697
+ },
698
+ {
699
+ inputs: [
700
+ {
701
+ internalType: "address",
702
+ name: "user",
703
+ type: "address",
704
+ },
705
+ {
706
+ internalType: "uint256",
707
+ name: "safeRatioPercentage",
708
+ type: "uint256",
709
+ },
710
+ ],
711
+ name: "isPositionSafe",
712
+ outputs: [
713
+ {
714
+ internalType: "bool",
715
+ name: "isOk",
716
+ type: "bool",
717
+ },
718
+ {
719
+ internalType: "uint256",
720
+ name: "userTl",
721
+ type: "uint256",
722
+ },
723
+ {
724
+ internalType: "uint256",
725
+ name: "userLtv",
726
+ type: "uint256",
727
+ },
728
+ ],
729
+ stateMutability: "view",
730
+ type: "function",
731
+ },
732
+ {
733
+ inputs: [],
734
+ name: "marketReferenceCurrencyPriceInUsdProxyAggregator",
735
+ outputs: [
736
+ {
737
+ internalType: "contract IEACAggregatorProxy",
738
+ name: "",
739
+ type: "address",
740
+ },
741
+ ],
742
+ stateMutability: "view",
743
+ type: "function",
744
+ },
745
+ {
746
+ inputs: [],
747
+ name: "nativeToken",
748
+ outputs: [
749
+ {
750
+ internalType: "address",
751
+ name: "",
752
+ type: "address",
753
+ },
754
+ ],
755
+ stateMutability: "view",
756
+ type: "function",
757
+ },
758
+ {
759
+ inputs: [],
760
+ name: "networkBaseTokenPriceInUsdProxyAggregator",
761
+ outputs: [
762
+ {
763
+ internalType: "contract IEACAggregatorProxy",
764
+ name: "",
765
+ type: "address",
766
+ },
767
+ ],
768
+ stateMutability: "view",
769
+ type: "function",
770
+ },
771
+ {
772
+ inputs: [
773
+ {
774
+ components: [
775
+ {
776
+ components: [
777
+ {
778
+ internalType: "address",
779
+ name: "sourceToken",
780
+ type: "address",
781
+ },
782
+ {
783
+ internalType: "address",
784
+ name: "targetToken",
785
+ type: "address",
786
+ },
787
+ {
788
+ internalType: "uint256",
789
+ name: "amount",
790
+ type: "uint256",
791
+ },
792
+ ],
793
+ internalType: "struct Variables.TokenInfo[]",
794
+ name: "supply",
795
+ type: "tuple[]",
796
+ },
797
+ {
798
+ components: [
799
+ {
800
+ internalType: "address",
801
+ name: "sourceToken",
802
+ type: "address",
803
+ },
804
+ {
805
+ internalType: "address",
806
+ name: "targetToken",
807
+ type: "address",
808
+ },
809
+ {
810
+ internalType: "uint256",
811
+ name: "amount",
812
+ type: "uint256",
813
+ },
814
+ ],
815
+ internalType: "struct Variables.TokenInfo[]",
816
+ name: "withdraw",
817
+ type: "tuple[]",
818
+ },
819
+ ],
820
+ internalType: "struct Variables.Position",
821
+ name: "position",
822
+ type: "tuple",
823
+ },
824
+ {
825
+ internalType: "bool",
826
+ name: "isTarget",
827
+ type: "bool",
828
+ },
829
+ ],
830
+ name: "sortData",
831
+ outputs: [
832
+ {
833
+ components: [
834
+ {
835
+ internalType: "address",
836
+ name: "targetDsa",
837
+ type: "address",
838
+ },
839
+ {
840
+ internalType: "uint256[]",
841
+ name: "supplyAmts",
842
+ type: "uint256[]",
843
+ },
844
+ {
845
+ internalType: "uint256[]",
846
+ name: "borrowAmts",
847
+ type: "uint256[]",
848
+ },
849
+ {
850
+ internalType: "address[]",
851
+ name: "supplyTokens",
852
+ type: "address[]",
853
+ },
854
+ {
855
+ internalType: "address[]",
856
+ name: "borrowTokens",
857
+ type: "address[]",
858
+ },
859
+ ],
860
+ internalType: "struct Variables.AaveData",
861
+ name: "aaveData",
862
+ type: "tuple",
863
+ },
864
+ ],
865
+ stateMutability: "view",
866
+ type: "function",
867
+ },
868
+ {
869
+ inputs: [],
870
+ name: "wnativeToken",
871
+ outputs: [
872
+ {
873
+ internalType: "address",
874
+ name: "",
875
+ type: "address",
876
+ },
877
+ ],
878
+ stateMutability: "view",
879
+ type: "function",
880
+ },
881
+ ];
882
+
883
+ export class AaveV3Resolver__factory {
884
+ static readonly abi = _abi;
885
+ static createInterface(): AaveV3ResolverInterface {
886
+ return new utils.Interface(_abi) as AaveV3ResolverInterface;
887
+ }
888
+ static connect(
889
+ address: string,
890
+ signerOrProvider: Signer | Provider
891
+ ): AaveV3Resolver {
892
+ return new Contract(address, _abi, signerOrProvider) as AaveV3Resolver;
893
+ }
894
+ }