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

fix: various eip-7702 rpc fixes #10590

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions crates/optimism/rpc/src/eth/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ where
chain_id,
blob_versioned_hashes,
max_fee_per_blob_gas,
// authorization_list,
authorization_list,
..
} = request;

Expand Down Expand Up @@ -98,7 +98,7 @@ where
// EIP-4844 fields
blob_hashes: blob_versioned_hashes.unwrap_or_default(),
max_fee_per_blob_gas,
authorization_list: Default::default(),
authorization_list: authorization_list.map(Into::into),
optimism: OptimismFields { enveloped_tx: Some(Bytes::new()), ..Default::default() },
};

Expand Down
4 changes: 2 additions & 2 deletions crates/rpc/rpc-eth-api/src/helpers/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ pub trait Call: LoadState + SpawnBlocking {
chain_id,
blob_versioned_hashes,
max_fee_per_blob_gas,
// authorization_list,
authorization_list,
..
} = request;

Expand Down Expand Up @@ -892,7 +892,7 @@ pub trait Call: LoadState + SpawnBlocking {
blob_hashes: blob_versioned_hashes.unwrap_or_default(),
max_fee_per_blob_gas,
// EIP-7702 fields
// authorization_list: TODO
authorization_list: authorization_list.map(Into::into),
..Default::default()
};

Expand Down
2 changes: 1 addition & 1 deletion crates/rpc/rpc-types-compat/src/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn fill(
#[allow(unreachable_patterns)]
let (gas_price, max_fee_per_gas) = match signed_tx.tx_type() {
TxType::Legacy | TxType::Eip2930 => (Some(signed_tx.max_fee_per_gas()), None),
TxType::Eip1559 | TxType::Eip4844 => {
TxType::Eip1559 | TxType::Eip4844 | TxType::Eip7702 => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pain

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very

// the gas price field for EIP1559 is set to `min(tip, gasFeeCap - baseFee) +
// baseFee`
let gas_price = tx_info
Expand Down
Loading