Docker
Docker is required to build using anchor. We highly recommend that you use the most up-to-date Docker version to avoid any issues with anchor builds.
Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -yInstall Solana 2.3.0
sh -c "$(curl -sSfL https://release.anza.xyz/v2.3.0/install)"Install Anchor 0.32.1
cargo install --git https://github.com/solana-foundation/anchor --tag v0.32.1 anchor-cli --lockedCreate the program ID keypair by running:
anchor keys sync -p execution_beacon
View the program ID's based on the generated keypairs:
anchor keys list
You will see an output such as:
execution_beacon: FfUKyGjrUREsjBhsykyAHUMy12qVHbSsuCiqSSAaJpwp
Copy the program ID value for use in the build step later.
Ensure you have Docker running before running the build command.
anchor build -v
ℹ️ For a breakdown of expected rent-exempt costs before deployment, see https://docs.layerzero.network/v2/developers/solana/technical-reference/solana-guidance#previewing-solana-rent-costs.
The deploy command will run with a priority fee. Read the section on 'Deploying Solana programs with a priority fee' to learn more.
solana program deploy --program-id target/deploy/execution_beacon-keypair.json target/verifiable/execution_beacon.so -u devnet --with-compute-unit-price <COMPUTE_UNIT_PRICE_IN_MICRO_LAMPORTS>Details
ℹ️ the -u flag specifies the RPC URL that should be used. The options are mainnet-beta, devnet, testnet, localhost, which also have their respective shorthands: -um, -ud, -ut, -ul
Ensure you have platform tools installed:
cargo build-sbf --force-tools-install
anchor test