Skip to content

Commit

Permalink
minor formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zerosnacks committed Dec 4, 2024
1 parent e650725 commit 5a6776f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions examples/transactions/examples/debug_trace_call_many.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async fn main() -> Result<()> {
let charlie = address!("90F79bf6EB2c4f870365E785982E1f101E93b906");
let dan = address!("15d34AAf54267DB7D7c367839AAf71A00a2C6A65");

// Define transactions
// Define transactions.
let tx1 =
TransactionRequest::default().with_from(alice).with_to(bob).with_value(U256::from(150));
let tx2 =
Expand All @@ -33,13 +33,14 @@ async fn main() -> Result<()> {
// Create the bundle of transactions.
let bundles = vec![Bundle { transactions: vec![tx1, tx2], block_override: None }];

// Define the State context and trace option
// Define the state context and trace option.
let state_context = StateContext::default();
let trace_options = GethDebugTracingCallOptions::default();

//Call `debug_trace_call_many` on the provider.
// Call `debug_trace_call_many` on the provider.
let result = provider.debug_trace_call_many(bundles, state_context, trace_options).await;

// Print the trace results.
match result {
Ok(traces) => {
println!("Traces:\n{:?}", traces);
Expand Down
4 changes: 2 additions & 2 deletions examples/transactions/examples/trace_call_many.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ async fn main() -> Result<()> {
let charlie = address!("90F79bf6EB2c4f870365E785982E1f101E93b906");
let dan = address!("15d34AAf54267DB7D7c367839AAf71A00a2C6A65");

// Define transactions
// Define transactions.
let tx1 =
TransactionRequest::default().with_from(alice).with_to(bob).with_value(U256::from(150));
let tx2 =
TransactionRequest::default().with_from(charlie).with_to(dan).with_value(U256::from(250));

// Define the trace for the trace_list
// Define the trace type for the trace call list.
let trace_type: &[TraceType] = &[TraceType::Trace];

// Trace the transaction on top of the latest block.
Expand Down

0 comments on commit 5a6776f

Please sign in to comment.