@townsq/mm-sdk 1.0.1

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 (390) hide show
  1. package/README.md +95 -0
  2. package/dist/chains/evm/common/constant/abi/arbitrum-node-interface-abi.d.ts +25 -0
  3. package/dist/chains/evm/common/constant/abi/arbitrum-node-interface-abi.js +18 -0
  4. package/dist/chains/evm/common/constant/abi/arbitrum-node-interface-abi.js.map +1 -0
  5. package/dist/chains/evm/common/constant/abi/bridge-router-abi.d.ts +1030 -0
  6. package/dist/chains/evm/common/constant/abi/bridge-router-abi.js +794 -0
  7. package/dist/chains/evm/common/constant/abi/bridge-router-abi.js.map +1 -0
  8. package/dist/chains/evm/common/constant/abi/ccip-data-adapter-abi.d.ts +796 -0
  9. package/dist/chains/evm/common/constant/abi/ccip-data-adapter-abi.js +622 -0
  10. package/dist/chains/evm/common/constant/abi/ccip-data-adapter-abi.js.map +1 -0
  11. package/dist/chains/evm/common/constant/abi/erc-20-abi.d.ts +235 -0
  12. package/dist/chains/evm/common/constant/abi/erc-20-abi.js +157 -0
  13. package/dist/chains/evm/common/constant/abi/erc-20-abi.js.map +1 -0
  14. package/dist/chains/evm/common/constant/abi/wormhole-data-adapter-abi.d.ts +821 -0
  15. package/dist/chains/evm/common/constant/abi/wormhole-data-adapter-abi.js +645 -0
  16. package/dist/chains/evm/common/constant/abi/wormhole-data-adapter-abi.js.map +1 -0
  17. package/dist/chains/evm/common/constant/abi/wormhole-relayer-abi.d.ts +783 -0
  18. package/dist/chains/evm/common/constant/abi/wormhole-relayer-abi.js +501 -0
  19. package/dist/chains/evm/common/constant/abi/wormhole-relayer-abi.js.map +1 -0
  20. package/dist/chains/evm/common/constant/chain.d.ts +128 -0
  21. package/dist/chains/evm/common/constant/chain.js +62 -0
  22. package/dist/chains/evm/common/constant/chain.js.map +1 -0
  23. package/dist/chains/evm/common/constant/contract.d.ts +9 -0
  24. package/dist/chains/evm/common/constant/contract.js +13 -0
  25. package/dist/chains/evm/common/constant/contract.js.map +1 -0
  26. package/dist/chains/evm/common/constant/tokens.d.ts +6 -0
  27. package/dist/chains/evm/common/constant/tokens.js +21 -0
  28. package/dist/chains/evm/common/constant/tokens.js.map +1 -0
  29. package/dist/chains/evm/common/types/chain.d.ts +9 -0
  30. package/dist/chains/evm/common/types/chain.js +2 -0
  31. package/dist/chains/evm/common/types/chain.js.map +1 -0
  32. package/dist/chains/evm/common/types/contract.d.ts +8 -0
  33. package/dist/chains/evm/common/types/contract.js +2 -0
  34. package/dist/chains/evm/common/types/contract.js.map +1 -0
  35. package/dist/chains/evm/common/types/gmp.d.ts +37 -0
  36. package/dist/chains/evm/common/types/gmp.js +2 -0
  37. package/dist/chains/evm/common/types/gmp.js.map +1 -0
  38. package/dist/chains/evm/common/types/module.d.ts +90 -0
  39. package/dist/chains/evm/common/types/module.js +2 -0
  40. package/dist/chains/evm/common/types/module.js.map +1 -0
  41. package/dist/chains/evm/common/types/token.d.ts +28 -0
  42. package/dist/chains/evm/common/types/token.js +2 -0
  43. package/dist/chains/evm/common/types/token.js.map +1 -0
  44. package/dist/chains/evm/common/utils/chain.d.ts +7 -0
  45. package/dist/chains/evm/common/utils/chain.js +24 -0
  46. package/dist/chains/evm/common/utils/chain.js.map +1 -0
  47. package/dist/chains/evm/common/utils/contract.d.ts +7387 -0
  48. package/dist/chains/evm/common/utils/contract.js +67 -0
  49. package/dist/chains/evm/common/utils/contract.js.map +1 -0
  50. package/dist/chains/evm/common/utils/gmp.d.ts +7 -0
  51. package/dist/chains/evm/common/utils/gmp.js +32 -0
  52. package/dist/chains/evm/common/utils/gmp.js.map +1 -0
  53. package/dist/chains/evm/common/utils/message.d.ts +21 -0
  54. package/dist/chains/evm/common/utils/message.js +426 -0
  55. package/dist/chains/evm/common/utils/message.js.map +1 -0
  56. package/dist/chains/evm/common/utils/provider.d.ts +5 -0
  57. package/dist/chains/evm/common/utils/provider.js +24 -0
  58. package/dist/chains/evm/common/utils/provider.js.map +1 -0
  59. package/dist/chains/evm/common/utils/tokens.d.ts +11 -0
  60. package/dist/chains/evm/common/utils/tokens.js +58 -0
  61. package/dist/chains/evm/common/utils/tokens.js.map +1 -0
  62. package/dist/chains/evm/hub/constants/abi/account-manager-abi.d.ts +945 -0
  63. package/dist/chains/evm/hub/constants/abi/account-manager-abi.js +709 -0
  64. package/dist/chains/evm/hub/constants/abi/account-manager-abi.js.map +1 -0
  65. package/dist/chains/evm/hub/constants/abi/bridge-router-hub-abi.d.ts +1062 -0
  66. package/dist/chains/evm/hub/constants/abi/bridge-router-hub-abi.js +816 -0
  67. package/dist/chains/evm/hub/constants/abi/bridge-router-hub-abi.js.map +1 -0
  68. package/dist/chains/evm/hub/constants/abi/hub-abi.d.ts +344 -0
  69. package/dist/chains/evm/hub/constants/abi/hub-abi.js +229 -0
  70. package/dist/chains/evm/hub/constants/abi/hub-abi.js.map +1 -0
  71. package/dist/chains/evm/hub/constants/abi/hub-pool-abi.d.ts +1999 -0
  72. package/dist/chains/evm/hub/constants/abi/hub-pool-abi.js +1558 -0
  73. package/dist/chains/evm/hub/constants/abi/hub-pool-abi.js.map +1 -0
  74. package/dist/chains/evm/hub/constants/abi/hub-rewards-v1-abi.d.ts +850 -0
  75. package/dist/chains/evm/hub/constants/abi/hub-rewards-v1-abi.js +649 -0
  76. package/dist/chains/evm/hub/constants/abi/hub-rewards-v1-abi.js.map +1 -0
  77. package/dist/chains/evm/hub/constants/abi/hub-rewards-v2-abi.d.ts +1213 -0
  78. package/dist/chains/evm/hub/constants/abi/hub-rewards-v2-abi.js +890 -0
  79. package/dist/chains/evm/hub/constants/abi/hub-rewards-v2-abi.js.map +1 -0
  80. package/dist/chains/evm/hub/constants/abi/loan-manager-abi.d.ts +1573 -0
  81. package/dist/chains/evm/hub/constants/abi/loan-manager-abi.js +1055 -0
  82. package/dist/chains/evm/hub/constants/abi/loan-manager-abi.js.map +1 -0
  83. package/dist/chains/evm/hub/constants/abi/node-manager-abi.d.ts +269 -0
  84. package/dist/chains/evm/hub/constants/abi/node-manager-abi.js +228 -0
  85. package/dist/chains/evm/hub/constants/abi/node-manager-abi.js.map +1 -0
  86. package/dist/chains/evm/hub/constants/abi/oracle-manager-abi.d.ts +495 -0
  87. package/dist/chains/evm/hub/constants/abi/oracle-manager-abi.js +391 -0
  88. package/dist/chains/evm/hub/constants/abi/oracle-manager-abi.js.map +1 -0
  89. package/dist/chains/evm/hub/constants/chain.d.ts +3 -0
  90. package/dist/chains/evm/hub/constants/chain.js +242 -0
  91. package/dist/chains/evm/hub/constants/chain.js.map +1 -0
  92. package/dist/chains/evm/hub/modules/index.d.ts +5 -0
  93. package/dist/chains/evm/hub/modules/index.js +6 -0
  94. package/dist/chains/evm/hub/modules/index.js.map +1 -0
  95. package/dist/chains/evm/hub/modules/ts-hub-account.d.ts +8 -0
  96. package/dist/chains/evm/hub/modules/ts-hub-account.js +75 -0
  97. package/dist/chains/evm/hub/modules/ts-hub-account.js.map +1 -0
  98. package/dist/chains/evm/hub/modules/ts-hub-gmp.d.ts +18 -0
  99. package/dist/chains/evm/hub/modules/ts-hub-gmp.js +98 -0
  100. package/dist/chains/evm/hub/modules/ts-hub-gmp.js.map +1 -0
  101. package/dist/chains/evm/hub/modules/ts-hub-loan.d.ts +27 -0
  102. package/dist/chains/evm/hub/modules/ts-hub-loan.js +484 -0
  103. package/dist/chains/evm/hub/modules/ts-hub-loan.js.map +1 -0
  104. package/dist/chains/evm/hub/modules/ts-hub-oracle.d.ts +8 -0
  105. package/dist/chains/evm/hub/modules/ts-hub-oracle.js +58 -0
  106. package/dist/chains/evm/hub/modules/ts-hub-oracle.js.map +1 -0
  107. package/dist/chains/evm/hub/modules/ts-hub-pool.d.ts +5 -0
  108. package/dist/chains/evm/hub/modules/ts-hub-pool.js +138 -0
  109. package/dist/chains/evm/hub/modules/ts-hub-pool.js.map +1 -0
  110. package/dist/chains/evm/hub/types/account.d.ts +23 -0
  111. package/dist/chains/evm/hub/types/account.js +2 -0
  112. package/dist/chains/evm/hub/types/account.js.map +1 -0
  113. package/dist/chains/evm/hub/types/chain.d.ts +20 -0
  114. package/dist/chains/evm/hub/types/chain.js +2 -0
  115. package/dist/chains/evm/hub/types/chain.js.map +1 -0
  116. package/dist/chains/evm/hub/types/loan.d.ts +148 -0
  117. package/dist/chains/evm/hub/types/loan.js +9 -0
  118. package/dist/chains/evm/hub/types/loan.js.map +1 -0
  119. package/dist/chains/evm/hub/types/oracle.d.ts +19 -0
  120. package/dist/chains/evm/hub/types/oracle.js +2 -0
  121. package/dist/chains/evm/hub/types/oracle.js.map +1 -0
  122. package/dist/chains/evm/hub/types/pool.d.ts +66 -0
  123. package/dist/chains/evm/hub/types/pool.js +2 -0
  124. package/dist/chains/evm/hub/types/pool.js.map +1 -0
  125. package/dist/chains/evm/hub/types/token.d.ts +9 -0
  126. package/dist/chains/evm/hub/types/token.js +2 -0
  127. package/dist/chains/evm/hub/types/token.js.map +1 -0
  128. package/dist/chains/evm/hub/utils/chain.d.ts +15 -0
  129. package/dist/chains/evm/hub/utils/chain.js +37 -0
  130. package/dist/chains/evm/hub/utils/chain.js.map +1 -0
  131. package/dist/chains/evm/hub/utils/contract.d.ts +26 -0
  132. package/dist/chains/evm/hub/utils/contract.js +76 -0
  133. package/dist/chains/evm/hub/utils/contract.js.map +1 -0
  134. package/dist/chains/evm/hub/utils/events.d.ts +23 -0
  135. package/dist/chains/evm/hub/utils/events.js +100 -0
  136. package/dist/chains/evm/hub/utils/events.js.map +1 -0
  137. package/dist/chains/evm/hub/utils/loan.d.ts +4 -0
  138. package/dist/chains/evm/hub/utils/loan.js +37 -0
  139. package/dist/chains/evm/hub/utils/loan.js.map +1 -0
  140. package/dist/chains/evm/spoke/constants/abi/bridge-router-spoke-abi.d.ts +1044 -0
  141. package/dist/chains/evm/spoke/constants/abi/bridge-router-spoke-abi.js +806 -0
  142. package/dist/chains/evm/spoke/constants/abi/bridge-router-spoke-abi.js.map +1 -0
  143. package/dist/chains/evm/spoke/constants/abi/spoke-common-abi.d.ts +1152 -0
  144. package/dist/chains/evm/spoke/constants/abi/spoke-common-abi.js +735 -0
  145. package/dist/chains/evm/spoke/constants/abi/spoke-common-abi.js.map +1 -0
  146. package/dist/chains/evm/spoke/constants/abi/spoke-rewards-v2-common-abi.d.ts +697 -0
  147. package/dist/chains/evm/spoke/constants/abi/spoke-rewards-v2-common-abi.js +501 -0
  148. package/dist/chains/evm/spoke/constants/abi/spoke-rewards-v2-common-abi.js.map +1 -0
  149. package/dist/chains/evm/spoke/constants/abi/spoke-token-abi.d.ts +986 -0
  150. package/dist/chains/evm/spoke/constants/abi/spoke-token-abi.js +705 -0
  151. package/dist/chains/evm/spoke/constants/abi/spoke-token-abi.js.map +1 -0
  152. package/dist/chains/evm/spoke/modules/index.d.ts +3 -0
  153. package/dist/chains/evm/spoke/modules/index.js +4 -0
  154. package/dist/chains/evm/spoke/modules/index.js.map +1 -0
  155. package/dist/chains/evm/spoke/modules/ts-evm-account.d.ts +18 -0
  156. package/dist/chains/evm/spoke/modules/ts-evm-account.js +141 -0
  157. package/dist/chains/evm/spoke/modules/ts-evm-account.js.map +1 -0
  158. package/dist/chains/evm/spoke/modules/ts-evm-gmp.d.ts +20 -0
  159. package/dist/chains/evm/spoke/modules/ts-evm-gmp.js +163 -0
  160. package/dist/chains/evm/spoke/modules/ts-evm-gmp.js.map +1 -0
  161. package/dist/chains/evm/spoke/modules/ts-evm-loan.d.ts +38 -0
  162. package/dist/chains/evm/spoke/modules/ts-evm-loan.js +461 -0
  163. package/dist/chains/evm/spoke/modules/ts-evm-loan.js.map +1 -0
  164. package/dist/chains/evm/spoke/types/pool.d.ts +7 -0
  165. package/dist/chains/evm/spoke/types/pool.js +2 -0
  166. package/dist/chains/evm/spoke/types/pool.js.map +1 -0
  167. package/dist/chains/evm/spoke/utils/contract.d.ts +18 -0
  168. package/dist/chains/evm/spoke/utils/contract.js +46 -0
  169. package/dist/chains/evm/spoke/utils/contract.js.map +1 -0
  170. package/dist/common/constants/adapter.d.ts +2 -0
  171. package/dist/common/constants/adapter.js +6 -0
  172. package/dist/common/constants/adapter.js.map +1 -0
  173. package/dist/common/constants/byte.d.ts +6 -0
  174. package/dist/common/constants/byte.js +7 -0
  175. package/dist/common/constants/byte.js.map +1 -0
  176. package/dist/common/constants/chain.d.ts +10 -0
  177. package/dist/common/constants/chain.js +224 -0
  178. package/dist/common/constants/chain.js.map +1 -0
  179. package/dist/common/constants/gmp.d.ts +3 -0
  180. package/dist/common/constants/gmp.js +10 -0
  181. package/dist/common/constants/gmp.js.map +1 -0
  182. package/dist/common/constants/lending.d.ts +2 -0
  183. package/dist/common/constants/lending.js +4 -0
  184. package/dist/common/constants/lending.js.map +1 -0
  185. package/dist/common/constants/message.d.ts +9 -0
  186. package/dist/common/constants/message.js +23 -0
  187. package/dist/common/constants/message.js.map +1 -0
  188. package/dist/common/constants/pool.d.ts +14 -0
  189. package/dist/common/constants/pool.js +24 -0
  190. package/dist/common/constants/pool.js.map +1 -0
  191. package/dist/common/types/adapter.d.ts +30 -0
  192. package/dist/common/types/adapter.js +7 -0
  193. package/dist/common/types/adapter.js.map +1 -0
  194. package/dist/common/types/address.d.ts +9 -0
  195. package/dist/common/types/address.js +2 -0
  196. package/dist/common/types/address.js.map +1 -0
  197. package/dist/common/types/brand.d.ts +6 -0
  198. package/dist/common/types/brand.js +2 -0
  199. package/dist/common/types/brand.js.map +1 -0
  200. package/dist/common/types/chain.d.ts +29 -0
  201. package/dist/common/types/chain.js +9 -0
  202. package/dist/common/types/chain.js.map +1 -0
  203. package/dist/common/types/core.d.ts +28 -0
  204. package/dist/common/types/core.js +2 -0
  205. package/dist/common/types/core.js.map +1 -0
  206. package/dist/common/types/gmp.d.ts +15 -0
  207. package/dist/common/types/gmp.js +6 -0
  208. package/dist/common/types/gmp.js.map +1 -0
  209. package/dist/common/types/lending.d.ts +20 -0
  210. package/dist/common/types/lending.js +13 -0
  211. package/dist/common/types/lending.js.map +1 -0
  212. package/dist/common/types/message.d.ts +280 -0
  213. package/dist/common/types/message.js +32 -0
  214. package/dist/common/types/message.js.map +1 -0
  215. package/dist/common/types/module.d.ts +20 -0
  216. package/dist/common/types/module.js +2 -0
  217. package/dist/common/types/module.js.map +1 -0
  218. package/dist/common/types/token.d.ts +49 -0
  219. package/dist/common/types/token.js +24 -0
  220. package/dist/common/types/token.js.map +1 -0
  221. package/dist/common/utils/adapter.d.ts +17 -0
  222. package/dist/common/utils/adapter.js +98 -0
  223. package/dist/common/utils/adapter.js.map +1 -0
  224. package/dist/common/utils/address.d.ts +6 -0
  225. package/dist/common/utils/address.js +32 -0
  226. package/dist/common/utils/address.js.map +1 -0
  227. package/dist/common/utils/bytes.d.ts +6 -0
  228. package/dist/common/utils/bytes.js +25 -0
  229. package/dist/common/utils/bytes.js.map +1 -0
  230. package/dist/common/utils/chain.d.ts +20 -0
  231. package/dist/common/utils/chain.js +79 -0
  232. package/dist/common/utils/chain.js.map +1 -0
  233. package/dist/common/utils/formulae.d.ts +19 -0
  234. package/dist/common/utils/formulae.js +118 -0
  235. package/dist/common/utils/formulae.js.map +1 -0
  236. package/dist/common/utils/gmp.d.ts +3 -0
  237. package/dist/common/utils/gmp.js +5 -0
  238. package/dist/common/utils/gmp.js.map +1 -0
  239. package/dist/common/utils/lending.d.ts +7 -0
  240. package/dist/common/utils/lending.js +16 -0
  241. package/dist/common/utils/lending.js.map +1 -0
  242. package/dist/common/utils/math-lib.d.ts +10 -0
  243. package/dist/common/utils/math-lib.js +41 -0
  244. package/dist/common/utils/math-lib.js.map +1 -0
  245. package/dist/common/utils/messages.d.ts +16 -0
  246. package/dist/common/utils/messages.js +124 -0
  247. package/dist/common/utils/messages.js.map +1 -0
  248. package/dist/common/utils/token.d.ts +3 -0
  249. package/dist/common/utils/token.js +8 -0
  250. package/dist/common/utils/token.js.map +1 -0
  251. package/dist/common/utils/transaction.d.ts +4 -0
  252. package/dist/common/utils/transaction.js +18 -0
  253. package/dist/common/utils/transaction.js.map +1 -0
  254. package/dist/index.d.ts +38 -0
  255. package/dist/index.js +50 -0
  256. package/dist/index.js.map +1 -0
  257. package/dist/lifeline/core/ts-core.d.ts +24 -0
  258. package/dist/lifeline/core/ts-core.js +101 -0
  259. package/dist/lifeline/core/ts-core.js.map +1 -0
  260. package/dist/lifeline/modules/index.d.ts +5 -0
  261. package/dist/lifeline/modules/index.js +6 -0
  262. package/dist/lifeline/modules/index.js.map +1 -0
  263. package/dist/lifeline/modules/ts-account.d.ts +23 -0
  264. package/dist/lifeline/modules/ts-account.js +205 -0
  265. package/dist/lifeline/modules/ts-account.js.map +1 -0
  266. package/dist/lifeline/modules/ts-gmp.d.ts +3 -0
  267. package/dist/lifeline/modules/ts-gmp.js +4 -0
  268. package/dist/lifeline/modules/ts-gmp.js.map +1 -0
  269. package/dist/lifeline/modules/ts-loan.d.ts +48 -0
  270. package/dist/lifeline/modules/ts-loan.js +580 -0
  271. package/dist/lifeline/modules/ts-loan.js.map +1 -0
  272. package/dist/lifeline/modules/ts-oracle.d.ts +8 -0
  273. package/dist/lifeline/modules/ts-oracle.js +27 -0
  274. package/dist/lifeline/modules/ts-oracle.js.map +1 -0
  275. package/dist/lifeline/modules/ts-pool.d.ts +5 -0
  276. package/dist/lifeline/modules/ts-pool.js +8 -0
  277. package/dist/lifeline/modules/ts-pool.js.map +1 -0
  278. package/dist/types/generics.d.ts +1 -0
  279. package/dist/types/generics.js +2 -0
  280. package/dist/types/generics.js.map +1 -0
  281. package/dist/utils/address.d.ts +1 -0
  282. package/dist/utils/address.js +2 -0
  283. package/dist/utils/address.js.map +1 -0
  284. package/dist/utils/array.d.ts +3 -0
  285. package/dist/utils/array.js +7 -0
  286. package/dist/utils/array.js.map +1 -0
  287. package/dist/utils/exhaustive-check.d.ts +1 -0
  288. package/dist/utils/exhaustive-check.js +4 -0
  289. package/dist/utils/exhaustive-check.js.map +1 -0
  290. package/dist/utils/random.d.ts +1 -0
  291. package/dist/utils/random.js +4 -0
  292. package/dist/utils/random.js.map +1 -0
  293. package/package.json +56 -0
  294. package/src/chains/evm/common/constant/abi/arbitrum-node-interface-abi.ts +17 -0
  295. package/src/chains/evm/common/constant/abi/bridge-router-abi.ts +793 -0
  296. package/src/chains/evm/common/constant/abi/ccip-data-adapter-abi.ts +621 -0
  297. package/src/chains/evm/common/constant/abi/erc-20-abi.ts +156 -0
  298. package/src/chains/evm/common/constant/abi/wormhole-data-adapter-abi.ts +644 -0
  299. package/src/chains/evm/common/constant/abi/wormhole-relayer-abi.ts +500 -0
  300. package/src/chains/evm/common/constant/chain.ts +88 -0
  301. package/src/chains/evm/common/constant/contract.ts +15 -0
  302. package/src/chains/evm/common/constant/tokens.ts +33 -0
  303. package/src/chains/evm/common/types/chain.ts +26 -0
  304. package/src/chains/evm/common/types/contract.ts +17 -0
  305. package/src/chains/evm/common/types/gmp.ts +43 -0
  306. package/src/chains/evm/common/types/module.ts +115 -0
  307. package/src/chains/evm/common/types/token.ts +35 -0
  308. package/src/chains/evm/common/utils/chain.ts +33 -0
  309. package/src/chains/evm/common/utils/contract.ts +120 -0
  310. package/src/chains/evm/common/utils/gmp.ts +54 -0
  311. package/src/chains/evm/common/utils/message.ts +648 -0
  312. package/src/chains/evm/common/utils/provider.ts +38 -0
  313. package/src/chains/evm/common/utils/tokens.ts +102 -0
  314. package/src/chains/evm/hub/constants/abi/account-manager-abi.ts +708 -0
  315. package/src/chains/evm/hub/constants/abi/bridge-router-hub-abi.ts +815 -0
  316. package/src/chains/evm/hub/constants/abi/hub-abi.ts +228 -0
  317. package/src/chains/evm/hub/constants/abi/hub-pool-abi.ts +1557 -0
  318. package/src/chains/evm/hub/constants/abi/hub-rewards-v1-abi.ts +648 -0
  319. package/src/chains/evm/hub/constants/abi/hub-rewards-v2-abi.ts +889 -0
  320. package/src/chains/evm/hub/constants/abi/loan-manager-abi.ts +1054 -0
  321. package/src/chains/evm/hub/constants/abi/node-manager-abi.ts +227 -0
  322. package/src/chains/evm/hub/constants/abi/oracle-manager-abi.ts +390 -0
  323. package/src/chains/evm/hub/constants/chain.ts +305 -0
  324. package/src/chains/evm/hub/modules/index.ts +5 -0
  325. package/src/chains/evm/hub/modules/ts-hub-account.ts +117 -0
  326. package/src/chains/evm/hub/modules/ts-hub-gmp.ts +231 -0
  327. package/src/chains/evm/hub/modules/ts-hub-loan.ts +915 -0
  328. package/src/chains/evm/hub/modules/ts-hub-oracle.ts +131 -0
  329. package/src/chains/evm/hub/modules/ts-hub-pool.ts +241 -0
  330. package/src/chains/evm/hub/types/account.ts +30 -0
  331. package/src/chains/evm/hub/types/chain.ts +22 -0
  332. package/src/chains/evm/hub/types/loan.ts +188 -0
  333. package/src/chains/evm/hub/types/oracle.ts +25 -0
  334. package/src/chains/evm/hub/types/pool.ts +75 -0
  335. package/src/chains/evm/hub/types/token.ts +10 -0
  336. package/src/chains/evm/hub/utils/chain.ts +78 -0
  337. package/src/chains/evm/hub/utils/contract.ts +178 -0
  338. package/src/chains/evm/hub/utils/events.ts +160 -0
  339. package/src/chains/evm/hub/utils/loan.ts +72 -0
  340. package/src/chains/evm/spoke/constants/abi/bridge-router-spoke-abi.ts +805 -0
  341. package/src/chains/evm/spoke/constants/abi/spoke-common-abi.ts +734 -0
  342. package/src/chains/evm/spoke/constants/abi/spoke-rewards-v2-common-abi.ts +500 -0
  343. package/src/chains/evm/spoke/constants/abi/spoke-token-abi.ts +704 -0
  344. package/src/chains/evm/spoke/modules/index.ts +3 -0
  345. package/src/chains/evm/spoke/modules/ts-evm-account.ts +341 -0
  346. package/src/chains/evm/spoke/modules/ts-evm-gmp.ts +353 -0
  347. package/src/chains/evm/spoke/modules/ts-evm-loan.ts +1032 -0
  348. package/src/chains/evm/spoke/types/pool.ts +7 -0
  349. package/src/chains/evm/spoke/utils/contract.ts +123 -0
  350. package/src/common/constants/adapter.ts +6 -0
  351. package/src/common/constants/byte.ts +7 -0
  352. package/src/common/constants/chain.ts +319 -0
  353. package/src/common/constants/gmp.ts +19 -0
  354. package/src/common/constants/lending.ts +9 -0
  355. package/src/common/constants/message.ts +25 -0
  356. package/src/common/constants/pool.ts +30 -0
  357. package/src/common/types/adapter.ts +44 -0
  358. package/src/common/types/address.ts +11 -0
  359. package/src/common/types/brand.ts +3 -0
  360. package/src/common/types/chain.ts +42 -0
  361. package/src/common/types/core.ts +31 -0
  362. package/src/common/types/gmp.ts +19 -0
  363. package/src/common/types/lending.ts +26 -0
  364. package/src/common/types/message.ts +401 -0
  365. package/src/common/types/module.ts +46 -0
  366. package/src/common/types/token.ts +72 -0
  367. package/src/common/utils/adapter.ts +197 -0
  368. package/src/common/utils/address.ts +50 -0
  369. package/src/common/utils/bytes.ts +36 -0
  370. package/src/common/utils/chain.ts +163 -0
  371. package/src/common/utils/formulae.ts +270 -0
  372. package/src/common/utils/gmp.ts +8 -0
  373. package/src/common/utils/lending.ts +31 -0
  374. package/src/common/utils/math-lib.ts +50 -0
  375. package/src/common/utils/messages.ts +283 -0
  376. package/src/common/utils/token.ts +13 -0
  377. package/src/common/utils/transaction.ts +27 -0
  378. package/src/index.ts +73 -0
  379. package/src/lifeline/core/ts-core.ts +136 -0
  380. package/src/lifeline/modules/index.ts +5 -0
  381. package/src/lifeline/modules/ts-account.ts +420 -0
  382. package/src/lifeline/modules/ts-gmp.ts +5 -0
  383. package/src/lifeline/modules/ts-loan.ts +1268 -0
  384. package/src/lifeline/modules/ts-oracle.ts +68 -0
  385. package/src/lifeline/modules/ts-pool.ts +19 -0
  386. package/src/types/generics.ts +1 -0
  387. package/src/utils/address.ts +0 -0
  388. package/src/utils/array.ts +11 -0
  389. package/src/utils/exhaustive-check.ts +3 -0
  390. package/src/utils/random.ts +3 -0
