This project is one of two parts - this part reads "tasks" from the solana blockchain and completes them to receive rewards. The sister repo that creates tasks is at https://github.com/poketapp/solana-hackathon-2021.
The project comprises of:
- An on-chain program to record location-based task completion on the solana blockchain
- A mobile-friendly client to view location-based tasks and complete them and submit data back tot the blockchain
The following dependencies are required to build and run this example, depending on your OS, they may already be installed:
- Install node (v14 recommended)
- Install npm
- Install the latest Rust stable from https://rustup.rs/
- Install Solana v1.7.11 or later from https://docs.solana.com/cli/install-solana-cli-tools
If this is your first time using Rust, these Installation Notes might be helpful.
If you're on Windows, it is recommended to use WSL to run these commands
- Set CLI config url to localhost cluster
solana config set --url localhost- Create CLI Keypair
If this is your first time using the Solana CLI, you will need to generate a new keypair:
solana-keygen newThis example connects to a local Solana cluster by default.
Start a local Solana cluster:
solana-test-validatorNote: You may need to do some system tuning (and restart your computer) to get the validator to run
Listen to transaction logs:
solana logsyarnnpm run build:program-rustsolana program deploy dist/program/helloworld.soIn the solana-react folder, run
yarn dev