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

Fix to Issue#8 - Viem Bug from misdocumented Viem.writeContract()#12

Merged
BunsDev merged 7 commits intomainfrom
zp-patches
Apr 12, 2025
Merged

Fix to Issue#8 - Viem Bug from misdocumented Viem.writeContract()#12
BunsDev merged 7 commits intomainfrom
zp-patches

Conversation

@zeuslawyer
Copy link
Copy Markdown
Contributor

@zeuslawyer zeuslawyer commented Apr 1, 2025

The following changes for packages/ccip-js]

  1. Fix Issue#8 using suggestions from PR#7. Viem Account type used instead of type Address.
  2. Add testnet integration tests of critical operations from the ccip client in the js sdk. Tests Fuji -> Sepolia
  3. rename original integration test to integration-mocked.test.ts as it uses mocks and can give false positives. Added logic to throw helpful error if dev does not have anvil running for these.
  4. update README
  5. add functionality relating to the PRIVATE_KEY to prefix with '0x' if needed for better devX
  6. minor fix the the js docs for getTokenAdminRegistry(). Corrected description of return data.

1. Fix Issue#8 using suggestions from PR#7. Viem Account type used instead of type Address.
2. Add testnet integration tests of critical operations from the ccip client in the js sdk. Tests  Fuji -> Sepolia
3. update README
4. add functionality relating to the PRIVATE_KEY to prefix with '0x' if needed for better devX
5. minor fix the the js docs for getTokenAdminRegistry(). Corrected description of return data.
1. renamed integration test name to -mocked. Updated package.json script for this.
2. Modified package.json to include --detectOpenHandles as viem appears to not shut resources so without this the tests exit with the jest open handles error.
3. Improved README instructions for running tests and clarified the use of Anvil.
4. Refactored constants to ensure the right private keys are used in the right tests. Default anvil key is used in integration-mocked tests.  Dev must supply pk for integration-testnet tets/
5. in clients.ts the mode was replaced to anvil from hardhat for the test clients.

Test clients do not throw the error identified in Issue#8 hence the need to have two different types of integration tests.
@zeuslawyer zeuslawyer marked this pull request as ready for review April 7, 2025 01:42
@zeuslawyer zeuslawyer requested a review from a team as a code owner April 7, 2025 01:42
@zeuslawyer zeuslawyer requested a review from BunsDev April 7, 2025 01:42
Rely on installing from package.json

This is same as #9
which will be closed.
@BunsDev BunsDev merged commit 0ac1983 into main Apr 12, 2025
4 checks passed
@zeuslawyer zeuslawyer deleted the zp-patches branch April 14, 2025 00:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants