@across-protocol/sdk 3.1.34 → 3.1.36

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 (266) hide show
  1. package/dist/cjs/apiClient/abstractClient.d.ts +2 -2
  2. package/dist/cjs/apiClient/mockedClient.d.ts +2 -2
  3. package/dist/cjs/apiClient/mockedClient.js +13 -12
  4. package/dist/cjs/apiClient/mockedClient.js.map +1 -1
  5. package/dist/cjs/apiClient/productionClient.d.ts +2 -2
  6. package/dist/cjs/apiClient/productionClient.js +10 -10
  7. package/dist/cjs/apiClient/productionClient.js.map +1 -1
  8. package/dist/cjs/apiClient/types.d.ts +10 -10
  9. package/dist/cjs/caching/Arweave/ArweaveClient.d.ts +2 -2
  10. package/dist/cjs/caching/Arweave/ArweaveClient.js +3 -4
  11. package/dist/cjs/caching/Arweave/ArweaveClient.js.map +1 -1
  12. package/dist/cjs/clients/BundleDataClient/BundleDataClient.d.ts +1 -1
  13. package/dist/cjs/clients/BundleDataClient/BundleDataClient.js +2 -3
  14. package/dist/cjs/clients/BundleDataClient/BundleDataClient.js.map +1 -1
  15. package/dist/cjs/clients/BundleDataClient/utils/PoolRebalanceUtils.d.ts +1 -1
  16. package/dist/cjs/clients/BundleDataClient/utils/PoolRebalanceUtils.js.map +1 -1
  17. package/dist/cjs/clients/BundleDataClient/utils/SuperstructUtils.d.ts +1 -1
  18. package/dist/cjs/clients/BundleDataClient/utils/SuperstructUtils.js +3 -3
  19. package/dist/cjs/clients/BundleDataClient/utils/SuperstructUtils.js.map +1 -1
  20. package/dist/cjs/clients/HubPoolClient.d.ts +2 -2
  21. package/dist/cjs/clients/HubPoolClient.js +1 -2
  22. package/dist/cjs/clients/HubPoolClient.js.map +1 -1
  23. package/dist/cjs/clients/SpokePoolClient.d.ts +2 -2
  24. package/dist/cjs/clients/SpokePoolClient.js +2 -3
  25. package/dist/cjs/clients/SpokePoolClient.js.map +1 -1
  26. package/dist/cjs/clients/mocks/MockHubPoolClient.d.ts +2 -1
  27. package/dist/cjs/clients/mocks/MockHubPoolClient.js.map +1 -1
  28. package/dist/cjs/clients/mocks/MockSpokePoolClient.d.ts +2 -1
  29. package/dist/cjs/clients/mocks/MockSpokePoolClient.js.map +1 -1
  30. package/dist/cjs/constants.d.ts +0 -3
  31. package/dist/cjs/constants.js +1 -3
  32. package/dist/cjs/constants.js.map +1 -1
  33. package/dist/cjs/contracts/utils.d.ts +2 -1
  34. package/dist/cjs/contracts/utils.js +2 -3
  35. package/dist/cjs/contracts/utils.js.map +1 -1
  36. package/dist/cjs/gasPriceOracle/adapters/arbitrum.js +4 -3
  37. package/dist/cjs/gasPriceOracle/adapters/arbitrum.js.map +1 -1
  38. package/dist/cjs/gasPriceOracle/adapters/ethereum.js +2 -3
  39. package/dist/cjs/gasPriceOracle/adapters/ethereum.js.map +1 -1
  40. package/dist/cjs/gasPriceOracle/adapters/polygon.js +33 -11
  41. package/dist/cjs/gasPriceOracle/adapters/polygon.js.map +1 -1
  42. package/dist/cjs/gasPriceOracle/types.d.ts +2 -1
  43. package/dist/cjs/gasPriceOracle/util.d.ts +2 -1
  44. package/dist/cjs/gasPriceOracle/util.js.map +1 -1
  45. package/dist/cjs/interfaces/Bridge.d.ts +1 -1
  46. package/dist/cjs/interfaces/BundleData.d.ts +2 -1
  47. package/dist/cjs/interfaces/Common.d.ts +1 -1
  48. package/dist/cjs/interfaces/ConfigStore.d.ts +1 -1
  49. package/dist/cjs/interfaces/HubPool.d.ts +1 -1
  50. package/dist/cjs/interfaces/SpokePool.d.ts +1 -1
  51. package/dist/cjs/pool/poolClient.d.ts +2 -2
  52. package/dist/cjs/pool/poolClient.js +14 -14
  53. package/dist/cjs/pool/poolClient.js.map +1 -1
  54. package/dist/cjs/priceClient/adapters/baseAdapter.js +11 -9
  55. package/dist/cjs/priceClient/adapters/baseAdapter.js.map +1 -1
  56. package/dist/cjs/providers/retryProvider.js +34 -24
  57. package/dist/cjs/providers/retryProvider.js.map +1 -1
  58. package/dist/cjs/relayFeeCalculator/chain-queries/baseQuery.d.ts +3 -3
  59. package/dist/cjs/relayFeeCalculator/relayFeeCalculator.d.ts +1 -2
  60. package/dist/cjs/relayFeeCalculator/relayFeeCalculator.js.map +1 -1
  61. package/dist/cjs/utils/AddressUtils.js +3 -2
  62. package/dist/cjs/utils/AddressUtils.js.map +1 -1
  63. package/dist/cjs/utils/BigNumberUtils.d.ts +9 -5
  64. package/dist/cjs/utils/BigNumberUtils.js +13 -8
  65. package/dist/cjs/utils/BigNumberUtils.js.map +1 -1
  66. package/dist/cjs/utils/FormattingUtils.d.ts +3 -4
  67. package/dist/cjs/utils/FormattingUtils.js +5 -5
  68. package/dist/cjs/utils/FormattingUtils.js.map +1 -1
  69. package/dist/cjs/utils/JSONUtils.js +5 -5
  70. package/dist/cjs/utils/JSONUtils.js.map +1 -1
  71. package/dist/cjs/utils/Multicall.js.map +1 -1
  72. package/dist/cjs/utils/SpokeUtils.js +1 -1
  73. package/dist/cjs/utils/SpokeUtils.js.map +1 -1
  74. package/dist/cjs/utils/TokenUtils.d.ts +2 -1
  75. package/dist/cjs/utils/TokenUtils.js.map +1 -1
  76. package/dist/cjs/utils/ValidatorUtils.js +4 -3
  77. package/dist/cjs/utils/ValidatorUtils.js.map +1 -1
  78. package/dist/cjs/utils/common.d.ts +4 -4
  79. package/dist/cjs/utils/common.js +5 -7
  80. package/dist/cjs/utils/common.js.map +1 -1
  81. package/dist/esm/apiClient/abstractClient.d.ts +2 -2
  82. package/dist/esm/apiClient/mockedClient.d.ts +2 -2
  83. package/dist/esm/apiClient/mockedClient.js +13 -12
  84. package/dist/esm/apiClient/mockedClient.js.map +1 -1
  85. package/dist/esm/apiClient/productionClient.d.ts +2 -2
  86. package/dist/esm/apiClient/productionClient.js +10 -10
  87. package/dist/esm/apiClient/productionClient.js.map +1 -1
  88. package/dist/esm/apiClient/types.d.ts +10 -10
  89. package/dist/esm/caching/Arweave/ArweaveClient.d.ts +2 -2
  90. package/dist/esm/caching/Arweave/ArweaveClient.js +2 -3
  91. package/dist/esm/caching/Arweave/ArweaveClient.js.map +1 -1
  92. package/dist/esm/clients/BundleDataClient/BundleDataClient.d.ts +1 -1
  93. package/dist/esm/clients/BundleDataClient/BundleDataClient.js +1 -2
  94. package/dist/esm/clients/BundleDataClient/BundleDataClient.js.map +1 -1
  95. package/dist/esm/clients/BundleDataClient/utils/PoolRebalanceUtils.d.ts +1 -1
  96. package/dist/esm/clients/BundleDataClient/utils/PoolRebalanceUtils.js.map +1 -1
  97. package/dist/esm/clients/BundleDataClient/utils/SuperstructUtils.d.ts +1 -1
  98. package/dist/esm/clients/BundleDataClient/utils/SuperstructUtils.js +1 -1
  99. package/dist/esm/clients/BundleDataClient/utils/SuperstructUtils.js.map +1 -1
  100. package/dist/esm/clients/HubPoolClient.d.ts +2 -2
  101. package/dist/esm/clients/HubPoolClient.js +1 -2
  102. package/dist/esm/clients/HubPoolClient.js.map +1 -1
  103. package/dist/esm/clients/SpokePoolClient.d.ts +2 -2
  104. package/dist/esm/clients/SpokePoolClient.js +1 -2
  105. package/dist/esm/clients/SpokePoolClient.js.map +1 -1
  106. package/dist/esm/clients/mocks/MockHubPoolClient.d.ts +2 -1
  107. package/dist/esm/clients/mocks/MockHubPoolClient.js.map +1 -1
  108. package/dist/esm/clients/mocks/MockSpokePoolClient.d.ts +2 -1
  109. package/dist/esm/clients/mocks/MockSpokePoolClient.js.map +1 -1
  110. package/dist/esm/constants.d.ts +0 -3
  111. package/dist/esm/constants.js +1 -3
  112. package/dist/esm/constants.js.map +1 -1
  113. package/dist/esm/contracts/utils.d.ts +2 -1
  114. package/dist/esm/contracts/utils.js +1 -2
  115. package/dist/esm/contracts/utils.js.map +1 -1
  116. package/dist/esm/gasPriceOracle/adapters/arbitrum.js +5 -4
  117. package/dist/esm/gasPriceOracle/adapters/arbitrum.js.map +1 -1
  118. package/dist/esm/gasPriceOracle/adapters/ethereum.js +1 -2
  119. package/dist/esm/gasPriceOracle/adapters/ethereum.js.map +1 -1
  120. package/dist/esm/gasPriceOracle/adapters/polygon.js +35 -15
  121. package/dist/esm/gasPriceOracle/adapters/polygon.js.map +1 -1
  122. package/dist/esm/gasPriceOracle/types.d.ts +2 -1
  123. package/dist/esm/gasPriceOracle/util.d.ts +2 -1
  124. package/dist/esm/gasPriceOracle/util.js.map +1 -1
  125. package/dist/esm/interfaces/Bridge.d.ts +1 -1
  126. package/dist/esm/interfaces/BundleData.d.ts +2 -1
  127. package/dist/esm/interfaces/Common.d.ts +1 -1
  128. package/dist/esm/interfaces/ConfigStore.d.ts +1 -1
  129. package/dist/esm/interfaces/HubPool.d.ts +1 -1
  130. package/dist/esm/interfaces/SpokePool.d.ts +1 -1
  131. package/dist/esm/pool/poolClient.d.ts +2 -2
  132. package/dist/esm/pool/poolClient.js +8 -8
  133. package/dist/esm/pool/poolClient.js.map +1 -1
  134. package/dist/esm/priceClient/adapters/baseAdapter.js +11 -9
  135. package/dist/esm/priceClient/adapters/baseAdapter.js.map +1 -1
  136. package/dist/esm/providers/retryProvider.js +34 -24
  137. package/dist/esm/providers/retryProvider.js.map +1 -1
  138. package/dist/esm/relayFeeCalculator/chain-queries/baseQuery.d.ts +3 -3
  139. package/dist/esm/relayFeeCalculator/relayFeeCalculator.d.ts +1 -2
  140. package/dist/esm/relayFeeCalculator/relayFeeCalculator.js.map +1 -1
  141. package/dist/esm/utils/AddressUtils.js +2 -1
  142. package/dist/esm/utils/AddressUtils.js.map +1 -1
  143. package/dist/esm/utils/BigNumberUtils.d.ts +9 -5
  144. package/dist/esm/utils/BigNumberUtils.js +11 -5
  145. package/dist/esm/utils/BigNumberUtils.js.map +1 -1
  146. package/dist/esm/utils/FormattingUtils.d.ts +3 -4
  147. package/dist/esm/utils/FormattingUtils.js +7 -7
  148. package/dist/esm/utils/FormattingUtils.js.map +1 -1
  149. package/dist/esm/utils/JSONUtils.js +2 -2
  150. package/dist/esm/utils/JSONUtils.js.map +1 -1
  151. package/dist/esm/utils/Multicall.js.map +1 -1
  152. package/dist/esm/utils/SpokeUtils.js +2 -2
  153. package/dist/esm/utils/SpokeUtils.js.map +1 -1
  154. package/dist/esm/utils/TokenUtils.d.ts +34 -33
  155. package/dist/esm/utils/TokenUtils.js.map +1 -1
  156. package/dist/esm/utils/ValidatorUtils.js +5 -4
  157. package/dist/esm/utils/ValidatorUtils.js.map +1 -1
  158. package/dist/esm/utils/common.d.ts +4 -4
  159. package/dist/esm/utils/common.js +4 -6
  160. package/dist/esm/utils/common.js.map +1 -1
  161. package/dist/types/apiClient/abstractClient.d.ts +2 -2
  162. package/dist/types/apiClient/abstractClient.d.ts.map +1 -1
  163. package/dist/types/apiClient/mockedClient.d.ts +2 -2
  164. package/dist/types/apiClient/mockedClient.d.ts.map +1 -1
  165. package/dist/types/apiClient/productionClient.d.ts +2 -2
  166. package/dist/types/apiClient/productionClient.d.ts.map +1 -1
  167. package/dist/types/apiClient/types.d.ts +10 -10
  168. package/dist/types/apiClient/types.d.ts.map +1 -1
  169. package/dist/types/caching/Arweave/ArweaveClient.d.ts +2 -2
  170. package/dist/types/caching/Arweave/ArweaveClient.d.ts.map +1 -1
  171. package/dist/types/clients/BundleDataClient/BundleDataClient.d.ts +1 -1
  172. package/dist/types/clients/BundleDataClient/BundleDataClient.d.ts.map +1 -1
  173. package/dist/types/clients/BundleDataClient/utils/PoolRebalanceUtils.d.ts +1 -1
  174. package/dist/types/clients/BundleDataClient/utils/PoolRebalanceUtils.d.ts.map +1 -1
  175. package/dist/types/clients/BundleDataClient/utils/SuperstructUtils.d.ts +1 -1
  176. package/dist/types/clients/BundleDataClient/utils/SuperstructUtils.d.ts.map +1 -1
  177. package/dist/types/clients/HubPoolClient.d.ts +2 -2
  178. package/dist/types/clients/HubPoolClient.d.ts.map +1 -1
  179. package/dist/types/clients/SpokePoolClient.d.ts +2 -2
  180. package/dist/types/clients/SpokePoolClient.d.ts.map +1 -1
  181. package/dist/types/clients/mocks/MockHubPoolClient.d.ts +2 -1
  182. package/dist/types/clients/mocks/MockHubPoolClient.d.ts.map +1 -1
  183. package/dist/types/clients/mocks/MockSpokePoolClient.d.ts +2 -1
  184. package/dist/types/clients/mocks/MockSpokePoolClient.d.ts.map +1 -1
  185. package/dist/types/constants.d.ts +0 -3
  186. package/dist/types/constants.d.ts.map +1 -1
  187. package/dist/types/contracts/utils.d.ts +2 -1
  188. package/dist/types/contracts/utils.d.ts.map +1 -1
  189. package/dist/types/gasPriceOracle/adapters/arbitrum.d.ts.map +1 -1
  190. package/dist/types/gasPriceOracle/adapters/ethereum.d.ts.map +1 -1
  191. package/dist/types/gasPriceOracle/adapters/polygon.d.ts.map +1 -1
  192. package/dist/types/gasPriceOracle/types.d.ts +2 -1
  193. package/dist/types/gasPriceOracle/types.d.ts.map +1 -1
  194. package/dist/types/gasPriceOracle/util.d.ts +2 -1
  195. package/dist/types/gasPriceOracle/util.d.ts.map +1 -1
  196. package/dist/types/interfaces/Bridge.d.ts +1 -1
  197. package/dist/types/interfaces/Bridge.d.ts.map +1 -1
  198. package/dist/types/interfaces/BundleData.d.ts +2 -1
  199. package/dist/types/interfaces/BundleData.d.ts.map +1 -1
  200. package/dist/types/interfaces/Common.d.ts +1 -1
  201. package/dist/types/interfaces/Common.d.ts.map +1 -1
  202. package/dist/types/interfaces/ConfigStore.d.ts +1 -1
  203. package/dist/types/interfaces/ConfigStore.d.ts.map +1 -1
  204. package/dist/types/interfaces/HubPool.d.ts +1 -1
  205. package/dist/types/interfaces/HubPool.d.ts.map +1 -1
  206. package/dist/types/interfaces/SpokePool.d.ts +1 -1
  207. package/dist/types/interfaces/SpokePool.d.ts.map +1 -1
  208. package/dist/types/pool/poolClient.d.ts +2 -2
  209. package/dist/types/pool/poolClient.d.ts.map +1 -1
  210. package/dist/types/priceClient/adapters/baseAdapter.d.ts.map +1 -1
  211. package/dist/types/providers/retryProvider.d.ts.map +1 -1
  212. package/dist/types/relayFeeCalculator/chain-queries/baseQuery.d.ts +3 -3
  213. package/dist/types/relayFeeCalculator/chain-queries/baseQuery.d.ts.map +1 -1
  214. package/dist/types/relayFeeCalculator/relayFeeCalculator.d.ts +1 -2
  215. package/dist/types/relayFeeCalculator/relayFeeCalculator.d.ts.map +1 -1
  216. package/dist/types/utils/AddressUtils.d.ts.map +1 -1
  217. package/dist/types/utils/BigNumberUtils.d.ts +9 -5
  218. package/dist/types/utils/BigNumberUtils.d.ts.map +1 -1
  219. package/dist/types/utils/FormattingUtils.d.ts +3 -4
  220. package/dist/types/utils/FormattingUtils.d.ts.map +1 -1
  221. package/dist/types/utils/Multicall.d.ts.map +1 -1
  222. package/dist/types/utils/SpokeUtils.d.ts.map +1 -1
  223. package/dist/types/utils/TokenUtils.d.ts +34 -33
  224. package/dist/types/utils/TokenUtils.d.ts.map +1 -1
  225. package/dist/types/utils/ValidatorUtils.d.ts.map +1 -1
  226. package/dist/types/utils/common.d.ts +4 -4
  227. package/dist/types/utils/common.d.ts.map +1 -1
  228. package/package.json +2 -1
  229. package/src/apiClient/abstractClient.ts +2 -2
  230. package/src/apiClient/mockedClient.ts +14 -13
  231. package/src/apiClient/productionClient.ts +11 -12
  232. package/src/apiClient/types.ts +10 -10
  233. package/src/caching/Arweave/ArweaveClient.ts +3 -4
  234. package/src/clients/BundleDataClient/BundleDataClient.ts +1 -1
  235. package/src/clients/BundleDataClient/utils/PoolRebalanceUtils.ts +1 -2
  236. package/src/clients/BundleDataClient/utils/SuperstructUtils.ts +1 -1
  237. package/src/clients/HubPoolClient.ts +2 -1
  238. package/src/clients/SpokePoolClient.ts +2 -1
  239. package/src/clients/mocks/MockHubPoolClient.ts +2 -2
  240. package/src/clients/mocks/MockSpokePoolClient.ts +2 -2
  241. package/src/constants.ts +1 -4
  242. package/src/contracts/utils.ts +2 -2
  243. package/src/gasPriceOracle/adapters/arbitrum.ts +4 -3
  244. package/src/gasPriceOracle/adapters/ethereum.ts +2 -2
  245. package/src/gasPriceOracle/adapters/polygon.ts +23 -12
  246. package/src/gasPriceOracle/types.ts +2 -1
  247. package/src/gasPriceOracle/util.ts +2 -1
  248. package/src/interfaces/Bridge.ts +1 -1
  249. package/src/interfaces/BundleData.ts +2 -1
  250. package/src/interfaces/Common.ts +1 -1
  251. package/src/interfaces/ConfigStore.ts +1 -1
  252. package/src/interfaces/HubPool.ts +1 -1
  253. package/src/interfaces/SpokePool.ts +1 -1
  254. package/src/pool/poolClient.ts +19 -10
  255. package/src/priceClient/adapters/baseAdapter.ts +1 -0
  256. package/src/providers/retryProvider.ts +35 -17
  257. package/src/relayFeeCalculator/relayFeeCalculator.ts +1 -1
  258. package/src/utils/AddressUtils.ts +2 -1
  259. package/src/utils/BigNumberUtils.ts +12 -6
  260. package/src/utils/FormattingUtils.ts +9 -9
  261. package/src/utils/JSONUtils.ts +2 -2
  262. package/src/utils/Multicall.ts +2 -1
  263. package/src/utils/SpokeUtils.ts +2 -2
  264. package/src/utils/TokenUtils.ts +2 -1
  265. package/src/utils/ValidatorUtils.ts +5 -4
  266. package/src/utils/common.ts +4 -5
