@ledgerhq/coin-evm 5.3.2 → 5.3.3
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.
- package/.oxlintrc.json +1 -1
- package/CHANGELOG.md +7 -0
- package/package.json +2 -2
- package/src/adapters/blockOperations.test.ts +27 -29
- package/src/api/index.flare.integ.test.ts +1 -13
- package/src/api/index.integ.test.ts +86 -97
- package/src/fixtures/context.fixtures.ts +79 -1
- package/src/fixtures/ethers.fixtures.ts +26 -0
- package/src/logic/broadcast.integ.test.ts +6 -18
- package/src/logic/broadcast.test.ts +19 -31
- package/src/logic/broadcastSource.test.ts +6 -7
- package/src/logic/common.test.ts +120 -112
- package/src/logic/craftTransaction.test.ts +161 -199
- package/src/logic/craftTransactionData.test.ts +6 -6
- package/src/logic/estimateFees.test.ts +19 -15
- package/src/logic/getBalance.test.ts +15 -14
- package/src/logic/getBlock.test.ts +372 -382
- package/src/logic/getBlockInfo.test.ts +6 -6
- package/src/logic/getNextSequence.test.ts +5 -5
- package/src/logic/getStakes.test.ts +34 -34
- package/src/logic/internalTransactionsFetcher.test.ts +23 -19
- package/src/logic/lastBlock.test.ts +29 -21
- package/src/logic/listOperations.test.ts +43 -40
- package/src/logic/validateIntent.test.ts +151 -101
- package/src/logic.test.ts +13 -18
- package/src/network/explorer/etherscan.test.ts +5 -5
- package/src/network/explorer/index.test.ts +51 -21
- package/src/network/explorer/ledger.test.ts +15 -4
- package/src/network/gasTracker/index.test.ts +14 -8
- package/src/network/gasTracker/ledger.test.ts +25 -13
- package/src/network/node/index.memoization.test.ts +25 -31
- package/src/network/node/index.test.ts +14 -25
- package/src/network/node/ledger.test.ts +45 -60
- package/src/network/node/node.fixtures.ts +0 -2
- package/src/network/node/rpc.test.ts +152 -177
- package/src/staking/encoder.test.ts +13 -21
- package/src/staking/logic.test.ts +20 -14
- package/src/staking/operations/index.test.ts +28 -28
- package/src/staking/prepareIntents.test.ts +26 -20
- package/src/staking/redelegations.test.ts +27 -18
- package/src/staking/rewards.test.ts +23 -15
- package/src/staking/rewardsFromReceipt.test.ts +19 -20
- package/src/staking/transactionData.test.ts +22 -22
- package/src/staking/validators/monad.test.ts +65 -24
- package/src/staking/validators/somnia.test.ts +21 -13
- package/src/staking/validators/zero_gravity.test.ts +118 -48
- package/src/staking/validators.integ.test.ts +13 -25
|
@@ -1,43 +1,31 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import { createMockEvmCoinConfig, mkExternalNode } from '../fixtures/context.fixtures'
|
|
5
5
|
import { getValidators } from './validators'
|
|
6
6
|
|
|
7
7
|
describe('getValidators', () => {
|
|
8
8
|
it.each([
|
|
9
9
|
[
|
|
10
10
|
'monad',
|
|
11
|
-
{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
uri: 'https://monad.coin.ledger.com',
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
} as EvmCoinConfig,
|
|
11
|
+
createMockEvmCoinConfig({
|
|
12
|
+
chainId: 143,
|
|
13
|
+
node: mkExternalNode({ uri: 'https://monad.coin.ledger.com' }),
|
|
14
|
+
}),
|
|
19
15
|
],
|
|
20
16
|
[
|
|
21
17
|
'zero_gravity',
|
|
22
|
-
{
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
uri: 'https://zero-gravity.coin.ledger.com',
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
} as EvmCoinConfig,
|
|
18
|
+
createMockEvmCoinConfig({
|
|
19
|
+
chainId: 16661,
|
|
20
|
+
node: mkExternalNode({ uri: 'https://zero-gravity.coin.ledger.com' }),
|
|
21
|
+
}),
|
|
30
22
|
],
|
|
31
23
|
[
|
|
32
24
|
'somnia',
|
|
33
|
-
{
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
uri: 'https://somnia-rpc.publicnode.com',
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
} as EvmCoinConfig,
|
|
25
|
+
createMockEvmCoinConfig({
|
|
26
|
+
chainId: 5031,
|
|
27
|
+
node: mkExternalNode({ uri: 'https://somnia-rpc.publicnode.com' }),
|
|
28
|
+
}),
|
|
41
29
|
],
|
|
42
30
|
])("fetches validators on '%s'", async (currencyId, config) => {
|
|
43
31
|
const firstPage = await getValidators(config.info, currencyId)
|