@ledgerhq/coin-evm 15.2.0 → 16.2.0

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 (259) hide show
  1. package/.oxlintrc.json +78 -1
  2. package/CHANGELOG.md +45 -0
  3. package/lib/api/index.d.ts +1 -1
  4. package/lib/api/index.d.ts.map +1 -1
  5. package/lib/api/index.js +14 -14
  6. package/lib/api/index.js.map +1 -1
  7. package/lib/chains.d.ts +6 -2
  8. package/lib/chains.d.ts.map +1 -1
  9. package/lib/chains.js +14 -3
  10. package/lib/chains.js.map +1 -1
  11. package/lib/config.d.ts +1 -1
  12. package/lib/config.d.ts.map +1 -1
  13. package/lib/config.js +2 -1
  14. package/lib/config.js.map +1 -1
  15. package/lib/errors.d.ts +11 -0
  16. package/lib/errors.d.ts.map +1 -1
  17. package/lib/errors.js +17 -1
  18. package/lib/errors.js.map +1 -1
  19. package/lib/logic/broadcast.d.ts +1 -1
  20. package/lib/logic/broadcast.d.ts.map +1 -1
  21. package/lib/logic/broadcast.js +2 -2
  22. package/lib/logic/broadcast.js.map +1 -1
  23. package/lib/logic/craftTransaction.d.ts +1 -1
  24. package/lib/logic/craftTransaction.d.ts.map +1 -1
  25. package/lib/logic/craftTransaction.js +3 -3
  26. package/lib/logic/craftTransaction.js.map +1 -1
  27. package/lib/logic/estimateFees.d.ts +1 -1
  28. package/lib/logic/estimateFees.d.ts.map +1 -1
  29. package/lib/logic/estimateFees.js +19 -4
  30. package/lib/logic/estimateFees.js.map +1 -1
  31. package/lib/logic/getBalance.d.ts +1 -2
  32. package/lib/logic/getBalance.d.ts.map +1 -1
  33. package/lib/logic/getBalance.js +5 -6
  34. package/lib/logic/getBalance.js.map +1 -1
  35. package/lib/logic/getBlock.d.ts +1 -1
  36. package/lib/logic/getBlock.d.ts.map +1 -1
  37. package/lib/logic/getBlock.js +2 -2
  38. package/lib/logic/getBlock.js.map +1 -1
  39. package/lib/logic/getBlockInfo.d.ts +1 -1
  40. package/lib/logic/getBlockInfo.d.ts.map +1 -1
  41. package/lib/logic/getBlockInfo.js +2 -2
  42. package/lib/logic/getBlockInfo.js.map +1 -1
  43. package/lib/logic/getNextSequence.d.ts +1 -1
  44. package/lib/logic/getNextSequence.d.ts.map +1 -1
  45. package/lib/logic/getNextSequence.js +2 -2
  46. package/lib/logic/getNextSequence.js.map +1 -1
  47. package/lib/logic/getStakes.d.ts +1 -1
  48. package/lib/logic/getStakes.d.ts.map +1 -1
  49. package/lib/logic/getStakes.js +2 -2
  50. package/lib/logic/getStakes.js.map +1 -1
  51. package/lib/logic/lastBlock.d.ts +1 -1
  52. package/lib/logic/lastBlock.d.ts.map +1 -1
  53. package/lib/logic/lastBlock.js +2 -2
  54. package/lib/logic/lastBlock.js.map +1 -1
  55. package/lib/logic/listOperations.d.ts +1 -1
  56. package/lib/logic/listOperations.d.ts.map +1 -1
  57. package/lib/logic/listOperations.js +2 -2
  58. package/lib/logic/listOperations.js.map +1 -1
  59. package/lib/logic/validateIntent.d.ts +1 -1
  60. package/lib/logic/validateIntent.d.ts.map +1 -1
  61. package/lib/logic/validateIntent.js +3 -3
  62. package/lib/logic/validateIntent.js.map +1 -1
  63. package/lib/logic.d.ts.map +1 -1
  64. package/lib/logic.js +5 -10
  65. package/lib/logic.js.map +1 -1
  66. package/lib/network/node/ledger.d.ts.map +1 -1
  67. package/lib/network/node/ledger.js +1 -9
  68. package/lib/network/node/ledger.js.map +1 -1
  69. package/lib/network/node/rpc.common.d.ts.map +1 -1
  70. package/lib/network/node/rpc.common.js +3 -11
  71. package/lib/network/node/rpc.common.js.map +1 -1
  72. package/lib/network/node/types.d.ts +1 -1
  73. package/lib/network/node/types.d.ts.map +1 -1
  74. package/lib/staking/detectOperationType.js +1 -1
  75. package/lib/staking/fetchers.js +0 -2
  76. package/lib/staking/fetchers.js.map +1 -1
  77. package/lib/staking/unbondings.d.ts.map +1 -1
  78. package/lib/staking/unbondings.js +0 -2
  79. package/lib/staking/unbondings.js.map +1 -1
  80. package/lib/staking/validators/index.d.ts +1 -1
  81. package/lib/staking/validators/index.d.ts.map +1 -1
  82. package/lib/staking/validators/index.js +2 -2
  83. package/lib/staking/validators/index.js.map +1 -1
  84. package/lib/staking/validators/monad.d.ts.map +1 -1
  85. package/lib/staking/validators/monad.js +0 -2
  86. package/lib/staking/validators/monad.js.map +1 -1
  87. package/lib/staking/validators/monadResolver.js +1 -1
  88. package/lib/staking/validators/monadResolver.js.map +1 -1
  89. package/lib/staking/validators/somnia.d.ts.map +1 -1
  90. package/lib/staking/validators/somnia.js +0 -2
  91. package/lib/staking/validators/somnia.js.map +1 -1
  92. package/lib/staking/validators/zero_gravity.d.ts.map +1 -1
  93. package/lib/staking/validators/zero_gravity.js +0 -2
  94. package/lib/staking/validators/zero_gravity.js.map +1 -1
  95. package/lib/types/etherscan.d.ts +1 -1
  96. package/lib/types/etherscan.d.ts.map +1 -1
  97. package/lib-es/api/index.d.ts +1 -1
  98. package/lib-es/api/index.d.ts.map +1 -1
  99. package/lib-es/api/index.js +14 -14
  100. package/lib-es/api/index.js.map +1 -1
  101. package/lib-es/chains.d.ts +6 -2
  102. package/lib-es/chains.d.ts.map +1 -1
  103. package/lib-es/chains.js +13 -2
  104. package/lib-es/chains.js.map +1 -1
  105. package/lib-es/config.d.ts +1 -1
  106. package/lib-es/config.d.ts.map +1 -1
  107. package/lib-es/config.js +1 -1
  108. package/lib-es/config.js.map +1 -1
  109. package/lib-es/errors.d.ts +11 -0
  110. package/lib-es/errors.d.ts.map +1 -1
  111. package/lib-es/errors.js +15 -0
  112. package/lib-es/errors.js.map +1 -1
  113. package/lib-es/logic/broadcast.d.ts +1 -1
  114. package/lib-es/logic/broadcast.d.ts.map +1 -1
  115. package/lib-es/logic/broadcast.js +2 -2
  116. package/lib-es/logic/broadcast.js.map +1 -1
  117. package/lib-es/logic/craftTransaction.d.ts +1 -1
  118. package/lib-es/logic/craftTransaction.d.ts.map +1 -1
  119. package/lib-es/logic/craftTransaction.js +3 -3
  120. package/lib-es/logic/craftTransaction.js.map +1 -1
  121. package/lib-es/logic/estimateFees.d.ts +1 -1
  122. package/lib-es/logic/estimateFees.d.ts.map +1 -1
  123. package/lib-es/logic/estimateFees.js +19 -4
  124. package/lib-es/logic/estimateFees.js.map +1 -1
  125. package/lib-es/logic/getBalance.d.ts +1 -2
  126. package/lib-es/logic/getBalance.d.ts.map +1 -1
  127. package/lib-es/logic/getBalance.js +5 -6
  128. package/lib-es/logic/getBalance.js.map +1 -1
  129. package/lib-es/logic/getBlock.d.ts +1 -1
  130. package/lib-es/logic/getBlock.d.ts.map +1 -1
  131. package/lib-es/logic/getBlock.js +2 -2
  132. package/lib-es/logic/getBlock.js.map +1 -1
  133. package/lib-es/logic/getBlockInfo.d.ts +1 -1
  134. package/lib-es/logic/getBlockInfo.d.ts.map +1 -1
  135. package/lib-es/logic/getBlockInfo.js +2 -2
  136. package/lib-es/logic/getBlockInfo.js.map +1 -1
  137. package/lib-es/logic/getNextSequence.d.ts +1 -1
  138. package/lib-es/logic/getNextSequence.d.ts.map +1 -1
  139. package/lib-es/logic/getNextSequence.js +2 -2
  140. package/lib-es/logic/getNextSequence.js.map +1 -1
  141. package/lib-es/logic/getStakes.d.ts +1 -1
  142. package/lib-es/logic/getStakes.d.ts.map +1 -1
  143. package/lib-es/logic/getStakes.js +2 -2
  144. package/lib-es/logic/getStakes.js.map +1 -1
  145. package/lib-es/logic/lastBlock.d.ts +1 -1
  146. package/lib-es/logic/lastBlock.d.ts.map +1 -1
  147. package/lib-es/logic/lastBlock.js +2 -2
  148. package/lib-es/logic/lastBlock.js.map +1 -1
  149. package/lib-es/logic/listOperations.d.ts +1 -1
  150. package/lib-es/logic/listOperations.d.ts.map +1 -1
  151. package/lib-es/logic/listOperations.js +2 -2
  152. package/lib-es/logic/listOperations.js.map +1 -1
  153. package/lib-es/logic/validateIntent.d.ts +1 -1
  154. package/lib-es/logic/validateIntent.d.ts.map +1 -1
  155. package/lib-es/logic/validateIntent.js +3 -3
  156. package/lib-es/logic/validateIntent.js.map +1 -1
  157. package/lib-es/logic.d.ts.map +1 -1
  158. package/lib-es/logic.js +6 -11
  159. package/lib-es/logic.js.map +1 -1
  160. package/lib-es/network/node/ledger.d.ts.map +1 -1
  161. package/lib-es/network/node/ledger.js +2 -10
  162. package/lib-es/network/node/ledger.js.map +1 -1
  163. package/lib-es/network/node/rpc.common.d.ts.map +1 -1
  164. package/lib-es/network/node/rpc.common.js +4 -12
  165. package/lib-es/network/node/rpc.common.js.map +1 -1
  166. package/lib-es/network/node/types.d.ts +1 -1
  167. package/lib-es/network/node/types.d.ts.map +1 -1
  168. package/lib-es/staking/detectOperationType.js +1 -1
  169. package/lib-es/staking/fetchers.js +0 -2
  170. package/lib-es/staking/fetchers.js.map +1 -1
  171. package/lib-es/staking/unbondings.d.ts.map +1 -1
  172. package/lib-es/staking/unbondings.js +0 -2
  173. package/lib-es/staking/unbondings.js.map +1 -1
  174. package/lib-es/staking/validators/index.d.ts +1 -1
  175. package/lib-es/staking/validators/index.d.ts.map +1 -1
  176. package/lib-es/staking/validators/index.js +2 -2
  177. package/lib-es/staking/validators/index.js.map +1 -1
  178. package/lib-es/staking/validators/monad.d.ts.map +1 -1
  179. package/lib-es/staking/validators/monad.js +0 -2
  180. package/lib-es/staking/validators/monad.js.map +1 -1
  181. package/lib-es/staking/validators/monadResolver.js +1 -1
  182. package/lib-es/staking/validators/monadResolver.js.map +1 -1
  183. package/lib-es/staking/validators/somnia.d.ts.map +1 -1
  184. package/lib-es/staking/validators/somnia.js +0 -2
  185. package/lib-es/staking/validators/somnia.js.map +1 -1
  186. package/lib-es/staking/validators/zero_gravity.d.ts.map +1 -1
  187. package/lib-es/staking/validators/zero_gravity.js +0 -2
  188. package/lib-es/staking/validators/zero_gravity.js.map +1 -1
  189. package/lib-es/types/etherscan.d.ts +1 -1
  190. package/lib-es/types/etherscan.d.ts.map +1 -1
  191. package/package.json +2 -2
  192. package/src/api/index.ts +14 -16
  193. package/src/api/tests/getBlock.integ.test.ts +3 -3
  194. package/src/api/tests/index.arbitrum.integ.test.ts +1 -1
  195. package/src/api/tests/index.arc.integ.test.ts +1 -1
  196. package/src/api/tests/index.avalanche_c_chain_fuji.integ.test.ts +1 -1
  197. package/src/api/tests/index.cronos.integ.test.ts +1 -1
  198. package/src/api/tests/index.flare.integ.test.ts +1 -1
  199. package/src/api/tests/index.integ.test.ts +5 -5
  200. package/src/api/tests/index.linea.integ.test.ts +1 -1
  201. package/src/api/tests/index.monad_testnet.integ.test.ts +1 -1
  202. package/src/api/tests/index.optimism.integ.test.ts +1 -1
  203. package/src/api/tests/index.rsk.integ.test.ts +1 -1
  204. package/src/api/tests/index.shape.integ.test.ts +1 -1
  205. package/src/api/tests/index.somnia.integ.test.ts +1 -1
  206. package/src/api/tests/index.test.ts +6 -6
  207. package/src/api/tests/index.zksync.integ.test.ts +1 -1
  208. package/src/chains.ts +14 -2
  209. package/src/config.ts +1 -1
  210. package/src/errors.ts +14 -0
  211. package/src/fixtures/context.fixtures.ts +2 -4
  212. package/src/logic/broadcast.ts +1 -2
  213. package/src/logic/craftTransaction.ts +2 -3
  214. package/src/logic/estimateFees.ts +22 -4
  215. package/src/logic/getBalance.ts +3 -6
  216. package/src/logic/getBlock.ts +2 -6
  217. package/src/logic/getBlockInfo.ts +2 -6
  218. package/src/logic/getNextSequence.ts +2 -6
  219. package/src/logic/getStakes.ts +1 -2
  220. package/src/logic/lastBlock.ts +2 -2
  221. package/src/logic/listOperations.ts +1 -2
  222. package/src/logic/tests/broadcast.integ.test.ts +1 -1
  223. package/src/logic/tests/broadcast.test.ts +4 -4
  224. package/src/logic/tests/broadcastSource.test.ts +3 -3
  225. package/src/logic/tests/craftTransaction.test.ts +15 -20
  226. package/src/logic/tests/estimateFees.test.ts +39 -17
  227. package/src/logic/tests/getBalance.test.ts +19 -22
  228. package/src/logic/tests/getBlock.test.ts +37 -38
  229. package/src/logic/tests/getBlockInfo.test.ts +5 -5
  230. package/src/logic/tests/getNextSequence.test.ts +1 -1
  231. package/src/logic/tests/getStakes.test.ts +14 -22
  232. package/src/logic/tests/lastBlock.test.ts +3 -3
  233. package/src/logic/tests/listOperations.test.ts +46 -52
  234. package/src/logic/tests/validateIntent.test.ts +3 -61
  235. package/src/logic/validateIntent.ts +2 -3
  236. package/src/logic.test.ts +23 -6
  237. package/src/logic.ts +6 -11
  238. package/src/network/node/ledger.ts +2 -10
  239. package/src/network/node/rpc.common.ts +4 -12
  240. package/src/network/node/types.ts +1 -1
  241. package/src/network/tests/explorer/index.test.ts +4 -4
  242. package/src/network/tests/node/ledger.test.ts +2 -2
  243. package/src/network/tests/node/rpc.test.ts +42 -0
  244. package/src/staking/detectOperationType.ts +1 -1
  245. package/src/staking/fetchers.ts +0 -2
  246. package/src/staking/redelegations.test.ts +3 -3
  247. package/src/staking/unbondings.test.ts +1 -1
  248. package/src/staking/unbondings.ts +0 -2
  249. package/src/staking/validators/index.ts +1 -2
  250. package/src/staking/validators/monad.test.ts +0 -6
  251. package/src/staking/validators/monad.ts +0 -2
  252. package/src/staking/validators/monadResolver.ts +1 -1
  253. package/src/staking/validators/somnia.test.ts +0 -2
  254. package/src/staking/validators/somnia.ts +0 -2
  255. package/src/staking/validators/zero_gravity.test.ts +0 -2
  256. package/src/staking/validators/zero_gravity.ts +0 -2
  257. package/src/staking/validators.integ.test.ts +1 -1
  258. package/src/staking/validators.test.ts +1 -1
  259. package/src/types/etherscan.ts +1 -1
