The smart contract can be built and deployed normally using Anchor. Currently there is a devnet deployment at GknYjbiQABncTa8JwStdHRX1t1UZArjdAoaRTrccfhdR that the switchboard functions reference.
To deploy the switchboard function follow these steps:
- Change the DOCKERHUB_CONTAINER_NAME variable to ensure that a fresh container is used
make publish_function
- Go to the switchboard website and fund the function, make sure that the correct measurement is included (run
make measurement
to check)
To add an oracle to the contract:
- Ensure the programId and ORACLE_NAME variables are set properly in
scripts/addOracle.ts
yarn addOracle
To run Anchor tests:
anchor test -- --features "test"
To run Program rust tests:
cargo test-bpf