Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Debug contract with native #155

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
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
12 changes: 12 additions & 0 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions crates/tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
simulator = [ "ckb-testtool/simulator" ]

[dependencies]
anyhow = "1.0"
ckb-testtool = { path = "../testtool" }
Expand Down
8 changes: 7 additions & 1 deletion crates/tests/src/testtool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ fn test_load_header() {
.build(),
CellOutput::new_builder()
.capacity(500u64.pack())
.lock(lock_script)
.lock(lock_script.clone())
.build(),
];

Expand Down Expand Up @@ -214,6 +214,12 @@ fn test_load_header() {
.build();
let tx = context.complete_tx(tx);

#[cfg(feature = "simulator")]
let context = context.set_simulator(
lock_script.code_hash(),
"crates/tests/test-contract/build/debug/libtest_contract_dbg.so",
);

// run
context
.verify_tx(&tx, MAX_CYCLES)
Expand Down
Loading