Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 27 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ members = [
"basics/transfer-sol/native/program",
"basics/transfer-sol/pinocchio/program",
"basics/transfer-sol/anchor/programs/*",
"basics/transfer-sol/asm",

# tokens
"tokens/token-2022/mint-close-authority/native/program",
Expand Down Expand Up @@ -89,3 +90,4 @@ solana-keypair = "3.0.1"
solana-pubkey = "3.0.0"
solana-transaction = "3.0.1"
solana-native-token = "3.0.0"
solana-address = "2.1.0"
11 changes: 11 additions & 0 deletions basics/transfer-sol/asm/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
build/**/*
deploy/**/*
node_modules
.sbpf
.DS_Store
.vscode
keypair.json
package-lock.json
test-ledger
yarn.lock
target
19 changes: 19 additions & 0 deletions basics/transfer-sol/asm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[package]
name = "asm"
version = "0.1.0"
edition = "2021"

[dependencies]

[dev-dependencies]
litesvm.workspace = true
solana-instruction.workspace = true
solana-address.workspace = true
solana-keypair.workspace = true
solana-native-token.workspace = true
solana-pubkey.workspace = true
solana-transaction.workspace = true
solana-system-interface.workspace = true

[features]
test-sbf = []
3 changes: 3 additions & 0 deletions basics/transfer-sol/asm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# asm

Created with [sbpf](https://github.com/blueshift-gg/sbpf)
8 changes: 8 additions & 0 deletions basics/transfer-sol/asm/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
24 changes: 24 additions & 0 deletions basics/transfer-sol/asm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"type": "module",
"scripts": {
"test": "pnpm ts-mocha -p ./tsconfig.json -t 1000000 ./tests/test.ts",
"build-and-test": "sbpf build && pnpm test",
"build": "sbpf build",
"deploy": "solana program deploy ./program/target/so/program.so"
},
"dependencies": {
"@solana/web3.js": "^1.47.3",
"buffer-layout": "^1.2.2",
"fs": "^0.0.1-security"
},
"devDependencies": {
"@types/bn.js": "^5.1.0",
"@types/chai": "^4.3.1",
"@types/mocha": "^9.1.1",
"chai": "^4.3.4",
"mocha": "^9.0.3",
"solana-bankrun": "^0.3.0",
"ts-mocha": "^10.0.0",
"typescript": "^4.3.5"
}
}
Loading