Skip to content

Commit

Permalink
add example basics/close-account : poseidon
Browse files Browse the repository at this point in the history
  • Loading branch information
dorkydhruv committed Oct 25, 2024
1 parent 45e302a commit a83e0f7
Show file tree
Hide file tree
Showing 15 changed files with 1,773 additions and 42 deletions.
169 changes: 127 additions & 42 deletions Cargo.lock

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions basics/close-account/poseidon/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.anchor
.DS_Store
target
**/*.rs.bk
node_modules
test-ledger
.yarn
7 changes: 7 additions & 0 deletions basics/close-account/poseidon/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.anchor
.DS_Store
target
node_modules
dist
build
test-ledger
18 changes: 18 additions & 0 deletions basics/close-account/poseidon/Anchor.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[toolchain]

[features]
resolution = true
skip-lint = false

[programs.localnet]
close_account = "3bo4FzxB1xAiPqZjq8nmLvHGMEsqm96VZeJFXFei7DJD"

[registry]
url = "https://api.apr.dev"

[provider]
cluster = "Localnet"
wallet = "~/.config/solana/id.json"

[scripts]
test = "pnpm run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
14 changes: 14 additions & 0 deletions basics/close-account/poseidon/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[workspace]
members = [
"programs/*"
]
resolver = "2"

[profile.release]
overflow-checks = true
lto = "fat"
codegen-units = 1
[profile.release.build-override]
opt-level = 3
incremental = false
codegen-units = 1
23 changes: 23 additions & 0 deletions basics/close-account/poseidon/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"license": "ISC",
"scripts": {
"test": "ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts",
"build-and-test": "cargo build-sbf --manifest-path=./Cargo.toml --sbf-out-dir=./tests/fixtures && pnpm test",
"build": "cargo build-sbf --manifest-path=./Cargo.toml --sbf-out-dir=./target/so",
"deploy": "solana program deploy ./target/so/program.so",
"ts-mocha": "ts-mocha"
},
"dependencies": {
"@coral-xyz/anchor": "^0.30.1"
},
"devDependencies": {
"chai": "^4.3.4",
"mocha": "^9.0.3",
"ts-mocha": "^10.0.0",
"@types/bn.js": "^5.1.0",
"@types/chai": "^4.3.0",
"@types/mocha": "^9.0.0",
"typescript": "^4.3.5",
"prettier": "^2.6.2"
}
}
Loading

0 comments on commit a83e0f7

Please sign in to comment.