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

feat: add authorization list to TransactionRequest #1125

Merged
merged 3 commits into from
Aug 5, 2024
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
1 change: 1 addition & 0 deletions crates/rpc-types-eth/src/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ impl Transaction {
max_fee_per_blob_gas: self.max_fee_per_blob_gas,
blob_versioned_hashes: self.blob_versioned_hashes,
sidecar: None,
authorization_list: None,
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions crates/rpc-types-eth/src/transaction/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use alloy_consensus::{
TxEip1559, TxEip2930, TxEip4844, TxEip4844Variant, TxEip4844WithSidecar, TxEnvelope, TxLegacy,
TxType, TypedTransaction,
};
use alloy_eips::eip7702::SignedAuthorization;
use alloy_primitives::{Address, Bytes, ChainId, TxKind, B256, U256};
use serde::{Deserialize, Serialize};
use std::hash::Hash;
Expand Down Expand Up @@ -66,6 +67,9 @@ pub struct TransactionRequest {
/// Blob sidecar for EIP-4844 transactions.
#[serde(default, flatten, skip_serializing_if = "Option::is_none")]
pub sidecar: Option<BlobTransactionSidecar>,
/// Authorization list for for 7702 transactions.
#[serde(default, flatten, skip_serializing_if = "Option::is_none")]
pub authorization_list: Option<SignedAuthorization>,
}

impl TransactionRequest {
Expand Down