Skip to content

Commit

Permalink
add debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
xgaozoyoe committed Dec 25, 2024
1 parent f2c8180 commit 68d4cd3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions abi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,17 +283,21 @@ macro_rules! create_zkwasm_apis {
}
let command = unsafe {wasm_input(0)};
let command_length = ((command & 0xff00) >> 8) as usize;
zkwasm_rust_sdk::dbg!("cmd length: {}\n", command_length);
unsafe { zkwasm_rust_sdk::require(command_length < 16) };
params.push(command);
for _ in 0..command_length - 1 {
params.push(unsafe {wasm_input(0)});
}
zkwasm_rust_sdk::dbg!("sig verify\n");
verify_tx_signature(params.clone());
zkwasm_rust_sdk::dbg!("success\n");
handle_tx(params);
let trace = unsafe {wasm_trace_size()};
zkwasm_rust_sdk::dbg!("trace track: {}\n", trace);
}

zkwasm_rust_sdk::dbg!("trace after tx handlers\n");
unsafe { zkwasm_rust_sdk::require(preempt()) };

let bytes = finalize();
Expand Down

0 comments on commit 68d4cd3

Please sign in to comment.