@across-protocol/sdk 4.1.63-beta.0 → 4.1.63

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 (366) hide show
  1. package/dist/cjs/arch/evm/SpokeUtils.d.ts +1 -1
  2. package/dist/cjs/arch/evm/SpokeUtils.js +5 -6
  3. package/dist/cjs/arch/evm/SpokeUtils.js.map +1 -1
  4. package/dist/cjs/arch/svm/index.d.ts +1 -5
  5. package/dist/cjs/arch/svm/index.js +2 -6
  6. package/dist/cjs/arch/svm/index.js.map +1 -1
  7. package/dist/cjs/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.d.ts +1 -1
  8. package/dist/cjs/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.js +7 -7
  9. package/dist/cjs/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.js.map +1 -1
  10. package/dist/cjs/clients/BaseAbstractClient.d.ts +5 -6
  11. package/dist/cjs/clients/BaseAbstractClient.js +19 -30
  12. package/dist/cjs/clients/BaseAbstractClient.js.map +1 -1
  13. package/dist/cjs/clients/BundleDataClient/BundleDataClient.js +11 -15
  14. package/dist/cjs/clients/BundleDataClient/BundleDataClient.js.map +1 -1
  15. package/dist/cjs/clients/BundleDataClient/utils/PoolRebalanceUtils.js +1 -1
  16. package/dist/cjs/clients/BundleDataClient/utils/PoolRebalanceUtils.js.map +1 -1
  17. package/dist/cjs/clients/BundleDataClient/utils/SuperstructUtils.d.ts +90 -90
  18. package/dist/cjs/clients/HubPoolClient.d.ts +1 -1
  19. package/dist/cjs/clients/HubPoolClient.js +16 -16
  20. package/dist/cjs/clients/HubPoolClient.js.map +1 -1
  21. package/dist/cjs/clients/SpokePoolClient/EVMSpokePoolClient.d.ts +3 -3
  22. package/dist/cjs/clients/SpokePoolClient/EVMSpokePoolClient.js +20 -23
  23. package/dist/cjs/clients/SpokePoolClient/EVMSpokePoolClient.js.map +1 -1
  24. package/dist/cjs/clients/SpokePoolClient/SpokePoolClient.d.ts +5 -5
  25. package/dist/cjs/clients/SpokePoolClient/SpokePoolClient.js +54 -50
  26. package/dist/cjs/clients/SpokePoolClient/SpokePoolClient.js.map +1 -1
  27. package/dist/cjs/clients/SpokePoolClient/index.d.ts +0 -3
  28. package/dist/cjs/clients/SpokePoolClient/index.js +1 -8
  29. package/dist/cjs/clients/SpokePoolClient/index.js.map +1 -1
  30. package/dist/cjs/clients/index.d.ts +1 -1
  31. package/dist/cjs/clients/index.js +1 -2
  32. package/dist/cjs/clients/index.js.map +1 -1
  33. package/dist/cjs/clients/mocks/MockConfigStoreClient.d.ts +1 -1
  34. package/dist/cjs/clients/mocks/MockConfigStoreClient.js +2 -2
  35. package/dist/cjs/clients/mocks/MockConfigStoreClient.js.map +1 -1
  36. package/dist/cjs/clients/mocks/MockHubPoolClient.js +2 -2
  37. package/dist/cjs/clients/mocks/MockHubPoolClient.js.map +1 -1
  38. package/dist/cjs/clients/mocks/MockSpokePoolClient.js +4 -7
  39. package/dist/cjs/clients/mocks/MockSpokePoolClient.js.map +1 -1
  40. package/dist/cjs/gasPriceOracle/adapters/arbitrum.d.ts +2 -2
  41. package/dist/cjs/gasPriceOracle/adapters/arbitrum.js.map +1 -1
  42. package/dist/cjs/gasPriceOracle/adapters/ethereum.d.ts +4 -4
  43. package/dist/cjs/gasPriceOracle/adapters/ethereum.js.map +1 -1
  44. package/dist/cjs/gasPriceOracle/adapters/linea-viem.js +2 -3
  45. package/dist/cjs/gasPriceOracle/adapters/linea-viem.js.map +1 -1
  46. package/dist/cjs/gasPriceOracle/adapters/polygon.d.ts +3 -3
  47. package/dist/cjs/gasPriceOracle/index.d.ts +1 -1
  48. package/dist/cjs/gasPriceOracle/oracle.d.ts +3 -4
  49. package/dist/cjs/gasPriceOracle/oracle.js +9 -16
  50. package/dist/cjs/gasPriceOracle/oracle.js.map +1 -1
  51. package/dist/cjs/gasPriceOracle/types.d.ts +1 -6
  52. package/dist/cjs/index.d.ts +1 -0
  53. package/dist/cjs/index.js +2 -1
  54. package/dist/cjs/index.js.map +1 -1
  55. package/dist/cjs/interfaces/SpokePool.d.ts +0 -7
  56. package/dist/cjs/relayFeeCalculator/chain-queries/baseQuery.d.ts +1 -1
  57. package/dist/cjs/relayFeeCalculator/chain-queries/baseQuery.js +4 -5
  58. package/dist/cjs/relayFeeCalculator/chain-queries/baseQuery.js.map +1 -1
  59. package/dist/cjs/relayFeeCalculator/chain-queries/factory.d.ts +11 -4
  60. package/dist/cjs/relayFeeCalculator/chain-queries/factory.js +1 -7
  61. package/dist/cjs/relayFeeCalculator/chain-queries/factory.js.map +1 -1
  62. package/dist/cjs/relayFeeCalculator/chain-queries/index.d.ts +0 -1
  63. package/dist/cjs/relayFeeCalculator/chain-queries/index.js +0 -1
  64. package/dist/cjs/relayFeeCalculator/chain-queries/index.js.map +1 -1
  65. package/dist/cjs/relayFeeCalculator/relayFeeCalculator.d.ts +9 -0
  66. package/dist/cjs/svm/eventsClient.d.ts +15 -0
  67. package/dist/cjs/{arch/svm → svm}/eventsClient.js +28 -60
  68. package/dist/cjs/svm/eventsClient.js.map +1 -0
  69. package/dist/cjs/svm/index.d.ts +3 -0
  70. package/dist/cjs/svm/index.js +8 -0
  71. package/dist/cjs/svm/index.js.map +1 -0
  72. package/dist/{esm/arch → cjs}/svm/types.d.ts +4 -9
  73. package/dist/cjs/svm/types.js.map +1 -0
  74. package/dist/cjs/svm/utils/events.d.ts +8 -0
  75. package/dist/cjs/svm/utils/events.js +47 -0
  76. package/dist/cjs/svm/utils/events.js.map +1 -0
  77. package/dist/cjs/svm/utils/helpers.d.ts +2 -0
  78. package/dist/cjs/svm/utils/helpers.js +19 -0
  79. package/dist/cjs/svm/utils/helpers.js.map +1 -0
  80. package/dist/cjs/svm/utils/index.d.ts +1 -0
  81. package/dist/cjs/svm/utils/index.js +5 -0
  82. package/dist/cjs/svm/utils/index.js.map +1 -0
  83. package/dist/cjs/utils/AddressUtils.d.ts +3 -9
  84. package/dist/cjs/utils/AddressUtils.js +6 -36
  85. package/dist/cjs/utils/AddressUtils.js.map +1 -1
  86. package/dist/cjs/utils/ArrayUtils.d.ts +0 -1
  87. package/dist/cjs/utils/ArrayUtils.js +1 -6
  88. package/dist/cjs/utils/ArrayUtils.js.map +1 -1
  89. package/dist/cjs/utils/EventUtils.d.ts +4 -4
  90. package/dist/cjs/utils/EventUtils.js +4 -7
  91. package/dist/cjs/utils/EventUtils.js.map +1 -1
  92. package/dist/cjs/utils/JSONUtils.js +0 -3
  93. package/dist/cjs/utils/JSONUtils.js.map +1 -1
  94. package/dist/cjs/utils/SpokeUtils.js +0 -5
  95. package/dist/cjs/utils/SpokeUtils.js.map +1 -1
  96. package/dist/cjs/utils/TokenUtils.d.ts +18 -0
  97. package/dist/esm/arch/evm/SpokeUtils.d.ts +1 -1
  98. package/dist/esm/arch/evm/SpokeUtils.js +5 -6
  99. package/dist/esm/arch/evm/SpokeUtils.js.map +1 -1
  100. package/dist/esm/arch/svm/index.d.ts +1 -5
  101. package/dist/esm/arch/svm/index.js +1 -5
  102. package/dist/esm/arch/svm/index.js.map +1 -1
  103. package/dist/esm/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.d.ts +1 -1
  104. package/dist/esm/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.js +7 -7
  105. package/dist/esm/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.js.map +1 -1
  106. package/dist/esm/clients/BaseAbstractClient.d.ts +5 -6
  107. package/dist/esm/clients/BaseAbstractClient.js +19 -30
  108. package/dist/esm/clients/BaseAbstractClient.js.map +1 -1
  109. package/dist/esm/clients/BundleDataClient/BundleDataClient.js +14 -17
  110. package/dist/esm/clients/BundleDataClient/BundleDataClient.js.map +1 -1
  111. package/dist/esm/clients/BundleDataClient/utils/PoolRebalanceUtils.js +1 -1
  112. package/dist/esm/clients/BundleDataClient/utils/PoolRebalanceUtils.js.map +1 -1
  113. package/dist/esm/clients/BundleDataClient/utils/SuperstructUtils.d.ts +90 -90
  114. package/dist/esm/clients/HubPoolClient.d.ts +1 -1
  115. package/dist/esm/clients/HubPoolClient.js +16 -16
  116. package/dist/esm/clients/HubPoolClient.js.map +1 -1
  117. package/dist/esm/clients/SpokePoolClient/EVMSpokePoolClient.d.ts +3 -3
  118. package/dist/esm/clients/SpokePoolClient/EVMSpokePoolClient.js +20 -23
  119. package/dist/esm/clients/SpokePoolClient/EVMSpokePoolClient.js.map +1 -1
  120. package/dist/esm/clients/SpokePoolClient/SpokePoolClient.d.ts +7 -7
  121. package/dist/esm/clients/SpokePoolClient/SpokePoolClient.js +55 -51
  122. package/dist/esm/clients/SpokePoolClient/SpokePoolClient.js.map +1 -1
  123. package/dist/esm/clients/SpokePoolClient/index.d.ts +0 -8
  124. package/dist/esm/clients/SpokePoolClient/index.js +0 -10
  125. package/dist/esm/clients/SpokePoolClient/index.js.map +1 -1
  126. package/dist/esm/clients/index.d.ts +1 -1
  127. package/dist/esm/clients/index.js +1 -1
  128. package/dist/esm/clients/index.js.map +1 -1
  129. package/dist/esm/clients/mocks/MockConfigStoreClient.d.ts +1 -1
  130. package/dist/esm/clients/mocks/MockConfigStoreClient.js +2 -2
  131. package/dist/esm/clients/mocks/MockConfigStoreClient.js.map +1 -1
  132. package/dist/esm/clients/mocks/MockHubPoolClient.js +2 -2
  133. package/dist/esm/clients/mocks/MockHubPoolClient.js.map +1 -1
  134. package/dist/esm/clients/mocks/MockSpokePoolClient.js +5 -8
  135. package/dist/esm/clients/mocks/MockSpokePoolClient.js.map +1 -1
  136. package/dist/esm/gasPriceOracle/adapters/arbitrum.d.ts +2 -2
  137. package/dist/esm/gasPriceOracle/adapters/arbitrum.js.map +1 -1
  138. package/dist/esm/gasPriceOracle/adapters/ethereum.d.ts +4 -4
  139. package/dist/esm/gasPriceOracle/adapters/ethereum.js.map +1 -1
  140. package/dist/esm/gasPriceOracle/adapters/linea-viem.js +2 -3
  141. package/dist/esm/gasPriceOracle/adapters/linea-viem.js.map +1 -1
  142. package/dist/esm/gasPriceOracle/adapters/polygon.d.ts +4 -4
  143. package/dist/esm/gasPriceOracle/adapters/polygon.js +1 -1
  144. package/dist/esm/gasPriceOracle/index.d.ts +1 -1
  145. package/dist/esm/gasPriceOracle/oracle.d.ts +3 -4
  146. package/dist/esm/gasPriceOracle/oracle.js +9 -18
  147. package/dist/esm/gasPriceOracle/oracle.js.map +1 -1
  148. package/dist/esm/gasPriceOracle/types.d.ts +1 -6
  149. package/dist/esm/index.d.ts +1 -0
  150. package/dist/esm/index.js +2 -0
  151. package/dist/esm/index.js.map +1 -1
  152. package/dist/esm/interfaces/SpokePool.d.ts +0 -7
  153. package/dist/esm/relayFeeCalculator/chain-queries/baseQuery.d.ts +1 -1
  154. package/dist/esm/relayFeeCalculator/chain-queries/baseQuery.js +3 -4
  155. package/dist/esm/relayFeeCalculator/chain-queries/baseQuery.js.map +1 -1
  156. package/dist/esm/relayFeeCalculator/chain-queries/factory.d.ts +11 -4
  157. package/dist/esm/relayFeeCalculator/chain-queries/factory.js +2 -8
  158. package/dist/esm/relayFeeCalculator/chain-queries/factory.js.map +1 -1
  159. package/dist/esm/relayFeeCalculator/chain-queries/index.d.ts +0 -1
  160. package/dist/esm/relayFeeCalculator/chain-queries/index.js +0 -1
  161. package/dist/esm/relayFeeCalculator/chain-queries/index.js.map +1 -1
  162. package/dist/esm/relayFeeCalculator/relayFeeCalculator.d.ts +9 -0
  163. package/dist/esm/svm/eventsClient.d.ts +51 -0
  164. package/dist/esm/{arch/svm → svm}/eventsClient.js +27 -69
  165. package/dist/esm/svm/eventsClient.js.map +1 -0
  166. package/dist/esm/svm/index.d.ts +3 -0
  167. package/dist/esm/svm/index.js +5 -0
  168. package/dist/esm/svm/index.js.map +1 -0
  169. package/dist/{cjs/arch → esm}/svm/types.d.ts +4 -9
  170. package/dist/esm/svm/types.js.map +1 -0
  171. package/dist/esm/svm/utils/events.d.ts +17 -0
  172. package/dist/esm/svm/utils/events.js +55 -0
  173. package/dist/esm/svm/utils/events.js.map +1 -0
  174. package/dist/esm/svm/utils/helpers.d.ts +5 -0
  175. package/dist/esm/svm/utils/helpers.js +18 -0
  176. package/dist/esm/svm/utils/helpers.js.map +1 -0
  177. package/dist/esm/svm/utils/index.d.ts +1 -0
  178. package/dist/esm/svm/utils/index.js +2 -0
  179. package/dist/esm/svm/utils/index.js.map +1 -0
  180. package/dist/esm/utils/AddressUtils.d.ts +3 -9
  181. package/dist/esm/utils/AddressUtils.js +6 -41
  182. package/dist/esm/utils/AddressUtils.js.map +1 -1
  183. package/dist/esm/utils/ArrayUtils.d.ts +0 -6
  184. package/dist/esm/utils/ArrayUtils.js +0 -9
  185. package/dist/esm/utils/ArrayUtils.js.map +1 -1
  186. package/dist/esm/utils/EventUtils.d.ts +4 -4
  187. package/dist/esm/utils/EventUtils.js +4 -7
  188. package/dist/esm/utils/EventUtils.js.map +1 -1
  189. package/dist/esm/utils/JSONUtils.js +0 -3
  190. package/dist/esm/utils/JSONUtils.js.map +1 -1
  191. package/dist/esm/utils/SpokeUtils.js +0 -5
  192. package/dist/esm/utils/SpokeUtils.js.map +1 -1
  193. package/dist/esm/utils/TokenUtils.d.ts +18 -0
  194. package/dist/types/arch/evm/SpokeUtils.d.ts +1 -1
  195. package/dist/types/arch/evm/SpokeUtils.d.ts.map +1 -1
  196. package/dist/types/arch/svm/index.d.ts +1 -5
  197. package/dist/types/arch/svm/index.d.ts.map +1 -1
  198. package/dist/types/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.d.ts +1 -1
  199. package/dist/types/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.d.ts.map +1 -1
  200. package/dist/types/clients/BaseAbstractClient.d.ts +5 -6
  201. package/dist/types/clients/BaseAbstractClient.d.ts.map +1 -1
  202. package/dist/types/clients/BundleDataClient/BundleDataClient.d.ts.map +1 -1
  203. package/dist/types/clients/BundleDataClient/utils/SuperstructUtils.d.ts +90 -90
  204. package/dist/types/clients/HubPoolClient.d.ts +1 -1
  205. package/dist/types/clients/HubPoolClient.d.ts.map +1 -1
  206. package/dist/types/clients/SpokePoolClient/EVMSpokePoolClient.d.ts +3 -3
  207. package/dist/types/clients/SpokePoolClient/EVMSpokePoolClient.d.ts.map +1 -1
  208. package/dist/types/clients/SpokePoolClient/SpokePoolClient.d.ts +7 -7
  209. package/dist/types/clients/SpokePoolClient/SpokePoolClient.d.ts.map +1 -1
  210. package/dist/types/clients/SpokePoolClient/index.d.ts +0 -8
  211. package/dist/types/clients/SpokePoolClient/index.d.ts.map +1 -1
  212. package/dist/types/clients/index.d.ts +1 -1
  213. package/dist/types/clients/index.d.ts.map +1 -1
  214. package/dist/types/clients/mocks/MockConfigStoreClient.d.ts +1 -1
  215. package/dist/types/clients/mocks/MockConfigStoreClient.d.ts.map +1 -1
  216. package/dist/types/clients/mocks/MockSpokePoolClient.d.ts.map +1 -1
  217. package/dist/types/gasPriceOracle/adapters/arbitrum.d.ts +2 -2
  218. package/dist/types/gasPriceOracle/adapters/arbitrum.d.ts.map +1 -1
  219. package/dist/types/gasPriceOracle/adapters/ethereum.d.ts +4 -4
  220. package/dist/types/gasPriceOracle/adapters/ethereum.d.ts.map +1 -1
  221. package/dist/types/gasPriceOracle/adapters/linea-viem.d.ts.map +1 -1
  222. package/dist/types/gasPriceOracle/adapters/polygon.d.ts +4 -4
  223. package/dist/types/gasPriceOracle/adapters/polygon.d.ts.map +1 -1
  224. package/dist/types/gasPriceOracle/index.d.ts +1 -1
  225. package/dist/types/gasPriceOracle/index.d.ts.map +1 -1
  226. package/dist/types/gasPriceOracle/oracle.d.ts +3 -4
  227. package/dist/types/gasPriceOracle/oracle.d.ts.map +1 -1
  228. package/dist/types/gasPriceOracle/types.d.ts +1 -6
  229. package/dist/types/gasPriceOracle/types.d.ts.map +1 -1
  230. package/dist/types/index.d.ts +1 -0
  231. package/dist/types/index.d.ts.map +1 -1
  232. package/dist/types/interfaces/SpokePool.d.ts +0 -7
  233. package/dist/types/interfaces/SpokePool.d.ts.map +1 -1
  234. package/dist/types/relayFeeCalculator/chain-queries/baseQuery.d.ts +1 -1
  235. package/dist/types/relayFeeCalculator/chain-queries/baseQuery.d.ts.map +1 -1
  236. package/dist/types/relayFeeCalculator/chain-queries/factory.d.ts +11 -4
  237. package/dist/types/relayFeeCalculator/chain-queries/factory.d.ts.map +1 -1
  238. package/dist/types/relayFeeCalculator/chain-queries/index.d.ts +0 -1
  239. package/dist/types/relayFeeCalculator/chain-queries/index.d.ts.map +1 -1
  240. package/dist/types/relayFeeCalculator/relayFeeCalculator.d.ts +9 -0
  241. package/dist/types/relayFeeCalculator/relayFeeCalculator.d.ts.map +1 -1
  242. package/dist/types/svm/eventsClient.d.ts +52 -0
  243. package/dist/types/svm/eventsClient.d.ts.map +1 -0
  244. package/dist/types/svm/index.d.ts +4 -0
  245. package/dist/types/svm/index.d.ts.map +1 -0
  246. package/dist/types/{arch/svm → svm}/types.d.ts +4 -9
  247. package/dist/types/svm/types.d.ts.map +1 -0
  248. package/dist/types/svm/utils/events.d.ts +18 -0
  249. package/dist/types/svm/utils/events.d.ts.map +1 -0
  250. package/dist/types/svm/utils/helpers.d.ts +6 -0
  251. package/dist/types/svm/utils/helpers.d.ts.map +1 -0
  252. package/dist/types/svm/utils/index.d.ts +2 -0
  253. package/dist/types/svm/utils/index.d.ts.map +1 -0
  254. package/dist/types/utils/AddressUtils.d.ts +3 -9
  255. package/dist/types/utils/AddressUtils.d.ts.map +1 -1
  256. package/dist/types/utils/ArrayUtils.d.ts +0 -6
  257. package/dist/types/utils/ArrayUtils.d.ts.map +1 -1
  258. package/dist/types/utils/EventUtils.d.ts +4 -4
  259. package/dist/types/utils/EventUtils.d.ts.map +1 -1
  260. package/dist/types/utils/JSONUtils.d.ts.map +1 -1
  261. package/dist/types/utils/SpokeUtils.d.ts.map +1 -1
  262. package/dist/types/utils/TokenUtils.d.ts +18 -0
  263. package/dist/types/utils/TokenUtils.d.ts.map +1 -1
  264. package/package.json +2 -5
  265. package/src/arch/evm/SpokeUtils.ts +5 -5
  266. package/src/arch/svm/index.ts +1 -5
  267. package/src/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.ts +7 -7
  268. package/src/clients/BaseAbstractClient.ts +13 -20
  269. package/src/clients/BundleDataClient/BundleDataClient.ts +19 -28
  270. package/src/clients/BundleDataClient/utils/PoolRebalanceUtils.ts +1 -1
  271. package/src/clients/HubPoolClient.ts +16 -16
  272. package/src/clients/SpokePoolClient/EVMSpokePoolClient.ts +21 -23
  273. package/src/clients/SpokePoolClient/SpokePoolClient.ts +56 -44
  274. package/src/clients/SpokePoolClient/index.ts +0 -11
  275. package/src/clients/index.ts +1 -1
  276. package/src/clients/mocks/MockConfigStoreClient.ts +2 -2
  277. package/src/clients/mocks/MockHubPoolClient.ts +2 -2
  278. package/src/clients/mocks/MockSpokePoolClient.ts +4 -9
  279. package/src/gasPriceOracle/adapters/arbitrum.ts +2 -5
  280. package/src/gasPriceOracle/adapters/ethereum.ts +4 -7
  281. package/src/gasPriceOracle/adapters/linea-viem.ts +1 -3
  282. package/src/gasPriceOracle/adapters/polygon.ts +6 -6
  283. package/src/gasPriceOracle/index.ts +1 -1
  284. package/src/gasPriceOracle/oracle.ts +4 -20
  285. package/src/gasPriceOracle/types.ts +1 -7
  286. package/src/index.ts +1 -0
  287. package/src/interfaces/SpokePool.ts +0 -7
  288. package/src/relayFeeCalculator/chain-queries/baseQuery.ts +3 -5
  289. package/src/relayFeeCalculator/chain-queries/factory.ts +5 -21
  290. package/src/relayFeeCalculator/chain-queries/index.ts +0 -1
  291. package/src/{arch/svm → svm}/eventsClient.ts +45 -67
  292. package/src/svm/index.ts +3 -0
  293. package/src/{arch/svm → svm}/types.ts +4 -21
  294. package/src/svm/utils/events.ts +58 -0
  295. package/src/svm/utils/helpers.ts +9 -0
  296. package/src/svm/utils/index.ts +1 -0
  297. package/src/utils/AddressUtils.ts +6 -49
  298. package/src/utils/ArrayUtils.ts +0 -12
  299. package/src/utils/EventUtils.ts +11 -11
  300. package/src/utils/JSONUtils.ts +0 -2
  301. package/src/utils/SpokeUtils.ts +1 -5
  302. package/dist/cjs/arch/svm/SpokeUtils.d.ts +0 -20
  303. package/dist/cjs/arch/svm/SpokeUtils.js +0 -428
  304. package/dist/cjs/arch/svm/SpokeUtils.js.map +0 -1
  305. package/dist/cjs/arch/svm/constants.d.ts +0 -1
  306. package/dist/cjs/arch/svm/constants.js +0 -5
  307. package/dist/cjs/arch/svm/constants.js.map +0 -1
  308. package/dist/cjs/arch/svm/eventsClient.d.ts +0 -21
  309. package/dist/cjs/arch/svm/eventsClient.js.map +0 -1
  310. package/dist/cjs/arch/svm/types.js.map +0 -1
  311. package/dist/cjs/arch/svm/utils.d.ts +0 -17
  312. package/dist/cjs/arch/svm/utils.js +0 -204
  313. package/dist/cjs/arch/svm/utils.js.map +0 -1
  314. package/dist/cjs/clients/SpokePoolClient/SVMSpokePoolClient.d.ts +0 -23
  315. package/dist/cjs/clients/SpokePoolClient/SVMSpokePoolClient.js +0 -145
  316. package/dist/cjs/clients/SpokePoolClient/SVMSpokePoolClient.js.map +0 -1
  317. package/dist/cjs/gasPriceOracle/adapters/solana.d.ts +0 -4
  318. package/dist/cjs/gasPriceOracle/adapters/solana.js +0 -43
  319. package/dist/cjs/gasPriceOracle/adapters/solana.js.map +0 -1
  320. package/dist/cjs/relayFeeCalculator/chain-queries/svmQuery.d.ts +0 -31
  321. package/dist/cjs/relayFeeCalculator/chain-queries/svmQuery.js +0 -136
  322. package/dist/cjs/relayFeeCalculator/chain-queries/svmQuery.js.map +0 -1
  323. package/dist/esm/arch/svm/SpokeUtils.d.ts +0 -94
  324. package/dist/esm/arch/svm/SpokeUtils.js +0 -513
  325. package/dist/esm/arch/svm/SpokeUtils.js.map +0 -1
  326. package/dist/esm/arch/svm/constants.d.ts +0 -1
  327. package/dist/esm/arch/svm/constants.js +0 -2
  328. package/dist/esm/arch/svm/constants.js.map +0 -1
  329. package/dist/esm/arch/svm/eventsClient.d.ts +0 -67
  330. package/dist/esm/arch/svm/eventsClient.js.map +0 -1
  331. package/dist/esm/arch/svm/types.js.map +0 -1
  332. package/dist/esm/arch/svm/utils.d.ts +0 -59
  333. package/dist/esm/arch/svm/utils.js +0 -248
  334. package/dist/esm/arch/svm/utils.js.map +0 -1
  335. package/dist/esm/clients/SpokePoolClient/SVMSpokePoolClient.d.ts +0 -67
  336. package/dist/esm/clients/SpokePoolClient/SVMSpokePoolClient.js +0 -196
  337. package/dist/esm/clients/SpokePoolClient/SVMSpokePoolClient.js.map +0 -1
  338. package/dist/esm/gasPriceOracle/adapters/solana.d.ts +0 -8
  339. package/dist/esm/gasPriceOracle/adapters/solana.js +0 -43
  340. package/dist/esm/gasPriceOracle/adapters/solana.js.map +0 -1
  341. package/dist/esm/relayFeeCalculator/chain-queries/svmQuery.d.ts +0 -66
  342. package/dist/esm/relayFeeCalculator/chain-queries/svmQuery.js +0 -169
  343. package/dist/esm/relayFeeCalculator/chain-queries/svmQuery.js.map +0 -1
  344. package/dist/types/arch/svm/SpokeUtils.d.ts +0 -95
  345. package/dist/types/arch/svm/SpokeUtils.d.ts.map +0 -1
  346. package/dist/types/arch/svm/constants.d.ts +0 -2
  347. package/dist/types/arch/svm/constants.d.ts.map +0 -1
  348. package/dist/types/arch/svm/eventsClient.d.ts +0 -68
  349. package/dist/types/arch/svm/eventsClient.d.ts.map +0 -1
  350. package/dist/types/arch/svm/types.d.ts.map +0 -1
  351. package/dist/types/arch/svm/utils.d.ts +0 -60
  352. package/dist/types/arch/svm/utils.d.ts.map +0 -1
  353. package/dist/types/clients/SpokePoolClient/SVMSpokePoolClient.d.ts +0 -68
  354. package/dist/types/clients/SpokePoolClient/SVMSpokePoolClient.d.ts.map +0 -1
  355. package/dist/types/gasPriceOracle/adapters/solana.d.ts +0 -9
  356. package/dist/types/gasPriceOracle/adapters/solana.d.ts.map +0 -1
  357. package/dist/types/relayFeeCalculator/chain-queries/svmQuery.d.ts +0 -67
  358. package/dist/types/relayFeeCalculator/chain-queries/svmQuery.d.ts.map +0 -1
  359. package/src/arch/svm/SpokeUtils.ts +0 -526
  360. package/src/arch/svm/constants.ts +0 -1
  361. package/src/arch/svm/utils.ts +0 -222
  362. package/src/clients/SpokePoolClient/SVMSpokePoolClient.ts +0 -244
  363. package/src/gasPriceOracle/adapters/solana.ts +0 -45
  364. package/src/relayFeeCalculator/chain-queries/svmQuery.ts +0 -193
  365. /package/dist/cjs/{arch/svm → svm}/types.js +0 -0
  366. /package/dist/esm/{arch/svm → svm}/types.js +0 -0
