- Install Rust, Solana CLI, and Anchor
- Clone this repository
- Install JS dependencies with yarn
- Create following accounts
solana-keygen new -o ./account/deployer.json
solana-keygen new -o ./account/program.json
solana-keygen new -o ./account/token-mint.json
- Configure program address in lib.rs and Anchor.toml
solana-keygen pubkey ./account/program.json
- Create .env and fill everything to run migration scripts
cp .env.example .env
vim .env
- Build
anchor build
- Deploy
solana program deploy --keypair ./account/deployer.json --program-id ./account/program.json ./target/deploy/solana_shop.so
- Run scripts
yarn script ./migrations/...ts
- Start solana test validator with necessary programs already deployed
yarn localnode
- Run unit tests
anchor test