Skip to content

Commit 12cc512

Browse files
committed
add cpi pinocchio example
1 parent 020ebe7 commit 12cc512

File tree

13 files changed

+1628
-0
lines changed

13 files changed

+1628
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[workspace]
2+
members = [
3+
"programs/*"
4+
]
5+
resolver = "2"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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 --bpf-out-dir=./target/so
8+
echo "Hand:"
9+
solana program deploy ./target/so/hand.so | grep "Program Id:"
10+
echo "Lever:"
11+
solana program deploy ./target/so/lever.so | grep "Program Id:"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"type": "module",
3+
"scripts": {
4+
"test": "pnpm ts-mocha -p ./tsconfig.json -t 1000000 ./tests/test.ts",
5+
"build-and-test": "cargo build-sbf --sbf-out-dir=./tests/fixtures && pnpm test",
6+
"build": "cargo build-sbf --sbf-out-dir=./program/target/so",
7+
"deploy": "solana program deploy ./program/target/so/program.so"
8+
},
9+
"dependencies": {
10+
"@solana/web3.js": "^1.47.3",
11+
"borsh": "^0.7.0",
12+
"buffer": "^6.0.3",
13+
"fs": "^0.0.1-security"
14+
},
15+
"devDependencies": {
16+
"@types/bn.js": "^5.1.0",
17+
"@types/chai": "^4.3.1",
18+
"@types/mocha": "^9.1.1",
19+
"chai": "^4.3.4",
20+
"mocha": "^9.0.3",
21+
"ts-mocha": "^10.0.0",
22+
"typescript": "^4.3.5"
23+
}
24+
}

0 commit comments

Comments
 (0)