These programs are enumerated the same as the other smart contract subdirectories (e.g. evm).
Read the design documents for each example project:
Warning These programs are written assuming you are building with Solana 1.14. Any higher versions are untested.
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, you can build the programs by simply running
make that runs the Makefile and install subdirectory's dependencies, such as
node_modules and the Wormhole programs from the solana directory of the
Wormhole repo.
Set the NETWORK environment variable to either "devnet", "testnet" or
"mainnet" prior to using the make build command. For example:
NETWORK=testnet make buildNote
Some users reported issues with
make --version< 4.x. If you get a make error like*** missing separator, try updating to a latermakeversion with 'brew reinstall make'
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 clippyandcargo testmake integration-test- Spawns a solana local validator and usests-mochawith@solana/web3.jsto 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 run the tests above afterwards to ensure that all of
the tests run as you expect.