Solana is a decentralized blockchain.
-
Check you've installed Rust:
rustc -V # rustc 1.55.0 (c8dfcfe04 2021-09-06)
-
Check you've installed Solana CLI:
solana -V # solana-cli 1.7.12 (src:ca83167c; feat:2013646575)
- Note: The example has been developed on Kubuntu 21.04.
- Note: Use WSL on Windows.
-
Go to the
/program
directory. -
Start Solana localnet:
solana-test-validator -C ./config.yml
- Tip:
-r, --reset: Reset the ledger to genesis if it exists.
- Tip:
-
Open a new terminal tab and go to
/program
again. -
Airdrop SOLs
solana airdrop -C ./config.yml 1 ./keypairs/voting-owner-keypair.json solana airdrop -C ./config.yml 1 ./keypairs/voter-keypair.json
-
Build the program:
cargo build-bpf
-
Deploy the program:
solana program deploy -C ./config.yml --program-id ./keypairs/program-keypair.json ./target/deploy/voting_program.so
-
Continue in /app/README.md.