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

chore(anvil): Add base alloy types #6778

Merged
merged 10 commits into from
Jan 15, 2024
Merged

chore(anvil): Add base alloy types #6778

merged 10 commits into from
Jan 15, 2024

Conversation

Evalir
Copy link
Member

@Evalir Evalir commented Jan 12, 2024

This PR adds an alloy version of the types in anvil-core, replacing them with alloy-consensus types. We keep our own TypedTransactionRequest/TypedTransaction/TypedReceipt types to enable optimism support.

Note that this PR only adds types. It doesn't remove or migrate the old types as to not blow up the scope. Incremental PRs removing old code will follow.

Comment on lines 1 to 5
use alloy_consensus::{TxEip2930, TxEip1559, TxLegacy};
use alloy_network::{TxKind, Signed};
use alloy_primitives::{Address, B256, Bloom, Bytes, Log, U256};
use alloy_rlp::{Encodable, Decodable, Header as RlpHeader, Error as DecodeError};
use alloy_rpc_types::AccessList;
Copy link
Member

Choose a reason for hiding this comment

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

@DaniPopes we prob want to figure out a nice re-export for these

@Evalir Evalir marked this pull request as ready for review January 15, 2024 16:07
@Evalir Evalir changed the title [WIP] chore(anvil): Migrate base types chore(anvil): Migrate base types Jan 15, 2024
@Evalir Evalir changed the title chore(anvil): Migrate base types chore(anvil): Add base alloy types Jan 15, 2024
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

nits, otherwise lgtm

crates/anvil/core/src/eth/transaction/alloy.rs Outdated Show resolved Hide resolved
crates/anvil/core/src/eth/utils.rs Show resolved Hide resolved
crates/anvil/core/src/eth/transaction/alloy.rs Outdated Show resolved Hide resolved
crates/anvil/core/src/eth/transaction/alloy.rs Outdated Show resolved Hide resolved
@Evalir Evalir merged commit fbd8c34 into master Jan 15, 2024
20 checks passed
@Evalir Evalir deleted the evalir/migrate-typed-tx branch January 15, 2024 17:49
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.

3 participants