Skip to content

Conversation

@mablr
Copy link
Contributor

@mablr mablr commented Nov 2, 2025

Motivation

Close #12390

Solution

Implement alloy_evm FromRecoveredTx trait for anvil TypedTransaction. Just copy-pasted existing conversion for now, but will changed once the following will done:

Pending alloy-rs/evm#209

... Before being merged, this PR needs to be rebased on #12406, and the test updated accordingly (tx json structure, see #12406 (comment))

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@mablr mablr changed the title feat(anvil): Implement alloy_evm FromRecoveredTx trait for anvil `T… feat(anvil): Implement alloy_evm FromRecoveredTx trait for anvil TypedTransaction Nov 2, 2025
Comment on lines +1367 to +1382
let TxDeposit { to, value, gas_limit, input, .. } = tx;

Self {
caller,
kind: transact_to(to),
data: input.clone(),
chain_id: tx.chain_id(),
nonce: 0,
value: *value,
gas_price: 0,
gas_priority_fee: None,
gas_limit: *gas_limit,
access_list: vec![].into(),
tx_type: DEPOSIT_TX_TYPE_ID,
..Default::default()
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To replace this with

Self::from_recovered_tx(tx, caller)

We need to bump alloy-evm to "0.23.0", but it relies on revm-precompile "29.0.0", while current foundry's revm version "30.2.0" relies on revm-precompile "28.1.1".

So the we need to bump revm to "31.0.0", but ... this change breaks alloy-evm "0.23.0",
bluealloy/revm@ce68f93

So I'll make a pr on alloy-evm to fix that, then we'll to cut a release and bump everything here...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Implement alloy_evm traits for anvil txtypes

1 participant