Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

zeuslawyer
Copy link

@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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant