git clone git@github.com:Nagaprasadvr/solana-native-starter.git
-
program/ - contains the rust program
-
-
entrypoint.rs - the entrypoint of the program
-
lib.rs - solana program lib crate
-
instruction.rs - all instructions are defined here
Note: instructions are annotated with
#[accounts(...)]
shank macros
which are required to generate client code -
state.rs - all account states are defined here
Note: state is deriving
ShankAccount
which is required to generate client code -
processor.rs - the processor file
-
error.rs - program errors are listed here
-
helper.rs - helpers and constants for program
-
-
js/ - contains the js
client
-
js/tests/ - contains the
tests
for the program
sudo chmod +rwx cicd.sh && sudo chmod +rwx gen-client.sh #for first time to provide permissions
solana-test-validator
Note: change program name in program/Cargo.toml and js/.solitarc.js before deployment
bash ./cicd.sh
dont forget to replace program id after program deployment in prorgam/src/lib.rs
bash ./gen-client.sh
The generated client code is located in js/src/generated
cd js && bun run test