Skip to content

Commit

Permalink
refactor: bpf test
Browse files Browse the repository at this point in the history
  • Loading branch information
codewithgun committed Dec 19, 2024
1 parent 6b16b2c commit 8f39722
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 6 deletions.
8 changes: 8 additions & 0 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
members = ["programs/*", "cli", "market_making", "commons", "dlmm_interface"]
members = ["cli", "market_making", "commons", "dlmm_interface"]
resolver = "2"

[workspace.dependencies]
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
#### Quote Testing

```
cd programs/lb_clmm/
cargo test-bpf
cargo t -p commons --test '*'
```

#### SDK Testing
Expand All @@ -13,4 +12,4 @@ cargo test-bpf
1. cd ts-client
2. anchor localnet -- --features localnet
3. pnpm run test
```
```
10 changes: 10 additions & 0 deletions commons/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,13 @@ anyhow = { workspace = true }
lb_clmm = { path = "../programs/lb_clmm", features = ["cpi"] }
tokio = { workspace = true, features = ["full", "parking_lot"] }
bincode = "1.3.3"

[dev-dependencies]
anchor-lang = { workspace = true }
anchor-spl = { workspace = true }
solana-program-test = "1.16.0"
solana-sdk = "1.16.0"
async-trait = "0.1.52"
assert_matches = "1.5.0"
spl-associated-token-account = { workspace = true }
solana-program = "1.16.0"
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![cfg(feature = "test-bpf")]
mod helpers;
use anchor_lang::prelude::*;
use anchor_lang::solana_program::{instruction::Instruction, pubkey::Pubkey};
Expand All @@ -20,7 +19,7 @@ use utils::*;
#[tokio::test]
async fn test_swap() {
let mut test = ProgramTest::default();

test.prefer_bpf(true);
test.add_program("./tests/artifacts/lb_clmm_prod", lb_clmm::id(), None);

let lb_pair = Pubkey::from_str("EtAdVRLFH22rjWh3mcUasKFF27WtHhsaCvK27tPFFWig").unwrap();
Expand Down

0 comments on commit 8f39722

Please sign in to comment.