@@ -159,7 +159,6 @@ describe('validateIntent', () => {
159
159
  ])('%s with too high fees on a %s asset', async (_s, assetType, expectedWarnings) => {
160
160
  const res = await validateIntent(
161
161
  context,
162
- 'ethereum',
163
162
  eip1559Intent({
164
163
  amount: 1n,
165
164
  asset: { type: assetType },
@@ -177,12 +176,9 @@ describe('validateIntent', () => {
177
176
 
178
177
  describe('recipient', () => {
179
178
  it('detects the missing recipient with an error', async () => {
180
- const res = await validateIntent(
181
- context,
182
- 'ethereum',
183
- eip1559Intent({ amount: 1n, recipient: '' }),
184
- [{ value: 50n, asset: { type: 'native' } }]
185
- )
179
+ const res = await validateIntent(context, eip1559Intent({ amount: 1n, recipient: '' }), [
180
+ { value: 50n, asset: { type: 'native' } },
181
+ ])
186
182
 
187
183
  expect(res.errors).toEqual(
188
184
  expect.objectContaining({
@@ -194,7 +190,6 @@ describe('validateIntent', () => {
194
190
  it('detects the incorrect recipient not being an eth address with an error', async () => {
195
191
  const res = await validateIntent(
196
192
  context,
197
- 'ethereum',
198
193
  eip1559Intent({ amount: 1n, recipient: 'invalid-address' }),
199
194
  [{ value: 50n, asset: { type: 'native' } }]
200
195
  )
@@ -211,7 +206,6 @@ describe('validateIntent', () => {
211
206
  it('detects the recipient being an ICAP with an error', async () => {
212
207
  const res = await validateIntent(
213
208
  context,
214
- 'ethereum',
215
209
  eip1559Intent({
216
210
  amount: 1n,
217
211
  recipient: 'XE89MW3Y75UITCQ4F53YDKR25UFLB1640YM', // ICAP version of recipient address
@@ -233,7 +227,6 @@ describe('validateIntent', () => {
233
227
  function nativeSendToRecipient(overrides = {}) {
234
228
  return validateIntent(
235
229
  context,
236
- 'ethereum',
237
230
  eip1559Intent({ amount: 1n, recipient: RECIPIENT, ...overrides }),
238
231
  [{ value: 50n, asset: { type: 'native' } }],
239
232
  { value: 0n, parameters: { gasLimit: 21000n, maxFeePerGas: 1n } }
@@ -322,7 +315,6 @@ describe('validateIntent', () => {
322
315
  it('detects the recipient not being an EIP55 address with a warning', async () => {
323
316
  const res = await validateIntent(
324
317
  context,
325
- 'ethereum',
326
318
  eip1559Intent({
327
319
  amount: 1n,
328
320
  recipient: '0xe2ca7390e76c5a992749bb622087310d2e63ca29',
@@ -342,7 +334,6 @@ describe('validateIntent', () => {
342
334
  it('detects an intent for a smart contract interaction without amount-related errors', async () => {
343
335
  const res = await validateIntent(
344
336
  context,
345
- 'ethereum',
346
337
  eip1559Intent({
347
338
  amount: 0n,
348
339
  asset: { type: 'native' },
@@ -361,7 +352,6 @@ describe('validateIntent', () => {
361
352
  it('detects an intent for native asset sending without amount with an error', async () => {
362
353
  const res = await validateIntent(
363
354
  context,
364
- 'ethereum',
365
355
  eip1559Intent({
366
356
  amount: 0n,
367
357
  asset: { type: 'native' },
@@ -381,7 +371,6 @@ describe('validateIntent', () => {
381
371
 
382
372
  const res = await validateIntent(
383
373
  context,
384
- 'ethereum',
385
374
  eip1559Intent({
386
375
  recipient: '0xe2ca7390e76c5A992749bB622087310d2e63ca29',
387
376
  amount: 0n,
@@ -403,7 +392,6 @@ describe('validateIntent', () => {
403
392
  it('detects native asset sending intent with an error', async () => {
404
393
  const res = await validateIntent(
405
394
  context,
406
- 'ethereum',
407
395
  eip1559Intent({
408
396
  amount: 20n,
409
397
  asset: { type: 'native' },
@@ -449,7 +437,6 @@ describe('validateIntent', () => {
449
437
 
450
438
  const res = await validateIntent(
451
439
  context,
452
- 'ethereum',
453
440
  eip1559Intent({
454
441
  sender: 'sender-address',
455
442
  recipient: '0xe2ca7390e76c5A992749bB622087310d2e63ca29',
@@ -481,7 +468,6 @@ describe('validateIntent', () => {
481
468
  it('detects NotEnoughBalance when spending would dip into locked funds', async () => {
482
469
  const res = await validateIntent(
483
470
  context,
484
- 'ethereum',
485
471
  eip1559Intent({
486
472
  recipient: '0xe2ca7390e76c5A992749bB622087310d2e63ca29',
487
473
  amount: 60n,
@@ -516,7 +502,6 @@ describe('validateIntent', () => {
516
502
 
517
503
  const res = await validateIntent(
518
504
  context,
519
- 'ethereum',
520
505
  legacyIntent({
521
506
  recipient: '0xe2ca7390e76c5A992749bB622087310d2e63ca29',
522
507
  useAllAmount: true,
@@ -539,7 +524,6 @@ describe('validateIntent', () => {
539
524
  it('detects missing validator address for delegate with an error', async () => {
540
525
  const res = await validateIntent(
541
526
  context,
542
- 'sei_evm',
543
527
  createStakingTransactionIntentMockData<MemoNotSupported, BufferTxData>({
544
528
  type: 'staking-legacy',
545
529
  mode: 'delegate',
@@ -563,7 +547,6 @@ describe('validateIntent', () => {
563
547
  it('detects missing destination validator address for redelegate with an error', async () => {
564
548
  const res = await validateIntent(
565
549
  context,
566
- 'sei_evm',
567
550
  createStakingTransactionIntentMockData<MemoNotSupported, BufferTxData>({
568
551
  type: 'staking-legacy',
569
552
  mode: 'redelegate',
@@ -587,7 +570,6 @@ describe('validateIntent', () => {
587
570
  it('detects delegate total spent greater than spendable balance with an error', async () => {
588
571
  const res = await validateIntent(
589
572
  context,
590
- 'sei_evm',
591
573
  createStakingTransactionIntentMockData<MemoNotSupported, BufferTxData>({
592
574
  type: 'staking-legacy',
593
575
  mode: 'delegate',
@@ -612,7 +594,6 @@ describe('validateIntent', () => {
612
594
  it('allows undelegate when amount exceeds spendable but fees fit in spendable balance', async () => {
613
595
  const res = await validateIntent(
614
596
  context,
615
- 'sei_evm',
616
597
  createStakingTransactionIntentMockData<MemoNotSupported, BufferTxData>({
617
598
  type: 'staking-legacy',
618
599
  mode: 'undelegate',
@@ -634,7 +615,6 @@ describe('validateIntent', () => {
634
615
  it('allows redelegate when amount exceeds spendable but fees fit in spendable balance', async () => {
635
616
  const res = await validateIntent(
636
617
  context,
637
- 'sei_evm',
638
618
  createStakingTransactionIntentMockData<MemoNotSupported, BufferTxData>({
639
619
  type: 'staking-legacy',
640
620
  mode: 'redelegate',
@@ -657,7 +637,6 @@ describe('validateIntent', () => {
657
637
  it('detects staking fees greater than native balance with an error', async () => {
658
638
  const res = await validateIntent(
659
639
  context,
660
- 'sei_evm',
661
640
  createStakingTransactionIntentMockData<MemoNotSupported, BufferTxData>({
662
641
  type: 'staking-legacy',
663
642
  mode: 'delegate',
@@ -682,7 +661,6 @@ describe('validateIntent', () => {
682
661
  it('should return an error when not enough balance for a claim reward', async () => {
683
662
  const res = await validateIntent(
684
663
  context,
685
- 'sei_evm',
686
664
  createStakingTransactionIntentMockData<MemoNotSupported, BufferTxData>({
687
665
  type: 'staking-legacy',
688
666
  mode: 'claimReward',
@@ -705,7 +683,6 @@ describe('validateIntent', () => {
705
683
  it('should return an error when no validator specified for a claim reward', async () => {
706
684
  const res = await validateIntent(
707
685
  context,
708
- 'sei_evm',
709
686
  createStakingTransactionIntentMockData<MemoNotSupported, BufferTxData>({
710
687
  type: 'staking-legacy',
711
688
  mode: 'claimReward',
@@ -728,7 +705,6 @@ describe('validateIntent', () => {
728
705
  it('should return no error for a valid claim reward', async () => {
729
706
  const res = await validateIntent(
730
707
  context,
731
- 'sei_evm',
732
708
  createStakingTransactionIntentMockData<MemoNotSupported, BufferTxData>({
733
709
  type: 'staking-legacy',
734
710
  mode: 'claimReward',
@@ -766,7 +742,6 @@ describe('validateIntent', () => {
766
742
  const totalFees = 100_000n // gasLimit(100_000) × gasPrice(1)
767
743
  const res = await validateIntent(
768
744
  context,
769
- 'unknown_chain',
770
745
  createStakingTransactionIntentMockData<MemoNotSupported, BufferTxData>({
771
746
  type: 'staking-legacy',
772
747
  mode: 'delegate',
@@ -789,7 +764,6 @@ describe('validateIntent', () => {
789
764
  const fees = 2n * 10n ** 17n // > configuredReserve
790
765
  const res = await validateIntent(
791
766
  seiContext,
792
- 'sei_evm',
793
767
  createStakingTransactionIntentMockData<MemoNotSupported, BufferTxData>({
794
768
  type: 'staking-legacy',
795
769
  mode: 'delegate',
@@ -817,7 +791,6 @@ describe('validateIntent', () => {
817
791
  const fees = 10n ** 14n // < configuredReserve
818
792
  const res = await validateIntent(
819
793
  seiContext,
820
- 'sei_evm',
821
794
  createStakingTransactionIntentMockData<MemoNotSupported, BufferTxData>({
822
795
  type: 'staking-legacy',
823
796
  mode: 'delegate',
@@ -870,7 +843,6 @@ describe('validateIntent', () => {
870
843
  ])('$name', async ({ amount, native }) => {
871
844
  const res = await validateIntent(
872
845
  context,
873
- 'sei_evm',
874
846
  claimRewardIntent({ amount, native }),
875
847
  claimRewardBalances(native),
876
848
  claimRewardFees
@@ -897,7 +869,6 @@ describe('validateIntent', () => {
897
869
  ])('$name', async ({ amount, native }) => {
898
870
  const res = await validateIntent(
899
871
  context,
900
- 'sei_evm',
901
872
  claimRewardIntent({ amount, native }),
902
873
  claimRewardBalances(native),
903
874
  claimRewardFees
@@ -915,7 +886,6 @@ describe('validateIntent', () => {
915
886
  it('detects missing fees with an error', async () => {
916
887
  const res = await validateIntent(
917
888
  context,
918
- 'ethereum',
919
889
  createIntent({}),
920
890
  [{ value: 50n, asset: { type: 'native' } }],
921
891
  { value: 0n }
@@ -931,7 +901,6 @@ describe('validateIntent', () => {
931
901
  it('detects a missing gasLimit with an error', async () => {
932
902
  const res = await validateIntent(
933
903
  context,
934
- 'ethereum',
935
904
  createIntent({}),
936
905
  [{ value: 50n, asset: { type: 'native' } }],
937
906
  {
@@ -950,7 +919,6 @@ describe('validateIntent', () => {
950
919
  it('detects a gasLimit = 0 with an error', async () => {
951
920
  const res = await validateIntent(
952
921
  context,
953
- 'ethereum',
954
922
  createIntent({}),
955
923
  [{ value: 50n, asset: { type: 'native' } }],
956
924
  {
@@ -969,7 +937,6 @@ describe('validateIntent', () => {
969
937
  it('detects a customGasLimit = 0 with an error', async () => {
970
938
  const res = await validateIntent(
971
939
  context,
972
- 'ethereum',
973
940
  createIntent({}),
974
941
  [{ value: 50n, asset: { type: 'native' } }],
975
942
  {
@@ -988,7 +955,6 @@ describe('validateIntent', () => {
988
955
  it('if the recipient has been set, detects fees being too high for the account balance with an error', async () => {
989
956
  const notEnoughBalanceRes = await validateIntent(
990
957
  context,
991
- 'ethereum',
992
958
  createIntent({ recipient: 'recipient-address' }),
993
959
  [{ value: 10n, asset: { type: 'native' } }],
994
960
  {
@@ -1003,7 +969,6 @@ describe('validateIntent', () => {
1003
969
  )
1004
970
  const notEnoughBalanceSponsoredRes = await validateIntent(
1005
971
  context,
1006
- 'ethereum',
1007
972
  createIntent({ recipient: 'recipient-address' }),
1008
973
  [{ value: 10n, asset: { type: 'native' } }],
1009
974
  {
@@ -1019,7 +984,6 @@ describe('validateIntent', () => {
1019
984
  )
1020
985
  const enoughBalanceRes = await validateIntent(
1021
986
  context,
1022
- 'ethereum',
1023
987
  createIntent({ recipient: 'recipient-address' }),
1024
988
  [{ value: 10n, asset: { type: 'native' } }],
1025
989
  {
@@ -1064,7 +1028,6 @@ describe('validateIntent', () => {
1064
1028
 
1065
1029
  const res = await validateIntent(
1066
1030
  alpenContext,
1067
- 'alpen_testnet',
1068
1031
  createIntent({ recipient: 'recipient-address' }),
1069
1032
  [{ value: 10n, asset: { type: 'native' } }],
1070
1033
  {
@@ -1091,7 +1054,6 @@ describe('validateIntent', () => {
1091
1054
  // (e.g. L1 data fee on L2s) push the total above the native balance.
1092
1055
  const res = await validateIntent(
1093
1056
  context,
1094
- 'ethereum',
1095
1057
  createIntent({ recipient: 'recipient-address' }),
1096
1058
  [{ value: 10n, asset: { type: 'native' } }],
1097
1059
  {
@@ -1116,7 +1078,6 @@ describe('validateIntent', () => {
1116
1078
  it('if the recipient has not been set, does not detect gas being too high', async () => {
1117
1079
  const notEnoughBalanceRes = await validateIntent(
1118
1080
  context,
1119
- 'ethereum',
1120
1081
  createIntent({ recipient: '' }),
1121
1082
  [{ value: 10n, asset: { type: 'native' } }],
1122
1083
  {
@@ -1130,7 +1091,6 @@ describe('validateIntent', () => {
1130
1091
  )
1131
1092
  const enoughBalanceRes = await validateIntent(
1132
1093
  context,
1133
- 'ethereum',
1134
1094
  createIntent({ recipient: '' }),
1135
1095
  [{ value: 10n, asset: { type: 'native' } }],
1136
1096
  {
@@ -1161,7 +1121,6 @@ describe('validateIntent', () => {
1161
1121
 
1162
1122
  const res = await validateIntent(
1163
1123
  context,
1164
- 'ethereum',
1165
1124
  createIntent({}),
1166
1125
  [{ value: 50n, asset: { type: 'native' } }],
1167
1126
  {
@@ -1185,7 +1144,6 @@ describe('validateIntent', () => {
1185
1144
 
1186
1145
  const res = await validateIntent(
1187
1146
  context,
1188
- 'ethereum',
1189
1147
  createIntent({}),
1190
1148
  [{ value: 50n, asset: { type: 'native' } }],
1191
1149
  {
@@ -1218,7 +1176,6 @@ describe('validateIntent', () => {
1218
1176
 
1219
1177
  await validateIntent(
1220
1178
  context,
1221
- 'ethereum',
1222
1179
  createIntent({}),
1223
1180
  [{ value: 50n, asset: { type: 'native' } }],
1224
1181
  { value: 0n, parameters: { gasLimit: 21000n } }
@@ -1234,7 +1191,6 @@ describe('validateIntent', () => {
1234
1191
  it('forwards the EIP-7623 defaults when the coin config sets none', async () => {
1235
1192
  await validateIntent(
1236
1193
  context,
1237
- 'ethereum',
1238
1194
  createIntent({}),
1239
1195
  [{ value: 50n, asset: { type: 'native' } }],
1240
1196
  { value: 0n, parameters: { gasLimit: 21000n } }
@@ -1251,7 +1207,6 @@ describe('validateIntent', () => {
1251
1207
  it('detects customGasLimit being lower than gasLimit with a warning', async () => {
1252
1208
  const res = await validateIntent(
1253
1209
  context,
1254
- 'ethereum',
1255
1210
  createIntent({}),
1256
1211
  [{ value: 50n, asset: { type: 'native' } }],
1257
1212
  {
@@ -1276,7 +1231,6 @@ describe('validateIntent', () => {
1276
1231
  it('detects a maxPriorityFeePerGas = 0 with an error', async () => {
1277
1232
  const res = await validateIntent(
1278
1233
  context,
1279
- 'ethereum',
1280
1234
  eip1559Intent({}),
1281
1235
  [{ value: 50n, asset: { type: 'native' } }],
1282
1236
  {
@@ -1295,7 +1249,6 @@ describe('validateIntent', () => {
1295
1249
  it('detects maxFeePerGas being greater than max gasOptions maxFeePerGas with an error', async () => {
1296
1250
  const res = await validateIntent(
1297
1251
  context,
1298
- 'ethereum',
1299
1252
  eip1559Intent({}),
1300
1253
  [{ value: 50n, asset: { type: 'native' } }],
1301
1254
  {
@@ -1335,7 +1288,6 @@ describe('validateIntent', () => {
1335
1288
 
1336
1289
  const res = await validateIntent(
1337
1290
  context,
1338
- 'ethereum',
1339
1291
  eip1559Intent({}),
1340
1292
  [{ value: 50n, asset: { type: 'native' } }],
1341
1293
  {
@@ -1375,7 +1327,6 @@ describe('validateIntent', () => {
1375
1327
 
1376
1328
  const res = await validateIntent(
1377
1329
  context,
1378
- 'ethereum',
1379
1330
  eip1559Intent({}),
1380
1331
  [{ value: 50n, asset: { type: 'native' } }],
1381
1332
  {
@@ -1415,7 +1366,6 @@ describe('validateIntent', () => {
1415
1366
 
1416
1367
  const res = await validateIntent(
1417
1368
  context,
1418
- 'ethereum',
1419
1369
  eip1559Intent({}),
1420
1370
  [{ value: 50n, asset: { type: 'native' } }],
1421
1371
  {
@@ -1447,7 +1397,6 @@ describe('validateIntent', () => {
1447
1397
  it('raises an error when maxPriorityFeePerGas is below the chain minGasPrice', async () => {
1448
1398
  const res = await validateIntent(
1449
1399
  context,
1450
- 'ethereum',
1451
1400
  eip1559Intent({}),
1452
1401
  [{ value: 50n, asset: { type: 'native' } }],
1453
1402
  {
@@ -1466,7 +1415,6 @@ describe('validateIntent', () => {
1466
1415
  it('does not raise an error when maxPriorityFeePerGas is above the chain minGasPrice', async () => {
1467
1416
  const res = await validateIntent(
1468
1417
  context,
1469
- 'ethereum',
1470
1418
  eip1559Intent({}),
1471
1419
  [{ value: 50n, asset: { type: 'native' } }],
1472
1420
  {
@@ -1501,7 +1449,6 @@ describe('validateIntent', () => {
1501
1449
  it('raises an error when gasPrice is below the chain minGasPrice', async () => {
1502
1450
  const res = await validateIntent(
1503
1451
  context,
1504
- 'ethereum',
1505
1452
  legacyIntent({ recipient: '0xe2ca7390e76c5A992749bB622087310d2e63ca29' }),
1506
1453
  [{ value: 50n, asset: { type: 'native' } }],
1507
1454
  {
@@ -1520,7 +1467,6 @@ describe('validateIntent', () => {
1520
1467
  it('does not raise an error when gasPrice is above the chain minGasPrice', async () => {
1521
1468
  const res = await validateIntent(
1522
1469
  context,
1523
- 'ethereum',
1524
1470
  legacyIntent({ recipient: '0xe2ca7390e76c5A992749bB622087310d2e63ca29' }),
1525
1471
  [{ value: 50n, asset: { type: 'native' } }],
1526
1472
  {
@@ -1664,7 +1610,6 @@ describe('validateIntent', () => {
1664
1610
 
1665
1611
  const res = await validateIntent(
1666
1612
  context,
1667
- 'ethereum',
1668
1613
  legacyIntent({
1669
1614
  ...amount,
1670
1615
  recipient: '0xe2ca7390e76c5A992749bB622087310d2e63ca29',
@@ -1740,7 +1685,6 @@ describe('validateIntent', () => {
1740
1685
 
1741
1686
  const res = await validateIntent(
1742
1687
  context,
1743
- 'ethereum',
1744
1688
  eip1559Intent({
1745
1689
  ...amount,
1746
1690
  recipient: '0xe2ca7390e76c5A992749bB622087310d2e63ca29',
@@ -1821,7 +1765,6 @@ describe('validateIntent', () => {
1821
1765
 
1822
1766
  const res = await validateIntent(
1823
1767
  context,
1824
- 'ethereum',
1825
1768
  eip1559Intent({
1826
1769
  ...amount,
1827
1770
  recipient: '0xe2ca7390e76c5A992749bB622087310d2e63ca29',
@@ -1887,7 +1830,6 @@ describe('validateIntent', () => {
1887
1830
  expect(
1888
1831
  await validateIntent(
1889
1832
  context,
1890
- 'ethereum',
1891
1833
  createIntent({
1892
1834
  amount: 2n,
1893
1835
  recipient: '0xe2ca7390e76c5A992749bB622087310d2e63ca29',
@@ -455,15 +455,14 @@ function refreshEstimationValue(
455
455
 
456
456
  export async function validateIntent(
457
457
  context: EvmContext,
458
- currencyId: string,
459
458
  intent: TransactionIntent<MemoNotSupported, BufferTxData>,
460
459
  balances: Balance[],
461
460
  customFees?: FeeEstimation
462
461
  ): Promise<TransactionValidation> {
463
- const config = await context.config(currencyId)
462
+ const config = await context.config()
464
463
  const estimatedFees = customFees?.parameters
465
464
  ? { ...customFees, value: refreshEstimationValue(intent, customFees.parameters) }
466
- : await estimateFees(context, currencyId, intent)
465
+ : await estimateFees(context, intent)
467
466
  const balance = findBalance(intent.asset, balances)
468
467
  const amount = computeAmount(config.chainId, intent, estimatedFees, balance)
469
468
  const additionalFees =
package/src/logic.test.ts CHANGED
@@ -8,7 +8,7 @@ jest.mock('./network/node/index', () => ({
8
8
  ),
9
9
  }))
10
10
 
11
- import { CHAIN_ID } from './config'
11
+ import { CHAIN_ID, OP_STACK_L1_FEE_CHAIN_IDS } from './config'
12
12
  import { createMockEvmConfigInfo, mkExternalNode, testLogger } from './fixtures/context.fixtures'
13
13
  import { getAdditionalLayer2Fees } from './logic'
14
14
  import { padHexString, safeEncodeEIP55 } from './logic-public'
@@ -45,12 +45,29 @@ describe('EVM Family', () => {
45
45
  expect(mockGetScrollAdditionalFees).toHaveBeenCalled()
46
46
  })
47
47
 
48
- it('should not try to get additionalFees for an invalid layer 2', async () => {
49
- const cfg = createMockEvmConfigInfo({ chainId: 1, node: mkExternalNode() })
50
- await getAdditionalLayer2Fees(cfg, '', testLogger)
51
- expect(mockGetOptimismAdditionalFees).not.toHaveBeenCalled()
52
- expect(mockGetScrollAdditionalFees).not.toHaveBeenCalled()
48
+ it.each(OP_STACK_L1_FEE_CHAIN_IDS)(
49
+ 'should get the OP Stack L1 data fee for chain %s',
50
+ async (chainId) => {
51
+ const cfg = createMockEvmConfigInfo({ chainId, node: mkExternalNode() })
52
+ await getAdditionalLayer2Fees(cfg, '', testLogger)
53
+ expect(mockGetOptimismAdditionalFees).toHaveBeenCalled()
54
+ expect(mockGetScrollAdditionalFees).not.toHaveBeenCalled()
55
+ }
56
+ )
57
+
58
+ it('should include Shape in the OP Stack chains', () => {
59
+ expect(OP_STACK_L1_FEE_CHAIN_IDS).toContain(CHAIN_ID.SHAPE)
53
60
  })
61
+
62
+ it.each([CHAIN_ID.ETHEREUM, CHAIN_ID.ARBITRUM, CHAIN_ID.LINEA])(
63
+ 'should not try to get additionalFees for chain %s',
64
+ async (chainId) => {
65
+ const cfg = createMockEvmConfigInfo({ chainId, node: mkExternalNode() })
66
+ await getAdditionalLayer2Fees(cfg, '', testLogger)
67
+ expect(mockGetOptimismAdditionalFees).not.toHaveBeenCalled()
68
+ expect(mockGetScrollAdditionalFees).not.toHaveBeenCalled()
69
+ }
70
+ )
54
71
  })
55
72
 
56
73
  describe('padHexString', () => {
package/src/logic.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  import type { EvmConfigInfo } from './config'
5
5
  import type { Logger } from '@ledgerhq/coin-module-framework/config'
6
6
  import type BigNumber from 'bignumber.js'
7
- import { CHAIN_ID } from './config'
7
+ import { CHAIN_ID, OP_STACK_L1_FEE_CHAIN_IDS } from './config'
8
8
  import { getNodeApi } from './network/node/index'
9
9
 
10
10
  /**
@@ -16,17 +16,12 @@ export const getAdditionalLayer2Fees = async (
16
16
  transaction: string,
17
17
  logger: Logger
18
18
  ): Promise<BigNumber | undefined> => {
19
+ if (OP_STACK_L1_FEE_CHAIN_IDS.includes(config.chainId)) {
20
+ const nodeApi = getNodeApi(config, logger)
21
+ const additionalFees = await nodeApi.getOptimismAdditionalFees(transaction)
22
+ return additionalFees
23
+ }
19
24
  switch (config.chainId) {
20
- case CHAIN_ID.OPTIMISM:
21
- case CHAIN_ID.OPTIMISM_SEPOLIA:
22
- case CHAIN_ID.BLAST:
23
- case CHAIN_ID.BLAST_SEPOLIA:
24
- case CHAIN_ID.BASE:
25
- case CHAIN_ID.BASE_SEPOLIA: {
26
- const nodeApi = getNodeApi(config, logger)
27
- const additionalFees = await nodeApi.getOptimismAdditionalFees(transaction)
28
- return additionalFees
29
- }
30
25
  case CHAIN_ID.SCROLL: {
31
26
  const nodeApi = getNodeApi(config, logger)
32
27
  const additionalFees = await nodeApi.getScrollAdditionalFees(transaction)
@@ -14,7 +14,7 @@ import { ethers } from 'ethers'
14
14
  import { toInterfaceAbi } from '../../abis'
15
15
  import ERC20Abi from '../../abis/erc20.abi.json'
16
16
  import OptimismGasPriceOracleAbi from '../../abis/optimismGasPriceOracle.abi.json'
17
- import { CHAIN_ID } from '../../config'
17
+ import { CHAIN_ID, OP_STACK_L1_FEE_CHAIN_IDS } from '../../config'
18
18
  import { GasEstimationError } from '../../errors'
19
19
  import { normalizeAddress, padHexString, safeEncodeEIP55 } from '../../logic-public'
20
20
  import { getGasOptions } from '../gasTracker/ledger'
@@ -288,15 +288,7 @@ async function getOptimismAdditionalFees(
288
288
  config: LedgerNodeApiConfig,
289
289
  transaction: string
290
290
  ): Promise<BigNumber> {
291
- const optimismFeeChainIds: readonly ChainId[] = [
292
- CHAIN_ID.OPTIMISM,
293
- CHAIN_ID.OPTIMISM_SEPOLIA,
294
- CHAIN_ID.BLAST,
295
- CHAIN_ID.BLAST_SEPOLIA,
296
- CHAIN_ID.BASE,
297
- CHAIN_ID.BASE_SEPOLIA,
298
- ]
299
- if (!optimismFeeChainIds.includes(config.chainId)) {
291
+ if (!OP_STACK_L1_FEE_CHAIN_IDS.includes(config.chainId)) {
300
292
  return new BigNumber(0)
301
293
  }
302
294
  if (!transaction) {
@@ -22,7 +22,7 @@ import { ethers, FetchRequest, JsonRpcProvider } from 'ethers'
22
22
  import ERC20Abi from '../../abis/erc20.abi.json'
23
23
  import OptimismGasPriceOracleAbi from '../../abis/optimismGasPriceOracle.abi.json'
24
24
  import ScrollGasPriceOracleAbi from '../../abis/scrollGasPriceOracle.abi.json'
25
- import { CHAIN_ID } from '../../config'
25
+ import { CHAIN_ID, OP_STACK_L1_FEE_CHAIN_IDS } from '../../config'
26
26
  import { GasEstimationError, InsufficientFunds, UnsupportedRpcMethodError } from '../../errors'
27
27
  import { isSmartContractInput, safeEncodeEIP55, normalizeAddress } from '../../logic-public'
28
28
  import {
@@ -256,7 +256,7 @@ export async function withApi<T>(
256
256
  /**
257
257
  * Read the L1 data/security fee from a raw RPC receipt, normalized to a decimal string.
258
258
  *
259
- * Only OP-stack chains (Optimism, Base, Blast, …) report it; it is a non-standard field, so it is read off the raw
259
+ * Only OP-stack chains (Optimism, Base, …) report it; it is a non-standard field, so it is read off the raw
260
260
  * record rather than the typed receipt.
261
261
  *
262
262
  * @param raw raw RPC receipt
@@ -914,15 +914,7 @@ async function getOptimismAdditionalFees(
914
914
  chainId: ChainId,
915
915
  transaction: string
916
916
  ): Promise<BigNumber> {
917
- const optimismFeeChainIds: readonly ChainId[] = [
918
- CHAIN_ID.OPTIMISM,
919
- CHAIN_ID.OPTIMISM_SEPOLIA,
920
- CHAIN_ID.BASE,
921
- CHAIN_ID.BASE_SEPOLIA,
922
- CHAIN_ID.BLAST,
923
- CHAIN_ID.BLAST_SEPOLIA,
924
- ]
925
- if (!optimismFeeChainIds.includes(chainId)) {
917
+ if (!OP_STACK_L1_FEE_CHAIN_IDS.includes(chainId)) {
926
918
  return new BigNumber(0)
927
919
  }
928
920
 
@@ -932,7 +924,7 @@ async function getOptimismAdditionalFees(
932
924
 
933
925
  const optimismGasOracle = new ethers.Contract(
934
926
  // Canonical OP-stack GasPriceOracle predeploy, present on all OP-stack chains
935
- // (Optimism, Base, Blast). @see https://docs.optimism.io/stack/transactions/fees
927
+ // (Optimism, Base). @see https://docs.optimism.io/stack/transactions/fees
936
928
  '0x420000000000000000000000000000000000000F',
937
929
  OptimismGasPriceOracleAbi,
938
930
  api
@@ -119,7 +119,7 @@ export type TransactionInfo = {
119
119
  erc20Transfers: ERC20Transfer[]
120
120
  /** Tx envelope type per EIP-2718 (decimal), e.g. 2 for EIP-1559. */
121
121
  type?: number
122
- /** L1 data/security fee in wei (OP-stack chains: Optimism, Base, Blast, …). Present only when the receipt includes the field. */
122
+ /** L1 data/security fee in wei (OP-stack chains: Optimism, Base, …). Present only when the receipt includes the field. */
123
123
  l1Fee?: string
124
124
  }
125
125
 
@@ -16,9 +16,9 @@ import { getExplorerApi } from '../../explorer/index'
16
16
  import ledgerExplorerApi from '../../explorer/ledger'
17
17
  import noExplorerAPI from '../../explorer/none'
18
18
 
19
- const configFor = (currencyId: string): EvmConfigInfo => {
19
+ const configFor = (chainName: string): EvmConfigInfo => {
20
20
  const node = mkExternalNode()
21
- switch (currencyId) {
21
+ switch (chainName) {
22
22
  case 'anything-coin':
23
23
  return createMockEvmConfigInfo({
24
24
  chainId: 1,
@@ -109,8 +109,8 @@ describe('EVM Family', () => {
109
109
  ['etherscan', 'etherscan-coin'],
110
110
  ['ledger', 'ledger-coin'],
111
111
  ['none', 'none-coin'],
112
- ])('%s arm exposes discoverTokenAssets', (_type, currencyId) => {
113
- const explorer = getExplorerApi(configFor(currencyId))
112
+ ])('%s arm exposes discoverTokenAssets', (_type, chainName) => {
113
+ const explorer = getExplorerApi(configFor(chainName))
114
114
 
115
115
  expect(typeof explorer.discoverTokenAssets).toBe('function')
116
116
  })
@@ -596,10 +596,10 @@ describe('EVM Family', () => {
596
596
  })
597
597
 
598
598
  it.each([
599
- ['blast', CHAIN_ID.BLAST],
600
- ['blast_sepolia', CHAIN_ID.BLAST_SEPOLIA],
601
599
  ['base', CHAIN_ID.BASE],
602
600
  ['base_sepolia', CHAIN_ID.BASE_SEPOLIA],
601
+ ['shape', CHAIN_ID.SHAPE],
602
+ ['boba', CHAIN_ID.BOBA],
603
603
  ])('should query the OP-stack gas oracle for %s (not return 0)', async (_name, chainId) => {
604
604
  const api = createLedgerNodeApi({ ...ledgerConfig, chainId }, testLogger)
605
605
  jest.spyOn(axios, 'request').mockImplementationOnce(async () => ({