@@ -0,0 +1,1558 @@
1
+ export const HubPoolAbi = [
2
+ {
3
+ type: 'constructor',
4
+ inputs: [
5
+ { name: 'admin', type: 'address', internalType: 'address' },
6
+ { name: 'hub', type: 'address', internalType: 'address' },
7
+ { name: 'loanController', type: 'address', internalType: 'address' },
8
+ { name: 'tokenDecimals', type: 'uint8', internalType: 'uint8' },
9
+ { name: 'tsTokenName', type: 'string', internalType: 'string' },
10
+ { name: 'tsTokenSymbol', type: 'string', internalType: 'string' },
11
+ { name: 'poolId', type: 'uint8', internalType: 'uint8' },
12
+ {
13
+ name: 'pooldata',
14
+ type: 'tuple',
15
+ internalType: 'struct HubAssetPoolState.PoolData',
16
+ components: [
17
+ {
18
+ name: 'lastUpdateTimestamp',
19
+ type: 'uint256',
20
+ internalType: 'uint256',
21
+ },
22
+ {
23
+ name: 'feeData',
24
+ type: 'tuple',
25
+ internalType: 'struct HubAssetPoolState.FeeData',
26
+ components: [
27
+ { name: 'flashLoanFee', type: 'uint32', internalType: 'uint32' },
28
+ { name: 'retentionRate', type: 'uint32', internalType: 'uint32' },
29
+ {
30
+ name: 'tsTokenFeeRecipient',
31
+ type: 'address',
32
+ internalType: 'address',
33
+ },
34
+ {
35
+ name: 'tokenFeeClaimer',
36
+ type: 'address',
37
+ internalType: 'address',
38
+ },
39
+ {
40
+ name: 'totalRetainedAmount',
41
+ type: 'uint256',
42
+ internalType: 'uint256',
43
+ },
44
+ {
45
+ name: 'tokenFeeRecipient',
46
+ type: 'bytes32',
47
+ internalType: 'bytes32',
48
+ },
49
+ ],
50
+ },
51
+ {
52
+ name: 'depositData',
53
+ type: 'tuple',
54
+ internalType: 'struct HubAssetPoolState.DepositData',
55
+ components: [
56
+ {
57
+ name: 'optimalUtilisationRatio',
58
+ type: 'uint16',
59
+ internalType: 'uint16',
60
+ },
61
+ { name: 'totalAmount', type: 'uint256', internalType: 'uint256' },
62
+ {
63
+ name: 'interestRate',
64
+ type: 'uint256',
65
+ internalType: 'uint256',
66
+ },
67
+ {
68
+ name: 'interestIndex',
69
+ type: 'uint256',
70
+ internalType: 'uint256',
71
+ },
72
+ ],
73
+ },
74
+ {
75
+ name: 'variableBorrowData',
76
+ type: 'tuple',
77
+ internalType: 'struct HubAssetPoolState.VariableBorrowData',
78
+ components: [
79
+ { name: 'vr0', type: 'uint32', internalType: 'uint32' },
80
+ { name: 'vr1', type: 'uint32', internalType: 'uint32' },
81
+ { name: 'vr2', type: 'uint32', internalType: 'uint32' },
82
+ { name: 'totalAmount', type: 'uint256', internalType: 'uint256' },
83
+ {
84
+ name: 'interestRate',
85
+ type: 'uint256',
86
+ internalType: 'uint256',
87
+ },
88
+ {
89
+ name: 'interestIndex',
90
+ type: 'uint256',
91
+ internalType: 'uint256',
92
+ },
93
+ ],
94
+ },
95
+ {
96
+ name: 'stableBorrowData',
97
+ type: 'tuple',
98
+ internalType: 'struct HubAssetPoolState.StableBorrowData',
99
+ components: [
100
+ { name: 'sr0', type: 'uint32', internalType: 'uint32' },
101
+ { name: 'sr1', type: 'uint32', internalType: 'uint32' },
102
+ { name: 'sr2', type: 'uint32', internalType: 'uint32' },
103
+ { name: 'sr3', type: 'uint32', internalType: 'uint32' },
104
+ {
105
+ name: 'optimalStableToTotalDebtRatio',
106
+ type: 'uint16',
107
+ internalType: 'uint16',
108
+ },
109
+ {
110
+ name: 'increaseBorrowBalanceUtilisationRatio',
111
+ type: 'uint16',
112
+ internalType: 'uint16',
113
+ },
114
+ {
115
+ name: 'increaseBorrowBalanceDepositInterestRate',
116
+ type: 'uint16',
117
+ internalType: 'uint16',
118
+ },
119
+ {
120
+ name: 'decreaseBorrowBalanceDelta',
121
+ type: 'uint16',
122
+ internalType: 'uint16',
123
+ },
124
+ { name: 'totalAmount', type: 'uint256', internalType: 'uint256' },
125
+ {
126
+ name: 'interestRate',
127
+ type: 'uint256',
128
+ internalType: 'uint256',
129
+ },
130
+ {
131
+ name: 'averageInterestRate',
132
+ type: 'uint256',
133
+ internalType: 'uint256',
134
+ },
135
+ { name: 'deviation', type: 'uint16', internalType: 'uint16' },
136
+ ],
137
+ },
138
+ {
139
+ name: 'capsData',
140
+ type: 'tuple',
141
+ internalType: 'struct HubAssetPoolState.CapsData',
142
+ components: [
143
+ { name: 'deposit', type: 'uint64', internalType: 'uint64' },
144
+ { name: 'borrow', type: 'uint64', internalType: 'uint64' },
145
+ {
146
+ name: 'stableBorrowPercentage',
147
+ type: 'uint64',
148
+ internalType: 'uint64',
149
+ },
150
+ ],
151
+ },
152
+ {
153
+ name: 'configData',
154
+ type: 'tuple',
155
+ internalType: 'struct HubAssetPoolState.ConfigData',
156
+ components: [
157
+ { name: 'deprecated', type: 'bool', internalType: 'bool' },
158
+ {
159
+ name: 'stableBorrowSupported',
160
+ type: 'bool',
161
+ internalType: 'bool',
162
+ },
163
+ { name: 'canMintTsToken', type: 'bool', internalType: 'bool' },
164
+ {
165
+ name: 'flashLoanSupported',
166
+ type: 'bool',
167
+ internalType: 'bool',
168
+ },
169
+ ],
170
+ },
171
+ ],
172
+ },
173
+ {
174
+ name: 'priceFeedManager',
175
+ type: 'address',
176
+ internalType: 'contract IPriceFeedManager',
177
+ },
178
+ { name: 'chainId', type: 'uint16', internalType: 'uint16' },
179
+ { name: 'spokeAddress', type: 'bytes32', internalType: 'bytes32' },
180
+ ],
181
+ stateMutability: 'nonpayable',
182
+ },
183
+ {
184
+ type: 'function',
185
+ name: 'DEFAULT_ADMIN_ROLE',
186
+ inputs: [],
187
+ outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }],
188
+ stateMutability: 'view',
189
+ },
190
+ {
191
+ type: 'function',
192
+ name: 'HUB_ROLE',
193
+ inputs: [],
194
+ outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }],
195
+ stateMutability: 'view',
196
+ },
197
+ {
198
+ type: 'function',
199
+ name: 'LOAN_MANAGER_ROLE',
200
+ inputs: [],
201
+ outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }],
202
+ stateMutability: 'view',
203
+ },
204
+ {
205
+ type: 'function',
206
+ name: 'ORACLE_ROLE',
207
+ inputs: [],
208
+ outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }],
209
+ stateMutability: 'view',
210
+ },
211
+ {
212
+ type: 'function',
213
+ name: 'PARAM_ROLE',
214
+ inputs: [],
215
+ outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }],
216
+ stateMutability: 'view',
217
+ },
218
+ {
219
+ type: 'function',
220
+ name: 'acceptDefaultAdminTransfer',
221
+ inputs: [],
222
+ outputs: [],
223
+ stateMutability: 'nonpayable',
224
+ },
225
+ {
226
+ type: 'function',
227
+ name: 'allowance',
228
+ inputs: [
229
+ { name: 'owner', type: 'address', internalType: 'address' },
230
+ { name: 'spender', type: 'address', internalType: 'address' },
231
+ ],
232
+ outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],
233
+ stateMutability: 'view',
234
+ },
235
+ {
236
+ type: 'function',
237
+ name: 'approve',
238
+ inputs: [
239
+ { name: 'spender', type: 'address', internalType: 'address' },
240
+ { name: 'value', type: 'uint256', internalType: 'uint256' },
241
+ ],
242
+ outputs: [{ name: '', type: 'bool', internalType: 'bool' }],
243
+ stateMutability: 'nonpayable',
244
+ },
245
+ {
246
+ type: 'function',
247
+ name: 'balanceOf',
248
+ inputs: [{ name: 'account', type: 'address', internalType: 'address' }],
249
+ outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],
250
+ stateMutability: 'view',
251
+ },
252
+ {
253
+ type: 'function',
254
+ name: 'beginDefaultAdminTransfer',
255
+ inputs: [{ name: 'newAdmin', type: 'address', internalType: 'address' }],
256
+ outputs: [],
257
+ stateMutability: 'nonpayable',
258
+ },
259
+ {
260
+ type: 'function',
261
+ name: 'burnTsToken',
262
+ inputs: [
263
+ { name: 'sender', type: 'address', internalType: 'address' },
264
+ { name: 'amount', type: 'uint256', internalType: 'uint256' },
265
+ ],
266
+ outputs: [],
267
+ stateMutability: 'nonpayable',
268
+ },
269
+ {
270
+ type: 'function',
271
+ name: 'cancelDefaultAdminTransfer',
272
+ inputs: [],
273
+ outputs: [],
274
+ stateMutability: 'nonpayable',
275
+ },
276
+ {
277
+ type: 'function',
278
+ name: 'changeDefaultAdminDelay',
279
+ inputs: [{ name: 'newDelay', type: 'uint48', internalType: 'uint48' }],
280
+ outputs: [],
281
+ stateMutability: 'nonpayable',
282
+ },
283
+ {
284
+ type: 'function',
285
+ name: 'clearTokenFees',
286
+ inputs: [],
287
+ outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],
288
+ stateMutability: 'nonpayable',
289
+ },
290
+ {
291
+ type: 'function',
292
+ name: 'decimals',
293
+ inputs: [],
294
+ outputs: [{ name: '', type: 'uint8', internalType: 'uint8' }],
295
+ stateMutability: 'view',
296
+ },
297
+ {
298
+ type: 'function',
299
+ name: 'defaultAdmin',
300
+ inputs: [],
301
+ outputs: [{ name: '', type: 'address', internalType: 'address' }],
302
+ stateMutability: 'view',
303
+ },
304
+ {
305
+ type: 'function',
306
+ name: 'defaultAdminDelay',
307
+ inputs: [],
308
+ outputs: [{ name: '', type: 'uint48', internalType: 'uint48' }],
309
+ stateMutability: 'view',
310
+ },
311
+ {
312
+ type: 'function',
313
+ name: 'defaultAdminDelayIncreaseWait',
314
+ inputs: [],
315
+ outputs: [{ name: '', type: 'uint48', internalType: 'uint48' }],
316
+ stateMutability: 'view',
317
+ },
318
+ {
319
+ type: 'function',
320
+ name: 'flashFee',
321
+ inputs: [
322
+ { name: 'token', type: 'address', internalType: 'address' },
323
+ { name: 'value', type: 'uint256', internalType: 'uint256' },
324
+ ],
325
+ outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],
326
+ stateMutability: 'view',
327
+ },
328
+ {
329
+ type: 'function',
330
+ name: 'flashLoan',
331
+ inputs: [
332
+ {
333
+ name: 'receiver',
334
+ type: 'address',
335
+ internalType: 'contract IERC3156FlashBorrower',
336
+ },
337
+ { name: 'token', type: 'address', internalType: 'address' },
338
+ { name: 'value', type: 'uint256', internalType: 'uint256' },
339
+ { name: 'data', type: 'bytes', internalType: 'bytes' },
340
+ ],
341
+ outputs: [{ name: '', type: 'bool', internalType: 'bool' }],
342
+ stateMutability: 'nonpayable',
343
+ },
344
+ {
345
+ type: 'function',
346
+ name: 'getCapsData',
347
+ inputs: [],
348
+ outputs: [
349
+ {
350
+ name: '',
351
+ type: 'tuple',
352
+ internalType: 'struct HubAssetPoolState.CapsData',
353
+ components: [
354
+ { name: 'deposit', type: 'uint64', internalType: 'uint64' },
355
+ { name: 'borrow', type: 'uint64', internalType: 'uint64' },
356
+ {
357
+ name: 'stableBorrowPercentage',
358
+ type: 'uint64',
359
+ internalType: 'uint64',
360
+ },
361
+ ],
362
+ },
363
+ ],
364
+ stateMutability: 'view',
365
+ },
366
+ {
367
+ type: 'function',
368
+ name: 'getChainSpoke',
369
+ inputs: [{ name: 'chainId', type: 'uint16', internalType: 'uint16' }],
370
+ outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }],
371
+ stateMutability: 'view',
372
+ },
373
+ {
374
+ type: 'function',
375
+ name: 'getConfigData',
376
+ inputs: [],
377
+ outputs: [
378
+ {
379
+ name: '',
380
+ type: 'tuple',
381
+ internalType: 'struct HubAssetPoolState.ConfigData',
382
+ components: [
383
+ { name: 'deprecated', type: 'bool', internalType: 'bool' },
384
+ { name: 'stableBorrowSupported', type: 'bool', internalType: 'bool' },
385
+ { name: 'canMintTsToken', type: 'bool', internalType: 'bool' },
386
+ { name: 'flashLoanSupported', type: 'bool', internalType: 'bool' },
387
+ ],
388
+ },
389
+ ],
390
+ stateMutability: 'view',
391
+ },
392
+ {
393
+ type: 'function',
394
+ name: 'getDepositData',
395
+ inputs: [],
396
+ outputs: [
397
+ {
398
+ name: '',
399
+ type: 'tuple',
400
+ internalType: 'struct HubAssetPoolState.DepositData',
401
+ components: [
402
+ {
403
+ name: 'optimalUtilisationRatio',
404
+ type: 'uint16',
405
+ internalType: 'uint16',
406
+ },
407
+ { name: 'totalAmount', type: 'uint256', internalType: 'uint256' },
408
+ { name: 'interestRate', type: 'uint256', internalType: 'uint256' },
409
+ { name: 'interestIndex', type: 'uint256', internalType: 'uint256' },
410
+ ],
411
+ },
412
+ ],
413
+ stateMutability: 'view',
414
+ },
415
+ {
416
+ type: 'function',
417
+ name: 'getFeeData',
418
+ inputs: [],
419
+ outputs: [
420
+ {
421
+ name: '',
422
+ type: 'tuple',
423
+ internalType: 'struct HubAssetPoolState.FeeData',
424
+ components: [
425
+ { name: 'flashLoanFee', type: 'uint32', internalType: 'uint32' },
426
+ { name: 'retentionRate', type: 'uint32', internalType: 'uint32' },
427
+ {
428
+ name: 'tsTokenFeeRecipient',
429
+ type: 'address',
430
+ internalType: 'address',
431
+ },
432
+ { name: 'tokenFeeClaimer', type: 'address', internalType: 'address' },
433
+ {
434
+ name: 'totalRetainedAmount',
435
+ type: 'uint256',
436
+ internalType: 'uint256',
437
+ },
438
+ {
439
+ name: 'tokenFeeRecipient',
440
+ type: 'bytes32',
441
+ internalType: 'bytes32',
442
+ },
443
+ ],
444
+ },
445
+ ],
446
+ stateMutability: 'view',
447
+ },
448
+ {
449
+ type: 'function',
450
+ name: 'getLastUpdateTimestamp',
451
+ inputs: [],
452
+ outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],
453
+ stateMutability: 'view',
454
+ },
455
+ {
456
+ type: 'function',
457
+ name: 'getPoolId',
458
+ inputs: [],
459
+ outputs: [{ name: '', type: 'uint8', internalType: 'uint8' }],
460
+ stateMutability: 'view',
461
+ },
462
+ {
463
+ type: 'function',
464
+ name: 'getPriceFeedManager',
465
+ inputs: [],
466
+ outputs: [{ name: '', type: 'address', internalType: 'address' }],
467
+ stateMutability: 'view',
468
+ },
469
+ {
470
+ type: 'function',
471
+ name: 'getRefreshedDepositIndex',
472
+ inputs: [],
473
+ outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],
474
+ stateMutability: 'view',
475
+ },
476
+ {
477
+ type: 'function',
478
+ name: 'getRoleAdmin',
479
+ inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }],
480
+ outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }],
481
+ stateMutability: 'view',
482
+ },
483
+ {
484
+ type: 'function',
485
+ name: 'getSendTokenMessage',
486
+ inputs: [
487
+ {
488
+ name: 'messageDispatcher',
489
+ type: 'address',
490
+ internalType: 'contract IMessageDispatcher',
491
+ },
492
+ { name: 'adapterId', type: 'uint16', internalType: 'uint16' },
493
+ { name: 'gasLimit', type: 'uint256', internalType: 'uint256' },
494
+ { name: 'accountId', type: 'bytes32', internalType: 'bytes32' },
495
+ { name: 'chainId', type: 'uint16', internalType: 'uint16' },
496
+ { name: 'amount', type: 'uint256', internalType: 'uint256' },
497
+ { name: 'recipient', type: 'bytes32', internalType: 'bytes32' },
498
+ ],
499
+ outputs: [
500
+ {
501
+ name: '',
502
+ type: 'tuple',
503
+ internalType: 'struct Messages.MessageToSend',
504
+ components: [
505
+ {
506
+ name: 'params',
507
+ type: 'tuple',
508
+ internalType: 'struct Messages.MessageParams',
509
+ components: [
510
+ { name: 'adapterId', type: 'uint16', internalType: 'uint16' },
511
+ {
512
+ name: 'returnAdapterId',
513
+ type: 'uint16',
514
+ internalType: 'uint16',
515
+ },
516
+ {
517
+ name: 'receiverValue',
518
+ type: 'uint256',
519
+ internalType: 'uint256',
520
+ },
521
+ { name: 'gasLimit', type: 'uint256', internalType: 'uint256' },
522
+ {
523
+ name: 'returnGasLimit',
524
+ type: 'uint256',
525
+ internalType: 'uint256',
526
+ },
527
+ ],
528
+ },
529
+ { name: 'sender', type: 'bytes32', internalType: 'bytes32' },
530
+ {
531
+ name: 'destinationChainId',
532
+ type: 'uint16',
533
+ internalType: 'uint16',
534
+ },
535
+ { name: 'handler', type: 'bytes32', internalType: 'bytes32' },
536
+ { name: 'payload', type: 'bytes', internalType: 'bytes' },
537
+ { name: 'finalityLevel', type: 'uint64', internalType: 'uint64' },
538
+ { name: 'extraArgs', type: 'bytes', internalType: 'bytes' },
539
+ ],
540
+ },
541
+ ],
542
+ stateMutability: 'nonpayable',
543
+ },
544
+ {
545
+ type: 'function',
546
+ name: 'getStableBorrowData',
547
+ inputs: [],
548
+ outputs: [
549
+ {
550
+ name: '',
551
+ type: 'tuple',
552
+ internalType: 'struct HubAssetPoolState.StableBorrowData',
553
+ components: [
554
+ { name: 'sr0', type: 'uint32', internalType: 'uint32' },
555
+ { name: 'sr1', type: 'uint32', internalType: 'uint32' },
556
+ { name: 'sr2', type: 'uint32', internalType: 'uint32' },
557
+ { name: 'sr3', type: 'uint32', internalType: 'uint32' },
558
+ {
559
+ name: 'optimalStableToTotalDebtRatio',
560
+ type: 'uint16',
561
+ internalType: 'uint16',
562
+ },
563
+ {
564
+ name: 'increaseBorrowBalanceUtilisationRatio',
565
+ type: 'uint16',
566
+ internalType: 'uint16',
567
+ },
568
+ {
569
+ name: 'increaseBorrowBalanceDepositInterestRate',
570
+ type: 'uint16',
571
+ internalType: 'uint16',
572
+ },
573
+ {
574
+ name: 'decreaseBorrowBalanceDelta',
575
+ type: 'uint16',
576
+ internalType: 'uint16',
577
+ },
578
+ { name: 'totalAmount', type: 'uint256', internalType: 'uint256' },
579
+ { name: 'interestRate', type: 'uint256', internalType: 'uint256' },
580
+ {
581
+ name: 'averageInterestRate',
582
+ type: 'uint256',
583
+ internalType: 'uint256',
584
+ },
585
+ { name: 'deviation', type: 'uint16', internalType: 'uint16' },
586
+ ],
587
+ },
588
+ ],
589
+ stateMutability: 'view',
590
+ },
591
+ {
592
+ type: 'function',
593
+ name: 'getTokenFeeClaimer',
594
+ inputs: [],
595
+ outputs: [{ name: '', type: 'address', internalType: 'address' }],
596
+ stateMutability: 'view',
597
+ },
598
+ {
599
+ type: 'function',
600
+ name: 'getTokenFeeHolder',
601
+ inputs: [],
602
+ outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }],
603
+ stateMutability: 'view',
604
+ },
605
+ {
606
+ type: 'function',
607
+ name: 'getUpdatedVariableBorrowInterestIndex',
608
+ inputs: [],
609
+ outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],
610
+ stateMutability: 'view',
611
+ },
612
+ {
613
+ type: 'function',
614
+ name: 'getVariableBorrowData',
615
+ inputs: [],
616
+ outputs: [
617
+ {
618
+ name: '',
619
+ type: 'tuple',
620
+ internalType: 'struct HubAssetPoolState.VariableBorrowData',
621
+ components: [
622
+ { name: 'vr0', type: 'uint32', internalType: 'uint32' },
623
+ { name: 'vr1', type: 'uint32', internalType: 'uint32' },
624
+ { name: 'vr2', type: 'uint32', internalType: 'uint32' },
625
+ { name: 'totalAmount', type: 'uint256', internalType: 'uint256' },
626
+ { name: 'interestRate', type: 'uint256', internalType: 'uint256' },
627
+ { name: 'interestIndex', type: 'uint256', internalType: 'uint256' },
628
+ ],
629
+ },
630
+ ],
631
+ stateMutability: 'view',
632
+ },
633
+ {
634
+ type: 'function',
635
+ name: 'grantRole',
636
+ inputs: [
637
+ { name: 'role', type: 'bytes32', internalType: 'bytes32' },
638
+ { name: 'account', type: 'address', internalType: 'address' },
639
+ ],
640
+ outputs: [],
641
+ stateMutability: 'nonpayable',
642
+ },
643
+ {
644
+ type: 'function',
645
+ name: 'hasRole',
646
+ inputs: [
647
+ { name: 'role', type: 'bytes32', internalType: 'bytes32' },
648
+ { name: 'account', type: 'address', internalType: 'address' },
649
+ ],
650
+ outputs: [{ name: '', type: 'bool', internalType: 'bool' }],
651
+ stateMutability: 'view',
652
+ },
653
+ {
654
+ type: 'function',
655
+ name: 'maxFlashLoan',
656
+ inputs: [{ name: 'token', type: 'address', internalType: 'address' }],
657
+ outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],
658
+ stateMutability: 'view',
659
+ },
660
+ {
661
+ type: 'function',
662
+ name: 'mintTsToken',
663
+ inputs: [
664
+ { name: 'recipient', type: 'address', internalType: 'address' },
665
+ { name: 'amount', type: 'uint256', internalType: 'uint256' },
666
+ ],
667
+ outputs: [],
668
+ stateMutability: 'nonpayable',
669
+ },
670
+ {
671
+ type: 'function',
672
+ name: 'mintTsTokenForFeeRecipient',
673
+ inputs: [{ name: 'amount', type: 'uint256', internalType: 'uint256' }],
674
+ outputs: [],
675
+ stateMutability: 'nonpayable',
676
+ },
677
+ {
678
+ type: 'function',
679
+ name: 'name',
680
+ inputs: [],
681
+ outputs: [{ name: '', type: 'string', internalType: 'string' }],
682
+ stateMutability: 'view',
683
+ },
684
+ {
685
+ type: 'function',
686
+ name: 'owner',
687
+ inputs: [],
688
+ outputs: [{ name: '', type: 'address', internalType: 'address' }],
689
+ stateMutability: 'view',
690
+ },
691
+ {
692
+ type: 'function',
693
+ name: 'pendingDefaultAdmin',
694
+ inputs: [],
695
+ outputs: [
696
+ { name: 'newAdmin', type: 'address', internalType: 'address' },
697
+ { name: 'schedule', type: 'uint48', internalType: 'uint48' },
698
+ ],
699
+ stateMutability: 'view',
700
+ },
701
+ {
702
+ type: 'function',
703
+ name: 'pendingDefaultAdminDelay',
704
+ inputs: [],
705
+ outputs: [
706
+ { name: 'newDelay', type: 'uint48', internalType: 'uint48' },
707
+ { name: 'schedule', type: 'uint48', internalType: 'uint48' },
708
+ ],
709
+ stateMutability: 'view',
710
+ },
711
+ {
712
+ type: 'function',
713
+ name: 'poolId',
714
+ inputs: [],
715
+ outputs: [{ name: '', type: 'uint8', internalType: 'uint8' }],
716
+ stateMutability: 'view',
717
+ },
718
+ {
719
+ type: 'function',
720
+ name: 'preparePoolForBorrow',
721
+ inputs: [
722
+ { name: 'amount', type: 'uint256', internalType: 'uint256' },
723
+ { name: 'maxStableRate', type: 'uint256', internalType: 'uint256' },
724
+ ],
725
+ outputs: [
726
+ {
727
+ name: 'borrowPoolParams',
728
+ type: 'tuple',
729
+ internalType: 'struct DataTypes.BorrowPoolParams',
730
+ components: [
731
+ {
732
+ name: 'variableInterestIndex',
733
+ type: 'uint256',
734
+ internalType: 'uint256',
735
+ },
736
+ {
737
+ name: 'stableInterestRate',
738
+ type: 'uint256',
739
+ internalType: 'uint256',
740
+ },
741
+ ],
742
+ },
743
+ ],
744
+ stateMutability: 'nonpayable',
745
+ },
746
+ {
747
+ type: 'function',
748
+ name: 'preparePoolForChangeBorrowMode',
749
+ inputs: [
750
+ { name: 'amount', type: 'uint256', internalType: 'uint256' },
751
+ { name: 'maxStableRate', type: 'uint256', internalType: 'uint256' },
752
+ ],
753
+ outputs: [
754
+ {
755
+ name: 'borrowPoolParams',
756
+ type: 'tuple',
757
+ internalType: 'struct DataTypes.BorrowPoolParams',
758
+ components: [
759
+ {
760
+ name: 'variableInterestIndex',
761
+ type: 'uint256',
762
+ internalType: 'uint256',
763
+ },
764
+ {
765
+ name: 'stableInterestRate',
766
+ type: 'uint256',
767
+ internalType: 'uint256',
768
+ },
769
+ ],
770
+ },
771
+ ],
772
+ stateMutability: 'nonpayable',
773
+ },
774
+ {
775
+ type: 'function',
776
+ name: 'preparePoolForDecreaseBorrowBalance',
777
+ inputs: [],
778
+ outputs: [
779
+ {
780
+ name: 'decreaseBorrowBalancePoolParams',
781
+ type: 'tuple',
782
+ internalType: 'struct DataTypes.DecreaseBorrowBalancePoolParams',
783
+ components: [
784
+ {
785
+ name: 'variableInterestIndex',
786
+ type: 'uint256',
787
+ internalType: 'uint256',
788
+ },
789
+ {
790
+ name: 'stableInterestRate',
791
+ type: 'uint256',
792
+ internalType: 'uint256',
793
+ },
794
+ { name: 'threshold', type: 'uint256', internalType: 'uint256' },
795
+ ],
796
+ },
797
+ ],
798
+ stateMutability: 'nonpayable',
799
+ },
800
+ {
801
+ type: 'function',
802
+ name: 'preparePoolForIncreaseBorrowBalance',
803
+ inputs: [],
804
+ outputs: [
805
+ {
806
+ name: 'borrowPoolParams',
807
+ type: 'tuple',
808
+ internalType: 'struct DataTypes.BorrowPoolParams',
809
+ components: [
810
+ {
811
+ name: 'variableInterestIndex',
812
+ type: 'uint256',
813
+ internalType: 'uint256',
814
+ },
815
+ {
816
+ name: 'stableInterestRate',
817
+ type: 'uint256',
818
+ internalType: 'uint256',
819
+ },
820
+ ],
821
+ },
822
+ ],
823
+ stateMutability: 'nonpayable',
824
+ },
825
+ {
826
+ type: 'function',
827
+ name: 'preparePoolForRepay',
828
+ inputs: [],
829
+ outputs: [
830
+ {
831
+ name: '',
832
+ type: 'tuple',
833
+ internalType: 'struct DataTypes.BorrowPoolParams',
834
+ components: [
835
+ {
836
+ name: 'variableInterestIndex',
837
+ type: 'uint256',
838
+ internalType: 'uint256',
839
+ },
840
+ {
841
+ name: 'stableInterestRate',
842
+ type: 'uint256',
843
+ internalType: 'uint256',
844
+ },
845
+ ],
846
+ },
847
+ ],
848
+ stateMutability: 'nonpayable',
849
+ },
850
+ {
851
+ type: 'function',
852
+ name: 'preparePoolForWithdraw',
853
+ inputs: [
854
+ { name: 'amount', type: 'uint256', internalType: 'uint256' },
855
+ { name: 'isFAmount', type: 'bool', internalType: 'bool' },
856
+ ],
857
+ outputs: [
858
+ {
859
+ name: 'withdrawPoolParams',
860
+ type: 'tuple',
861
+ internalType: 'struct DataTypes.WithdrawPoolParams',
862
+ components: [
863
+ { name: 'underlingAmount', type: 'uint256', internalType: 'uint256' },
864
+ { name: 'fAmount', type: 'uint256', internalType: 'uint256' },
865
+ ],
866
+ },
867
+ ],
868
+ stateMutability: 'nonpayable',
869
+ },
870
+ {
871
+ type: 'function',
872
+ name: 'preparePoolForWithdrawTsToken',
873
+ inputs: [],
874
+ outputs: [],
875
+ stateMutability: 'nonpayable',
876
+ },
877
+ {
878
+ type: 'function',
879
+ name: 'renounceRole',
880
+ inputs: [
881
+ { name: 'role', type: 'bytes32', internalType: 'bytes32' },
882
+ { name: 'account', type: 'address', internalType: 'address' },
883
+ ],
884
+ outputs: [],
885
+ stateMutability: 'nonpayable',
886
+ },
887
+ {
888
+ type: 'function',
889
+ name: 'revokeRole',
890
+ inputs: [
891
+ { name: 'role', type: 'bytes32', internalType: 'bytes32' },
892
+ { name: 'account', type: 'address', internalType: 'address' },
893
+ ],
894
+ outputs: [],
895
+ stateMutability: 'nonpayable',
896
+ },
897
+ {
898
+ type: 'function',
899
+ name: 'rollbackDefaultAdminDelay',
900
+ inputs: [],
901
+ outputs: [],
902
+ stateMutability: 'nonpayable',
903
+ },
904
+ {
905
+ type: 'function',
906
+ name: 'supportsInterface',
907
+ inputs: [{ name: 'interfaceId', type: 'bytes4', internalType: 'bytes4' }],
908
+ outputs: [{ name: '', type: 'bool', internalType: 'bool' }],
909
+ stateMutability: 'view',
910
+ },
911
+ {
912
+ type: 'function',
913
+ name: 'symbol',
914
+ inputs: [],
915
+ outputs: [{ name: '', type: 'string', internalType: 'string' }],
916
+ stateMutability: 'view',
917
+ },
918
+ {
919
+ type: 'function',
920
+ name: 'totalSupply',
921
+ inputs: [],
922
+ outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],
923
+ stateMutability: 'view',
924
+ },
925
+ {
926
+ type: 'function',
927
+ name: 'transfer',
928
+ inputs: [
929
+ { name: 'to', type: 'address', internalType: 'address' },
930
+ { name: 'value', type: 'uint256', internalType: 'uint256' },
931
+ ],
932
+ outputs: [{ name: '', type: 'bool', internalType: 'bool' }],
933
+ stateMutability: 'nonpayable',
934
+ },
935
+ {
936
+ type: 'function',
937
+ name: 'transferFrom',
938
+ inputs: [
939
+ { name: 'from', type: 'address', internalType: 'address' },
940
+ { name: 'to', type: 'address', internalType: 'address' },
941
+ { name: 'value', type: 'uint256', internalType: 'uint256' },
942
+ ],
943
+ outputs: [{ name: '', type: 'bool', internalType: 'bool' }],
944
+ stateMutability: 'nonpayable',
945
+ },
946
+ {
947
+ type: 'function',
948
+ name: 'updateCapsData',
949
+ inputs: [
950
+ {
951
+ name: 'capsData',
952
+ type: 'tuple',
953
+ internalType: 'struct HubAssetPoolState.CapsData',
954
+ components: [
955
+ { name: 'deposit', type: 'uint64', internalType: 'uint64' },
956
+ { name: 'borrow', type: 'uint64', internalType: 'uint64' },
957
+ {
958
+ name: 'stableBorrowPercentage',
959
+ type: 'uint64',
960
+ internalType: 'uint64',
961
+ },
962
+ ],
963
+ },
964
+ ],
965
+ outputs: [],
966
+ stateMutability: 'nonpayable',
967
+ },
968
+ {
969
+ type: 'function',
970
+ name: 'updateConfigData',
971
+ inputs: [
972
+ {
973
+ name: 'configData',
974
+ type: 'tuple',
975
+ internalType: 'struct HubAssetPoolState.ConfigData',
976
+ components: [
977
+ { name: 'deprecated', type: 'bool', internalType: 'bool' },
978
+ { name: 'stableBorrowSupported', type: 'bool', internalType: 'bool' },
979
+ { name: 'canMintTsToken', type: 'bool', internalType: 'bool' },
980
+ { name: 'flashLoanSupported', type: 'bool', internalType: 'bool' },
981
+ ],
982
+ },
983
+ ],
984
+ outputs: [],
985
+ stateMutability: 'nonpayable',
986
+ },
987
+ {
988
+ type: 'function',
989
+ name: 'updateDepositData',
990
+ inputs: [
991
+ {
992
+ name: 'optimalUtilisationRatio',
993
+ type: 'uint16',
994
+ internalType: 'uint16',
995
+ },
996
+ ],
997
+ outputs: [],
998
+ stateMutability: 'nonpayable',
999
+ },
1000
+ {
1001
+ type: 'function',
1002
+ name: 'updateFeeData',
1003
+ inputs: [
1004
+ { name: 'flashLoanFee', type: 'uint32', internalType: 'uint32' },
1005
+ { name: 'retentionRate', type: 'uint32', internalType: 'uint32' },
1006
+ { name: 'tsTokenFeeRecipient', type: 'address', internalType: 'address' },
1007
+ { name: 'tokenFeeClaimer', type: 'address', internalType: 'address' },
1008
+ { name: 'tokenFeeRecipient', type: 'bytes32', internalType: 'bytes32' },
1009
+ ],
1010
+ outputs: [],
1011
+ stateMutability: 'nonpayable',
1012
+ },
1013
+ {
1014
+ type: 'function',
1015
+ name: 'updateInterestIndexes',
1016
+ inputs: [],
1017
+ outputs: [],
1018
+ stateMutability: 'nonpayable',
1019
+ },
1020
+ {
1021
+ type: 'function',
1022
+ name: 'updatePoolWithBorrow',
1023
+ inputs: [
1024
+ { name: 'oldBorrowAmount', type: 'uint256', internalType: 'uint256' },
1025
+ {
1026
+ name: 'additionalBorrowAmount',
1027
+ type: 'uint256',
1028
+ internalType: 'uint256',
1029
+ },
1030
+ { name: 'oldBorrowStableRate', type: 'uint256', internalType: 'uint256' },
1031
+ { name: 'newBorrowStableRate', type: 'uint256', internalType: 'uint256' },
1032
+ { name: 'isStable', type: 'bool', internalType: 'bool' },
1033
+ ],
1034
+ outputs: [],
1035
+ stateMutability: 'nonpayable',
1036
+ },
1037
+ {
1038
+ type: 'function',
1039
+ name: 'updatePoolWithChangeBorrowMode',
1040
+ inputs: [
1041
+ { name: 'loanBorrowAmount', type: 'uint256', internalType: 'uint256' },
1042
+ { name: 'switchingToStable', type: 'bool', internalType: 'bool' },
1043
+ {
1044
+ name: 'oldLoanBorrowStableRate',
1045
+ type: 'uint256',
1046
+ internalType: 'uint256',
1047
+ },
1048
+ ],
1049
+ outputs: [],
1050
+ stateMutability: 'nonpayable',
1051
+ },
1052
+ {
1053
+ type: 'function',
1054
+ name: 'updatePoolWithDeposit',
1055
+ inputs: [{ name: 'amount', type: 'uint256', internalType: 'uint256' }],
1056
+ outputs: [
1057
+ {
1058
+ name: '',
1059
+ type: 'tuple',
1060
+ internalType: 'struct DataTypes.DepositPoolParams',
1061
+ components: [
1062
+ { name: 'fAmount', type: 'uint256', internalType: 'uint256' },
1063
+ {
1064
+ name: 'depositInterestIndex',
1065
+ type: 'uint256',
1066
+ internalType: 'uint256',
1067
+ },
1068
+ {
1069
+ name: 'priceFeed',
1070
+ type: 'tuple',
1071
+ internalType: 'struct DataTypes.PriceFeed',
1072
+ components: [
1073
+ { name: 'price', type: 'uint256', internalType: 'uint256' },
1074
+ { name: 'decimals', type: 'uint8', internalType: 'uint8' },
1075
+ ],
1076
+ },
1077
+ ],
1078
+ },
1079
+ ],
1080
+ stateMutability: 'nonpayable',
1081
+ },
1082
+ {
1083
+ type: 'function',
1084
+ name: 'updatePoolWithLiquidation',
1085
+ inputs: [
1086
+ { name: 'repaidBorrowAmount', type: 'uint256', internalType: 'uint256' },
1087
+ {
1088
+ name: 'violatorLoanStableRate',
1089
+ type: 'uint256',
1090
+ internalType: 'uint256',
1091
+ },
1092
+ {
1093
+ name: 'liquidatorOldBorrowAmount',
1094
+ type: 'uint256',
1095
+ internalType: 'uint256',
1096
+ },
1097
+ {
1098
+ name: 'liquidatorOldLoanStableRate',
1099
+ type: 'uint256',
1100
+ internalType: 'uint256',
1101
+ },
1102
+ {
1103
+ name: 'liquidatorNewLoanStableRate',
1104
+ type: 'uint256',
1105
+ internalType: 'uint256',
1106
+ },
1107
+ ],
1108
+ outputs: [],
1109
+ stateMutability: 'nonpayable',
1110
+ },
1111
+ {
1112
+ type: 'function',
1113
+ name: 'updatePoolWithRebalance',
1114
+ inputs: [
1115
+ { name: 'amount', type: 'uint256', internalType: 'uint256' },
1116
+ {
1117
+ name: 'oldLoanStableInterestRate',
1118
+ type: 'uint256',
1119
+ internalType: 'uint256',
1120
+ },
1121
+ ],
1122
+ outputs: [],
1123
+ stateMutability: 'nonpayable',
1124
+ },
1125
+ {
1126
+ type: 'function',
1127
+ name: 'updatePoolWithRepay',
1128
+ inputs: [
1129
+ { name: 'principalPaid', type: 'uint256', internalType: 'uint256' },
1130
+ { name: 'interestPaid', type: 'uint256', internalType: 'uint256' },
1131
+ { name: 'loanStableRate', type: 'uint256', internalType: 'uint256' },
1132
+ { name: 'excessAmount', type: 'uint256', internalType: 'uint256' },
1133
+ ],
1134
+ outputs: [],
1135
+ stateMutability: 'nonpayable',
1136
+ },
1137
+ {
1138
+ type: 'function',
1139
+ name: 'updatePoolWithRepayWithCollateral',
1140
+ inputs: [
1141
+ { name: 'principalPaid', type: 'uint256', internalType: 'uint256' },
1142
+ { name: 'interestPaid', type: 'uint256', internalType: 'uint256' },
1143
+ { name: 'loanStableRate', type: 'uint256', internalType: 'uint256' },
1144
+ ],
1145
+ outputs: [
1146
+ {
1147
+ name: '',
1148
+ type: 'tuple',
1149
+ internalType: 'struct DataTypes.RepayWithCollateralPoolParams',
1150
+ components: [
1151
+ { name: 'fAmount', type: 'uint256', internalType: 'uint256' },
1152
+ ],
1153
+ },
1154
+ ],
1155
+ stateMutability: 'nonpayable',
1156
+ },
1157
+ {
1158
+ type: 'function',
1159
+ name: 'updatePoolWithWithdraw',
1160
+ inputs: [
1161
+ { name: 'underlyingAmount', type: 'uint256', internalType: 'uint256' },
1162
+ ],
1163
+ outputs: [],
1164
+ stateMutability: 'nonpayable',
1165
+ },
1166
+ {
1167
+ type: 'function',
1168
+ name: 'updatePriceFeedManager',
1169
+ inputs: [
1170
+ {
1171
+ name: 'newPriceFeedManager',
1172
+ type: 'address',
1173
+ internalType: 'contract IPriceFeedManager',
1174
+ },
1175
+ ],
1176
+ outputs: [],
1177
+ stateMutability: 'nonpayable',
1178
+ },
1179
+ {
1180
+ type: 'function',
1181
+ name: 'updateStableBorrowData',
1182
+ inputs: [
1183
+ { name: 'sr0', type: 'uint32', internalType: 'uint32' },
1184
+ { name: 'sr1', type: 'uint32', internalType: 'uint32' },
1185
+ { name: 'sr2', type: 'uint32', internalType: 'uint32' },
1186
+ { name: 'sr3', type: 'uint32', internalType: 'uint32' },
1187
+ {
1188
+ name: 'optimalStableToTotalDebtRatio',
1189
+ type: 'uint16',
1190
+ internalType: 'uint16',
1191
+ },
1192
+ {
1193
+ name: 'increaseBorrowBalanceUtilisationRatio',
1194
+ type: 'uint16',
1195
+ internalType: 'uint16',
1196
+ },
1197
+ {
1198
+ name: 'increaseBorrowBalanceDepositInterestRate',
1199
+ type: 'uint16',
1200
+ internalType: 'uint16',
1201
+ },
1202
+ {
1203
+ name: 'decreaseBorrowBalanceDelta',
1204
+ type: 'uint16',
1205
+ internalType: 'uint16',
1206
+ },
1207
+ { name: 'deviation', type: 'uint16', internalType: 'uint16' },
1208
+ ],
1209
+ outputs: [],
1210
+ stateMutability: 'nonpayable',
1211
+ },
1212
+ {
1213
+ type: 'function',
1214
+ name: 'updateVariableBorrowData',
1215
+ inputs: [
1216
+ { name: 'vr0', type: 'uint32', internalType: 'uint32' },
1217
+ { name: 'vr1', type: 'uint32', internalType: 'uint32' },
1218
+ { name: 'vr2', type: 'uint32', internalType: 'uint32' },
1219
+ ],
1220
+ outputs: [],
1221
+ stateMutability: 'nonpayable',
1222
+ },
1223
+ {
1224
+ type: 'function',
1225
+ name: 'verifyReceiveToken',
1226
+ inputs: [
1227
+ { name: 'chainId', type: 'uint16', internalType: 'uint16' },
1228
+ { name: 'source', type: 'bytes32', internalType: 'bytes32' },
1229
+ ],
1230
+ outputs: [],
1231
+ stateMutability: 'view',
1232
+ },
1233
+ {
1234
+ type: 'event',
1235
+ name: 'Approval',
1236
+ inputs: [
1237
+ {
1238
+ name: 'owner',
1239
+ type: 'address',
1240
+ indexed: true,
1241
+ internalType: 'address',
1242
+ },
1243
+ {
1244
+ name: 'spender',
1245
+ type: 'address',
1246
+ indexed: true,
1247
+ internalType: 'address',
1248
+ },
1249
+ {
1250
+ name: 'value',
1251
+ type: 'uint256',
1252
+ indexed: false,
1253
+ internalType: 'uint256',
1254
+ },
1255
+ ],
1256
+ anonymous: false,
1257
+ },
1258
+ {
1259
+ type: 'event',
1260
+ name: 'DefaultAdminDelayChangeCanceled',
1261
+ inputs: [],
1262
+ anonymous: false,
1263
+ },
1264
+ {
1265
+ type: 'event',
1266
+ name: 'DefaultAdminDelayChangeScheduled',
1267
+ inputs: [
1268
+ {
1269
+ name: 'newDelay',
1270
+ type: 'uint48',
1271
+ indexed: false,
1272
+ internalType: 'uint48',
1273
+ },
1274
+ {
1275
+ name: 'effectSchedule',
1276
+ type: 'uint48',
1277
+ indexed: false,
1278
+ internalType: 'uint48',
1279
+ },
1280
+ ],
1281
+ anonymous: false,
1282
+ },
1283
+ {
1284
+ type: 'event',
1285
+ name: 'DefaultAdminTransferCanceled',
1286
+ inputs: [],
1287
+ anonymous: false,
1288
+ },
1289
+ {
1290
+ type: 'event',
1291
+ name: 'DefaultAdminTransferScheduled',
1292
+ inputs: [
1293
+ {
1294
+ name: 'newAdmin',
1295
+ type: 'address',
1296
+ indexed: true,
1297
+ internalType: 'address',
1298
+ },
1299
+ {
1300
+ name: 'acceptSchedule',
1301
+ type: 'uint48',
1302
+ indexed: false,
1303
+ internalType: 'uint48',
1304
+ },
1305
+ ],
1306
+ anonymous: false,
1307
+ },
1308
+ {
1309
+ type: 'event',
1310
+ name: 'InterestIndexesUpdated',
1311
+ inputs: [
1312
+ {
1313
+ name: 'variableBorrowInterestIndex',
1314
+ type: 'uint256',
1315
+ indexed: false,
1316
+ internalType: 'uint256',
1317
+ },
1318
+ {
1319
+ name: 'depositInterestIndex',
1320
+ type: 'uint256',
1321
+ indexed: false,
1322
+ internalType: 'uint256',
1323
+ },
1324
+ {
1325
+ name: 'lastUpdateTimestamp',
1326
+ type: 'uint256',
1327
+ indexed: false,
1328
+ internalType: 'uint256',
1329
+ },
1330
+ ],
1331
+ anonymous: false,
1332
+ },
1333
+ {
1334
+ type: 'event',
1335
+ name: 'InterestRatesUpdated',
1336
+ inputs: [
1337
+ {
1338
+ name: 'variableBorrowInterestRate',
1339
+ type: 'uint256',
1340
+ indexed: false,
1341
+ internalType: 'uint256',
1342
+ },
1343
+ {
1344
+ name: 'stableBorrowInterestRate',
1345
+ type: 'uint256',
1346
+ indexed: false,
1347
+ internalType: 'uint256',
1348
+ },
1349
+ {
1350
+ name: 'depositInterestRate',
1351
+ type: 'uint256',
1352
+ indexed: false,
1353
+ internalType: 'uint256',
1354
+ },
1355
+ ],
1356
+ anonymous: false,
1357
+ },
1358
+ {
1359
+ type: 'event',
1360
+ name: 'RoleAdminChanged',
1361
+ inputs: [
1362
+ { name: 'role', type: 'bytes32', indexed: true, internalType: 'bytes32' },
1363
+ {
1364
+ name: 'previousAdminRole',
1365
+ type: 'bytes32',
1366
+ indexed: true,
1367
+ internalType: 'bytes32',
1368
+ },
1369
+ {
1370
+ name: 'newAdminRole',
1371
+ type: 'bytes32',
1372
+ indexed: true,
1373
+ internalType: 'bytes32',
1374
+ },
1375
+ ],
1376
+ anonymous: false,
1377
+ },
1378
+ {
1379
+ type: 'event',
1380
+ name: 'RoleGranted',
1381
+ inputs: [
1382
+ { name: 'role', type: 'bytes32', indexed: true, internalType: 'bytes32' },
1383
+ {
1384
+ name: 'account',
1385
+ type: 'address',
1386
+ indexed: true,
1387
+ internalType: 'address',
1388
+ },
1389
+ {
1390
+ name: 'sender',
1391
+ type: 'address',
1392
+ indexed: true,
1393
+ internalType: 'address',
1394
+ },
1395
+ ],
1396
+ anonymous: false,
1397
+ },
1398
+ {
1399
+ type: 'event',
1400
+ name: 'RoleRevoked',
1401
+ inputs: [
1402
+ { name: 'role', type: 'bytes32', indexed: true, internalType: 'bytes32' },
1403
+ {
1404
+ name: 'account',
1405
+ type: 'address',
1406
+ indexed: true,
1407
+ internalType: 'address',
1408
+ },
1409
+ {
1410
+ name: 'sender',
1411
+ type: 'address',
1412
+ indexed: true,
1413
+ internalType: 'address',
1414
+ },
1415
+ ],
1416
+ anonymous: false,
1417
+ },
1418
+ {
1419
+ type: 'event',
1420
+ name: 'Transfer',
1421
+ inputs: [
1422
+ { name: 'from', type: 'address', indexed: true, internalType: 'address' },
1423
+ { name: 'to', type: 'address', indexed: true, internalType: 'address' },
1424
+ {
1425
+ name: 'value',
1426
+ type: 'uint256',
1427
+ indexed: false,
1428
+ internalType: 'uint256',
1429
+ },
1430
+ ],
1431
+ anonymous: false,
1432
+ },
1433
+ { type: 'error', name: 'AccessControlBadConfirmation', inputs: [] },
1434
+ {
1435
+ type: 'error',
1436
+ name: 'AccessControlEnforcedDefaultAdminDelay',
1437
+ inputs: [{ name: 'schedule', type: 'uint48', internalType: 'uint48' }],
1438
+ },
1439
+ { type: 'error', name: 'AccessControlEnforcedDefaultAdminRules', inputs: [] },
1440
+ {
1441
+ type: 'error',
1442
+ name: 'AccessControlInvalidDefaultAdmin',
1443
+ inputs: [
1444
+ { name: 'defaultAdmin', type: 'address', internalType: 'address' },
1445
+ ],
1446
+ },
1447
+ {
1448
+ type: 'error',
1449
+ name: 'AccessControlUnauthorizedAccount',
1450
+ inputs: [
1451
+ { name: 'account', type: 'address', internalType: 'address' },
1452
+ { name: 'neededRole', type: 'bytes32', internalType: 'bytes32' },
1453
+ ],
1454
+ },
1455
+ {
1456
+ type: 'error',
1457
+ name: 'ERC20InsufficientAllowance',
1458
+ inputs: [
1459
+ { name: 'spender', type: 'address', internalType: 'address' },
1460
+ { name: 'allowance', type: 'uint256', internalType: 'uint256' },
1461
+ { name: 'needed', type: 'uint256', internalType: 'uint256' },
1462
+ ],
1463
+ },
1464
+ {
1465
+ type: 'error',
1466
+ name: 'ERC20InsufficientBalance',
1467
+ inputs: [
1468
+ { name: 'sender', type: 'address', internalType: 'address' },
1469
+ { name: 'balance', type: 'uint256', internalType: 'uint256' },
1470
+ { name: 'needed', type: 'uint256', internalType: 'uint256' },
1471
+ ],
1472
+ },
1473
+ {
1474
+ type: 'error',
1475
+ name: 'ERC20InvalidApprover',
1476
+ inputs: [{ name: 'approver', type: 'address', internalType: 'address' }],
1477
+ },
1478
+ {
1479
+ type: 'error',
1480
+ name: 'ERC20InvalidReceiver',
1481
+ inputs: [{ name: 'receiver', type: 'address', internalType: 'address' }],
1482
+ },
1483
+ {
1484
+ type: 'error',
1485
+ name: 'ERC20InvalidSender',
1486
+ inputs: [{ name: 'sender', type: 'address', internalType: 'address' }],
1487
+ },
1488
+ {
1489
+ type: 'error',
1490
+ name: 'ERC20InvalidSpender',
1491
+ inputs: [{ name: 'spender', type: 'address', internalType: 'address' }],
1492
+ },
1493
+ {
1494
+ type: 'error',
1495
+ name: 'ERC3156ExceededMaxLoan',
1496
+ inputs: [{ name: 'maxLoan', type: 'uint256', internalType: 'uint256' }],
1497
+ },
1498
+ {
1499
+ type: 'error',
1500
+ name: 'ERC3156InvalidReceiver',
1501
+ inputs: [{ name: 'receiver', type: 'address', internalType: 'address' }],
1502
+ },
1503
+ {
1504
+ type: 'error',
1505
+ name: 'ERC3156UnsupportedToken',
1506
+ inputs: [{ name: 'token', type: 'address', internalType: 'address' }],
1507
+ },
1508
+ {
1509
+ type: 'error',
1510
+ name: 'ExistingChainSpoke',
1511
+ inputs: [{ name: 'chainId', type: 'uint16', internalType: 'uint16' }],
1512
+ },
1513
+ { type: 'error', name: 'FlashLoanFeeTooHigh', inputs: [] },
1514
+ {
1515
+ type: 'error',
1516
+ name: 'IncreaseBorrowBalanceDepositInterestRateTooHigh',
1517
+ inputs: [],
1518
+ },
1519
+ {
1520
+ type: 'error',
1521
+ name: 'IncreaseBorrowBalanceUtilisationRatioTooHigh',
1522
+ inputs: [],
1523
+ },
1524
+ { type: 'error', name: 'MathOverflowedMulDiv', inputs: [] },
1525
+ { type: 'error', name: 'MaxStableInterestRateTooHigh', inputs: [] },
1526
+ { type: 'error', name: 'MaxVariableInterestRateTooHigh', inputs: [] },
1527
+ {
1528
+ type: 'error',
1529
+ name: 'NoChainSpoke',
1530
+ inputs: [{ name: 'chainId', type: 'uint16', internalType: 'uint16' }],
1531
+ },
1532
+ { type: 'error', name: 'OptimalStableToTotalDebtRatioTooHigh', inputs: [] },
1533
+ { type: 'error', name: 'OptimalUtilisationRatioTooHigh', inputs: [] },
1534
+ { type: 'error', name: 'OptimalUtilisationRatioTooLow', inputs: [] },
1535
+ { type: 'error', name: 'RatioExceedsOne', inputs: [] },
1536
+ { type: 'error', name: 'ReentrancyGuardReentrantCall', inputs: [] },
1537
+ { type: 'error', name: 'RetentionRateTooHigh', inputs: [] },
1538
+ {
1539
+ type: 'error',
1540
+ name: 'SafeCastOverflowedUintDowncast',
1541
+ inputs: [
1542
+ { name: 'bits', type: 'uint8', internalType: 'uint8' },
1543
+ { name: 'value', type: 'uint256', internalType: 'uint256' },
1544
+ ],
1545
+ },
1546
+ { type: 'error', name: 'StableBorrowPercentageTooHigh', inputs: [] },
1547
+ { type: 'error', name: 'StableRateJump', inputs: [] },
1548
+ {
1549
+ type: 'error',
1550
+ name: 'UnmatchedChainSpoke',
1551
+ inputs: [
1552
+ { name: 'chainId', type: 'uint16', internalType: 'uint16' },
1553
+ { name: 'expected', type: 'bytes32', internalType: 'bytes32' },
1554
+ { name: 'actual', type: 'bytes32', internalType: 'bytes32' },
1555
+ ],
1556
+ },
1557
+ ];
1558
+ //# sourceMappingURL=hub-pool-abi.js.map