Skip to content

Commit c9f2c05

Browse files
committed
addes basics/checking_accounts/steel
1 parent 45e302a commit c9f2c05

File tree

15 files changed

+1759
-0
lines changed

15 files changed

+1759
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"node-option": ["loader=ts-node/esm"]
3+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[workspace]
2+
resolver = "2"
3+
members = ["api", "program"]
4+
5+
[workspace.package]
6+
version = "0.1.0"
7+
edition = "2021"
8+
license = "Apache-2.0"
9+
10+
[workspace.dependencies]
11+
checking-account-api = { path = "./api", version = "0.1.0" }
12+
bytemuck = "1.14"
13+
num_enum = "0.7"
14+
solana-program = "1.18"
15+
steel = "2.1.0"
16+
thiserror = "1.0"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[package]
2+
name = "checking-account-api"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]
7+
bytemuck.workspace = true
8+
num_enum.workspace = true
9+
solana-program.workspace = true
10+
steel.workspace = true
11+
thiserror.workspace = true
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/// Seed of the account PDA.
2+
pub const ACCOUNT: &[u8] = b"account";
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
use steel::*;
2+
3+
#[repr(u8)]
4+
#[derive(Clone, Copy, Debug, Eq, PartialEq, TryFromPrimitive)]
5+
pub enum AccountInstruction {
6+
InitializeAccount = 0,
7+
}
8+
9+
#[repr(C)]
10+
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
11+
pub struct InitializeAccount {}
12+
13+
instruction!(AccountInstruction, InitializeAccount);
14+
15+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
pub mod consts;
2+
pub mod instruction;
3+
4+
pub mod prelude {
5+
pub use crate::consts::*;
6+
pub use crate::instruction::*;
7+
}
8+
9+
use steel::*;
10+
11+
declare_id!("FFJjpuXzZeBM8k1aTzzUrV9tgboUWtAaKH6U2QudoH2K");
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3+
"vcs": {
4+
"enabled": false,
5+
"clientKind": "git",
6+
"useIgnoreFile": false
7+
},
8+
"files": {
9+
"ignoreUnknown": false,
10+
"ignore": []
11+
},
12+
"formatter": {
13+
"enabled": true,
14+
"indentStyle": "tab"
15+
},
16+
"organizeImports": {
17+
"enabled": true
18+
},
19+
"linter": {
20+
"enabled": true,
21+
"rules": {
22+
"recommended": true
23+
}
24+
},
25+
"javascript": {
26+
"formatter": {
27+
"quoteStyle": "double"
28+
}
29+
}
30+
}
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 ./tests/tsconfig.test.json -t 1000000 ./tests/*.test.ts",
5+
"build-and-test": "cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./tests/fixtures && pnpm test",
6+
"build": "cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so",
7+
"deploy": "solana program deploy ./program/target/so/rent_program.so"
8+
},
9+
"dependencies": {
10+
"@solana/web3.js": "^1.95.4"
11+
},
12+
"devDependencies": {
13+
"@biomejs/biome": "1.9.4",
14+
"@types/bn.js": "^5.1.6",
15+
"@types/chai": "^5.0.0",
16+
"@types/mocha": "^10.0.9",
17+
"chai": "^5.1.1",
18+
"mocha": "^10.7.3",
19+
"solana-bankrun": "^0.4.0",
20+
"ts-mocha": "^10.0.0",
21+
"ts-node": "^10.9.2",
22+
"typescript": "^5.6.3"
23+
}
24+
}

0 commit comments

Comments
 (0)