@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
@@ -1118,6 +1118,48 @@ describe('EVM Family', () => {
1118
1118
  expect(result.gasPrice).toEqual(new BigNumber('20000000000'))
1119
1119
  })
1120
1120
 
1121
+ describe('forceLegacyTransactions', () => {
1122
+ // Sparse fee market: the node reports a 1,000,000 wei gas price, a zero
1123
+ // eth_maxPriorityFeePerGas and zero feeHistory rewards, and the latest block
1124
+ // still carries a baseFeePerGas.
1125
+ beforeEach(() => {
1126
+ config = createMockEvmConfigInfo({
1127
+ chainId: 1,
1128
+ node: mkExternalNode({ uri: 'my-rpc.com' }),
1129
+ forceLegacyTransactions: true,
1130
+ minGasPrice: '2000000',
1131
+ })
1132
+ })
1133
+
1134
+ it('prices an EIP-1559 request as legacy at the minGasPrice floor', async () => {
1135
+ const sendSpy = jest.spyOn(JsonRpcProvider.prototype, 'send')
1136
+ jest
1137
+ .spyOn(JsonRpcProvider.prototype, 'getFeeData')
1138
+ .mockResolvedValueOnce(new FeeData(BigInt('1000000'), 0n, 0n))
1139
+
1140
+ const result = await nodeApi.getFeeData(config, eip1559Tx)
1141
+
1142
+ expect(result).toEqual({
1143
+ maxFeePerGas: null,
1144
+ maxPriorityFeePerGas: null,
1145
+ gasPrice: new BigNumber('2000000'),
1146
+ nextBaseFee: null,
1147
+ })
1148
+ expect(sendSpy).not.toHaveBeenCalledWith('eth_feeHistory', expect.anything())
1149
+ expect(sendSpy).not.toHaveBeenCalledWith('eth_maxPriorityFeePerGas', expect.anything())
1150
+ })
1151
+
1152
+ it('follows the node gas price when it is above the minGasPrice floor', async () => {
1153
+ jest
1154
+ .spyOn(JsonRpcProvider.prototype, 'getFeeData')
1155
+ .mockResolvedValueOnce(new FeeData(BigInt('3000000'), 0n, 0n))
1156
+
1157
+ const result = await nodeApi.getFeeData(config, eip1559Tx)
1158
+
1159
+ expect(result.gasPrice).toEqual(new BigNumber('3000000'))
1160
+ })
1161
+ })
1162
+
1121
1163
  it('should return the expected payload for an EIP1559 tx when network returns 0 priority fee for 0G', async () => {
1122
1164
  jest.spyOn(JsonRpcProvider.prototype, 'send').mockImplementationOnce(async (method) => {
1123
1165
  if (method === 'eth_feeHistory') {
@@ -43,7 +43,7 @@ type SelectorEntry = {
43
43
  /**
44
44
  * Builds and caches, per currency, a selector → entry map derived from the staking ABI.
45
45
  * The cache is bounded — one entry per staking-enabled currency — regardless of how many
46
- * distinct `to` addresses appear in the tx history. A per-(currencyId, to) cache would
46
+ * distinct `to` addresses appear in the tx history. A per-(chainId, to) cache would
47
47
  * grow unboundedly for factory-per-validator chains like 0G, since
48
48
  * detectEvmStakingOperationType is called for every outgoing tx.
49
49
  *
@@ -164,8 +164,6 @@ const createStakeFromContract = async (
164
164
  state: 'active',
165
165
  asset: {
166
166
  type: 'native',
167
- name: evmConfig.name,
168
- unit: evmConfig.unit,
169
167
  },
170
168
  amount,
171
169
  actions: [],
@@ -283,7 +283,7 @@ describe('redelegations', () => {
283
283
  expect(result).toBeNull()
284
284
  })
285
285
 
286
- it('should return null for an unsupported currencyId', async () => {
286
+ it('should return null for an unsupported chain', async () => {
287
287
  const op = makeOperation({
288
288
  type: 'REDELEGATE',
289
289
  extra: { contractPayload: encodeRedelegateCalldata(SRC, DST, AMOUNT_USEI) },
@@ -304,7 +304,7 @@ describe('redelegations', () => {
304
304
 
305
305
  beforeEach(() => jest.clearAllMocks())
306
306
 
307
- it('should return null for an unsupported currencyId', async () => {
307
+ it('should return null for an unsupported chain', async () => {
308
308
  const op = makeOperation({
309
309
  type: 'DELEGATE',
310
310
  extra: { contractPayload: encodeDelegateCalldata(VALIDATOR) },
@@ -509,7 +509,7 @@ describe('redelegations', () => {
509
509
 
510
510
  beforeEach(() => jest.clearAllMocks())
511
511
 
512
- it('should return [] for an unsupported currencyId', async () => {
512
+ it('should return [] for an unsupported chain', async () => {
513
513
  expect(await buildRedelegationsFromOps(ethereumConfig, [], testLogger)).toEqual([])
514
514
  })
515
515
 
@@ -147,7 +147,7 @@ describe('staking/unbondings', () => {
147
147
  amount: 101000000n * USEI_TO_EVM_SCALE,
148
148
  actions: [],
149
149
  })
150
- expect(stakes[0].asset).toMatchObject({ type: 'native', name: 'Sei' })
150
+ expect(stakes[0].asset).toMatchObject({ type: 'native' })
151
151
  })
152
152
 
153
153
  it('should not expose a withdraw action nor a withdrawId', async () => {
@@ -98,8 +98,6 @@ async function fetchCosmosRestUnbondings(
98
98
  stateUpdatedAt: completionDate,
99
99
  asset: {
100
100
  type: 'native',
101
- name: evmConfig.name,
102
- unit: evmConfig.unit,
103
101
  },
104
102
  amount,
105
103
  actions: [],
@@ -157,9 +157,8 @@ export const hasChainRewards = (chainId: ChainId): boolean => {
157
157
  */
158
158
  export const getValidatorsPage = async (
159
159
  context: EvmContext,
160
- currencyId: string,
161
160
  cursor?: Cursor
162
161
  ): Promise<Page<Validator>> => {
163
- const config = await context.config(currencyId)
162
+ const config = await context.config()
164
163
  return getValidators(config, context.logger, cursor)
165
164
  }
@@ -519,8 +519,6 @@ describe('staking/validators/monad', () => {
519
519
  state: 'active',
520
520
  asset: {
521
521
  type: 'native',
522
- name: 'Monad',
523
- unit: { name: 'MON', code: 'MON', magnitude: 18 },
524
522
  },
525
523
  amount: 100n,
526
524
  actions: [],
@@ -751,8 +749,6 @@ describe('staking/validators/monad', () => {
751
749
  stateUpdatedAt: new Date(NOW - 2 * EPOCH_DURATION_MS),
752
750
  asset: {
753
751
  type: 'native',
754
- name: 'Monad',
755
- unit: { name: 'MON', code: 'MON', magnitude: 18 },
756
752
  },
757
753
  amount: 40n,
758
754
  actions: [],
@@ -772,8 +768,6 @@ describe('staking/validators/monad', () => {
772
768
  stateUpdatedAt: new Date(NOW + 5 * EPOCH_DURATION_MS),
773
769
  asset: {
774
770
  type: 'native',
775
- name: 'Monad',
776
- unit: { name: 'MON', code: 'MON', magnitude: 18 },
777
771
  },
778
772
  amount: 60n,
779
773
  actions: [],
@@ -348,8 +348,6 @@ const fetchStakeForValId = async (
348
348
 
349
349
  const asset: AssetInfo = {
350
350
  type: 'native',
351
- name: evmConfig.name,
352
- unit: evmConfig.unit,
353
351
  }
354
352
  const details = {
355
353
  contractAddress,
@@ -11,7 +11,7 @@ import { isExternalNodeConfig } from '../../network/node/types'
11
11
  import { getStakingABI } from '../abis'
12
12
 
13
13
  // TODO: stopgap - hardcoded because contracts.ts cannot import from monad.ts (circular dep).
14
- // Fix when getStakingApi(currencyId) factory replaces the Record in contracts.ts.
14
+ // Fix when getStakingApi(chainId) factory replaces the Record in contracts.ts.
15
15
  const MONAD_PRECOMPILE = '0x0000000000000000000000000000000000001000'
16
16
 
17
17
  // getValidator returns 12 fields; we only type/validate the ones we read:
@@ -315,8 +315,6 @@ describe('staking/validators/somnia', () => {
315
315
  state: 'active',
316
316
  asset: {
317
317
  type: 'native',
318
- name: 'Somnia',
319
- unit: { name: 'SOMI', code: 'SOMI', magnitude: 18 },
320
318
  },
321
319
  amount: 100n,
322
320
  actions: [],
@@ -326,8 +326,6 @@ export const fetchSomniaStakes = async (
326
326
 
327
327
  const asset: AssetInfo = {
328
328
  type: 'native',
329
- name: evmConfig.name,
330
- unit: evmConfig.unit,
331
329
  }
332
330
  const stakes: Stake[] = []
333
331
 
@@ -408,8 +408,6 @@ describe('staking/validators/zero_gravity', () => {
408
408
  const NOW = 1_000_000_000
409
409
  const ASSET = {
410
410
  type: 'native',
411
- name: '0G',
412
- unit: { magnitude: 18, name: '0G', code: '0G' },
413
411
  }
414
412
 
415
413
  beforeEach(() => {
@@ -228,8 +228,6 @@ export const fetchZeroGravityStakes = async (
228
228
 
229
229
  const asset: AssetInfo = {
230
230
  type: 'native',
231
- name: evmConfig.name,
232
- unit: evmConfig.unit,
233
231
  }
234
232
 
235
233
  try {
@@ -27,7 +27,7 @@ describe('getValidators', () => {
27
27
  node: mkExternalNode({ uri: 'https://api.infra.mainnet.somnia.network' }),
28
28
  }),
29
29
  ],
30
- ])("fetches validators on '%s'", async (_currencyId, config) => {
30
+ ])("fetches validators on '%s'", async (_chainName, config) => {
31
31
  const firstPage = await getValidators(config.info, testLogger)
32
32
  expect(firstPage.items.length).toBeGreaterThan(0)
33
33
 
@@ -327,7 +327,7 @@ describe('staking/validators', () => {
327
327
  },
328
328
  })
329
329
 
330
- const page = await getValidatorsPage(createMockEvmContext(mockConfig), 'sei_evm', undefined)
330
+ const page = await getValidatorsPage(createMockEvmContext(mockConfig), undefined)
331
331
 
332
332
  expect(page.next).toBeUndefined()
333
333
  expect(page.items).toEqual([
@@ -28,7 +28,7 @@ export type EtherscanOperation = {
28
28
  confirmations: string
29
29
  methodId: string
30
30
  functionName: string
31
- /** L1 data/security fee in wei, as reported by OP-stack explorers (Optimism, Base, Blast, …). */
31
+ /** L1 data/security fee in wei, as reported by OP-stack explorers (Optimism, Base, …). */
32
32
  L1FeesPaid?: string
33
33
  }
34
34