Skip to content

Commit

Permalink
chore: update eth_call to serialize output data in console (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
MexicanAce authored Sep 28, 2023
1 parent 4ffd847 commit 3f8c893
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -833,10 +833,12 @@ impl<S: ForkSource + std::fmt::Debug> InMemoryNode<S> {

match &tx_result.result {
ExecutionResult::Success { output } => {
log::info!("Call: {} {:?}", "SUCCESS".green(), output)
log::info!("Call: {}", "SUCCESS".green());
let output_bytes = zksync_basic_types::Bytes::from(output.clone());
log::info!("Output: {}", serde_json::to_string(&output_bytes).unwrap());
}
ExecutionResult::Revert { output } => {
log::info!("Call: {}: {}", "FAILED".red(), output)
log::info!("Call: {}: {}", "FAILED".red(), output);
}
ExecutionResult::Halt { reason } => log::info!("Call: {} {}", "HALTED".red(), reason),
};
Expand Down

0 comments on commit 3f8c893

Please sign in to comment.