@@ -113,6 +113,15 @@ export declare const resolveContractFromSymbol: (symbol: string, chainId: string
113
113
  };
114
114
  coingeckoId: string;
115
115
  };
116
+ ezETH: {
117
+ name: string;
118
+ symbol: string;
119
+ decimals: number;
120
+ addresses: {
121
+ [x: number]: string;
122
+ };
123
+ coingeckoId: string;
124
+ };
116
125
  GHO: {
117
126
  name: string;
118
127
  symbol: string;
@@ -519,6 +528,15 @@ export declare function getTokenInfo(l2TokenAddress: string, chainId: number, to
519
528
  };
520
529
  coingeckoId: string;
521
530
  };
531
+ ezETH: {
532
+ name: string;
533
+ symbol: string;
534
+ decimals: number;
535
+ addresses: {
536
+ [x: number]: string;
537
+ };
538
+ coingeckoId: string;
539
+ };
522
540
  GHO: {
523
541
  name: string;
524
542
  symbol: string;
@@ -1 +1 @@
1
- {"version":3,"file":"TokenUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/TokenUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAY,SAAS,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAM7C,KAAK,gBAAgB,GAAG,SAAS,CAAC,QAAQ,GAAG,MAAM,CAAC;AAEpD,wBAAsB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,CAI1G;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAoB,GAAG,OAAO,CAkB/G;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAOlF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAUjF"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@across-protocol/sdk",
3
3
  "author": "UMA Team",
4
- "version": "4.1.63-beta.0",
4
+ "version": "4.1.63",
5
5
  "license": "AGPL-3.0",
6
6
  "homepage": "https://docs.across.to/reference/sdk",
7
7
  "files": [
@@ -104,17 +104,14 @@
104
104
  },
105
105
  "dependencies": {
106
106
  "@across-protocol/across-token": "^1.0.0",
107
- "@across-protocol/constants": "^3.1.64",
107
+ "@across-protocol/constants": "^3.1.66",
108
108
  "@across-protocol/contracts": "^4.0.9",
109
109
  "@coral-xyz/anchor": "^0.30.1",
110
110
  "@eth-optimism/sdk": "^3.3.1",
111
111
  "@ethersproject/bignumber": "^5.7.0",
112
112
  "@pinata/sdk": "^2.1.0",
113
113
  "@solana/kit": "^2.1.0",
114
- "@solana-program/system": "^0.7.0",
115
- "@solana-program/token-2022": "^0.4.0",
116
114
  "@solana/web3.js": "^1.31.0",
117
- "@solana-program/system": "^0.7.0",
118
115
  "@types/mocha": "^10.0.1",
119
116
  "@uma/sdk": "^0.34.10",
120
117
  "arweave": "^1.14.4",
@@ -160,7 +160,7 @@ export async function findDepositBlock(
160
160
  export async function relayFillStatus(
161
161
  spokePool: Contract,
162
162
  relayData: RelayData,
163
- blockTag: BlockTag = "latest",
163
+ blockTag?: number | "latest",
164
164
  destinationChainId?: number
165
165
  ): Promise<FillStatus> {
166
166
  destinationChainId ??= await spokePool.chainId();
@@ -290,20 +290,20 @@ export async function findFillEvent(
290
290
  if (!blockNumber) return undefined;
291
291
 
292
292
  // We can hardcode this to 0 to instruct paginatedEventQuery to make a single request for the same block number.
293
- const maxLookBack = 0;
294
- const [from, to] = [blockNumber, blockNumber];
293
+ const maxBlockLookBack = 0;
294
+ const [fromBlock, toBlock] = [blockNumber, blockNumber];
295
295
 
296
296
  const query = (
297
297
  await Promise.all([
298
298
  paginatedEventQuery(
299
299
  spokePool,
300
300
  spokePool.filters.FilledRelay(null, null, null, null, null, relayData.originChainId, relayData.depositId),
301
- { from, to, maxLookBack }
301
+ { fromBlock, toBlock, maxBlockLookBack }
302
302
  ),
303
303
  paginatedEventQuery(
304
304
  spokePool,
305
305
  spokePool.filters.FilledV3Relay(null, null, null, null, null, relayData.originChainId, relayData.depositId),
306
- { from, to, maxLookBack }
306
+ { fromBlock, toBlock, maxBlockLookBack }
307
307
  ),
308
308
  ])
309
309
  ).flat();
@@ -1,5 +1 @@
1
- export * from "./eventsClient";
2
- export * from "./SpokeUtils";
3
- export * from "./types";
4
- export * from "./utils";
5
- export * from "./constants";
1
+ export const platform = "svm"; // Placeholder for actual exports.
@@ -98,12 +98,12 @@ export class AcrossConfigStoreClient extends BaseAbstractClient {
98
98
  constructor(
99
99
  readonly logger: winston.Logger,
100
100
  readonly configStore: Contract,
101
- eventSearchConfig: MakeOptional<EventSearchConfig, "to"> = { from: 0, maxLookBack: 0 },
101
+ eventSearchConfig: MakeOptional<EventSearchConfig, "toBlock"> = { fromBlock: 0, maxBlockLookBack: 0 },
102
102
  readonly configStoreVersion: number
103
103
  ) {
104
104
  super(eventSearchConfig);
105
- this.firstHeightToSearch = eventSearchConfig.from;
106
- this.latestHeightSearched = 0;
105
+ this.firstBlockToSearch = eventSearchConfig.fromBlock;
106
+ this.latestBlockSearched = 0;
107
107
  }
108
108
 
109
109
  getRateModelForBlockNumber(
@@ -355,7 +355,7 @@ export class AcrossConfigStoreClient extends BaseAbstractClient {
355
355
  return {
356
356
  success: true,
357
357
  chainId,
358
- searchEndBlock: searchConfig.to,
358
+ searchEndBlock: searchConfig.toBlock,
359
359
  events: {
360
360
  updatedTokenConfigEvents: updatedTokenConfigSortableEvents,
361
361
  updatedGlobalConfigEvents: updatedGlobalConfigSortableEvents,
@@ -550,9 +550,9 @@ export class AcrossConfigStoreClient extends BaseAbstractClient {
550
550
  }
551
551
 
552
552
  this.hasLatestConfigStoreVersion = this.hasValidConfigStoreVersionForTimestamp();
553
- this.latestHeightSearched = result.searchEndBlock;
554
- this.firstHeightToSearch = result.searchEndBlock + 1; // Next iteration should start off from where this one ended.
555
- this.eventSearchConfig.to = undefined; // Caller can re-set on subsequent updates if necessary
553
+ this.latestBlockSearched = result.searchEndBlock;
554
+ this.firstBlockToSearch = result.searchEndBlock + 1; // Next iteration should start off from where this one ended.
555
+ this.eventSearchConfig.toBlock = undefined; // Caller can re-set on subsequent updates if necessary
556
556
  this.chainId = this.chainId ?? chainId; // Update on the first run only.
557
557
  this.isUpdated = true;
558
558
 
@@ -1,7 +1,6 @@
1
1
  import { providers } from "ethers";
2
2
  import { CachingMechanismInterface } from "../interfaces";
3
3
  import { EventSearchConfig, isDefined, MakeOptional } from "../utils";
4
- import { SVMProvider } from "../arch/svm";
5
4
 
6
5
  export enum UpdateFailureReason {
7
6
  NotReady,
@@ -19,15 +18,15 @@ export function isUpdateFailureReason(x: EventSearchConfig | UpdateFailureReason
19
18
  */
20
19
  export abstract class BaseAbstractClient {
21
20
  protected _isUpdated: boolean;
22
- public firstHeightToSearch = 0;
23
- public latestHeightSearched = 0;
21
+ public firstBlockToSearch = 0;
22
+ public latestBlockSearched = 0;
24
23
 
25
24
  /**
26
25
  * Creates a new client.
27
26
  * @param cachingMechanism The caching mechanism to use for this client. If not provided, the client will not rely on an external cache.
28
27
  */
29
28
  constructor(
30
- readonly eventSearchConfig: MakeOptional<EventSearchConfig, "to"> = { from: 0, maxLookBack: 0 },
29
+ readonly eventSearchConfig: MakeOptional<EventSearchConfig, "toBlock"> = { fromBlock: 0, maxBlockLookBack: 0 },
31
30
  protected cachingMechanism?: CachingMechanismInterface
32
31
  ) {
33
32
  this._isUpdated = false;
@@ -59,28 +58,22 @@ export abstract class BaseAbstractClient {
59
58
  * @provider Ethers RPC provider instance.
60
59
  * @returns An EventSearchConfig instance if valid, otherwise an UpdateFailureReason.
61
60
  */
62
- public async updateSearchConfig(
63
- provider: providers.Provider | SVMProvider
64
- ): Promise<EventSearchConfig | UpdateFailureReason> {
65
- const from = this.firstHeightToSearch;
66
- let { to } = this.eventSearchConfig;
67
- if (isDefined(to)) {
68
- if (from > to) {
69
- throw new Error(`Invalid event search config from (${from}) > to (${to})`);
61
+ public async updateSearchConfig(provider: providers.Provider): Promise<EventSearchConfig | UpdateFailureReason> {
62
+ const fromBlock = this.firstBlockToSearch;
63
+ let { toBlock } = this.eventSearchConfig;
64
+ if (isDefined(toBlock)) {
65
+ if (fromBlock > toBlock) {
66
+ throw new Error(`Invalid event search config fromBlock (${fromBlock}) > toBlock (${toBlock})`);
70
67
  }
71
68
  } else {
72
- if (provider instanceof providers.Provider) {
73
- to = await provider.getBlockNumber();
74
- } else {
75
- to = Number(await provider.getSlot({ commitment: "confirmed" }).send());
76
- }
77
- if (to < from) {
69
+ toBlock = await provider.getBlockNumber();
70
+ if (toBlock < fromBlock) {
78
71
  return UpdateFailureReason.AlreadyUpdated;
79
72
  }
80
73
  }
81
74
 
82
- const { maxLookBack } = this.eventSearchConfig;
83
- return { from, to, maxLookBack };
75
+ const { maxBlockLookBack } = this.eventSearchConfig;
76
+ return { fromBlock, toBlock, maxBlockLookBack };
84
77
  }
85
78
 
86
79
  /**
@@ -20,8 +20,7 @@ import {
20
20
  DepositWithBlock,
21
21
  } from "../../interfaces";
22
22
  import { SpokePoolClient } from "..";
23
- import { findFillEvent as findEvmFillEvent } from "../../arch/evm";
24
- import { findFillEvent as findSvmFillEvent } from "../../arch/svm";
23
+ import { findFillEvent } from "../../arch/evm";
25
24
  import {
26
25
  BigNumber,
27
26
  bnZero,
@@ -57,7 +56,7 @@ import {
57
56
  V3FillWithBlock,
58
57
  verifyFillRepayment,
59
58
  } from "./utils";
60
- import { isEVMSpokePoolClient, isSvmSpokePoolClient } from "../SpokePoolClient";
59
+ import { isEVMSpokePoolClient } from "../SpokePoolClient";
61
60
 
62
61
  // max(uint256) - 1
63
62
  export const INFINITE_FILL_DEADLINE = bnUint32Max;
@@ -371,7 +370,7 @@ export class BundleDataClient {
371
370
  }
372
371
 
373
372
  const bundle = this.clients.hubPoolClient.getLatestFullyExecutedRootBundle(
374
- this.clients.hubPoolClient.latestHeightSearched
373
+ this.clients.hubPoolClient.latestBlockSearched
375
374
  );
376
375
  if (bundle !== undefined) {
377
376
  refunds.push(await this.getPendingRefundsFromBundle(bundle));
@@ -384,7 +383,7 @@ export class BundleDataClient {
384
383
  async getPendingRefundsFromBundle(bundle: ProposedRootBundle): Promise<CombinedRefunds> {
385
384
  const nextBundleMainnetStartBlock = this.clients.hubPoolClient.getNextBundleStartBlockNumber(
386
385
  this.chainIdListForBundleEvaluationBlockNumbers,
387
- this.clients.hubPoolClient.latestHeightSearched,
386
+ this.clients.hubPoolClient.latestBlockSearched,
388
387
  this.clients.hubPoolClient.chainId
389
388
  );
390
389
  const chainIds = this.clients.configStoreClient.getChainIdIndicesForBlock(nextBundleMainnetStartBlock);
@@ -518,7 +517,7 @@ export class BundleDataClient {
518
517
  const hubPoolClient = this.clients.hubPoolClient;
519
518
  const nextBundleMainnetStartBlock = hubPoolClient.getNextBundleStartBlockNumber(
520
519
  this.chainIdListForBundleEvaluationBlockNumbers,
521
- hubPoolClient.latestHeightSearched,
520
+ hubPoolClient.latestBlockSearched,
522
521
  hubPoolClient.chainId
523
522
  );
524
523
  const chainIds = this.clients.configStoreClient.getChainIdIndicesForBlock(nextBundleMainnetStartBlock);
@@ -531,8 +530,8 @@ export class BundleDataClient {
531
530
  this.spokePoolClients,
532
531
  getEndBlockBuffers(chainIds, this.blockRangeEndBlockBuffer),
533
532
  this.clients,
534
- this.clients.hubPoolClient.latestHeightSearched,
535
- this.clients.configStoreClient.getEnabledChains(this.clients.hubPoolClient.latestHeightSearched)
533
+ this.clients.hubPoolClient.latestBlockSearched,
534
+ this.clients.configStoreClient.getEnabledChains(this.clients.hubPoolClient.latestBlockSearched)
536
535
  );
537
536
  // Return block ranges for blocks after _pendingBlockRanges and up to widestBlockRanges.
538
537
  // If a chain is disabled or doesn't have a spoke pool client, return a range of 0
@@ -800,7 +799,7 @@ export class BundleDataClient {
800
799
  // hasn't queried. This is because this function will usually be called
801
800
  // in production with block ranges that were validated by
802
801
  // DataworkerUtils.blockRangesAreInvalidForSpokeClients.
803
- Math.min(queryBlock, spokePoolClients[deposit.destinationChainId].latestHeightSearched)
802
+ Math.min(queryBlock, spokePoolClients[deposit.destinationChainId].latestBlockSearched)
804
803
  );
805
804
  };
806
805
 
@@ -1617,24 +1616,16 @@ export class BundleDataClient {
1617
1616
  deposit: DepositWithBlock,
1618
1617
  spokePoolClient: SpokePoolClient
1619
1618
  ): Promise<FillWithBlock | undefined> {
1620
- if (isSvmSpokePoolClient(spokePoolClient)) {
1621
- return await findSvmFillEvent(
1622
- deposit,
1623
- spokePoolClient.chainId,
1624
- spokePoolClient.svmEventsClient,
1625
- spokePoolClient.deploymentBlock,
1626
- spokePoolClient.latestHeightSearched
1627
- );
1628
- } else if (isEVMSpokePoolClient(spokePoolClient)) {
1629
- return await findEvmFillEvent(
1630
- spokePoolClient.spokePool,
1631
- deposit,
1632
- spokePoolClient.deploymentBlock,
1633
- spokePoolClient.latestHeightSearched
1634
- );
1635
- } else {
1636
- throw new Error("Unsupported spoke pool client type");
1619
+ if (!isEVMSpokePoolClient(spokePoolClient)) {
1620
+ // FIXME: Handle non-EVM chains.
1621
+ throw new Error("Destination chain is not an EVM chain.");
1637
1622
  }
1623
+ return await findFillEvent(
1624
+ spokePoolClient.spokePool,
1625
+ deposit,
1626
+ spokePoolClient.deploymentBlock,
1627
+ spokePoolClient.latestBlockSearched
1628
+ );
1638
1629
  }
1639
1630
 
1640
1631
  async getBundleBlockTimestamps(
@@ -1661,13 +1652,13 @@ export class BundleDataClient {
1661
1652
  // contain blocks where the spoke pool client hasn't queried. This is because this function
1662
1653
  // will usually be called in production with block ranges that were validated by
1663
1654
  // DataworkerUtils.blockRangesAreInvalidForSpokeClients.
1664
- const startBlockForChain = Math.min(_startBlockForChain, spokePoolClient.latestHeightSearched);
1655
+ const startBlockForChain = Math.min(_startBlockForChain, spokePoolClient.latestBlockSearched);
1665
1656
  // @dev Add 1 to the bundle end block. The thinking here is that there can be a gap between
1666
1657
  // block timestamps in subsequent blocks. The bundle data client assumes that fill deadlines expire
1667
1658
  // in exactly one bundle, therefore we must make sure that the bundle block timestamp for one bundle's
1668
1659
  // end block is exactly equal to the bundle block timestamp for the next bundle's start block. This way
1669
1660
  // there are no gaps in block timestamps between bundles.
1670
- const endBlockForChain = Math.min(_endBlockForChain + 1, spokePoolClient.latestHeightSearched);
1661
+ const endBlockForChain = Math.min(_endBlockForChain + 1, spokePoolClient.latestBlockSearched);
1671
1662
  const [startTime, _endTime] = [
1672
1663
  await spokePoolClient.getTimestampForBlock(startBlockForChain),
1673
1664
  await spokePoolClient.getTimestampForBlock(endBlockForChain),
@@ -32,7 +32,7 @@ export function getWidestPossibleExpectedBlockRange(
32
32
  // filled during the challenge period.
33
33
  const latestPossibleBundleEndBlockNumbers = chainIdListForBundleEvaluationBlockNumbers.map(
34
34
  (chainId: number, index) =>
35
- spokeClients[chainId] && Math.max(spokeClients[chainId].latestHeightSearched - endBlockBuffers[index], 0)
35
+ spokeClients[chainId] && Math.max(spokeClients[chainId].latestBlockSearched - endBlockBuffers[index], 0)
36
36
  );
37
37
  return chainIdListForBundleEvaluationBlockNumbers.map((chainId: number, index) => {
38
38
  const lastEndBlockForChain = clients.hubPoolClient.getLatestBundleEndBlockForChain(
@@ -105,7 +105,7 @@ export class HubPoolClient extends BaseAbstractClient {
105
105
  public configStoreClient: ConfigStoreClient,
106
106
  public deploymentBlock = 0,
107
107
  readonly chainId: number = 1,
108
- eventSearchConfig: MakeOptional<EventSearchConfig, "to"> = { from: 0, maxLookBack: 0 },
108
+ eventSearchConfig: MakeOptional<EventSearchConfig, "toBlock"> = { fromBlock: 0, maxBlockLookBack: 0 },
109
109
  protected readonly configOverride: {
110
110
  ignoredHubExecutedBundles: number[];
111
111
  ignoredHubProposedBundles: number[];
@@ -117,8 +117,8 @@ export class HubPoolClient extends BaseAbstractClient {
117
117
  cachingMechanism?: CachingMechanismInterface
118
118
  ) {
119
119
  super(eventSearchConfig, cachingMechanism);
120
- this.latestHeightSearched = Math.min(deploymentBlock - 1, 0);
121
- this.firstHeightToSearch = eventSearchConfig.from;
120
+ this.latestBlockSearched = Math.min(deploymentBlock - 1, 0);
121
+ this.firstBlockToSearch = eventSearchConfig.fromBlock;
122
122
 
123
123
  const provider = this.hubPool.provider;
124
124
  this.blockFinder = new BlockFinder(provider);
@@ -254,7 +254,7 @@ export class HubPoolClient extends BaseAbstractClient {
254
254
  return l2Token !== undefined;
255
255
  }
256
256
 
257
- l2TokenHasPoolRebalanceRoute(l2Token: string, l2ChainId: number, hubPoolBlock = this.latestHeightSearched): boolean {
257
+ l2TokenHasPoolRebalanceRoute(l2Token: string, l2ChainId: number, hubPoolBlock = this.latestBlockSearched): boolean {
258
258
  return Object.values(this.l1TokensToDestinationTokensWithBlock).some((destinationTokenMapping) => {
259
259
  return Object.entries(destinationTokenMapping).some(([_l2ChainId, setPoolRebalanceRouteEvents]) => {
260
260
  return setPoolRebalanceRouteEvents.some((e) => {
@@ -312,7 +312,7 @@ export class HubPoolClient extends BaseAbstractClient {
312
312
  }
313
313
 
314
314
  async getCurrentPoolUtilization(l1Token: string): Promise<BigNumber> {
315
- const blockNumber = this.latestHeightSearched ?? (await this.hubPool.provider.getBlockNumber());
315
+ const blockNumber = this.latestBlockSearched ?? (await this.hubPool.provider.getBlockNumber());
316
316
  return await this.getUtilization(l1Token, blockNumber, bnZero, getCurrentTime(), 0);
317
317
  }
318
318
 
@@ -523,7 +523,7 @@ export class HubPoolClient extends BaseAbstractClient {
523
523
  chainIdA: number,
524
524
  tokenB: string,
525
525
  chainIdB: number,
526
- hubPoolBlock = this.latestHeightSearched
526
+ hubPoolBlock = this.latestBlockSearched
527
527
  ): boolean {
528
528
  if (
529
529
  !this.l2TokenHasPoolRebalanceRoute(tokenA, chainIdA, hubPoolBlock) ||
@@ -719,7 +719,7 @@ export class HubPoolClient extends BaseAbstractClient {
719
719
  if (n === 0) {
720
720
  throw new Error("n cannot be 0");
721
721
  }
722
- if (!this.latestHeightSearched) {
722
+ if (!this.latestBlockSearched) {
723
723
  throw new Error("HubPoolClient::getNthFullyExecutedRootBundle client not updated");
724
724
  }
725
725
 
@@ -728,7 +728,7 @@ export class HubPoolClient extends BaseAbstractClient {
728
728
  // If n is negative, then return the Nth latest executed bundle, otherwise return the Nth earliest
729
729
  // executed bundle.
730
730
  if (n < 0) {
731
- let nextLatestMainnetBlock = startBlock ?? this.latestHeightSearched;
731
+ let nextLatestMainnetBlock = startBlock ?? this.latestBlockSearched;
732
732
  for (let i = 0; i < Math.abs(n); i++) {
733
733
  bundleToReturn = this.getLatestFullyExecutedRootBundle(nextLatestMainnetBlock);
734
734
  const bundleBlockNumber = bundleToReturn ? bundleToReturn.blockNumber : 0;
@@ -740,12 +740,12 @@ export class HubPoolClient extends BaseAbstractClient {
740
740
  } else {
741
741
  let nextStartBlock = startBlock ?? 0;
742
742
  for (let i = 0; i < n; i++) {
743
- bundleToReturn = this.getEarliestFullyExecutedRootBundle(this.latestHeightSearched, nextStartBlock);
743
+ bundleToReturn = this.getEarliestFullyExecutedRootBundle(this.latestBlockSearched, nextStartBlock);
744
744
  const bundleBlockNumber = bundleToReturn ? bundleToReturn.blockNumber : 0;
745
745
 
746
746
  // Add 1 so that next `getEarliestFullyExecutedRootBundle` call filters out the root bundle we just found
747
747
  // because its block number is < nextStartBlock.
748
- nextStartBlock = Math.min(bundleBlockNumber + 1, this.latestHeightSearched);
748
+ nextStartBlock = Math.min(bundleBlockNumber + 1, this.latestBlockSearched);
749
749
  }
750
750
  }
751
751
 
@@ -831,7 +831,7 @@ export class HubPoolClient extends BaseAbstractClient {
831
831
  // instantiation. However, certain events generally must be queried back to HubPool genesis.
832
832
  const overrideEvents = ["CrossChainContractsSet", "L1TokenEnabledForLiquidityProvision", "SetPoolRebalanceRoute"];
833
833
  if (overrideEvents.includes(eventName) && !this.isUpdated) {
834
- _searchConfig.from = this.deploymentBlock;
834
+ _searchConfig.fromBlock = this.deploymentBlock;
835
835
  }
836
836
 
837
837
  return {
@@ -853,7 +853,7 @@ export class HubPoolClient extends BaseAbstractClient {
853
853
  const [multicallOutput, ...events] = await Promise.all([
854
854
  hubPool.callStatic.multicall(
855
855
  multicallFunctions.map((f) => hubPool.interface.encodeFunctionData(f)),
856
- { blockTag: searchConfig.to }
856
+ { blockTag: searchConfig.toBlock }
857
857
  ),
858
858
  ...eventSearchConfigs.map((config) => paginatedEventQuery(hubPool, config.filter, config.searchConfig)),
859
859
  ]);
@@ -874,7 +874,7 @@ export class HubPoolClient extends BaseAbstractClient {
874
874
  success: true,
875
875
  currentTime,
876
876
  pendingRootBundleProposal,
877
- searchEndBlock: searchConfig.to,
877
+ searchEndBlock: searchConfig.toBlock,
878
878
  events: _events,
879
879
  };
880
880
  }
@@ -1087,9 +1087,9 @@ export class HubPoolClient extends BaseAbstractClient {
1087
1087
  }
1088
1088
 
1089
1089
  this.currentTime = currentTime;
1090
- this.latestHeightSearched = searchEndBlock;
1091
- this.firstHeightToSearch = update.searchEndBlock + 1; // Next iteration should start off from where this one ended.
1092
- this.eventSearchConfig.to = undefined; // Caller can re-set on subsequent updates if necessary.
1090
+ this.latestBlockSearched = searchEndBlock;
1091
+ this.firstBlockToSearch = update.searchEndBlock + 1; // Next iteration should start off from where this one ended.
1092
+ this.eventSearchConfig.toBlock = undefined; // Caller can re-set on subsequent updates if necessary.
1093
1093
 
1094
1094
  this.isUpdated = true;
1095
1095
  this.logger.debug({ at: "HubPoolClient::update", message: "HubPool client updated!", searchEndBlock });
@@ -39,17 +39,20 @@ export class EVMSpokePoolClient extends SpokePoolClient {
39
39
  hubPoolClient: HubPoolClient | null,
40
40
  chainId: number,
41
41
  deploymentBlock: number,
42
- eventSearchConfig: MakeOptional<EventSearchConfig, "to"> = { from: 0, maxLookBack: 0 }
42
+ eventSearchConfig: MakeOptional<EventSearchConfig, "toBlock"> = { fromBlock: 0, maxBlockLookBack: 0 }
43
43
  ) {
44
44
  super(logger, hubPoolClient, chainId, deploymentBlock, eventSearchConfig);
45
45
  }
46
46
 
47
- public override relayFillStatus(relayData: RelayData, atHeight?: number): Promise<FillStatus> {
48
- return relayFillStatus(this.spokePool, relayData, atHeight, this.chainId);
47
+ public override relayFillStatus(relayData: RelayData, blockTag?: number | "latest"): Promise<FillStatus> {
48
+ return relayFillStatus(this.spokePool, relayData, blockTag, this.chainId);
49
49
  }
50
50
 
51
- public override fillStatusArray(relayData: RelayData[], atHeight?: number): Promise<(FillStatus | undefined)[]> {
52
- return fillStatusArray(this.spokePool, relayData, atHeight);
51
+ public override fillStatusArray(
52
+ relayData: RelayData[],
53
+ blockTag?: number | "latest"
54
+ ): Promise<(FillStatus | undefined)[]> {
55
+ return fillStatusArray(this.spokePool, relayData, blockTag);
53
56
  }
54
57
 
55
58
  public override getMaxFillDeadlineInRange(startBlock: number, endBlock: number): Promise<number> {
@@ -86,7 +89,7 @@ export class EVMSpokePoolClient extends SpokePoolClient {
86
89
  // However, certain events have special overriding requirements to their search ranges:
87
90
  // - EnabledDepositRoute: The full history is always required, so override the requested fromBlock.
88
91
  if (eventName === "EnabledDepositRoute" && !this.isUpdated) {
89
- _searchConfig.from = this.deploymentBlock;
92
+ _searchConfig.fromBlock = this.deploymentBlock;
90
93
  }
91
94
 
92
95
  return {
@@ -107,7 +110,7 @@ export class EVMSpokePoolClient extends SpokePoolClient {
107
110
  const [multicallOutput, ...events] = await Promise.all([
108
111
  spokePool.callStatic.multicall(
109
112
  multicallFunctions.map((f) => spokePool.interface.encodeFunctionData(f)),
110
- { blockTag: searchConfig.to }
113
+ { blockTag: searchConfig.toBlock }
111
114
  ),
112
115
  ...eventSearchConfigs.map((config) => paginatedEventQuery(this.spokePool, config.filter, config.searchConfig)),
113
116
  ]);
@@ -121,22 +124,17 @@ export class EVMSpokePoolClient extends SpokePoolClient {
121
124
  const errMsg = BigNumber.isBigNumber(currentTime)
122
125
  ? `currentTime: ${currentTime} < ${toBN(this.currentTime)}`
123
126
  : `currentTime is not a BigNumber: ${JSON.stringify(currentTime)}`;
124
- throw new Error(`EVMSpokePoolClient::update: ${errMsg}`);
127
+ throw new Error(`SpokePoolClient::update: ${errMsg}`);
125
128
  }
126
129
 
127
130
  // Sort all events to ensure they are stored in a consistent order.
128
131
  events.forEach((events) => sortEventsAscendingInPlace(events.map(logToSortableEvent)));
129
132
 
130
- // Map events to SortableEvent
131
- const eventsWithBlockNumber = events.map((eventList) =>
132
- eventList.map((event) => spreadEventWithBlockNumber(event))
133
- );
134
-
135
133
  return {
136
134
  success: true,
137
135
  currentTime: currentTime.toNumber(), // uint32
138
- searchEndBlock: searchConfig.to,
139
- events: eventsWithBlockNumber,
136
+ searchEndBlock: searchConfig.toBlock,
137
+ events,
140
138
  };
141
139
  }
142
140
 
@@ -151,31 +149,31 @@ export class EVMSpokePoolClient extends SpokePoolClient {
151
149
  }
152
150
 
153
151
  // No deposit found; revert to searching for it.
154
- const upperBound = this.latestHeightSearched || undefined; // Don't permit block 0 as the high block.
155
- const from = await findDepositBlock(this.spokePool, depositId, this.deploymentBlock, upperBound);
152
+ const upperBound = this.latestBlockSearched || undefined; // Don't permit block 0 as the high block.
153
+ const fromBlock = await findDepositBlock(this.spokePool, depositId, this.deploymentBlock, upperBound);
156
154
  const chain = getNetworkName(this.chainId);
157
- if (!from) {
155
+ if (!fromBlock) {
158
156
  const reason =
159
157
  `Unable to find ${chain} depositId ${depositId}` +
160
158
  ` within blocks [${this.deploymentBlock}, ${upperBound ?? "latest"}].`;
161
159
  return { found: false, code: InvalidFill.DepositIdNotFound, reason };
162
160
  }
163
161
 
164
- const to = from;
162
+ const toBlock = fromBlock;
165
163
  const tStart = Date.now();
166
164
  // Check both V3FundsDeposited and FundsDeposited events to look for a specified depositId.
167
- const { maxLookBack } = this.eventSearchConfig;
165
+ const { maxBlockLookBack } = this.eventSearchConfig;
168
166
  const query = (
169
167
  await Promise.all([
170
168
  paginatedEventQuery(
171
169
  this.spokePool,
172
170
  this.spokePool.filters.V3FundsDeposited(null, null, null, null, null, depositId),
173
- { from, to, maxLookBack }
171
+ { fromBlock, toBlock, maxBlockLookBack }
174
172
  ),
175
173
  paginatedEventQuery(
176
174
  this.spokePool,
177
175
  this.spokePool.filters.FundsDeposited(null, null, null, null, null, depositId),
178
- { from, to, maxLookBack }
176
+ { fromBlock, toBlock, maxBlockLookBack }
179
177
  ),
180
178
  ])
181
179
  ).flat();
@@ -186,7 +184,7 @@ export class EVMSpokePoolClient extends SpokePoolClient {
186
184
  return {
187
185
  found: false,
188
186
  code: InvalidFill.DepositIdNotFound,
189
- reason: `${chain} depositId ${depositId} not found at block ${from}.`,
187
+ reason: `${chain} depositId ${depositId} not found at block ${fromBlock}.`,
190
188
  };
191
189
  }
192
190