Skip to content

BHEEEET/writemind

Repository files navigation

Simple Solana onchain blog

Setup

Start own testnet:

solana-test-validator

Change the api cluster:

solana config set --url localhost

See activity:

solana logs

init

cargo init hello_world 
cargo add solana-program

anchor init hello_world

Build:

cargo build-bpf

anchor build

Deploy:

solana program deploy ./target/deploy/hello_world.so

anchor deploy

Local testnet explorer:

https://explorer.solana.com/?cluster=custom&customUrl=http%3A%2F%2F127.0%3A8899

Workflow

workflow anchor

coral-xyz/anchor#1912

Get program_id:

anchor keys list

Debug

Add program_id to /target/idl/hello_world.json:

,
"metadata":
{"address": "progam_id"}

Testing

Test contract:

anchor test 
 
#if you already have test-validator running
anchor run test

About

My mind writing in the waves of the human language.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published