Skip to content

Conversation

@0xferrous
Copy link
Contributor

@0xferrous 0xferrous commented Jan 12, 2026

There were compile errors when i tried to use this library.

Comment on lines 382 to 402
impl Tx for Recovered<&EthereumTxEnvelope<TxEip4844WithSidecar<BlobTransactionSidecarVariant>>> {
fn fill_tx_env(&self, tx_env: &mut TxEnv) {
match self.inner() {
EthereumTxEnvelope::Legacy(t) => {
Recovered::new_unchecked(t, self.signer()).fill_tx_env(tx_env)
}
EthereumTxEnvelope::Eip2930(t) => {
Recovered::new_unchecked(t, self.signer()).fill_tx_env(tx_env)
}
EthereumTxEnvelope::Eip1559(t) => {
Recovered::new_unchecked(t, self.signer()).fill_tx_env(tx_env)
}
EthereumTxEnvelope::Eip4844(t) => {
Recovered::new_unchecked(t, self.signer()).fill_tx_env(tx_env)
}
EthereumTxEnvelope::Eip7702(t) => {
Recovered::new_unchecked(t, self.signer()).fill_tx_env(tx_env)
}
}
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is also something that can be made generic, should i?

Copy link
Member

Choose a reason for hiding this comment

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

i'm on the fence about making these generic, as there's currently no trait bound to limit the typevar to something that's valid in context afaik

I suppose it won't cause any issues to go more generic, and it does DRY the code. let's make this generic as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there was a problem with generics because of missing trait bound as you point out. but i added a macro instead.

@Evalir Evalir requested review from Evalir and prestwich January 12, 2026 10:14
@prestwich
Copy link
Member

thank you! alloy introduced a breaking change in 1.4.0 which caused this error. would you mind bumping the dep spec in the trevm Cargo.toml to alloy = { version = "1.4.0", ... }

as a workaround, in your project you can downgrade all alloy packages to 1.2 (haven't tested 1.3) downgrading alloy alone is unfortunately not sufficient as the alloy meta crate at 1.2. will still select subcrates at 1.4

Copy link
Member

@prestwich prestwich left a comment

Choose a reason for hiding this comment

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

ty, looking good

@prestwich prestwich merged commit 711d54e into init4tech:main Jan 12, 2026
6 checks passed
@prestwich
Copy link
Member

this will be released in trevm@0.31.4 shortly

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants