Skip to content

Commit

Permalink
fixup! feat(anvil): add mined transactions to state dump
Browse files Browse the repository at this point in the history
this changes the dump format to include the impersonated_sender of block transactions
  • Loading branch information
tuler committed Jul 11, 2024
1 parent dfbc369 commit 270ef76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/anvil/core/src/eth/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ pub enum TypedTransactionRequest {
///
/// This is a helper that carries the `impersonated` sender so that the right hash
/// [TypedTransaction::impersonated_hash] can be created.
#[derive(Clone, Debug, PartialEq, Eq)]
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
pub struct MaybeImpersonatedTransaction {
pub transaction: TypedTransaction,
pub impersonated_sender: Option<Address>,
Expand Down
4 changes: 2 additions & 2 deletions crates/anvil/src/eth/backend/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use alloy_primitives::{keccak256, Address, Bytes, B256, U256, U64};
use alloy_rpc_types::BlockId;
use anvil_core::eth::{
block::Block,
transaction::{TransactionInfo, TypedReceipt, TypedTransaction},
transaction::{MaybeImpersonatedTransaction, TransactionInfo, TypedReceipt},
};
use foundry_common::errors::FsPathError;
use foundry_evm::{
Expand Down Expand Up @@ -362,7 +362,7 @@ pub struct SerializableAccountRecord {
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct SerializableBlock {
pub header: Header,
pub transactions: Vec<TypedTransaction>,
pub transactions: Vec<MaybeImpersonatedTransaction>,
pub ommers: Vec<Header>,
}

Expand Down

0 comments on commit 270ef76

Please sign in to comment.