Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Re-enable other field
  • Loading branch information
mdehoog authored and anikaraghu committed Nov 21, 2023
commit fc08146752bf9ea15ea1ef08e38b178118ea20a2
4 changes: 4 additions & 0 deletions crates/anvil/core/src/eth/transaction/ethers_compat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ fn to_ethers_transaction_with_hash_and_sender(
source_hash: None,
mint: None,
is_system_tx: None,
other: Default::default(),
},
TypedTransaction::EIP2930(t) => EthersTransaction {
hash,
Expand All @@ -172,6 +173,7 @@ fn to_ethers_transaction_with_hash_and_sender(
source_hash: None,
mint: None,
is_system_tx: None,
other: Default::default(),
},
TypedTransaction::EIP1559(t) => EthersTransaction {
hash,
Expand All @@ -196,6 +198,7 @@ fn to_ethers_transaction_with_hash_and_sender(
source_hash: None,
mint: None,
is_system_tx: None,
other: Default::default(),
},
TypedTransaction::OpDeposit(t) => EthersTransaction {
hash,
Expand All @@ -220,6 +223,7 @@ fn to_ethers_transaction_with_hash_and_sender(
source_hash: Some(t.source_hash),
mint: Some(t.mint),
is_system_tx: Some(t.is_system_tx),
other: Default::default(),
},
}
}
Expand Down
16 changes: 8 additions & 8 deletions crates/anvil/src/eth/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1843,16 +1843,16 @@ impl EthApi {
// insert revert reason if failure
if receipt.inner.status.unwrap_or_default().as_u64() == 0 {
if let Some(reason) = decode_revert_reason(&output) {
// tx.other.insert(
// "revertReason".to_string(),
// serde_json::to_value(reason).expect("Infallible"),
// );
tx.other.insert(
"revertReason".to_string(),
serde_json::to_value(reason).expect("Infallible"),
);
}
}
// tx.other.insert(
// "output".to_string(),
// serde_json::to_value(output).expect("Infallible"),
// );
tx.other.insert(
"output".to_string(),
serde_json::to_value(output).expect("Infallible"),
);
}
}
}
Expand Down
11 changes: 6 additions & 5 deletions crates/macros/src/fmt/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ s {}
to {}
transactionIndex {}
v {}
value {}",
value {}{}",
self.block_hash.pretty(),
self.block_number.pretty(),
self.from.pretty(),
Expand All @@ -328,6 +328,7 @@ value {}",
self.transaction_index.pretty(),
self.v.pretty(),
self.value.pretty(),
self.other.pretty()
)
}
}
Expand Down Expand Up @@ -356,10 +357,10 @@ pub fn get_pretty_tx_attr(transaction: &Transaction, attr: &str) -> Option<Strin
"transactionIndex" | "transaction_index" => Some(transaction.transaction_index.pretty()),
"v" => Some(transaction.v.pretty()),
"value" => Some(transaction.value.pretty()),
_other => {
// if let Some(value) = transaction.other.get(other) {
// return Some(value.to_string().trim_matches('"').to_string())
// }
other => {
if let Some(value) = transaction.other.get(other) {
return Some(value.to_string().trim_matches('"').to_string())
}
None
}
}
Expand Down