@ledgerhq/coin-evm 5.4.0 → 5.4.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ledgerhq/coin-evm
2
2
 
3
+ ## 5.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#936](https://github.com/LedgerHQ/coin-modules/pull/936) [`30cc3a4`](https://github.com/LedgerHQ/coin-modules/commit/30cc3a47c0fecf9c1c4dbb46144786c95ab32bc1) Thanks [@francois-guerin-ledger](https://github.com/francois-guerin-ledger)! - Point the Arc EVM integration test at mainnet instead of testnet. The Arc testnet blockscout proxy now returns HTTP 301, and Arc mainnet is the production network going forward. The test still covers the same native-USDC-as-ERC20-precompile double-counting behavior, using real mainnet transactions.
8
+
3
9
  ## 5.4.0
4
10
 
5
11
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/coin-evm",
3
- "version": "5.4.0",
3
+ "version": "5.4.1",
4
4
  "description": "Ledger EVM Coin integration",
5
5
  "keywords": [
6
6
  "Ledger",
@@ -6,29 +6,32 @@ import type { Operation } from '@ledgerhq/coin-module-framework/api/types'
6
6
  import { createMockEvmContext } from '../fixtures/context.fixtures'
7
7
  import { createApi } from './index'
8
8
 
9
- // Arc testnet exposes its native unit (USDC) as an ERC20 at this fixed precompile
9
+ // Arc exposes its native unit (USDC) as an ERC20 at this fixed precompile
10
10
  // address. The explorer indexes native transfers as BOTH a native tx AND a synthetic
11
11
  // ERC20 Transfer event on this contract. We rely on the `nativeContracts` config
12
12
  // to skip the ERC20 side so the wallet doesn't double-count.
13
13
  const ARC_USDC_NATIVE_CONTRACT = '0x3600000000000000000000000000000000000000'
14
14
 
15
15
  // Address with on-chain native USDC activity in both directions (IN and OUT).
16
- const NATIVE_USDC_ADDRESS = '0x6b618ca7eadcd948266de6602f2f8f3452d1ad6c'
16
+ const NATIVE_USDC_ADDRESS = '0x40ae34b075169df3a738571005be709d9376aa04'
17
17
 
18
- describe('EVM Api (Arc Testnet)', () => {
18
+ describe('EVM Api (Arc)', () => {
19
19
  let module: ReturnType<typeof createApi>
20
20
  let operations: Operation[]
21
21
 
22
22
  const config: Partial<EvmConfigInfo> = {
23
- node: { type: 'external', uri: 'https://rpc.testnet.arc.network' },
23
+ node: {
24
+ type: 'external',
25
+ uri: 'https://arc.coin.ledger.com',
26
+ },
24
27
  explorer: {
25
28
  type: 'blockscout',
26
- uri: 'https://proxyblockscout.api.live.ledger.com/5042002/api',
29
+ uri: 'https://proxyblockscout.api.live.ledger.com/5042/api',
27
30
  },
28
31
  nativeContracts: [ARC_USDC_NATIVE_CONTRACT],
29
32
  }
30
33
  beforeAll(async () => {
31
- module = createApi('arc_testnet')
34
+ module = createApi('arc')
32
35
 
33
36
  const { items } = await module.listOperations(
34
37
  createMockEvmContext(config),
@@ -65,22 +68,22 @@ describe('EVM Api (Arc Testnet)', () => {
65
68
  })
66
69
 
67
70
  it('exposes the expected metadata on a known native USDC IN transfer', () => {
68
- // https://testnet.arcscan.app/tx/0xea849633c4a3ae7e63f53ebe6f2cb1adda76d1547285be754a2ecbef30a343bf
69
- // 20 USDC received from 0xd4c0b7… (18-decimal native units).
70
- const txHash = '0xea849633c4a3ae7e63f53ebe6f2cb1adda76d1547285be754a2ecbef30a343bf'
71
+ // https://arcscan.app/tx/0xb44d663b7ace5ddfecd432834ecaa5cd1221bf26b05566578cf674b977f037ca
72
+ // ~45.31835 USDC received from 0xe7ee2b3a… (18-decimal native units).
73
+ const txHash = '0xb44d663b7ace5ddfecd432834ecaa5cd1221bf26b05566578cf674b977f037ca'
71
74
 
72
75
  const operation = operations.find((op) => op.tx.hash.toLowerCase() === txHash)
73
76
  expect(operation).toMatchObject({
74
77
  type: 'IN',
75
- value: 20000000000000000000n,
78
+ value: 45318350000000000000n,
76
79
  asset: { type: 'native' },
77
80
  tx: expect.objectContaining({
78
81
  hash: txHash,
79
- block: expect.objectContaining({ height: 41845790 }),
82
+ block: expect.objectContaining({ height: 21177512 }),
80
83
  }),
81
84
  })
82
85
  expect(operation!.senders.map((s) => s.toLowerCase())).toEqual([
83
- '0xd4c0b787aa2ff9eb751bb515c877ebbf2daddaae',
86
+ '0xe7ee2b3a199d7afb2df80089138dff0f619153e8',
84
87
  ])
85
88
  expect(operation!.recipients.map((r) => r.toLowerCase())).toEqual([NATIVE_USDC_ADDRESS])
86
89
  })