Skip to content

Commit a114df7

Browse files
committed
feat: missing alloy fill impl
1 parent 4404ad5 commit a114df7

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "trevm"
3-
version = "0.27.2"
3+
version = "0.27.3"
44
rust-version = "1.83.0"
55
edition = "2021"
66
authors = ["init4"]

src/fill/alloy.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use alloy::{
2-
consensus::{Signed, TxType},
2+
consensus::{Signed, TxEip4844, TxType},
33
primitives::U256,
44
};
55
use revm::context::{BlockEnv, TxEnv};
@@ -273,6 +273,18 @@ impl Tx for alloy::consensus::TxEnvelope {
273273
}
274274
}
275275

276+
impl Tx for alloy::consensus::EthereumTxEnvelope<TxEip4844> {
277+
fn fill_tx_env(&self, tx_env: &mut TxEnv) {
278+
match self {
279+
Self::Legacy(t) => t.fill_tx_env(tx_env),
280+
Self::Eip2930(t) => t.fill_tx_env(tx_env),
281+
Self::Eip1559(t) => t.fill_tx_env(tx_env),
282+
Self::Eip4844(t) => t.fill_tx_env(tx_env),
283+
Self::Eip7702(t) => t.fill_tx_env(tx_env),
284+
}
285+
}
286+
}
287+
276288
impl Block for alloy::consensus::Header {
277289
fn fill_block_env(&self, block_env: &mut BlockEnv) {
278290
let BlockEnv {

0 commit comments

Comments
 (0)