Skip to content

Commit ab2efaf

Browse files
committed
add pinocchio account data example
1 parent a11dcf9 commit ab2efaf

File tree

10 files changed

+1802
-3
lines changed

10 files changed

+1802
-3
lines changed

Cargo.lock

Lines changed: 46 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
members = [
33
#basics
44
"basics/account-data/native/program",
5+
"basics/account-data/pinocchio/program",
56
"basics/account-data/anchor/programs/anchor-program-example",
67
"basics/checking-accounts/native/program",
78
"basics/checking-accounts/anchor/programs/anchor-program-example",
@@ -65,8 +66,9 @@ spl-associated-token-account-interface = "2.0.0"
6566
spl-token-2022-interface = "2.0.0"
6667

6768
# pinocchio
68-
pinocchio = "=0.8.1"
69+
pinocchio = "0.9.2"
6970
pinocchio-log = "0.4.0"
71+
pinocchio-system = "0.4.0"
7072

7173
# testing
7274
litesvm = "0.8.1"
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: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"type": "module",
3+
"scripts": {
4+
"test": "pnpm ts-mocha -p ./tsconfig.json -t 1000000 ./tests/index.test.ts",
5+
"build-and-test": "cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./tests/fixtures && pnpm test",
6+
"build": "cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so",
7+
"deploy": "solana program deploy ./program/target/so/hello_solana_program_pinocchio.so"
8+
},
9+
"dependencies": {
10+
"@solana/web3.js": "^1.47.3"
11+
},
12+
"devDependencies": {
13+
"@types/bn.js": "^5.1.0",
14+
"@types/chai": "^4.3.1",
15+
"@types/mocha": "^9.1.1",
16+
"@types/node": "^22.15.2",
17+
"chai": "^4.3.4",
18+
"mocha": "^9.0.3",
19+
"solana-bankrun": "^0.3.0",
20+
"ts-mocha": "^10.0.0",
21+
"typescript": "^4.3.5"
22+
}
23+
}

0 commit comments

Comments
 (0)