Skip to content

Commit 8735834

Browse files
authored
feat: add pinocchio example for hello solana program (#376)
* add pinocchio example for hello solana program * update cicd.sh
1 parent aca7380 commit 8735834

File tree

8 files changed

+1480
-0
lines changed

8 files changed

+1480
-0
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ members = [
1515
"basics/cross-program-invocation/anchor/programs/*",
1616
"basics/hello-solana/native/program",
1717
"basics/hello-solana/anchor/programs/*",
18+
"basics/hello-solana/pinocchio/program",
1819
"basics/pda-rent-payer/native/program",
1920
"basics/pda-rent-payer/anchor/programs/*",
2021
"basics/processing-instructions/native/program",
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
# This script is for quick building & deploying of the program.
4+
# It also serves as a reference for the commands used for building & deploying Solana programs.
5+
# Run this bad boy with "bash cicd.sh" or "./cicd.sh"
6+
7+
cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so
8+
solana program deploy ./program/target/so/program.so
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"scripts": {
3+
"test": "pnpm ts-mocha -p ./tsconfig.json -t 1000000 ./tests/index.test.ts",
4+
"build-and-test": "cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./tests/fixtures && pnpm test",
5+
"build": "cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so",
6+
"deploy": "solana program deploy ./program/target/so/hello_solana_program_pinocchio.so"
7+
},
8+
"dependencies": {
9+
"@solana/web3.js": "^1.47.3"
10+
},
11+
"devDependencies": {
12+
"@types/bn.js": "^5.1.0",
13+
"@types/chai": "^4.3.1",
14+
"@types/mocha": "^9.1.1",
15+
"@types/node": "^22.15.2",
16+
"chai": "^4.3.4",
17+
"mocha": "^9.0.3",
18+
"solana-bankrun": "^0.3.0",
19+
"ts-mocha": "^10.0.0",
20+
"typescript": "^4.3.5"
21+
}
22+
}

0 commit comments

Comments
 (0)