diff --git a/CHANGELOG.md b/CHANGELOG.md index 22722f4..1a561ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/docs/src/interacting_with_contracts.md b/docs/src/interacting_with_contracts.md index beeea97..398cae3 100644 --- a/docs/src/interacting_with_contracts.md +++ b/docs/src/interacting_with_contracts.md @@ -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 diff --git a/src/interpreter/functions/contract.rs b/src/interpreter/functions/contract.rs index c6d0f35..cbca271 100644 --- a/src/interpreter/functions/contract.rs +++ b/src/interpreter/functions/contract.rs @@ -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"), } } @@ -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), } @@ -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)