Skip to content

Commit

Permalink
fix(cheatcodes): always omit pk on addr (foundry-rs#6698)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evalir authored and RPate97 committed Jan 12, 2024
1 parent 7c2937f commit 8777c13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/evm/traces/src/decoder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ impl CallTraceDecoder {
fn decode_cheatcode_inputs(&self, func: &Function, data: &[u8]) -> Option<Vec<String>> {
match func.name.as_str() {
"expectRevert" => Some(vec![decode::decode_revert(data, Some(&self.errors), None)]),
"rememberKey" | "addr" | "startBroadcast" | "broadcast" => {
"rememberKey" | "startBroadcast" | "broadcast" => {
// these functions accept a private key as uint256, which should not be
// converted to plain text
if !func.inputs.is_empty() && func.inputs[0].ty != "uint256" {
Expand All @@ -375,6 +375,7 @@ impl CallTraceDecoder {
}
Some(decoded.iter().map(format_token).collect())
}
"addr" => Some(vec!["<pk>".to_string()]),
"deriveKey" => Some(vec!["<pk>".to_string()]),
"parseJson" |
"parseJsonUint" |
Expand Down

0 comments on commit 8777c13

Please sign in to comment.