Skip to content

Commit

Permalink
add basics/favorites/native (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
joonx05 authored Jan 4, 2025
1 parent 9776aa1 commit 2e3800c
Show file tree
Hide file tree
Showing 14 changed files with 1,736 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ members = [
"basics/realloc/anchor/programs/*",
"basics/rent/native/program",
"basics/rent/anchor/programs/*",
"basics/favorites/native/program",
"basics/repository-layout/native/program",
"basics/repository-layout/anchor/programs/*",
"basics/transfer-sol/native/program",
Expand Down
8 changes: 8 additions & 0 deletions basics/favorites/native/cicd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

# This script is for quick building & deploying of the program.
# It also serves as a reference for the commands used for building & deploying Solana programs.
# Run this bad boy with "bash cicd.sh" or "./cicd.sh"

cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
solana program deploy ./program/target/so/program.so
23 changes: 23 additions & 0 deletions basics/favorites/native/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"scripts": {
"test": "pnpm ts-mocha -p ./tsconfig.json -t 1000000 ./tests/test.ts",
"build-and-test": "cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./tests/fixtures && pnpm test",
"build": "cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so",
"deploy": "solana program deploy ./program/target/so/program.so"
},
"dependencies": {
"@solana/web3.js": "^1.47.3",
"borsh": "^2.0.0"
},
"devDependencies": {
"@types/bn.js": "^5.1.0",
"@types/chai": "^4.3.1",
"@types/mocha": "^9.1.1",
"@types/node": "^22.8.1",
"chai": "^4.3.4",
"mocha": "^9.0.3",
"solana-bankrun": "^0.3.0",
"ts-mocha": "^10.0.0",
"typescript": "^4.3.5"
}
}
Loading

0 comments on commit 2e3800c

Please sign in to comment.