Skip to content

Commit

Permalink
Rename trace_call to traceCall
Browse files Browse the repository at this point in the history
  • Loading branch information
danhper committed Sep 21, 2024
1 parent 0f7960f commit d3f342e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

* Add `repl.fork` to start run and use an Anvil instance as a fork of the current URL
* Add `repl.startPrank` / `repl.stopPrank` to start/stop impersonating an address
* Add `FUNC.trace_call` method to contract functions
* Add `FUNC.traceCall` method to contract functions
* Add `abi.decodeData` to decode function calldata and errors from any known ABI

### Other changes
Expand Down
2 changes: 1 addition & 1 deletion docs/src/interacting_with_contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Sending a transaction requires an [account to be loaded](./account_management.md
The behavior can be changed by using one of the following method on the returned function object:

* `call`: Call the function and return the result
* `trace_call`: Same as call but also prints the trace of the call (also potentially shows better error messages)
* `traceCall`: Same as call but also prints the trace of the call (also potentially shows better error messages)
* `send`: Sends a transaction to the function and return the result
* `encode`: ABI-encodes the function call

Expand Down
5 changes: 2 additions & 3 deletions src/interpreter/functions/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl std::fmt::Display for ContractCallMode {
ContractCallMode::Default => write!(f, "default"),
ContractCallMode::Encode => write!(f, "encode"),
ContractCallMode::Call => write!(f, "call"),
ContractCallMode::TraceCall => write!(f, "trace_call"),
ContractCallMode::TraceCall => write!(f, "traceCall"),
ContractCallMode::Send => write!(f, "send"),
}
}
Expand All @@ -52,7 +52,7 @@ impl TryFrom<&str> for ContractCallMode {
match s {
"encode" => Ok(ContractCallMode::Encode),
"call" => Ok(ContractCallMode::Call),
"trace_call" => Ok(ContractCallMode::TraceCall),
"traceCall" => Ok(ContractCallMode::TraceCall),
"send" => Ok(ContractCallMode::Send),
_ => bail!("{} does not exist for contract call", s),
}
Expand Down Expand Up @@ -386,7 +386,6 @@ where
geth::GethDebugBuiltInTracerType::CallTracer,
));
options = options.with_tracing_options(tracing_options);
// options.with_tracing_options(options)
let block_tag = env.block();
let block = provider
.get_block(block_tag, BlockTransactionsKind::Hashes)
Expand Down

0 comments on commit d3f342e

Please sign in to comment.