You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #25 from smartcontractkit/feat/support-decimals
Feat/support decimals for Hedera
- Fixes Support for Hedera with 8 decimals #22. Also updates the demo examples/nextjs app with Hedera configs.
- Bumps ccip-js to v0.2.5
- Bumps ccip-react-components to v0.3.1 as its wagmi dependency is now hard-pinned to avoid the issue of updating from 2.12.x --> 2.15.x ( see commit sha c7a72f5)
- Update @chainlink/contracts dependency version (to 1.6) and import paths
- hard pins Viem and Wagmi dependency versions.
- Update pnpm-lock as package.json is updated.
-[`ccip-js`](/packages/ccip-js/README.md): A TypeScript library that provides a client for managing cross-chain token transfers that use Chainlink's [Cross-Chain Interoperability Protocol (CCIP)](https://docs.chain.link/ccip) routers.
14
-
-[`ccip-react-components`](/packages/ccip-react-components/README.md): A set of prebuilt ready-to-use UI components built on top of `ccip-js`.
13
+
### Start here
14
+
15
+
The CCIP JavaScript SDK is a monorepo for two packages:
16
+
17
+
-[`ccip-js`](/packages/ccip-js/README.md): A TypeScript library that provides a client for managing cross-chain token transfers that use Chainlink's [Cross-Chain Interoperability Protocol (CCIP)](https://docs.chain.link/ccip) routers.
18
+
-[`ccip-react-components`](/packages/ccip-react-components/README.md): A set of prebuilt ready-to-use React UI components. This package depends on `ccip-js`.
15
19
16
-
Using both packages, you can add a fully featured CCIP bridge to your app that can be styled to match your app design.
17
-
18
-
To view more detailed documentation and more examples, visit the [Chainlink Javascript SDK Documentation](https://docs.chain.link/ccip/ccip-javascript-sdk/).
20
+
Using both packages, you can add a fully featured CCIP bridge to your app that can be styled to match your app design.
21
+
22
+
To view more detailed documentation and more examples, visit the [Chainlink Javascript SDK Documentation](https://docs.chain.link/ccip/ccip-javascript-sdk/). Development specific information is also found in individual READMEs inside the `./packages/<<PACKAGE_NAME>>` directory.
23
+
24
+
There is also an example implementation of a front end NextJS app that uses these packages in `./examples/nextjs`. That has its own README as well.
If you want to make changes to the package code, you need to rebuild the packages and make sure package.json file to point to the updated local versions.
50
+
If you want to make changes to the package code, you need to rebuild the packages.
51
+
Then:
46
52
47
-
Make sure to build the `ccip-js` package before you build the `ccip-react-components` package. The React components depend on the JS package.
53
+
1. Make sure to build the `ccip-js` package before you build the `ccip-react-components` package. The React components depend on the JS package.
54
+
55
+
2. Make sure your client's package.json file to points to the updated local versions or use npm link or equivalent in your downstream client code. You can see examples of this in the steps below.
Copy file name to clipboardExpand all lines: packages/ccip-js/README.md
+5-14Lines changed: 5 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -605,26 +605,17 @@ folder. From there, the relevant ABI arrays must be manually moved to `./src/abi
605
605
606
606
#### Running tests
607
607
608
-
1.cd into `packages/ccip-js` and then run `pnpm install` OR from the project root you can run `pnpm i -w`
608
+
1.Integration tests against testnets are favored in the ccip-js package.
609
609
610
-
2. open a new terminal window and run `foundryup` followed by `anvil` - requires that you've [installed Foundry Anvil](https://book.getfoundry.sh/anvil/).
611
-
<b?>Note:</b> that Anvil is only needed for the integrations tests inside `./test` which uses the [Chainlink Local](https://github.com/smartcontractkit/chainlink-local) simulator. Actual testnet and mainnet behavior may differ from time to time and passing these tests does not guarantee testnet or mainnet behavior.
610
+
2. Start by cd into `packages/ccip-js` and then run `pnpm install` OR from the project root you can run `pnpm i -w`
612
611
613
-
3. Back in the first terminal, inside, `packages/ccip-js` run `export PRIVATE_KEY=xxxxxx` to set your private key and then run `pnpm t:int` or `pnpm t:uint`.
612
+
3. Back in the first terminal, inside, `packages/ccip-js` run `export PRIVATE_KEY=0x.....` to set your private key and then run `pnpm t:int`. If you're in the entire repo's root you can run the workspace filtering command `pnpm test-ccip-js`
614
613
615
-
Note some tests are flaky - this is under investigation. You can choose to run just the mocked test or the testnet integration tests using `pnpm jest <<name of test file>>`.
616
-
617
-
Note further that we have set a 180000ms (3 mins) timeout on the jest config. This can cause the testnet integration test to "hang" for the entire duration.
614
+
Note further that we have set a 180000ms (3 mins) timeout on the jest config. This can cause the testnet integration test to appear to "hang"until timeout completes.
618
615
619
616
### Contributing
620
617
621
-
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
622
-
623
-
1. Fork the repository.
624
-
1. Create your feature branch (git checkout -b feature/my-feature).
625
-
1. Commit your changes (git commit -m 'Add some feature').
626
-
1. Push to the branch (git push origin feature/my-feature).
0 commit comments