Based on the buildspace Build a Web3 app on Solana with React and Rust project.
A web app that lets anyone with a Solana (Phantom π») wallet:
- submit GIFs to a portal
- save them on the Solana blockchain
- retrieve all of the GIFs that have been submitted
- Clone the repo.
- Run
npm install
at the root of your directory - Run
npm run start
to start the web app
gifportal/
a Solana program (written in Rust) to store submitted GIFs on the Solana blockchainsrc/
a React web app that calls the deployed program
You will need to install Rust, Solana tool suite and Anchor.
Set the Solana environment to devnet:
solana config set --url devnet
Run Anchor build:
cd gifportal
anchor build
Get the program ID:
solana address -k target/deploy/gifportal-keypair.json
Set the program ID in src/lib.rs
and Anchor.toml
Run Anchor deploy:
anchor deploy
Compile the gifportal
program and run the tests from tests/gifportal.js
using:
anchor test