@gmx-io/sdk 1.6.3 → 1.6.4

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 (247) hide show
  1. package/README.md +1 -1
  2. package/build/cjs/scripts/generate-synthetics-abis.js +181 -0
  3. package/build/cjs/scripts/subsquid-codegen.js +1 -1
  4. package/build/cjs/src/abis/AbstractSubaccountApprovalNonceable.js +23 -0
  5. package/build/cjs/src/abis/CustomErrors.js +198 -88
  6. package/build/cjs/src/abis/ExchangeRouter.js +155 -272
  7. package/build/cjs/src/abis/GelatoRelayRouter.js +331 -0
  8. package/build/cjs/src/abis/SimulationRouter.js +583 -0
  9. package/build/cjs/src/abis/SubaccountGelatoRelayRouter.js +393 -0
  10. package/build/cjs/src/abis/SyntheticsReader.js +40 -0
  11. package/build/cjs/src/abis/index.js +4 -24
  12. package/build/cjs/src/clients/v1/modules/markets/index.js +10 -6
  13. package/build/cjs/src/clients/v1/modules/orders/utils.js +1 -0
  14. package/build/cjs/src/clients/v1/modules/orders/utils.spec.js +66 -0
  15. package/build/cjs/src/clients/v1/modules/positions/positions.js +2 -10
  16. package/build/cjs/src/clients/v1/modules/positions/positions.spec.js +1 -1
  17. package/build/cjs/src/clients/v1/modules/trades/trades.js +5 -1
  18. package/build/cjs/src/clients/v1/simulateExecuteOrder.js +33 -54
  19. package/build/cjs/src/clients/v1/testUtil.js +1 -1
  20. package/build/cjs/src/clients/v2/__tests__/editCancel.spec.js +3 -1
  21. package/build/cjs/src/clients/v2/__tests__/increase.spec.js +8 -6
  22. package/build/cjs/src/clients/v2/index.js +6 -0
  23. package/build/cjs/src/codegen/prebuilt/hashedKinkModelMarketRatesKeys.json +0 -26
  24. package/build/cjs/src/codegen/prebuilt/hashedMarketConfigKeys.json +1692 -561
  25. package/build/cjs/src/codegen/prebuilt/hashedMarketValuesKeys.json +0 -47
  26. package/build/cjs/src/codegen/subsquid.js +101 -2
  27. package/build/cjs/src/configs/__tests__/tokens.spec.js +0 -1
  28. package/build/cjs/src/configs/api.js +0 -4
  29. package/build/cjs/src/configs/batch.js +0 -1
  30. package/build/cjs/src/configs/chainIds.js +1 -2
  31. package/build/cjs/src/configs/chains.js +2 -57
  32. package/build/cjs/src/configs/contracts.js +77 -133
  33. package/build/cjs/src/configs/dataStore.js +23 -8
  34. package/build/cjs/src/configs/express.js +0 -2
  35. package/build/cjs/src/configs/gasLimits.js +0 -7
  36. package/build/cjs/src/configs/markets.js +0 -23
  37. package/build/cjs/src/configs/multichainTokens.js +1 -1
  38. package/build/cjs/src/configs/oracleKeeper.js +0 -2
  39. package/build/cjs/src/configs/tokens.js +2 -104
  40. package/build/cjs/src/test/fixtures/arbitrumMarkets.json +1210 -0
  41. package/build/cjs/src/test/fixtures/arbitrumTickers.json +1002 -0
  42. package/build/cjs/src/test/fixtures/arbitrumTokens.json +136 -0
  43. package/build/cjs/src/test/mockCrossFetch.js +28 -0
  44. package/build/cjs/src/utils/__tests__/fees.spec.js +264 -0
  45. package/build/cjs/src/utils/__tests__/marketsRisk.spec.js +80 -0
  46. package/build/cjs/src/utils/__tests__/numbers.spec.js +49 -0
  47. package/build/cjs/src/utils/__tests__/orderTransactions/decreaseOrders.spec.js +6 -25
  48. package/build/cjs/src/utils/__tests__/orderTransactions/increaseOrders.spec.js +6 -25
  49. package/build/cjs/src/utils/__tests__/orderTransactions/swapOrders.spec.js +3 -13
  50. package/build/cjs/src/utils/__tests__/parseError.spec.js +23 -0
  51. package/build/cjs/src/utils/__tests__/uiFeeReceiver.spec.js +159 -58
  52. package/build/cjs/src/utils/errors/parseError.js +13 -1
  53. package/build/cjs/src/utils/errors/transactionsErrors.js +2 -0
  54. package/build/cjs/src/utils/express/utils/batchOrderUtils.js +1 -2
  55. package/build/cjs/src/utils/express/utils/estimateExpressParams.js +2 -0
  56. package/build/cjs/src/utils/express/utils/estimateExpressParams.spec.js +81 -0
  57. package/build/cjs/src/utils/express/utils/expressParamsUtils.js +5 -1
  58. package/build/cjs/src/utils/express/utils/expressParamsUtils.spec.js +27 -0
  59. package/build/cjs/src/utils/fees/executionFee.js +0 -1
  60. package/build/cjs/src/utils/fees/priceImpact.js +61 -20
  61. package/build/cjs/src/utils/http/validation.js +33 -0
  62. package/build/cjs/src/utils/markets/__tests__/api.spec.js +168 -0
  63. package/build/cjs/src/utils/markets/__tests__/mockMarkets.js +14 -5
  64. package/build/cjs/src/utils/markets/api.js +45 -3
  65. package/build/cjs/src/utils/markets/hashKeys.js +34 -6
  66. package/build/cjs/src/utils/markets/multicall.js +110 -11
  67. package/build/cjs/src/utils/markets/types.js +23 -0
  68. package/build/cjs/src/utils/markets/utils.js +15 -1
  69. package/build/cjs/src/utils/numbers/utils.js +26 -5
  70. package/build/cjs/src/utils/orderTransactions/simulation.js +13 -0
  71. package/build/cjs/src/utils/orderTransactions/utils.js +21 -8
  72. package/build/cjs/src/utils/positions/__tests__/api.spec.js +50 -0
  73. package/build/cjs/src/utils/positions/api.js +7 -1
  74. package/build/cjs/src/utils/positions/utils.js +7 -1
  75. package/build/cjs/src/utils/prices/utils.js +2 -0
  76. package/build/cjs/src/utils/subaccount/sdkClient.js +0 -1
  77. package/build/cjs/src/utils/swap/buildSwapStrategy.js +6 -123
  78. package/build/cjs/src/utils/swap/index.js +0 -3
  79. package/build/cjs/src/utils/swap/swapValues.js +0 -67
  80. package/build/cjs/src/utils/tokens/utils.js +9 -10
  81. package/build/cjs/src/utils/trade/__tests__/getMaxWithdrawAmount.spec.js +44 -0
  82. package/build/cjs/src/utils/trade/decrease.js +47 -23
  83. package/build/cjs/src/utils/trade/increase.js +22 -6
  84. package/build/cjs/src/utils/trade/types.js +0 -1
  85. package/build/cjs/src/utils/tradeHistory/types.js +3 -1
  86. package/build/cjs/src/utils/tradeHistory/utils.js +7 -0
  87. package/build/cjs/src/utils/twap/uiFeeReceiver.js +134 -47
  88. package/build/esm/scripts/generate-synthetics-abis.js +153 -0
  89. package/build/esm/scripts/subsquid-codegen.js +1 -1
  90. package/build/esm/src/abis/AbstractSubaccountApprovalNonceable.js +21 -0
  91. package/build/esm/src/abis/CustomErrors.js +198 -88
  92. package/build/esm/src/abis/ExchangeRouter.js +155 -272
  93. package/build/esm/src/abis/GelatoRelayRouter.js +331 -0
  94. package/build/esm/src/abis/SimulationRouter.js +581 -0
  95. package/build/esm/src/abis/SubaccountGelatoRelayRouter.js +393 -0
  96. package/build/esm/src/abis/SyntheticsReader.js +40 -0
  97. package/build/esm/src/abis/index.js +3 -23
  98. package/build/esm/src/clients/v1/modules/markets/index.js +10 -6
  99. package/build/esm/src/clients/v1/modules/orders/utils.js +1 -0
  100. package/build/esm/src/clients/v1/modules/orders/utils.spec.js +64 -0
  101. package/build/esm/src/clients/v1/modules/positions/positions.js +2 -10
  102. package/build/esm/src/clients/v1/modules/positions/positions.spec.js +1 -1
  103. package/build/esm/src/clients/v1/modules/trades/trades.js +5 -1
  104. package/build/esm/src/clients/v1/simulateExecuteOrder.js +35 -55
  105. package/build/esm/src/clients/v1/testUtil.js +1 -1
  106. package/build/esm/src/clients/v2/__tests__/editCancel.spec.js +3 -1
  107. package/build/esm/src/clients/v2/__tests__/increase.spec.js +8 -6
  108. package/build/esm/src/clients/v2/__tests__/swap.spec.js +1 -1
  109. package/build/esm/src/clients/v2/index.js +7 -1
  110. package/build/esm/src/codegen/prebuilt/hashedKinkModelMarketRatesKeys.json +0 -26
  111. package/build/esm/src/codegen/prebuilt/hashedMarketConfigKeys.json +1692 -561
  112. package/build/esm/src/codegen/prebuilt/hashedMarketValuesKeys.json +0 -47
  113. package/build/esm/src/codegen/subsquid.js +99 -0
  114. package/build/esm/src/configs/__tests__/multichainTokens.spec.js +1 -1
  115. package/build/esm/src/configs/__tests__/tokens.spec.js +1 -2
  116. package/build/esm/src/configs/api.js +1 -5
  117. package/build/esm/src/configs/batch.js +1 -2
  118. package/build/esm/src/configs/chainIds.js +0 -1
  119. package/build/esm/src/configs/chains.js +3 -57
  120. package/build/esm/src/configs/contracts.js +76 -133
  121. package/build/esm/src/configs/dataStore.js +16 -4
  122. package/build/esm/src/configs/express.js +1 -3
  123. package/build/esm/src/configs/gasLimits.js +1 -8
  124. package/build/esm/src/configs/markets.js +1 -24
  125. package/build/esm/src/configs/multichainTokens.js +1 -1
  126. package/build/esm/src/configs/oracleKeeper.js +1 -3
  127. package/build/esm/src/configs/tokens.js +3 -105
  128. package/build/esm/src/test/fixtures/arbitrumMarkets.json +1210 -0
  129. package/build/esm/src/test/fixtures/arbitrumTickers.json +1002 -0
  130. package/build/esm/src/test/fixtures/arbitrumTokens.json +136 -0
  131. package/build/esm/src/test/mockCrossFetch.js +23 -0
  132. package/build/esm/src/utils/__tests__/fees.spec.js +266 -2
  133. package/build/esm/src/utils/__tests__/marketsRisk.spec.js +78 -0
  134. package/build/esm/src/utils/__tests__/numbers.spec.js +50 -1
  135. package/build/esm/src/utils/__tests__/orderTransactions/decreaseOrders.spec.js +6 -25
  136. package/build/esm/src/utils/__tests__/orderTransactions/increaseOrders.spec.js +6 -25
  137. package/build/esm/src/utils/__tests__/orderTransactions/swapOrders.spec.js +3 -13
  138. package/build/esm/src/utils/__tests__/parseError.spec.js +25 -2
  139. package/build/esm/src/utils/__tests__/uiFeeReceiver.spec.js +161 -60
  140. package/build/esm/src/utils/errors/parseError.js +12 -1
  141. package/build/esm/src/utils/errors/transactionsErrors.js +2 -0
  142. package/build/esm/src/utils/express/utils/batchOrderUtils.js +2 -3
  143. package/build/esm/src/utils/express/utils/estimateExpressParams.js +2 -0
  144. package/build/esm/src/utils/express/utils/estimateExpressParams.spec.js +79 -0
  145. package/build/esm/src/utils/express/utils/expressParamsUtils.js +3 -0
  146. package/build/esm/src/utils/express/utils/expressParamsUtils.spec.js +25 -0
  147. package/build/esm/src/utils/fees/executionFee.js +0 -1
  148. package/build/esm/src/utils/fees/priceImpact.js +54 -13
  149. package/build/esm/src/utils/http/validation.js +28 -0
  150. package/build/esm/src/utils/markets/__tests__/api.spec.js +166 -0
  151. package/build/esm/src/utils/markets/__tests__/mockMarkets.js +15 -6
  152. package/build/esm/src/utils/markets/api.js +42 -2
  153. package/build/esm/src/utils/markets/hashKeys.js +35 -7
  154. package/build/esm/src/utils/markets/multicall.js +108 -11
  155. package/build/esm/src/utils/markets/types.js +22 -1
  156. package/build/esm/src/utils/markets/utils.js +13 -0
  157. package/build/esm/src/utils/numbers/utils.js +21 -3
  158. package/build/esm/src/utils/orderTransactions/simulation.js +9 -0
  159. package/build/esm/src/utils/orderTransactions/utils.js +22 -9
  160. package/build/esm/src/utils/positions/__tests__/api.spec.js +48 -0
  161. package/build/esm/src/utils/positions/api.js +7 -1
  162. package/build/esm/src/utils/positions/utils.js +7 -1
  163. package/build/esm/src/utils/prices/utils.js +2 -0
  164. package/build/esm/src/utils/subaccount/sdkClient.js +0 -1
  165. package/build/esm/src/utils/swap/buildSwapStrategy.js +7 -124
  166. package/build/esm/src/utils/swap/index.js +0 -3
  167. package/build/esm/src/utils/swap/swapValues.js +1 -68
  168. package/build/esm/src/utils/tokens/utils.js +8 -8
  169. package/build/esm/src/utils/trade/__tests__/getMaxWithdrawAmount.spec.js +45 -1
  170. package/build/esm/src/utils/trade/decrease.js +44 -22
  171. package/build/esm/src/utils/trade/increase.js +23 -7
  172. package/build/esm/src/utils/trade/types.js +0 -1
  173. package/build/esm/src/utils/tradeHistory/types.js +2 -0
  174. package/build/esm/src/utils/tradeHistory/utils.js +7 -0
  175. package/build/esm/src/utils/twap/uiFeeReceiver.js +127 -42
  176. package/build/tsconfig.tsbuildinfo +1 -1
  177. package/build/types/scripts/generate-synthetics-abis.d.ts +17 -0
  178. package/build/types/src/abis/AbstractSubaccountApprovalNonceable.d.ts +16 -0
  179. package/build/types/src/abis/CustomErrors.d.ts +331 -139
  180. package/build/types/src/abis/ExchangeRouter.d.ts +121 -209
  181. package/build/types/src/abis/GelatoRelayRouter.d.ts +258 -0
  182. package/build/types/src/abis/SimulationRouter.d.ts +448 -0
  183. package/build/types/src/abis/SubaccountGelatoRelayRouter.d.ts +307 -0
  184. package/build/types/src/abis/SyntheticsReader.d.ts +32 -0
  185. package/build/types/src/abis/index.d.ts +8108 -7891
  186. package/build/types/src/clients/v1/index.d.ts +1 -1
  187. package/build/types/src/clients/v1/modules/base.d.ts +1 -1
  188. package/build/types/src/clients/v1/modules/orders/utils.spec.d.ts +1 -0
  189. package/build/types/src/clients/v1/multicall.d.ts +1 -1
  190. package/build/types/src/clients/v1/simulateExecuteOrder.d.ts +0 -1
  191. package/build/types/src/clients/v2/index.d.ts +2 -0
  192. package/build/types/src/codegen/prebuilt/index.d.ts +1692 -634
  193. package/build/types/src/codegen/subsquid.d.ts +368 -0
  194. package/build/types/src/configs/chainIds.d.ts +0 -1
  195. package/build/types/src/configs/chains.d.ts +9 -34
  196. package/build/types/src/configs/contracts.d.ts +5 -66
  197. package/build/types/src/configs/dataStore.d.ts +8 -2
  198. package/build/types/src/configs/multichainTokens.d.ts +1 -1
  199. package/build/types/src/test/mockCrossFetch.d.ts +2 -0
  200. package/build/types/src/utils/__tests__/marketsRisk.spec.d.ts +1 -0
  201. package/build/types/src/utils/errors/parseError.d.ts +1 -0
  202. package/build/types/src/utils/errors/transactionsErrors.d.ts +2 -0
  203. package/build/types/src/utils/express/types.d.ts +2 -1
  204. package/build/types/src/utils/express/utils/batchOrderUtils.d.ts +1 -1
  205. package/build/types/src/utils/express/utils/estimateExpressParams.spec.d.ts +1 -0
  206. package/build/types/src/utils/express/utils/expressParamsUtils.d.ts +1 -0
  207. package/build/types/src/utils/express/utils/expressParamsUtils.spec.d.ts +1 -0
  208. package/build/types/src/utils/express/utils/globalExpressParams.d.ts +1 -1
  209. package/build/types/src/utils/fees/priceImpact.d.ts +2 -0
  210. package/build/types/src/utils/http/validation.d.ts +7 -0
  211. package/build/types/src/utils/markets/__tests__/api.spec.d.ts +1 -0
  212. package/build/types/src/utils/markets/api.d.ts +7 -1
  213. package/build/types/src/utils/markets/hashKeys.d.ts +1 -1
  214. package/build/types/src/utils/markets/multicall.d.ts +13 -2
  215. package/build/types/src/utils/markets/types.d.ts +18 -4
  216. package/build/types/src/utils/markets/utils.d.ts +2 -1
  217. package/build/types/src/utils/numbers/utils.d.ts +5 -1
  218. package/build/types/src/utils/orderTransactions/simulation.d.ts +1 -0
  219. package/build/types/src/utils/orders/types.d.ts +2 -0
  220. package/build/types/src/utils/positions/__tests__/api.spec.d.ts +1 -0
  221. package/build/types/src/utils/positions/types.d.ts +1 -0
  222. package/build/types/src/utils/positions/utils.d.ts +1 -0
  223. package/build/types/src/utils/prices/utils.d.ts +1 -0
  224. package/build/types/src/utils/swap/buildSwapStrategy.d.ts +3 -5
  225. package/build/types/src/utils/swap/index.d.ts +0 -3
  226. package/build/types/src/utils/swap/swapValues.d.ts +1 -1
  227. package/build/types/src/utils/swap/types.d.ts +2 -7
  228. package/build/types/src/utils/tokens/types.d.ts +0 -1
  229. package/build/types/src/utils/tokens/utils.d.ts +1 -2
  230. package/build/types/src/utils/trade/decrease.d.ts +11 -0
  231. package/build/types/src/utils/trade/types.d.ts +2 -8
  232. package/build/types/src/utils/tradeHistory/types.d.ts +7 -0
  233. package/build/types/src/utils/twap/types.d.ts +1 -1
  234. package/build/types/src/utils/twap/uiFeeReceiver.d.ts +23 -22
  235. package/package.json +10 -7
  236. package/build/cjs/src/abis/StBTC.js +0 -513
  237. package/build/cjs/src/utils/swap/botanixStaking.js +0 -90
  238. package/build/cjs/src/utils/swap/externalSwapPath.js +0 -41
  239. package/build/cjs/src/utils/swap/externalSwapQuoteByPath.js +0 -27
  240. package/build/esm/src/abis/StBTC.js +0 -511
  241. package/build/esm/src/utils/swap/botanixStaking.js +0 -83
  242. package/build/esm/src/utils/swap/externalSwapPath.js +0 -37
  243. package/build/esm/src/utils/swap/externalSwapQuoteByPath.js +0 -23
  244. package/build/types/src/abis/StBTC.d.ts +0 -932
  245. package/build/types/src/utils/swap/botanixStaking.d.ts +0 -11
  246. package/build/types/src/utils/swap/externalSwapPath.d.ts +0 -13
  247. package/build/types/src/utils/swap/externalSwapQuoteByPath.d.ts +0 -6
