Skip to content

Commit 2e3800c

Browse files
authored
add basics/favorites/native (#238)
1 parent 9776aa1 commit 2e3800c

File tree

14 files changed

+1736
-2
lines changed

14 files changed

+1736
-2
lines changed

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ members = [
2525
"basics/realloc/anchor/programs/*",
2626
"basics/rent/native/program",
2727
"basics/rent/anchor/programs/*",
28+
"basics/favorites/native/program",
2829
"basics/repository-layout/native/program",
2930
"basics/repository-layout/anchor/programs/*",
3031
"basics/transfer-sol/native/program",

basics/favorites/native/cicd.sh

+8
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 --bpf-out-dir=./program/target/so
8+
solana program deploy ./program/target/so/program.so

basics/favorites/native/package.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"scripts": {
3+
"test": "pnpm ts-mocha -p ./tsconfig.json -t 1000000 ./tests/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/program.so"
7+
},
8+
"dependencies": {
9+
"@solana/web3.js": "^1.47.3",
10+
"borsh": "^2.0.0"
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.8.1",
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)