Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use debug traces to extract the input for settlement::Observer #3245

Merged
merged 7 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
15 changes: 13 additions & 2 deletions crates/autopilot/src/domain/eth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,15 +312,24 @@ pub struct TradeEvent {
pub order_uid: domain::OrderUid,
}

/// Call frames of a transaction.
#[derive(Clone, Debug, Default)]
pub struct CallFrame {
/// The address of the contract that was called.
pub to: Option<Address>,
/// Calldata input.
pub input: Calldata,
/// Recorded child calls.
pub calls: Vec<CallFrame>,
}

/// Any type of on-chain transaction.
#[derive(Debug, Clone, Default)]
pub struct Transaction {
/// The hash of the transaction.
pub hash: TxId,
/// The address of the sender of the transaction.
pub from: Address,
/// The call data of the transaction.
pub input: Calldata,
/// The block number of the block that contains the transaction.
pub block: BlockNo,
/// The timestamp of the block that contains the transaction.
Expand All @@ -329,4 +338,6 @@ pub struct Transaction {
pub gas: Gas,
/// The effective gas price of the transaction.
pub gas_price: EffectiveGasPrice,
/// Traces of all Calls contained in the transaction.
pub trace_calls: CallFrame,
}
Loading
Loading