package/README.md CHANGED
@@ -18,7 +18,7 @@ const sdk = new GmxSdk({
18
18
  rpcUrl: "https://arb1.arbitrum.io/rpc",
19
19
  oracleUrl: "https://arbitrum-api.gmxinfra.io",
20
20
  walletClient: useWallet().walletClient,
21
- subsquidUrl: "https://gmx.squids.live/gmx-synthetics-arbitrum:prod/api/graphql",
21
+ subsquidUrl: "https://gmx.squids.live/gmx-synthetics-arbitrum@bac941/api/graphql",
22
22
  });
23
23
 
24
24
  const { marketsInfoData, tokensData } = await sdk.markets.getMarketsInfo();
@@ -0,0 +1,181 @@
1
+ "use strict";
2
+ /* eslint-disable no-console */
3
+ /**
4
+ * Generate/update ABI TypeScript files from gmx-synthetics-private deployments.
5
+ *
6
+ * Copies the contract filtering + naming behavior from extractAddresses.mjs:
7
+ * - allowedChains
8
+ * - allowedContracts
9
+ * - Reader -> SyntheticsReader
10
+ * - Router -> SyntheticsRouter
11
+ *
12
+ * Usage:
13
+ * yarn tsx sdk/scripts/generate-synthetics-abis.ts <gmx-synthetics-private-path> --chain-name=<chainName>
14
+ *
15
+ * Examples:
16
+ * yarn tsx sdk/scripts/generate-synthetics-abis.ts ../gmx-synthetics-private --chain-name=arbitrum
17
+ * yarn tsx sdk/scripts/generate-synthetics-abis.ts /path/to/gmx-synthetics-private --chain-name=avalanche
18
+ */
19
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
20
+ if (k2 === undefined) k2 = k;
21
+ var desc = Object.getOwnPropertyDescriptor(m, k);
22
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
23
+ desc = { enumerable: true, get: function() { return m[k]; } };
24
+ }
25
+ Object.defineProperty(o, k2, desc);
26
+ }) : (function(o, m, k, k2) {
27
+ if (k2 === undefined) k2 = k;
28
+ o[k2] = m[k];
29
+ }));
30
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
31
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
32
+ }) : function(o, v) {
33
+ o["default"] = v;
34
+ });
35
+ var __importStar = (this && this.__importStar) || function (mod) {
36
+ if (mod && mod.__esModule) return mod;
37
+ var result = {};
38
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
39
+ __setModuleDefault(result, mod);
40
+ return result;
41
+ };
42
+ var __importDefault = (this && this.__importDefault) || function (mod) {
43
+ return (mod && mod.__esModule) ? mod : { "default": mod };
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ const fs_1 = __importDefault(require("fs"));
47
+ const path_1 = __importDefault(require("path"));
48
+ const prettier = __importStar(require("prettier"));
49
+ const url_1 = require("url");
50
+ // Only process these specific chains (copied from extractAddresses.mjs)
51
+ const allowedChains = ["arbitrum", "avalanche", "arbitrumSepolia", "avalancheFuji", "megaEth"];
52
+ // Only include these specific contracts (copied from extractAddresses.mjs)
53
+ const allowedContracts = [
54
+ "DataStore",
55
+ "EventEmitter",
56
+ "ExchangeRouter",
57
+ "SubaccountRouter",
58
+ "Reader",
59
+ "Router",
60
+ "SimulationRouter",
61
+ "GlvReader",
62
+ "GlvRouter",
63
+ "GelatoRelayRouter",
64
+ "SubaccountGelatoRelayRouter",
65
+ "MultichainClaimsRouter",
66
+ "MultichainGlvRouter",
67
+ "MultichainGmRouter",
68
+ "MultichainOrderRouter",
69
+ "MultichainSubaccountRouter",
70
+ "MultichainTransferRouter",
71
+ "MultichainVault",
72
+ "LayerZeroProvider",
73
+ "ReferralStorage",
74
+ "ClaimHandler",
75
+ ];
76
+ // @ts-ignore
77
+ const __filename = (0, url_1.fileURLToPath)(import.meta.url);
78
+ const __dirname = path_1.default.dirname(__filename);
79
+ function resolveDeploymentsPath(inputPath) {
80
+ const absoluteInput = path_1.default.resolve(inputPath);
81
+ if (path_1.default.basename(absoluteInput) === "deployments") {
82
+ return absoluteInput;
83
+ }
84
+ const nestedDeploymentsPath = path_1.default.join(absoluteInput, "deployments");
85
+ if (fs_1.default.existsSync(nestedDeploymentsPath) && fs_1.default.statSync(nestedDeploymentsPath).isDirectory()) {
86
+ return nestedDeploymentsPath;
87
+ }
88
+ console.error(`Error: could not find deployments directory under ${absoluteInput}`);
89
+ process.exit(1);
90
+ }
91
+ function getOutputName(contractName) {
92
+ if (contractName === "Reader") {
93
+ return "SyntheticsReader";
94
+ }
95
+ if (contractName === "Router") {
96
+ return "SyntheticsRouter";
97
+ }
98
+ return contractName;
99
+ }
100
+ function renderAbiTsFile(abi) {
101
+ return `export default ${JSON.stringify(abi, null, 2)} as const;\n`;
102
+ }
103
+ async function formatAbiContent(content, filePath, resolvedConfig = {}) {
104
+ return prettier.format(content, {
105
+ ...resolvedConfig,
106
+ filepath: filePath,
107
+ });
108
+ }
109
+ async function main() {
110
+ const args = process.argv.slice(2);
111
+ const chainNameArg = args.find((arg) => arg.startsWith("--chain-name="));
112
+ const targetChainName = chainNameArg?.split("=")[1];
113
+ const basePathArg = args.find((arg) => !arg.startsWith("--"));
114
+ if (!basePathArg || !targetChainName) {
115
+ console.error("Usage: yarn tsx sdk/scripts/generate-synthetics-abis.ts <gmx-synthetics-private-path> --chain-name=<chainName>");
116
+ process.exit(1);
117
+ }
118
+ if (!allowedChains.includes(targetChainName)) {
119
+ console.error(`Error: unsupported chain "${targetChainName}". Allowed chains: ${allowedChains.join(", ")}`);
120
+ process.exit(1);
121
+ }
122
+ const deploymentsPath = resolveDeploymentsPath(basePathArg);
123
+ const chainPath = path_1.default.join(deploymentsPath, targetChainName);
124
+ if (!fs_1.default.existsSync(chainPath) || !fs_1.default.statSync(chainPath).isDirectory()) {
125
+ console.error(`Error: chain deployments folder not found: ${chainPath}`);
126
+ process.exit(1);
127
+ }
128
+ const abiOutputDir = path_1.default.join(__dirname, "..", "src", "abis");
129
+ const prettierConfig = (await prettier.resolveConfig(path_1.default.join(abiOutputDir, "index.ts"))) ?? {};
130
+ let updatedCount = 0;
131
+ let createdCount = 0;
132
+ let skippedCount = 0;
133
+ console.log(`Reading deployments from: ${chainPath}`);
134
+ console.log(`Writing ABI files to: ${abiOutputDir}\n`);
135
+ for (const contractName of allowedContracts) {
136
+ const artifactPath = path_1.default.join(chainPath, `${contractName}.json`);
137
+ if (!fs_1.default.existsSync(artifactPath)) {
138
+ console.warn(`- Skip ${contractName}: artifact not found`);
139
+ skippedCount++;
140
+ continue;
141
+ }
142
+ try {
143
+ const artifact = JSON.parse(fs_1.default.readFileSync(artifactPath, "utf8"));
144
+ if (!Array.isArray(artifact.abi)) {
145
+ console.warn(`- Skip ${contractName}: missing or invalid abi`);
146
+ skippedCount++;
147
+ continue;
148
+ }
149
+ const outputName = getOutputName(contractName);
150
+ const outputPath = path_1.default.join(abiOutputDir, `${outputName}.ts`);
151
+ const existed = fs_1.default.existsSync(outputPath);
152
+ const nextContent = await formatAbiContent(renderAbiTsFile(artifact.abi), outputPath, prettierConfig);
153
+ const prevContent = existed ? fs_1.default.readFileSync(outputPath, "utf8") : null;
154
+ if (prevContent === nextContent) {
155
+ console.log(`= ${outputName}: no changes`);
156
+ continue;
157
+ }
158
+ fs_1.default.writeFileSync(outputPath, nextContent, "utf8");
159
+ if (existed) {
160
+ updatedCount++;
161
+ console.log(`✓ ${outputName}: updated`);
162
+ }
163
+ else {
164
+ createdCount++;
165
+ console.log(`+ ${outputName}: created`);
166
+ }
167
+ }
168
+ catch (error) {
169
+ skippedCount++;
170
+ console.error(`- Skip ${contractName}: failed to process ${artifactPath}`, error);
171
+ }
172
+ }
173
+ console.log("\nDone.");
174
+ console.log(`Updated: ${updatedCount}`);
175
+ console.log(`Created: ${createdCount}`);
176
+ console.log(`Skipped: ${skippedCount}`);
177
+ }
178
+ main().catch((error) => {
179
+ console.error(error);
180
+ process.exit(1);
181
+ });
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const config = {
4
- schema: "https://gmx.squids.live/gmx-synthetics-arbitrum:prod/api/graphql",
4
+ schema: "https://gmx.squids.live/gmx-synthetics-arbitrum@bac941/api/graphql",
5
5
  overwrite: true,
6
6
  debug: true,
7
7
  generates: {
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = [
4
+ {
5
+ inputs: [
6
+ {
7
+ internalType: "address",
8
+ name: "",
9
+ type: "address",
10
+ },
11
+ ],
12
+ name: "subaccountApprovalNonces",
13
+ outputs: [
14
+ {
15
+ internalType: "uint256",
16
+ name: "",
17
+ type: "uint256",
18
+ },
19
+ ],
20
+ stateMutability: "view",
21
+ type: "function",
22
+ },
23
+ ];
@@ -30,6 +30,15 @@ exports.default = [
30
30
  name: "ArrayOutOfBoundsUint256",
31
31
  type: "error",
32
32
  },
33
+ {
34
+ inputs: [
35
+ { internalType: "uint256", name: "minRequiredFeeAmount", type: "uint256" },
36
+ { internalType: "uint256", name: "feeAmountCurrentChain", type: "uint256" },
37
+ { internalType: "uint256", name: "amountToBridgeOut", type: "uint256" },
38
+ ],
39
+ name: "AttemptedBridgeAmountTooHigh",
40
+ type: "error",
41
+ },
33
42
  {
34
43
  inputs: [
35
44
  { internalType: "address", name: "feeToken", type: "address" },
@@ -39,15 +48,28 @@ exports.default = [
39
48
  name: "AvailableFeeAmountIsZero",
40
49
  type: "error",
41
50
  },
51
+ { inputs: [], name: "BridgeOutNotSupportedDuringShift", type: "error" },
42
52
  {
43
53
  inputs: [
44
- { internalType: "uint256", name: "minOracleBlockNumber", type: "uint256" },
45
- { internalType: "uint256", name: "prevMinOracleBlockNumber", type: "uint256" },
54
+ { internalType: "uint256", name: "minRequiredFeeAmount", type: "uint256" },
55
+ { internalType: "uint256", name: "currentChainFeeAmount", type: "uint256" },
46
56
  ],
47
- name: "BlockNumbersNotSorted",
57
+ name: "BridgedAmountNotSufficient",
58
+ type: "error",
59
+ },
60
+ {
61
+ inputs: [
62
+ { internalType: "uint256", name: "balancesLength", type: "uint256" },
63
+ { internalType: "uint256", name: "targetBalancesLength", type: "uint256" },
64
+ ],
65
+ name: "BridgingBalanceArrayMismatch",
66
+ type: "error",
67
+ },
68
+ {
69
+ inputs: [{ internalType: "bytes", name: "result", type: "bytes" }],
70
+ name: "BridgingTransactionFailed",
48
71
  type: "error",
49
72
  },
50
- { inputs: [], name: "BridgeOutNotSupportedDuringShift", type: "error" },
51
73
  {
52
74
  inputs: [
53
75
  { internalType: "address", name: "feeToken", type: "address" },
@@ -199,6 +221,7 @@ exports.default = [
199
221
  type: "error",
200
222
  },
201
223
  { inputs: [], name: "EmptyOrder", type: "error" },
224
+ { inputs: [{ internalType: "uint32", name: "eid", type: "uint32" }], name: "EmptyPeer", type: "error" },
202
225
  { inputs: [], name: "EmptyPosition", type: "error" },
203
226
  { inputs: [], name: "EmptyPositionImpactWithdrawalAmount", type: "error" },
204
227
  { inputs: [{ internalType: "address", name: "token", type: "address" }], name: "EmptyPrimaryPrice", type: "error" },
@@ -222,6 +245,14 @@ exports.default = [
222
245
  { inputs: [{ internalType: "string", name: "key", type: "string" }], name: "EventItemNotFound", type: "error" },
223
246
  { inputs: [{ internalType: "bytes", name: "data", type: "bytes" }], name: "ExternalCallFailed", type: "error" },
224
247
  { inputs: [{ internalType: "bytes32", name: "key", type: "bytes32" }], name: "FeeBatchNotFound", type: "error" },
248
+ {
249
+ inputs: [
250
+ { internalType: "uint256", name: "lastDistributionTime", type: "uint256" },
251
+ { internalType: "uint256", name: "startOfCurrentWeek", type: "uint256" },
252
+ ],
253
+ name: "FeeDistributionAlreadyCompleted",
254
+ type: "error",
255
+ },
225
256
  {
226
257
  inputs: [
227
258
  { internalType: "bytes32", name: "salt", type: "bytes32" },
@@ -343,7 +374,7 @@ exports.default = [
343
374
  { internalType: "uint256", name: "effectivePriceImpactFactor", type: "uint256" },
344
375
  { internalType: "uint256", name: "glvMaxShiftPriceImpactFactor", type: "uint256" },
345
376
  ],
346
- name: "GlvShiftMaxPriceImpactExceeded",
377
+ name: "GlvShiftMaxLossExceeded",
347
378
  type: "error",
348
379
  },
349
380
  { inputs: [{ internalType: "bytes32", name: "key", type: "bytes32" }], name: "GlvShiftNotFound", type: "error" },
@@ -357,63 +388,12 @@ exports.default = [
357
388
  type: "error",
358
389
  },
359
390
  { inputs: [{ internalType: "bytes32", name: "key", type: "bytes32" }], name: "GlvWithdrawalNotFound", type: "error" },
360
- { inputs: [{ internalType: "uint256", name: "signerIndex", type: "uint256" }], name: "GmEmptySigner", type: "error" },
361
- {
362
- inputs: [
363
- { internalType: "uint256", name: "minOracleBlockNumber", type: "uint256" },
364
- { internalType: "uint256", name: "currentBlockNumber", type: "uint256" },
365
- ],
366
- name: "GmInvalidBlockNumber",
367
- type: "error",
368
- },
369
- {
370
- inputs: [
371
- { internalType: "uint256", name: "minOracleBlockNumber", type: "uint256" },
372
- { internalType: "uint256", name: "maxOracleBlockNumber", type: "uint256" },
373
- ],
374
- name: "GmInvalidMinMaxBlockNumber",
375
- type: "error",
376
- },
377
- {
378
- inputs: [
379
- { internalType: "uint256", name: "oracleSigners", type: "uint256" },
380
- { internalType: "uint256", name: "maxOracleSigners", type: "uint256" },
381
- ],
382
- name: "GmMaxOracleSigners",
383
- type: "error",
384
- },
385
391
  {
386
392
  inputs: [
387
- { internalType: "address", name: "token", type: "address" },
388
- { internalType: "uint256", name: "price", type: "uint256" },
389
- { internalType: "uint256", name: "prevPrice", type: "uint256" },
390
- ],
391
- name: "GmMaxPricesNotSorted",
392
- type: "error",
393
- },
394
- {
395
- inputs: [
396
- { internalType: "uint256", name: "signerIndex", type: "uint256" },
397
- { internalType: "uint256", name: "maxSignerIndex", type: "uint256" },
398
- ],
399
- name: "GmMaxSignerIndex",
400
- type: "error",
401
- },
402
- {
403
- inputs: [
404
- { internalType: "uint256", name: "oracleSigners", type: "uint256" },
405
- { internalType: "uint256", name: "minOracleSigners", type: "uint256" },
406
- ],
407
- name: "GmMinOracleSigners",
408
- type: "error",
409
- },
410
- {
411
- inputs: [
412
- { internalType: "address", name: "token", type: "address" },
413
- { internalType: "uint256", name: "price", type: "uint256" },
414
- { internalType: "uint256", name: "prevPrice", type: "uint256" },
393
+ { internalType: "uint256", name: "outputAmount", type: "uint256" },
394
+ { internalType: "uint256", name: "minAmountOut", type: "uint256" },
415
395
  ],
416
- name: "GmMinPricesNotSorted",
396
+ name: "InsufficientBridgeOutputAmount",
417
397
  type: "error",
418
398
  },
419
399
  {
@@ -548,6 +528,19 @@ exports.default = [
548
528
  name: "InsufficientMultichainBalance",
549
529
  type: "error",
550
530
  },
531
+ {
532
+ inputs: [{ internalType: "uint256", name: "msgValue", type: "uint256" }],
533
+ name: "InsufficientMultichainNativeFee",
534
+ type: "error",
535
+ },
536
+ {
537
+ inputs: [
538
+ { internalType: "uint256", name: "msgValue", type: "uint256" },
539
+ { internalType: "uint256", name: "expectedNativeValue", type: "uint256" },
540
+ ],
541
+ name: "InsufficientNativeTokenAmount",
542
+ type: "error",
543
+ },
551
544
  {
552
545
  inputs: [
553
546
  { internalType: "uint256", name: "outputAmount", type: "uint256" },
@@ -769,6 +762,11 @@ exports.default = [
769
762
  name: "InvalidDestinationChainId",
770
763
  type: "error",
771
764
  },
765
+ {
766
+ inputs: [{ internalType: "uint256", name: "distributionStateUint", type: "uint256" }],
767
+ name: "InvalidDistributionState",
768
+ type: "error",
769
+ },
772
770
  {
773
771
  inputs: [
774
772
  { internalType: "address", name: "token", type: "address" },
@@ -778,6 +776,14 @@ exports.default = [
778
776
  name: "InvalidEdgeDataStreamBidAsk",
779
777
  type: "error",
780
778
  },
779
+ {
780
+ inputs: [
781
+ { internalType: "address", name: "token", type: "address" },
782
+ { internalType: "uint256", name: "decimals", type: "uint256" },
783
+ ],
784
+ name: "InvalidEdgeDataStreamDecimals",
785
+ type: "error",
786
+ },
781
787
  {
782
788
  inputs: [{ internalType: "int256", name: "expo", type: "int256" }],
783
789
  name: "InvalidEdgeDataStreamExpo",
@@ -892,41 +898,13 @@ exports.default = [
892
898
  name: "InvalidGlvDepositSwapPath",
893
899
  type: "error",
894
900
  },
895
- {
896
- inputs: [
897
- { internalType: "uint256", name: "minPrice", type: "uint256" },
898
- { internalType: "uint256", name: "maxPrice", type: "uint256" },
899
- ],
900
- name: "InvalidGmMedianMinMaxPrice",
901
- type: "error",
902
- },
903
- {
904
- inputs: [{ internalType: "address", name: "token", type: "address" }],
905
- name: "InvalidGmOraclePrice",
906
- type: "error",
907
- },
908
- {
909
- inputs: [
910
- { internalType: "address", name: "recoveredSigner", type: "address" },
911
- { internalType: "address", name: "expectedSigner", type: "address" },
912
- ],
913
- name: "InvalidGmSignature",
914
- type: "error",
915
- },
916
- {
917
- inputs: [
918
- { internalType: "uint256", name: "minPrice", type: "uint256" },
919
- { internalType: "uint256", name: "maxPrice", type: "uint256" },
920
- ],
921
- name: "InvalidGmSignerMinMaxPrice",
922
- type: "error",
923
- },
924
901
  {
925
902
  inputs: [{ internalType: "address", name: "account", type: "address" }],
926
903
  name: "InvalidHoldingAddress",
927
904
  type: "error",
928
905
  },
929
906
  { inputs: [], name: "InvalidInitializer", type: "error" },
907
+ { inputs: [{ internalType: "uint256", name: "interval", type: "uint256" }], name: "InvalidInterval", type: "error" },
930
908
  {
931
909
  inputs: [{ internalType: "address", name: "keeper", type: "address" }],
932
910
  name: "InvalidKeeperForFrozenOrder",
@@ -1094,6 +1072,11 @@ exports.default = [
1094
1072
  name: "InvalidPositionSizeValues",
1095
1073
  type: "error",
1096
1074
  },
1075
+ {
1076
+ inputs: [{ internalType: "address", name: "feedAddress", type: "address" }],
1077
+ name: "InvalidPriceFeed",
1078
+ type: "error",
1079
+ },
1097
1080
  {
1098
1081
  inputs: [
1099
1082
  { internalType: "uint256", name: "primaryTokensLength", type: "uint256" },
@@ -1137,6 +1120,11 @@ exports.default = [
1137
1120
  name: "InvalidRecoveredSigner",
1138
1121
  type: "error",
1139
1122
  },
1123
+ {
1124
+ inputs: [{ internalType: "address", name: "token", type: "address" }],
1125
+ name: "InvalidReferralRewardToken",
1126
+ type: "error",
1127
+ },
1140
1128
  {
1141
1129
  inputs: [
1142
1130
  { internalType: "uint256", name: "tokensLength", type: "uint256" },
@@ -1218,6 +1206,11 @@ exports.default = [
1218
1206
  },
1219
1207
  { inputs: [], name: "InvalidTransferRequestsLength", type: "error" },
1220
1208
  { inputs: [], name: "InvalidTrustedSignerAddress", type: "error" },
1209
+ {
1210
+ inputs: [{ internalType: "uint256", name: "twapCount", type: "uint256" }],
1211
+ name: "InvalidTwapCount",
1212
+ type: "error",
1213
+ },
1221
1214
  {
1222
1215
  inputs: [
1223
1216
  { internalType: "uint256", name: "uiFeeFactor", type: "uint256" },
@@ -1228,6 +1221,37 @@ exports.default = [
1228
1221
  },
1229
1222
  { inputs: [{ internalType: "bytes32", name: "digest", type: "bytes32" }], name: "InvalidUserDigest", type: "error" },
1230
1223
  { inputs: [{ internalType: "uint256", name: "version", type: "uint256" }], name: "InvalidVersion", type: "error" },
1224
+ { inputs: [], name: "JitEmptyShiftParams", type: "error" },
1225
+ {
1226
+ inputs: [
1227
+ { internalType: "address", name: "market", type: "address" },
1228
+ { internalType: "address", name: "expectedMarket", type: "address" },
1229
+ ],
1230
+ name: "JitInvalidToMarket",
1231
+ type: "error",
1232
+ },
1233
+ {
1234
+ inputs: [{ internalType: "uint256", name: "orderType", type: "uint256" }],
1235
+ name: "JitUnsupportedOrderType",
1236
+ type: "error",
1237
+ },
1238
+ {
1239
+ inputs: [
1240
+ { internalType: "uint256", name: "wntForKeepers", type: "uint256" },
1241
+ { internalType: "uint256", name: "wntToKeepers", type: "uint256" },
1242
+ ],
1243
+ name: "KeeperAmountMismatch",
1244
+ type: "error",
1245
+ },
1246
+ {
1247
+ inputs: [
1248
+ { internalType: "uint256", name: "keepersLength", type: "uint256" },
1249
+ { internalType: "uint256", name: "keeperTargetBalancesLength", type: "uint256" },
1250
+ { internalType: "uint256", name: "keeperVersionsLength", type: "uint256" },
1251
+ ],
1252
+ name: "KeeperArrayLengthMismatch",
1253
+ type: "error",
1254
+ },
1231
1255
  {
1232
1256
  inputs: [
1233
1257
  { internalType: "string", name: "reason", type: "string" },
@@ -1288,6 +1312,14 @@ exports.default = [
1288
1312
  name: "MaxCallbackGasLimitExceeded",
1289
1313
  type: "error",
1290
1314
  },
1315
+ {
1316
+ inputs: [
1317
+ { internalType: "uint256", name: "collateralSum", type: "uint256" },
1318
+ { internalType: "uint256", name: "maxCollateralSum", type: "uint256" },
1319
+ ],
1320
+ name: "MaxCollateralSumExceeded",
1321
+ type: "error",
1322
+ },
1291
1323
  {
1292
1324
  inputs: [
1293
1325
  { internalType: "uint256", name: "dataLength", type: "uint256" },
@@ -1296,6 +1328,14 @@ exports.default = [
1296
1328
  name: "MaxDataListLengthExceeded",
1297
1329
  type: "error",
1298
1330
  },
1331
+ {
1332
+ inputs: [
1333
+ { internalType: "uint256", name: "tokensForReferralRewards", type: "uint256" },
1334
+ { internalType: "uint256", name: "maxEsGmxReferralRewards", type: "uint256" },
1335
+ ],
1336
+ name: "MaxEsGmxReferralRewardsAmountExceeded",
1337
+ type: "error",
1338
+ },
1299
1339
  {
1300
1340
  inputs: [
1301
1341
  { internalType: "uint256", name: "maxFundingFactorPerSecond", type: "uint256" },
@@ -1363,6 +1403,23 @@ exports.default = [
1363
1403
  name: "MaxRefPriceDeviationExceeded",
1364
1404
  type: "error",
1365
1405
  },
1406
+ {
1407
+ inputs: [
1408
+ { internalType: "address", name: "token", type: "address" },
1409
+ { internalType: "uint256", name: "cumulativeTransferAmount", type: "uint256" },
1410
+ { internalType: "uint256", name: "tokensForReferralRewards", type: "uint256" },
1411
+ ],
1412
+ name: "MaxReferralRewardsExceeded",
1413
+ type: "error",
1414
+ },
1415
+ {
1416
+ inputs: [
1417
+ { internalType: "uint256", name: "feeUsd", type: "uint256" },
1418
+ { internalType: "uint256", name: "maxFeeUsd", type: "uint256" },
1419
+ ],
1420
+ name: "MaxRelayFeeSwapExceeded",
1421
+ type: "error",
1422
+ },
1366
1423
  {
1367
1424
  inputs: [
1368
1425
  { internalType: "uint256", name: "feeUsd", type: "uint256" },
@@ -1411,6 +1468,30 @@ exports.default = [
1411
1468
  name: "MaxTotalContributorTokenAmountExceeded",
1412
1469
  type: "error",
1413
1470
  },
1471
+ {
1472
+ inputs: [
1473
+ { internalType: "uint256", name: "maxWntFromTreasury", type: "uint256" },
1474
+ { internalType: "uint256", name: "additionalWntFromTreasury", type: "uint256" },
1475
+ ],
1476
+ name: "MaxWntFromTreasuryExceeded",
1477
+ type: "error",
1478
+ },
1479
+ {
1480
+ inputs: [
1481
+ { internalType: "uint256", name: "wntReferralRewardsInUsd", type: "uint256" },
1482
+ { internalType: "uint256", name: "maxWntReferralRewardsInUsdAmount", type: "uint256" },
1483
+ ],
1484
+ name: "MaxWntReferralRewardsInUsdAmountExceeded",
1485
+ type: "error",
1486
+ },
1487
+ {
1488
+ inputs: [
1489
+ { internalType: "uint256", name: "wntReferralRewardsInUsd", type: "uint256" },
1490
+ { internalType: "uint256", name: "maxWntReferralRewardsInUsd", type: "uint256" },
1491
+ ],
1492
+ name: "MaxWntReferralRewardsInUsdExceeded",
1493
+ type: "error",
1494
+ },
1414
1495
  {
1415
1496
  inputs: [{ internalType: "uint256", name: "interval", type: "uint256" }],
1416
1497
  name: "MinContributorPaymentIntervalBelowAllowedRange",
@@ -1550,6 +1631,11 @@ exports.default = [
1550
1631
  name: "OrderValidFromTimeNotReached",
1551
1632
  type: "error",
1552
1633
  },
1634
+ {
1635
+ inputs: [{ internalType: "uint256", name: "timestamp", type: "uint256" }],
1636
+ name: "OutdatedReadResponse",
1637
+ type: "error",
1638
+ },
1553
1639
  {
1554
1640
  inputs: [
1555
1641
  { internalType: "int256", name: "pnlToPoolFactor", type: "int256" },
@@ -1615,12 +1701,25 @@ exports.default = [
1615
1701
  name: "ReductionExceedsLentAmount",
1616
1702
  type: "error",
1617
1703
  },
1704
+ {
1705
+ inputs: [{ internalType: "bytes32", name: "code", type: "bytes32" }],
1706
+ name: "ReferralCodeAlreadyExists",
1707
+ type: "error",
1708
+ },
1618
1709
  {
1619
1710
  inputs: [{ internalType: "uint256", name: "calldataLength", type: "uint256" }],
1620
1711
  name: "RelayCalldataTooLong",
1621
1712
  type: "error",
1622
1713
  },
1623
1714
  { inputs: [], name: "RelayEmptyBatch", type: "error" },
1715
+ {
1716
+ inputs: [
1717
+ { internalType: "bytes32", name: "listKey", type: "bytes32" },
1718
+ { internalType: "bytes32", name: "entityKey", type: "bytes32" },
1719
+ ],
1720
+ name: "RemovalShouldNotBeSkipped",
1721
+ type: "error",
1722
+ },
1624
1723
  {
1625
1724
  inputs: [
1626
1725
  { internalType: "uint256", name: "requestAge", type: "uint256" },
@@ -1635,6 +1734,15 @@ exports.default = [
1635
1734
  name: "SelfTransferNotSupported",
1636
1735
  type: "error",
1637
1736
  },
1737
+ {
1738
+ inputs: [
1739
+ { internalType: "address", name: "keeper", type: "address" },
1740
+ { internalType: "uint256", name: "sendAmount", type: "uint256" },
1741
+ { internalType: "bytes", name: "result", type: "bytes" },
1742
+ ],
1743
+ name: "SendEthToKeeperFailed",
1744
+ type: "error",
1745
+ },
1638
1746
  { inputs: [], name: "SequencerDown", type: "error" },
1639
1747
  {
1640
1748
  inputs: [
@@ -1663,6 +1771,7 @@ exports.default = [
1663
1771
  name: "SignalTimeNotYetPassed",
1664
1772
  type: "error",
1665
1773
  },
1774
+ { inputs: [{ internalType: "address", name: "token", type: "address" }], name: "StaticPriceNotSet", type: "error" },
1666
1775
  {
1667
1776
  inputs: [
1668
1777
  { internalType: "uint256", name: "currentTimestamp", type: "uint256" },
@@ -1881,4 +1990,5 @@ exports.default = [
1881
1990
  type: "error",
1882
1991
  },
1883
1992
  { inputs: [{ internalType: "bytes32", name: "key", type: "bytes32" }], name: "WithdrawalNotFound", type: "error" },
1993
+ { inputs: [], name: "ZeroTreasuryAddress", type: "error" },
1884
1994
  ];