Skip to content

Commit 81ec7d4

Browse files
authored
add checking accounts asm example (#539)
1 parent c193f58 commit 81ec7d4

13 files changed

Lines changed: 2110 additions & 3 deletions

File tree

Cargo.lock

Lines changed: 16 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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ members = [
77
"basics/checking-accounts/native/program",
88
"basics/checking-accounts/pinocchio/program",
99
"basics/checking-accounts/anchor/programs/anchor-program-example",
10+
"basics/checking-accounts/asm",
1011
"basics/close-account/native/program",
1112
"basics/close-account/pinocchio/program",
1213
"basics/close-account/anchor/programs/close-account",
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
build/**/*
2+
deploy/**/*
3+
node_modules
4+
.sbpf
5+
.DS_Store
6+
.vscode
7+
keypair.json
8+
package-lock.json
9+
test-ledger
10+
yarn.lock
11+
target
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[package]
2+
name = "checking-account-asm-program"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]
7+
8+
[dev-dependencies]
9+
litesvm = "0.11.0"
10+
solana-instruction = "3.0.0"
11+
solana-keypair = "3.0.1"
12+
solana-native-token = "3.0.0"
13+
solana-pubkey = "3.0.0"
14+
solana-transaction = "3.0.1"
15+
solana-system-interface.workspace = true
16+
solana-transaction-error = "3.0.0"
17+
18+
[features]
19+
test-sbf = []
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# checking-account-asm-program
2+
3+
Created with [sbpf](https://github.com/blueshift-gg/sbpf)
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+
sbpf build --deploy-dir ./tests/fixtures/
8+
solana program deploy ./tests/fixtures/checking-account-asm-program.so
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"type": "module",
3+
"scripts": {
4+
"test": "pnpm ts-mocha -p ./tsconfig.json -t 1000000 ./tests/test.ts",
5+
"build-and-test": "sbpf build --deploy-dir ./tests/fixtures && pnpm test",
6+
"build": "sbpf build --deploy-dir ./tests/fixtures",
7+
"deploy": "solana program deploy ./tests/fixtures/checking-account-asm-program.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+
"chai": "^4.3.4",
17+
"mocha": "^9.0.3",
18+
"ts-mocha": "^10.0.0",
19+
"typescript": "^4.3.5",
20+
"solana-bankrun": "^0.3.0"
21+
}
22+
}

0 commit comments

Comments
 (0)