@@ -1,6 +1,7 @@
1
1
  import { BlockTag } from "@ethersproject/abstract-provider";
2
- import { BigNumber, providers, Signer } from "ethers";
2
+ import { providers, Signer } from "ethers";
3
3
  import { L1Token } from "../interfaces";
4
+ import { BigNumber } from "./BigNumberUtils";
4
5
  type SignerOrProvider = providers.Provider | Signer;
5
6
  export declare function fetchTokenInfo(address: string, signerOrProvider: SignerOrProvider): Promise<L1Token>;
6
7
  export declare const getL2TokenAddresses: (l1TokenAddress: string, l1ChainId?: number) => {
@@ -74,15 +75,14 @@ export declare const resolveContractFromSymbol: (symbol: string, chainId: string
74
75
  addresses: {
75
76
  [x: number]: string;
76
77
  };
77
- /**
78
- * Resolve a token symbol to an L1Token description on a particular chain ID.
79
- * @notice Not to be confused with the HubPool's internal view on the supported origin/destination token for a chain.
80
- * @param symbol Symbol to query.
81
- * @param chainId Chain ID to query on.
82
- * @returns Symbol, decimals and contract address on the requested chain.
83
- */
84
78
  coingeckoId: string;
85
- };
79
+ }; /**
80
+ * Resolve a token symbol to an L1Token description on a particular chain ID.
81
+ * @notice Not to be confused with the HubPool's internal view on the supported origin/destination token for a chain.
82
+ * @param symbol Symbol to query.
83
+ * @param chainId Chain ID to query on.
84
+ * @returns Symbol, decimals and contract address on the requested chain.
85
+ */
86
86
  ETH: {
87
87
  name: string;
88
88
  symbol: string;
@@ -199,16 +199,17 @@ export declare const resolveContractFromSymbol: (symbol: string, chainId: string
199
199
  [x: number]: string;
200
200
  };
201
201
  coingeckoId: string;
202
- }; /**
203
- * Retrieves the ERC20 balance for a given address and token address.
204
- * @param address The address to retrieve the balance for.
205
- * @param tokenAddress The token address
206
- * @param signerOrProvider A valid ethers.js Signer or Provider object.
207
- * @param blockTag The block tag to retrieve the balance at.
208
- * @returns The balance of the given address for the given token address.
209
- */
202
+ };
210
203
  WBTC: {
211
204
  name: string;
205
+ /**
206
+ * Retrieves the ERC20 balance for a given address and token address.
207
+ * @param address The address to retrieve the balance for.
208
+ * @param tokenAddress The token address
209
+ * @param signerOrProvider A valid ethers.js Signer or Provider object.
210
+ * @param blockTag The block tag to retrieve the balance at.
211
+ * @returns The balance of the given address for the given token address.
212
+ */
212
213
  symbol: string;
213
214
  decimals: number;
214
215
  addresses: {
@@ -288,15 +289,14 @@ export declare function getTokenInformationFromAddress(address: string, tokenMap
288
289
  addresses: {
289
290
  [x: number]: string;
290
291
  };
291
- /**
292
- * Resolve a token symbol to an L1Token description on a particular chain ID.
293
- * @notice Not to be confused with the HubPool's internal view on the supported origin/destination token for a chain.
294
- * @param symbol Symbol to query.
295
- * @param chainId Chain ID to query on.
296
- * @returns Symbol, decimals and contract address on the requested chain.
297
- */
298
292
  coingeckoId: string;
299
- };
293
+ }; /**
294
+ * Resolve a token symbol to an L1Token description on a particular chain ID.
295
+ * @notice Not to be confused with the HubPool's internal view on the supported origin/destination token for a chain.
296
+ * @param symbol Symbol to query.
297
+ * @param chainId Chain ID to query on.
298
+ * @returns Symbol, decimals and contract address on the requested chain.
299
+ */
300
300
  ETH: {
301
301
  name: string;
302
302
  symbol: string;
@@ -413,16 +413,17 @@ export declare function getTokenInformationFromAddress(address: string, tokenMap
413
413
  [x: number]: string;
414
414
  };
415
415
  coingeckoId: string;
416
- }; /**
417
- * Retrieves the ERC20 balance for a given address and token address.
418
- * @param address The address to retrieve the balance for.
419
- * @param tokenAddress The token address
420
- * @param signerOrProvider A valid ethers.js Signer or Provider object.
421
- * @param blockTag The block tag to retrieve the balance at.
422
- * @returns The balance of the given address for the given token address.
423
- */
416
+ };
424
417
  WBTC: {
425
418
  name: string;
419
+ /**
420
+ * Retrieves the ERC20 balance for a given address and token address.
421
+ * @param address The address to retrieve the balance for.
422
+ * @param tokenAddress The token address
423
+ * @param signerOrProvider A valid ethers.js Signer or Provider object.
424
+ * @param blockTag The block tag to retrieve the balance at.
425
+ * @returns The balance of the given address for the given token address.
426
+ */
426
427
  symbol: string;
427
428
  decimals: number;
428
429
  addresses: {
@@ -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,EAAE,SAAS,EAAY,SAAS,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAOxC,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;AAED,eAAO,MAAM,mBAAmB,mBACd,MAAM;;aAMvB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAY7E;AAED;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,WAC5B,MAAM,WACL,MA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAqDH;;;;;;;WAOG;;;;;;;;;;;;;;;;;;;;;;;;;;CA5B6F,GAAG,OAAO,GAAG,SAAS,CAWrH;AAED,wBAAgB,4BAA4B,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAM5E;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,QAAQ,GAAE,QAAmB,GAC5B,OAAO,CAAC,SAAS,CAAC,CAGpB;AAED,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAI1D;AAED,wBAAgB,YAAY,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAc7E;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAOlF;AAED,wBAAgB,cAAc,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAa/E"}
@@ -1 +1 @@
1
- {"version":3,"file":"ValidatorUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/ValidatorUtils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAmCjD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,gBAAgB,CAEtF"}
1
+ {"version":3,"file":"ValidatorUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/ValidatorUtils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAoCjD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,gBAAgB,CAEtF"}
@@ -1,11 +1,11 @@
1
1
  import { L2Provider } from "@eth-optimism/sdk/dist/interfaces/l2-provider";
2
2
  import Decimal from "decimal.js";
3
- import { BigNumber, PopulatedTransaction, providers } from "ethers";
3
+ import { ethers, PopulatedTransaction, providers } from "ethers";
4
4
  import { TypedMessage } from "../interfaces/TypedData";
5
- import { BigNumberish, BN } from "./BigNumberUtils";
5
+ import { BigNumber, BigNumberish, BN } from "./BigNumberUtils";
6
6
  export type Decimalish = string | number | Decimal;
7
7
  export declare const AddressZero = "0x0000000000000000000000000000000000000000";
8
- export declare const MAX_BIG_INT: BigNumber;
8
+ export declare const MAX_BIG_INT: ethers.BigNumber;
9
9
  /**
10
10
  * toBNWei.
11
11
  *
@@ -38,7 +38,7 @@ export declare function min(a: BigNumberish, b: BigNumberish): BN;
38
38
  * @returns {BN}
39
39
  */
40
40
  export declare function max(a: BigNumberish, b: BigNumberish): BN;
41
- export declare const fixedPointAdjustment: BigNumber;
41
+ export declare const fixedPointAdjustment: ethers.BigNumber;
42
42
  /**
43
43
  * Convert an amount of native gas token into a token given price and token decimals.
44
44
  *
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/utils/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAG3E,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,SAAS,EAAU,oBAAoB,EAAE,SAAS,EAAc,MAAM,QAAQ,CAAC;AAExF,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,EAAE,EAAQ,MAAM,kBAAkB,CAAC;AAI1D,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AACnD,eAAO,MAAM,WAAW,+CAA+B,CAAC;AACxD,eAAO,MAAM,WAAW,WAAqD,CAAC;AAE9E;;;;;;G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,EAAE,SAAS,CAAA;SAAE;QAC7C;YAAE,IAAI,EAAE,gBAAgB,CAAC;YAAC,IAAI,EAAE,OAAO,CAAA;SAAE;KAC1C,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG;IAC9C,oBAAoB,EAAE;QACpB;YAAE,IAAI,EAAE,WAAW,CAAC;YAAC,IAAI,EAAE,QAAQ,CAAA;SAAE;QACrC;YAAE,IAAI,EAAE,eAAe,CAAC;YAAC,IAAI,EAAE,SAAS,CAAA;SAAE;QAC1C;YAAE,IAAI,EAAE,qBAAqB,CAAC;YAAC,IAAI,EAAE,SAAS,CAAA;SAAE;QAChD;YAAE,IAAI,EAAE,kBAAkB,CAAC;YAAC,IAAI,EAAE,SAAS,CAAA;SAAE;QAC7C;YAAE,IAAI,EAAE,gBAAgB,CAAC;YAAC,IAAI,EAAE,OAAO,CAAA;SAAE;KAC1C,CAAC;CACH,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,EACrB,oBAAoB,EAAE,SAAS,EAC/B,gBAAgB,EAAE,MAAM,EACxB,cAAc,EAAE,MAAM,GACrB,YAAY,CAAC,+BAA+B,CAAC,CAyB/C;AAED,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,EACrB,mBAAmB,EAAE,SAAS,EAC9B,gBAAgB,EAAE,MAAM,EACxB,cAAc,EAAE,MAAM,GACrB,YAAY,CAAC,iCAAiC,CAAC,CAyBjD;AAED,wBAAgB,aAAa,WAE5B"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@across-protocol/sdk",
3
3
  "author": "UMA Team",
4
- "version": "3.1.34",
4
+ "version": "3.1.36",
5
5
  "license": "AGPL-3.0",
6
6
  "homepage": "https://docs.across.to/reference/sdk",
7
7
  "files": [
@@ -101,6 +101,7 @@
101
101
  "@across-protocol/constants": "^3.1.14",
102
102
  "@across-protocol/contracts": "^3.0.10",
103
103
  "@eth-optimism/sdk": "^3.3.1",
104
+ "@ethersproject/bignumber": "^5.7.0",
104
105
  "@pinata/sdk": "^2.1.0",
105
106
  "@types/mocha": "^10.0.1",
106
107
  "@uma/sdk": "^0.34.1",
@@ -1,4 +1,4 @@
1
- import { ethers } from "ethers";
1
+ import { BigNumber } from "../utils";
2
2
  import {
3
3
  CoingeckoDataReturnType,
4
4
  SuggestedFeeReturnType,
@@ -64,7 +64,7 @@ export default abstract class AbstractApiClient {
64
64
  * @throws Throws an error if the API call fails.
65
65
  */
66
66
  public abstract getSuggestedFees(
67
- amount: ethers.BigNumber,
67
+ amount: BigNumber,
68
68
  originToken: string,
69
69
  toChainid: number,
70
70
  fromChainid: number
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable @typescript-eslint/no-unused-vars */
2
2
  import { ethers } from "ethers";
3
3
  import { deepCopy } from "ethers/lib/utils";
4
+ import { BigNumber, bnOne } from "../utils";
4
5
  import AbstractApiClient from "./abstractClient";
5
6
  import {
6
7
  AcrossBridgeStatisticsType,
@@ -39,7 +40,7 @@ export default class MockedApiClient extends AbstractApiClient {
39
40
  );
40
41
  }
41
42
  public getSuggestedFees(
42
- _amount: ethers.BigNumber,
43
+ _amount: BigNumber,
43
44
  _originToken: string,
44
45
  _toChainid: number,
45
46
  _fromChainid: number
@@ -47,20 +48,20 @@ export default class MockedApiClient extends AbstractApiClient {
47
48
  return Promise.resolve(
48
49
  this.mockedData.SuggestedFees ?? {
49
50
  relayerFee: {
50
- pct: ethers.constants.One,
51
- total: ethers.constants.One,
51
+ pct: bnOne,
52
+ total: bnOne,
52
53
  },
53
54
  relayerCapitalFee: {
54
- pct: ethers.constants.One,
55
- total: ethers.constants.One,
55
+ pct: bnOne,
56
+ total: bnOne,
56
57
  },
57
58
  relayerGasFee: {
58
- pct: ethers.constants.One,
59
- total: ethers.constants.One,
59
+ pct: bnOne,
60
+ total: bnOne,
60
61
  },
61
62
  isAmountTooLow: false,
62
- quoteBlock: ethers.constants.One,
63
- quoteTimestamp: ethers.constants.One,
63
+ quoteBlock: bnOne,
64
+ quoteTimestamp: bnOne,
64
65
  }
65
66
  );
66
67
  }
@@ -71,10 +72,10 @@ export default class MockedApiClient extends AbstractApiClient {
71
72
  ): Promise<BridgeLimitsReturnType> {
72
73
  return Promise.resolve(
73
74
  this.mockedData.BridgeLimits ?? {
74
- minDeposit: ethers.BigNumber.from("317845960607070"),
75
- maxDeposit: ethers.BigNumber.from("1625976243310274613043"),
76
- maxDepositInstant: ethers.BigNumber.from("148518401181482545509"),
77
- maxDepositShortDelay: ethers.BigNumber.from("1625976243310274613043"),
75
+ minDeposit: BigNumber.from("317845960607070"),
76
+ maxDeposit: BigNumber.from("1625976243310274613043"),
77
+ maxDepositInstant: BigNumber.from("148518401181482545509"),
78
+ maxDepositShortDelay: BigNumber.from("1625976243310274613043"),
78
79
  }
79
80
  );
80
81
  }
@@ -1,6 +1,6 @@
1
1
  import axios from "axios";
2
- import { ethers } from "ethers";
3
2
  import AbstractApiClient from "./abstractClient";
3
+ import { BigNumber, parseEther } from "../utils";
4
4
  import {
5
5
  CoingeckoDataReturnType,
6
6
  SuggestedFeeReturnType,
@@ -27,14 +27,13 @@ export default class ProductionApiClient extends AbstractApiClient {
27
27
  },
28
28
  });
29
29
  const result = response.data;
30
- const price =
31
- baseCurrency === "usd" ? ethers.utils.parseEther(String(result.price)) : ethers.BigNumber.from(result.price);
30
+ const price = baseCurrency === "usd" ? parseEther(String(result.price)) : BigNumber.from(result.price);
32
31
  return {
33
32
  price,
34
33
  };
35
34
  }
36
35
  public async getSuggestedFees(
37
- amount: ethers.BigNumber,
36
+ amount: BigNumber,
38
37
  originToken: string,
39
38
  toChainid: number,
40
39
  fromChainid: number
@@ -49,19 +48,19 @@ export default class ProductionApiClient extends AbstractApiClient {
49
48
  },
50
49
  });
51
50
  const result = response.data;
52
- const relayFeePct = ethers.BigNumber.from(result["relayFeePct"]);
53
- const relayFeeTotal = ethers.BigNumber.from(result["relayFeeTotal"]);
51
+ const relayFeePct = BigNumber.from(result["relayFeePct"]);
52
+ const relayFeeTotal = BigNumber.from(result["relayFeeTotal"]);
54
53
 
55
- const capitalFeePct = ethers.BigNumber.from(result["capitalFeePct"]);
56
- const capitalFeeTotal = ethers.BigNumber.from(result["capitalFeeTotal"]);
54
+ const capitalFeePct = BigNumber.from(result["capitalFeePct"]);
55
+ const capitalFeeTotal = BigNumber.from(result["capitalFeeTotal"]);
57
56
 
58
- const relayGasFeePct = ethers.BigNumber.from(result["relayGasFeePct"]);
59
- const relayGasFeeTotal = ethers.BigNumber.from(result["relayGasFeeTotal"]);
57
+ const relayGasFeePct = BigNumber.from(result["relayGasFeePct"]);
58
+ const relayGasFeeTotal = BigNumber.from(result["relayGasFeeTotal"]);
60
59
 
61
60
  const isAmountTooLow = result["isAmountTooLow"];
62
61
 
63
- const quoteTimestamp = ethers.BigNumber.from(result["timestamp"]);
64
- const quoteBlock = ethers.BigNumber.from(result["quoteBlock"]);
62
+ const quoteTimestamp = BigNumber.from(result["timestamp"]);
63
+ const quoteBlock = BigNumber.from(result["quoteBlock"]);
65
64
 
66
65
  return {
67
66
  relayerFee: {
@@ -1,25 +1,25 @@
1
- import { ethers } from "ethers";
1
+ import { BigNumber } from "../utils";
2
2
 
3
- export type CoingeckoDataReturnType = { price: ethers.BigNumber };
3
+ export type CoingeckoDataReturnType = { price: BigNumber };
4
4
 
5
5
  export type Fee = {
6
- total: ethers.BigNumber;
7
- pct: ethers.BigNumber;
6
+ total: BigNumber;
7
+ pct: BigNumber;
8
8
  };
9
9
  export type SuggestedFeeReturnType = {
10
10
  relayerFee: Fee;
11
11
  relayerGasFee: Fee;
12
12
  relayerCapitalFee: Fee;
13
13
  isAmountTooLow: boolean;
14
- quoteTimestamp: ethers.BigNumber;
15
- quoteBlock: ethers.BigNumber;
14
+ quoteTimestamp: BigNumber;
15
+ quoteBlock: BigNumber;
16
16
  };
17
17
 
18
18
  export type BridgeLimitsReturnType = {
19
- minDeposit: ethers.BigNumber;
20
- maxDeposit: ethers.BigNumber;
21
- maxDepositInstant: ethers.BigNumber;
22
- maxDepositShortDelay: ethers.BigNumber;
19
+ minDeposit: BigNumber;
20
+ maxDeposit: BigNumber;
21
+ maxDepositInstant: BigNumber;
22
+ maxDepositShortDelay: BigNumber;
23
23
  };
24
24
 
25
25
  export type SpecificRewardType = {
@@ -1,11 +1,10 @@
1
1
  import Arweave from "arweave";
2
2
  import { JWKInterface } from "arweave/node/lib/wallet";
3
3
  import axios from "axios";
4
- import { BigNumber, ethers } from "ethers";
5
4
  import { Struct, create } from "superstruct";
6
5
  import winston from "winston";
7
6
  import { ARWEAVE_TAG_APP_NAME, ARWEAVE_TAG_APP_VERSION, DEFAULT_ARWEAVE_STORAGE_ADDRESS } from "../../constants";
8
- import { isDefined, jsonReplacerWithBigNumbers, toBN } from "../../utils";
7
+ import { BigNumber, isDefined, jsonReplacerWithBigNumbers, toBN } from "../../utils";
9
8
 
10
9
  export class ArweaveClient {
11
10
  private client: Arweave;
@@ -230,14 +229,14 @@ export class ArweaveClient {
230
229
  * The balance of the signer
231
230
  * @returns The balance of the signer in winston units
232
231
  */
233
- async getBalance(): Promise<ethers.BigNumber> {
232
+ async getBalance(): Promise<BigNumber> {
234
233
  const address = await this.getAddress();
235
234
  const balanceInFloat = await this.client.wallets.getBalance(address);
236
235
  // Sometimes the balance is returned in scientific notation, so we need to
237
236
  // convert it to a BigNumber
238
237
  if (balanceInFloat.includes("e")) {
239
238
  const [balance, exponent] = balanceInFloat.split("e");
240
- const resultingBN = ethers.BigNumber.from(balance).mul(toBN(10).pow(exponent.replace("+", "")));
239
+ const resultingBN = BigNumber.from(balance).mul(toBN(10).pow(exponent.replace("+", "")));
241
240
  return BigNumber.from(resultingBN.toString());
242
241
  } else {
243
242
  return BigNumber.from(balanceInFloat);
@@ -17,6 +17,7 @@ import {
17
17
  } from "../../interfaces";
18
18
  import { AcrossConfigStoreClient, SpokePoolClient } from "..";
19
19
  import {
20
+ BigNumber,
20
21
  bnZero,
21
22
  queryHistoricalDepositForFill,
22
23
  assign,
@@ -31,7 +32,6 @@ import {
31
32
  mapAsync,
32
33
  bnUint32Max,
33
34
  } from "../../utils";
34
- import { BigNumber } from "ethers";
35
35
  import winston from "winston";
36
36
  import {
37
37
  _buildPoolRebalanceRoot,
@@ -1,8 +1,7 @@
1
1
  import { MerkleTree } from "@across-protocol/contracts/dist/utils/MerkleTree";
2
2
  import { RunningBalances, PoolRebalanceLeaf, Clients, SpokePoolTargetBalance } from "../../../interfaces";
3
3
  import { SpokePoolClient } from "../../SpokePoolClient";
4
- import { BigNumber } from "ethers";
5
- import { bnZero, compareAddresses } from "../../../utils";
4
+ import { BigNumber, bnZero, compareAddresses } from "../../../utils";
6
5
  import { HubPoolClient } from "../../HubPoolClient";
7
6
  import { V3DepositWithBlock } from "./shims";
8
7
  import { AcrossConfigStoreClient } from "../../AcrossConfigStoreClient";
@@ -11,7 +11,7 @@ import {
11
11
  boolean,
12
12
  defaulted,
13
13
  } from "superstruct";
14
- import { BigNumber } from "ethers";
14
+ import { BigNumber } from "../../../utils";
15
15
 
16
16
  const PositiveIntegerStringSS = pattern(string(), /\d+/);
17
17
  const Web3AddressSS = pattern(string(), /^0x[a-fA-F0-9]{40}$/);
@@ -1,5 +1,5 @@
1
1
  import assert from "assert";
2
- import { BigNumber, Contract, Event, EventFilter } from "ethers";
2
+ import { Contract, Event, EventFilter } from "ethers";
3
3
  import _ from "lodash";
4
4
  import winston from "winston";
5
5
  import { DEFAULT_CACHING_SAFE_LAG, DEFAULT_CACHING_TTL } from "../constants";
@@ -22,6 +22,7 @@ import {
22
22
  } from "../interfaces";
23
23
  import * as lpFeeCalculator from "../lpFeeCalculator";
24
24
  import {
25
+ BigNumber,
25
26
  BlockFinder,
26
27
  bnZero,
27
28
  dedupArray,
@@ -1,7 +1,8 @@
1
- import { BigNumber, Contract, Event, EventFilter } from "ethers";
1
+ import { Contract, Event, EventFilter } from "ethers";
2
2
  import winston from "winston";
3
3
  import {
4
4
  AnyObject,
5
+ BigNumber,
5
6
  bnZero,
6
7
  DefaultLogLevels,
7
8
  EventSearchConfig,
@@ -1,6 +1,6 @@
1
1
  import winston from "winston";
2
- import { BigNumber, Contract, Event } from "ethers";
3
- import { randomAddress, assign, bnZero } from "../../utils";
2
+ import { Contract, Event } from "ethers";
3
+ import { BigNumber, randomAddress, assign, bnZero } from "../../utils";
4
4
  import { L1Token, PendingRootBundle, RealizedLpFee } from "../../interfaces";
5
5
  import { AcrossConfigStoreClient as ConfigStoreClient } from "../AcrossConfigStoreClient";
6
6
  import { HubPoolClient, HubPoolUpdate, LpFeeRequest } from "../HubPoolClient";
@@ -1,5 +1,5 @@
1
1
  import assert from "assert";
2
- import { BigNumber, Contract, Event, providers } from "ethers";
2
+ import { Contract, Event, providers } from "ethers";
3
3
  import { random } from "lodash";
4
4
  import winston from "winston";
5
5
  import { ZERO_ADDRESS } from "../../constants";
@@ -15,7 +15,7 @@ import {
15
15
  SlowFillLeaf,
16
16
  SpeedUp,
17
17
  } from "../../interfaces";
18
- import { bnZero, toBN, toBNWei, forEachAsync, getCurrentTime, randomAddress } from "../../utils";
18
+ import { BigNumber, bnZero, toBN, toBNWei, forEachAsync, getCurrentTime, randomAddress } from "../../utils";
19
19
  import { SpokePoolClient, SpokePoolUpdate } from "../SpokePoolClient";
20
20
  import { HubPoolClient } from "../HubPoolClient";
21
21
  import { EventManager, EventOverrides, getEventManager } from "./MockEvents";
package/src/constants.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { constants as ethersConstants, BigNumber, utils } from "ethers";
1
+ import { constants as ethersConstants } from "ethers";
2
2
  import { TOKEN_SYMBOLS_MAP } from "@across-protocol/constants";
3
3
 
4
4
  export {
@@ -44,9 +44,6 @@ export const PROTOCOL_DEFAULT_CHAIN_ID_INDICES = [1, 10, 137, 288, 42161];
44
44
  export const DEFAULT_CACHING_TTL = 60 * 60 * 24 * 7 * 2; // 2 Weeks
45
45
  export const DEFAULT_CACHING_SAFE_LAG = 60 * 60; // 1 hour
46
46
 
47
- export const UBA_BOUNDS_RANGE_MAX = BigNumber.from(String(Number.MAX_SAFE_INTEGER)).mul(utils.parseEther("1.0"));
48
- export const UBA_BOUNDS_RANGE_MIN = UBA_BOUNDS_RANGE_MAX.mul(-1);
49
-
50
47
  export const DEFAULT_SIMULATED_RELAYER_ADDRESS = "0x07aE8551Be970cB1cCa11Dd7a11F47Ae82e70E67";
51
48
  export const DEFAULT_SIMULATED_RELAYER_ADDRESS_TEST = "0x9A8f92a830A5cB89a3816e3D267CB7791c16b04D"; // Görli, ...
52
49
 
@@ -1,6 +1,6 @@
1
1
  import assert from "assert";
2
- import { BigNumber, BigNumberish, Event } from "ethers";
3
- import { isDefined } from "../utils";
2
+ import { Event } from "ethers";
3
+ import { BigNumber, BigNumberish, isDefined } from "../utils";
4
4
 
5
5
  /**
6
6
  * @dev Originally imported from @uma/sdk.
@@ -1,14 +1,15 @@
1
- import { providers, utils as ethersUtils } from "ethers";
2
- import { bnOne } from "../../utils";
1
+ import { providers } from "ethers";
2
+ import { BigNumber, bnOne, parseUnits } from "../../utils";
3
3
  import { GasPriceEstimate } from "../types";
4
4
  import * as ethereum from "./ethereum";
5
5
 
6
- const DEFAULT_PRIORITY_FEE = ethersUtils.parseUnits("1.5", 9);
6
+ let DEFAULT_PRIORITY_FEE: BigNumber | undefined = undefined;
7
7
 
8
8
  // Arbitrum Nitro implements EIP-1559 pricing, but the priority fee is always refunded to the caller. Further,
9
9
  // ethers typically hardcodes the priority fee to 1.5 Gwei. So, confirm that the priority fee supplied was 1.5
10
10
  // Gwei, and then drop it to 1 Wei. Reference: https://developer.arbitrum.io/faqs/gas-faqs#q-priority
11
11
  export async function eip1559(provider: providers.Provider, chainId: number): Promise<GasPriceEstimate> {
12
+ DEFAULT_PRIORITY_FEE ??= parseUnits("1.5", 9);
12
13
  const { maxFeePerGas: _maxFeePerGas, maxPriorityFeePerGas } = await ethereum.eip1559(provider, chainId);
13
14
 
14
15
  // If this throws, ethers default behaviour has changed, or Arbitrum RPCs are returning something more sensible.
@@ -1,5 +1,5 @@
1
- import { BigNumber, providers } from "ethers";
2
- import { bnZero } from "../../utils";
1
+ import { providers } from "ethers";
2
+ import { BigNumber, bnZero } from "../../utils";
3
3
  import { GasPriceEstimate } from "../types";
4
4
  import { gasPriceError } from "../util";
5
5
 
@@ -1,6 +1,6 @@
1
- import { providers, utils as ethersUtils } from "ethers";
1
+ import { providers } from "ethers";
2
2
  import { BaseHTTPAdapter, BaseHTTPAdapterArgs } from "../../priceClient/adapters/baseAdapter";
3
- import { bnZero, isDefined } from "../../utils";
3
+ import { BigNumber, bnZero, isDefined, parseUnits } from "../../utils";
4
4
  import { CHAIN_IDs } from "../../constants";
5
5
  import { GasPriceEstimate } from "../types";
6
6
  import { gasPriceError } from "../util";
@@ -27,8 +27,6 @@ type GasStationArgs = BaseHTTPAdapterArgs & {
27
27
 
28
28
  const { POLYGON } = CHAIN_IDs;
29
29
 
30
- // @dev toBNWei() is not imported from ../utils because of a circular dependency loop.
31
- // The fix is probably to relocate the function estimateTotalGasRequiredByUnsignedTransaction().
32
30
  class PolygonGasStation extends BaseHTTPAdapter {
33
31
  readonly chainId: number;
34
32
 
@@ -42,7 +40,7 @@ class PolygonGasStation extends BaseHTTPAdapter {
42
40
  async getFeeData(strategy: "safeLow" | "standard" | "fast" = "fast"): Promise<GasPriceEstimate> {
43
41
  const gas = await this.query("v2", {});
44
42
 
45
- const gasPrice: Polygon1559GasPrice = (gas as GasStationV2Response)?.[strategy];
43
+ const gasPrice = (gas as GasStationV2Response)?.[strategy];
46
44
  if (!this.isPolygon1559GasPrice(gasPrice)) {
47
45
  // @todo: generalise gasPriceError() to accept a reason/cause?
48
46
  gasPriceError("getFeeData()", this.chainId, bnZero);
@@ -50,12 +48,12 @@ class PolygonGasStation extends BaseHTTPAdapter {
50
48
 
51
49
  [gasPrice.maxFee, gasPrice.maxPriorityFee].forEach((gasPrice) => {
52
50
  if (Number(gasPrice) < 0) {
53
- gasPriceError("getFeeData()", this.chainId, ethersUtils.parseUnits(gasPrice.toString(), 9));
51
+ gasPriceError("getFeeData()", this.chainId, parseUnits(gasPrice.toString(), 9));
54
52
  }
55
53
  });
56
54
 
57
- const maxPriorityFeePerGas = ethersUtils.parseUnits(gasPrice.maxPriorityFee.toString(), 9);
58
- const maxFeePerGas = ethersUtils.parseUnits(gasPrice.maxFee.toString(), 9);
55
+ const maxPriorityFeePerGas = parseUnits(gasPrice.maxPriorityFee.toString(), 9);
56
+ const maxFeePerGas = parseUnits(gasPrice.maxFee.toString(), 9);
59
57
 
60
58
  return { maxPriorityFeePerGas, maxFeePerGas };
61
59
  }
@@ -69,12 +67,25 @@ class PolygonGasStation extends BaseHTTPAdapter {
69
67
  }
70
68
  }
71
69
 
72
- export function gasStation(provider: providers.Provider, chainId: number): Promise<GasPriceEstimate> {
73
- const gasStation = new PolygonGasStation({ chainId: chainId });
70
+ export async function gasStation(provider: providers.Provider, chainId: number): Promise<GasPriceEstimate> {
71
+ const gasStation = new PolygonGasStation({ chainId: chainId, timeout: 2000, retries: 0 });
72
+ let maxPriorityFeePerGas: BigNumber;
73
+ let maxFeePerGas: BigNumber;
74
74
  try {
75
- return gasStation.getFeeData();
75
+ ({ maxPriorityFeePerGas, maxFeePerGas } = await gasStation.getFeeData());
76
76
  } catch (err) {
77
77
  // Fall back to the RPC provider. May be less accurate.
78
- return eip1559(provider, chainId);
78
+ ({ maxPriorityFeePerGas, maxFeePerGas } = await eip1559(provider, chainId));
79
+
80
+ // Per the GasStation docs, the minimum priority fee on Polygon is 30 Gwei.
81
+ // https://docs.polygon.technology/tools/gas/polygon-gas-station/#interpretation
82
+ const minPriorityFee = parseUnits("30", 9);
83
+ if (maxPriorityFeePerGas.lt(minPriorityFee)) {
84
+ const priorityDelta = minPriorityFee.sub(maxPriorityFeePerGas);
85
+ maxPriorityFeePerGas = minPriorityFee;
86
+ maxFeePerGas = maxFeePerGas.add(priorityDelta);
87
+ }
79
88
  }
89
+
90
+ return { maxPriorityFeePerGas, maxFeePerGas };
80
91
  }
@@ -1,4 +1,5 @@
1
- import { BigNumber, providers } from "ethers";
1
+ import { providers } from "ethers";
2
+ import { BigNumber } from "../utils";
2
3
 
3
4
  export type GasPriceEstimate = {
4
5
  maxFeePerGas: BigNumber;
@@ -1,4 +1,5 @@
1
- import { BigNumber, providers } from "ethers";
1
+ import { providers } from "ethers";
2
+ import { BigNumber } from "../utils";
2
3
 
3
4
  export function gasPriceError(method: string, chainId: number, data: providers.FeeData | BigNumber): void {
4
5
  throw new Error(`Malformed ${method} response on chain ID ${chainId} (${JSON.stringify(data)})`);
@@ -1,4 +1,4 @@
1
- import { BigNumber } from "ethers";
1
+ import { BigNumber } from "../utils";
2
2
 
3
3
  export interface OutstandingTransfers {
4
4
  [address: string]: {
@@ -1,8 +1,9 @@
1
- import { BigNumber, Signer } from "ethers";
1
+ import { Signer } from "ethers";
2
2
  import { DepositWithBlock, FillWithBlock, Refund } from "./SpokePool";
3
3
  import { HubPoolClient } from "../clients/HubPoolClient";
4
4
  import { AcrossConfigStoreClient } from "../clients";
5
5
  import { ArweaveClient } from "../caching";
6
+ import { BigNumber } from "../utils";
6
7
 
7
8
  export type ExpiredDepositsToRefundV3 = {
8
9
  [originChainId: number]: {
@@ -1,4 +1,4 @@
1
- import { BigNumber } from "ethers";
1
+ import { BigNumber } from "../utils";
2
2
 
3
3
  export interface SortableEvent {
4
4
  blockNumber: number;