Skip to content
This repository was archived by the owner on Mar 17, 2026. It is now read-only.

Commit bbf67b0

Browse files
zeuslawyerthodges-gh
authored andcommitted
* CCIP - JS
- update integration test file names - update its README with env vars needed for integration tests. - correct test script in packages.json
1 parent 05d454e commit bbf67b0

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

packages/ccip-js/README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,7 @@ const walletClient = createWalletClient({
119119

120120
// Using ethers.js signer & provider
121121
import { ethers } from 'ethers'
122-
import {
123-
ethersSignerToWalletClient,
124-
ethersProviderToPublicClient,
125-
} from '@chainlink/ccip-js'
122+
import { ethersSignerToWalletClient, ethersProviderToPublicClient } from '@chainlink/ccip-js'
126123

127124
const ethersProvider = new ethers.JsonRpcProvider('https://rpc.example.com')
128125
const ethersSigner = new ethers.Wallet(PRIVATE_KEY, ethersProvider)
@@ -621,7 +618,15 @@ folder. From there, the relevant ABI arrays must be manually moved to `./src/abi
621618

622619
#### Running tests
623620

624-
1. Integration tests against testnets are favored in the ccip-js package.
621+
1. Integration tests against testnets are favored in the ccip-js package. They require the you set the following environment variables:
622+
623+
```
624+
PRIVATE_KEY=
625+
AVALANCHE_FUJI_RPC_URL
626+
SEPOLIA_RPC_URL
627+
HEDERA_TESTNET_RPC_URL
628+
629+
```
625630

626631
2. Start by cd into `packages/ccip-js` and then run `pnpm install` OR from the project root you can run `pnpm i -w`
627632

packages/ccip-js/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
"build": "tsc && hardhat compile",
1515
"lint": "eslint 'src/**/*.{ts,js}'",
1616
"format": "prettier --write 'src/**/*.{ts,js,json,md}'",
17-
"t:int": "pnpm t:int:viem",
17+
"t:int": "jest --coverage -u --testMatch=\"**/integration-testnet**.test.ts\" --detectOpenHandles",
1818
"t:int:viem": "jest --coverage -u --testMatch=\"**/integration-testnet.test.ts\" --detectOpenHandles",
19-
"t:int:ethers": "jest --coverage -u --testMatch=\"**/integration-testn*d-ethers.test.ts\" --detectOpenHandles",
19+
"t:int:ethers": "jest --coverage -u --testMatch=\"**/integration-testnet-ethers.test.ts\" --detectOpenHandles",
2020
"t:unit": "jest --coverage -u --testMatch=\"**/unit.test.ts\" ",
2121
"test:hh": "hardhat test"
2222
},

packages/ccip-js/src/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ import TokenPoolABI from './abi/TokenPool.json'
1717
import TokenAdminRegistryABI from './abi/TokenAdminRegistry.json'
1818
import { TRANSFER_STATUS_FROM_BLOCK_SHIFT, ExecutionStateChangedABI } from './config'
1919
import { parseAbi } from 'viem'
20+
21+
export { IERC20ABI }
2022
export {
2123
ethersProviderToTransport,
2224
ethersSignerToAccount,
2325
ethersProviderToPublicClient,
2426
ethersSignerToWalletClient,
2527
} from './ethers-adapters'
2628

27-
export { IERC20ABI }
28-
2929
/** An object containing methods for cross-chain transfer management.
3030
* @typedef {Object} Client */
3131
export interface Client {

packages/ccip-js/src/ethers-adapters.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import type { Address, Hash } from 'viem'
21
import type { Provider, Signer, TypedDataField } from 'ethers'
3-
import { custom } from 'viem'
4-
import type { Transport, WalletClient, PublicClient } from 'viem'
5-
import { createPublicClient, createWalletClient } from 'viem'
2+
import type {Address, Hash, Transport, WalletClient, PublicClient } from 'viem'
3+
4+
import { custom, createPublicClient, createWalletClient } from 'viem'
65
import { toAccount } from 'viem/accounts'
76

87
/** Convert an ethers provider to a viem transport. */

packages/ccip-js/test/integration-testned-ethers.test.ts renamed to packages/ccip-js/test/integration-testnet-ethers.test.ts

File renamed without changes.

0 commit comments

Comments
 (0)