These programs are enumerated the same as the other smart contract subdirectories (e.g. evm).
Read the design documents for each example project:
First, you will need cargo
and anchor
CLI tools. If you need these tools,
please visit the Anchor book for more details.
Once you have the above CLI tools, install this subdirectory's dependencies,
run make dependencies
. This will set up node_modules
and compile program
BPFs from the solana
directory of the Wormhole repo.
To run both unit and integration tests, run make test
. If you want to isolate
your testing, use either of these commands:
make unit-test
- Runscargo clippy
andcargo test
make integration-test
- Spawns a solana local validator and usests-mocha
with@solana/web3.js
to interact with the example programs.
If you are pushing code to a branch and there is a PR associated with it, we
recommend running make clean
to make sure the environment does not have any
old artifacts. Then running the tests above afterwards to ensure that all of
the tests run as you expect.