chore: bump alloy and rm EvmOverrides (#8875)

This commit is contained in:
Thomas Coratger
2024-06-17 11:46:42 +02:00
committed by GitHub
parent 859b96388a
commit 333a86db10
20 changed files with 138 additions and 145 deletions

85
Cargo.lock generated
View File

@ -124,7 +124,7 @@ dependencies = [
[[package]]
name = "alloy-consensus"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-eips 0.1.0",
"alloy-primitives",
@ -171,7 +171,7 @@ dependencies = [
[[package]]
name = "alloy-eips"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-primitives",
"alloy-rlp",
@ -203,7 +203,7 @@ dependencies = [
[[package]]
name = "alloy-genesis"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-primitives",
"alloy-serde 0.1.0",
@ -226,7 +226,7 @@ dependencies = [
[[package]]
name = "alloy-json-rpc"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-primitives",
"serde",
@ -238,13 +238,14 @@ dependencies = [
[[package]]
name = "alloy-network"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-consensus 0.1.0",
"alloy-eips 0.1.0",
"alloy-json-rpc",
"alloy-primitives",
"alloy-rpc-types-eth 0.1.0",
"alloy-serde 0.1.0",
"alloy-signer",
"alloy-sol-types",
"async-trait",
@ -256,7 +257,7 @@ dependencies = [
[[package]]
name = "alloy-node-bindings"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-genesis",
"alloy-primitives",
@ -298,7 +299,7 @@ dependencies = [
[[package]]
name = "alloy-provider"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-chains",
"alloy-consensus 0.1.0",
@ -308,9 +309,9 @@ dependencies = [
"alloy-primitives",
"alloy-pubsub",
"alloy-rpc-client",
"alloy-rpc-types-admin",
"alloy-rpc-types-engine",
"alloy-rpc-types-eth 0.1.0",
"alloy-rpc-types-trace",
"alloy-transport",
"alloy-transport-http",
"alloy-transport-ws",
@ -333,7 +334,7 @@ dependencies = [
[[package]]
name = "alloy-pubsub"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-json-rpc",
"alloy-primitives",
@ -373,7 +374,7 @@ dependencies = [
[[package]]
name = "alloy-rpc-client"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-json-rpc",
"alloy-primitives",
@ -396,7 +397,7 @@ dependencies = [
[[package]]
name = "alloy-rpc-types"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-rpc-types-engine",
"alloy-rpc-types-eth 0.1.0",
@ -413,10 +414,21 @@ dependencies = [
"alloy-serde 0.1.1",
]
[[package]]
name = "alloy-rpc-types-admin"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-genesis",
"alloy-primitives",
"serde",
"serde_json",
]
[[package]]
name = "alloy-rpc-types-anvil"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-primitives",
"alloy-serde 0.1.0",
@ -426,7 +438,7 @@ dependencies = [
[[package]]
name = "alloy-rpc-types-beacon"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-eips 0.1.0",
"alloy-primitives",
@ -439,7 +451,7 @@ dependencies = [
[[package]]
name = "alloy-rpc-types-engine"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-consensus 0.1.0",
"alloy-eips 0.1.0",
@ -457,11 +469,10 @@ dependencies = [
[[package]]
name = "alloy-rpc-types-eth"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-consensus 0.1.0",
"alloy-eips 0.1.0",
"alloy-genesis",
"alloy-primitives",
"alloy-rlp",
"alloy-serde 0.1.0",
@ -496,7 +507,7 @@ dependencies = [
[[package]]
name = "alloy-rpc-types-trace"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-primitives",
"alloy-rpc-types-eth 0.1.0",
@ -506,11 +517,25 @@ dependencies = [
]
[[package]]
name = "alloy-serde"
name = "alloy-rpc-types-txpool"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-primitives",
"alloy-rpc-types-eth 0.1.0",
"alloy-serde 0.1.0",
"serde",
]
[[package]]
name = "alloy-serde"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-primitives",
"arbitrary",
"proptest",
"proptest-derive",
"serde",
"serde_json",
]
@ -528,7 +553,7 @@ dependencies = [
[[package]]
name = "alloy-signer"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-primitives",
"async-trait",
@ -539,9 +564,9 @@ dependencies = [
]
[[package]]
name = "alloy-signer-wallet"
name = "alloy-signer-local"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-consensus 0.1.0",
"alloy-network",
@ -630,7 +655,7 @@ dependencies = [
[[package]]
name = "alloy-transport"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-json-rpc",
"base64 0.22.1",
@ -647,7 +672,7 @@ dependencies = [
[[package]]
name = "alloy-transport-http"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-json-rpc",
"alloy-transport",
@ -661,7 +686,7 @@ dependencies = [
[[package]]
name = "alloy-transport-ipc"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-json-rpc",
"alloy-pubsub",
@ -679,7 +704,7 @@ dependencies = [
[[package]]
name = "alloy-transport-ws"
version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0"
source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf"
dependencies = [
"alloy-pubsub",
"alloy-transport",
@ -2323,6 +2348,7 @@ dependencies = [
"futures-util",
"reth",
"reth-node-ethereum",
"reth-rpc-types",
]
[[package]]
@ -6777,7 +6803,7 @@ dependencies = [
"alloy-network",
"alloy-rpc-types 0.1.0",
"alloy-signer",
"alloy-signer-wallet",
"alloy-signer-local",
"eyre",
"futures-util",
"jsonrpsee",
@ -8000,10 +8026,13 @@ version = "1.0.0-rc.1"
dependencies = [
"alloy-primitives",
"alloy-rpc-types 0.1.0",
"alloy-rpc-types-admin",
"alloy-rpc-types-anvil",
"alloy-rpc-types-beacon",
"alloy-rpc-types-engine",
"alloy-rpc-types-trace",
"alloy-rpc-types-txpool",
"alloy-serde 0.1.0",
"arbitrary",
"bytes",
"jsonrpsee-types",
@ -8356,7 +8385,7 @@ dependencies = [
[[package]]
name = "revm-inspectors"
version = "0.1.0"
source = "git+https://github.com/paradigmxyz/revm-inspectors?rev=52f632e#52f632e66404b9d6bfd474eeef3ff65d58167f2e"
source = "git+https://github.com/paradigmxyz/revm-inspectors?rev=6bbf303#6bbf3033ba0119531de69cbddad1f4b89dfa2c4a"
dependencies = [
"alloy-primitives",
"alloy-rpc-types 0.1.0",

View File

@ -344,7 +344,7 @@ revm = { version = "9.0.0", features = [
revm-primitives = { version = "4.0.0", features = [
"std",
], default-features = false }
revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors", rev = "52f632e" }
revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors", rev = "6bbf303" }
# eth
alloy-chains = "0.1.15"
@ -353,33 +353,36 @@ alloy-dyn-abi = "0.7.2"
alloy-sol-types = "0.7.2"
alloy-rlp = "0.3.4"
alloy-trie = "0.4"
alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false, features = [
alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false, features = [
"eth",
] }
alloy-rpc-types-anvil = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false }
alloy-rpc-types-beacon = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false }
alloy-rpc-types-engine = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false }
alloy-rpc-types-eth = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false }
alloy-rpc-types-trace = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false }
alloy-genesis = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false }
alloy-node-bindings = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false }
alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false, features = [
alloy-rpc-types-anvil = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false }
alloy-rpc-types-beacon = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false }
alloy-rpc-types-admin = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false }
alloy-rpc-types-txpool = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false }
alloy-serde = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false }
alloy-rpc-types-engine = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false }
alloy-rpc-types-eth = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false }
alloy-rpc-types-trace = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false }
alloy-genesis = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false }
alloy-node-bindings = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false }
alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false, features = [
"reqwest",
] }
alloy-eips = { git = "https://github.com/alloy-rs/alloy", default-features = false, rev = "00d81d7" }
alloy-signer = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false }
alloy-signer-wallet = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false }
alloy-network = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false }
alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false }
alloy-transport = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7" }
alloy-transport-http = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", features = [
alloy-eips = { git = "https://github.com/alloy-rs/alloy", default-features = false, rev = "6cb3713" }
alloy-signer = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false }
alloy-signer-local = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false }
alloy-network = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false }
alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false }
alloy-transport = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713" }
alloy-transport-http = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", features = [
"reqwest-rustls-tls",
], default-features = false }
alloy-transport-ws = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false }
alloy-transport-ipc = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false }
alloy-pubsub = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false }
alloy-json-rpc = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false }
alloy-rpc-client = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false }
alloy-transport-ws = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false }
alloy-transport-ipc = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false }
alloy-pubsub = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false }
alloy-json-rpc = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false }
alloy-rpc-client = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false }
# misc
auto_impl = "1"

View File

@ -29,7 +29,7 @@ tokio.workspace = true
tokio-stream.workspace = true
serde_json.workspace = true
alloy-signer.workspace = true
alloy-signer-wallet = { workspace = true, features = ["mnemonic"] }
alloy-signer-local = { workspace = true, features = ["mnemonic"] }
alloy-rpc-types.workspace = true
alloy-network.workspace = true
alloy-consensus = { workspace = true, features = ["kzg"] }

View File

@ -1,9 +1,9 @@
use alloy_consensus::{
BlobTransactionSidecar, SidecarBuilder, SimpleCoder, TxEip4844Variant, TxEnvelope,
};
use alloy_network::{eip2718::Encodable2718, EthereumSigner, TransactionBuilder};
use alloy_network::{eip2718::Encodable2718, EthereumWallet, TransactionBuilder};
use alloy_rpc_types::{TransactionInput, TransactionRequest};
use alloy_signer_wallet::LocalWallet;
use alloy_signer_local::PrivateKeySigner;
use eyre::Ok;
use reth_primitives::{hex, Address, Bytes, U256};
@ -13,19 +13,22 @@ pub struct TransactionTestContext;
impl TransactionTestContext {
/// Creates a static transfer and signs it, returning bytes
pub async fn transfer_tx(chain_id: u64, wallet: LocalWallet) -> TxEnvelope {
pub async fn transfer_tx(chain_id: u64, wallet: PrivateKeySigner) -> TxEnvelope {
let tx = tx(chain_id, None, 0);
Self::sign_tx(wallet, tx).await
}
/// Creates a static transfer and signs it, returning bytes
pub async fn transfer_tx_bytes(chain_id: u64, wallet: LocalWallet) -> Bytes {
pub async fn transfer_tx_bytes(chain_id: u64, wallet: PrivateKeySigner) -> Bytes {
let signed = Self::transfer_tx(chain_id, wallet).await;
signed.encoded_2718().into()
}
/// Creates a tx with blob sidecar and sign it
pub async fn tx_with_blobs(chain_id: u64, wallet: LocalWallet) -> eyre::Result<TxEnvelope> {
pub async fn tx_with_blobs(
chain_id: u64,
wallet: PrivateKeySigner,
) -> eyre::Result<TxEnvelope> {
let mut tx = tx(chain_id, None, 0);
let mut builder = SidecarBuilder::<SimpleCoder>::new();
@ -40,13 +43,16 @@ impl TransactionTestContext {
}
/// Signs an arbitrary TransactionRequest using the provided wallet
pub async fn sign_tx(wallet: LocalWallet, tx: TransactionRequest) -> TxEnvelope {
let signer = EthereumSigner::from(wallet);
pub async fn sign_tx(wallet: PrivateKeySigner, tx: TransactionRequest) -> TxEnvelope {
let signer = EthereumWallet::from(wallet);
tx.build(&signer).await.unwrap()
}
/// Creates a tx with blob sidecar and sign it, returning bytes
pub async fn tx_with_blobs_bytes(chain_id: u64, wallet: LocalWallet) -> eyre::Result<Bytes> {
pub async fn tx_with_blobs_bytes(
chain_id: u64,
wallet: PrivateKeySigner,
) -> eyre::Result<Bytes> {
let signed = Self::tx_with_blobs(chain_id, wallet).await?;
Ok(signed.encoded_2718().into())
@ -54,12 +60,12 @@ impl TransactionTestContext {
pub async fn optimism_l1_block_info_tx(
chain_id: u64,
wallet: LocalWallet,
wallet: PrivateKeySigner,
nonce: u64,
) -> Bytes {
let l1_block_info = Bytes::from_static(&hex!("7ef9015aa044bae9d41b8380d781187b426c6fe43df5fb2fb57bd4466ef6a701e1f01e015694deaddeaddeaddeaddeaddeaddeaddeaddead000194420000000000000000000000000000000000001580808408f0d18001b90104015d8eb900000000000000000000000000000000000000000000000000000000008057650000000000000000000000000000000000000000000000000000000063d96d10000000000000000000000000000000000000000000000000000000000009f35273d89754a1e0387b89520d989d3be9c37c1f32495a88faf1ea05c61121ab0d1900000000000000000000000000000000000000000000000000000000000000010000000000000000000000002d679b567db6187c0c8323fa982cfb88b74dbcc7000000000000000000000000000000000000000000000000000000000000083400000000000000000000000000000000000000000000000000000000000f4240"));
let tx = tx(chain_id, Some(l1_block_info), nonce);
let signer = EthereumSigner::from(wallet);
let signer = EthereumWallet::from(wallet);
tx.build(&signer).await.unwrap().encoded_2718().into()
}

View File

@ -1,9 +1,9 @@
use alloy_signer::Signer;
use alloy_signer_wallet::{coins_bip39::English, LocalWallet, MnemonicBuilder};
use alloy_signer_local::{coins_bip39::English, MnemonicBuilder, PrivateKeySigner};
/// One of the accounts of the genesis allocations.
pub struct Wallet {
pub inner: LocalWallet,
pub inner: PrivateKeySigner,
pub inner_nonce: u64,
pub chain_id: u64,
amount: usize,
@ -27,7 +27,7 @@ impl Wallet {
self.derivation_path.as_deref().unwrap_or("m/44'/60'/0'/0/")
}
pub fn gen(&self) -> Vec<LocalWallet> {
pub fn gen(&self) -> Vec<PrivateKeySigner> {
let builder = MnemonicBuilder::<English>::default().phrase(TEST_MNEMONIC);
// use the derivation path

View File

@ -1312,7 +1312,7 @@ mod tests {
let request = requests.first().unwrap();
let withdrawal_request = request.as_withdrawal_request().unwrap();
assert_eq!(withdrawal_request.source_address, sender_address);
assert_eq!(withdrawal_request.validator_public_key, validator_public_key);
assert_eq!(withdrawal_request.validator_pubkey, validator_public_key);
assert_eq!(withdrawal_request.amount, u64::from_be_bytes(withdrawal_amount.into()));
}

View File

@ -377,7 +377,7 @@ mod tests {
}),
Request::WithdrawalRequest(WithdrawalRequest {
source_address: Address::from([1; 20]),
validator_public_key: FixedBytes::<48>::from([10; 48]),
validator_pubkey: FixedBytes::<48>::from([10; 48]),
amount: 72,
}),
])];

View File

@ -82,7 +82,7 @@ reth-transaction-pool = { workspace = true, features = ["test-utils"] }
# alloy deps for testing against nodes
alloy-node-bindings.workspace = true
alloy-provider.workspace = true
alloy-provider= { workspace = true, features = ["admin-api"] }
# misc
serial_test.workspace = true

View File

@ -319,14 +319,14 @@ where
let mut source_address = Address::ZERO;
data.copy_to_slice(source_address.as_mut_slice());
let mut validator_public_key = FixedBytes::<48>::ZERO;
data.copy_to_slice(validator_public_key.as_mut_slice());
let mut validator_pubkey = FixedBytes::<48>::ZERO;
data.copy_to_slice(validator_pubkey.as_mut_slice());
let amount = data.get_u64();
withdrawal_requests.push(Request::WithdrawalRequest(WithdrawalRequest {
source_address,
validator_public_key,
validator_pubkey,
amount,
}));
}

View File

@ -19,6 +19,9 @@ alloy-rpc-types = { workspace = true, features = ["jsonrpsee-types"] }
alloy-rpc-types-anvil.workspace = true
alloy-rpc-types-trace.workspace = true
alloy-rpc-types-beacon.workspace = true
alloy-rpc-types-admin.workspace = true
alloy-rpc-types-txpool.workspace = true
alloy-serde.workspace = true
alloy-rpc-types-engine = { workspace = true, features = ["jsonrpsee-types"] }
# misc

View File

@ -22,6 +22,9 @@ pub use alloy_rpc_types::serde_helpers;
// Ethereum specific rpc types coming from alloy.
pub use alloy_rpc_types::*;
// Ethereum specific serde types coming from alloy.
pub use alloy_serde::*;
pub mod trace {
//! RPC types for trace endpoints and inspectors.
pub use alloy_rpc_types_trace::*;
@ -33,6 +36,12 @@ pub use alloy_rpc_types_anvil as anvil;
// re-export beacon
pub use alloy_rpc_types_beacon as beacon;
// re-export admin
pub use alloy_rpc_types_admin as admin;
// re-export txpool
pub use alloy_rpc_types_txpool as txpool;
// Ethereum specific rpc types related to typed transaction requests and the engine API.
pub use eth::{
engine,

View File

@ -1,4 +1,4 @@
use alloy_rpc_types::admin::EthProtocolInfo;
use alloy_rpc_types_admin::EthProtocolInfo;
use serde::{Deserialize, Serialize};
/// The status of the network being ran by the local node.

View File

@ -1,7 +1,7 @@
use crate::{
eth::{
error::{EthApiError, EthResult},
revm_utils::{prepare_call_env, EvmOverrides},
revm_utils::prepare_call_env,
EthTransactions,
},
result::{internal_rpc_err, ToRpcResult},
@ -20,6 +20,7 @@ use reth_provider::{
use reth_revm::database::StateProviderDatabase;
use reth_rpc_api::DebugApiServer;
use reth_rpc_types::{
state::EvmOverrides,
trace::geth::{
BlockTraceResult, FourByteFrame, GethDebugBuiltInTracerType, GethDebugTracerType,
GethDebugTracingCallOptions, GethDebugTracingOptions, GethTrace, NoopFrame, TraceResult,

View File

@ -6,7 +6,6 @@ use crate::{
revm_utils::{
apply_state_overrides, build_call_evm_env, caller_gas_allowance,
cap_tx_gas_limit_with_caller_allowance, get_precompiles, prepare_call_env,
EvmOverrides,
},
EthTransactions,
},
@ -20,8 +19,8 @@ use reth_provider::{
};
use reth_revm::database::StateProviderDatabase;
use reth_rpc_types::{
state::StateOverride, AccessListWithGasUsed, Bundle, EthCallResponse, StateContext,
TransactionRequest,
state::{EvmOverrides, StateOverride},
AccessListWithGasUsed, Bundle, EthCallResponse, StateContext, TransactionRequest,
};
use reth_transaction_pool::TransactionPool;
use revm::{

View File

@ -6,7 +6,6 @@ use crate::{
eth::{
api::{EthApi, EthTransactions},
error::EthApiError,
revm_utils::EvmOverrides,
},
result::{internal_rpc_err, ToRpcResult},
};
@ -21,9 +20,11 @@ use reth_provider::{
};
use reth_rpc_api::EthApiServer;
use reth_rpc_types::{
serde_helpers::JsonStorageKey, state::StateOverride, AccessListWithGasUsed,
AnyTransactionReceipt, BlockOverrides, Bundle, EIP1186AccountProofResponse, EthCallResponse,
FeeHistory, Header, Index, RichBlock, StateContext, SyncStatus, TransactionRequest, Work,
serde_helpers::JsonStorageKey,
state::{EvmOverrides, StateOverride},
AccessListWithGasUsed, AnyTransactionReceipt, BlockOverrides, Bundle,
EIP1186AccountProofResponse, EthCallResponse, FeeHistory, Header, Index, RichBlock,
StateContext, SyncStatus, TransactionRequest, Work,
};
use reth_transaction_pool::TransactionPool;
use tracing::trace;

View File

@ -3,7 +3,7 @@ use crate::{
eth::{
api::pending_block::PendingBlockEnv,
error::{EthApiError, EthResult, RpcInvalidTransactionError, SignError},
revm_utils::{prepare_call_env, EvmOverrides},
revm_utils::prepare_call_env,
utils::recover_raw_transaction,
},
EthApi, EthApiSpec,
@ -26,6 +26,7 @@ use reth_provider::{
};
use reth_revm::database::StateProviderDatabase;
use reth_rpc_types::{
state::EvmOverrides,
transaction::{
EIP1559TransactionRequest, EIP2930TransactionRequest, EIP4844TransactionRequest,
LegacyTransactionRequest,

View File

@ -10,7 +10,7 @@ use reth_primitives::{
TransactionSignedEcRecovered, TxHash, TxKind, B256, U256,
};
use reth_rpc_types::{
state::{AccountOverride, StateOverride},
state::{AccountOverride, EvmOverrides, StateOverride},
BlockOverrides, TransactionRequest,
};
#[cfg(feature = "optimism")]
@ -27,64 +27,6 @@ use revm::{
use std::cmp::min;
use tracing::trace;
/// Helper type that bundles various overrides for EVM Execution.
///
/// By `Default`, no overrides are included.
#[derive(Debug, Clone, Default)]
pub struct EvmOverrides {
/// Applies overrides to the state before execution.
pub state: Option<StateOverride>,
/// Applies overrides to the block before execution.
///
/// This is a `Box` because less common and only available in debug trace endpoints.
pub block: Option<Box<BlockOverrides>>,
}
impl EvmOverrides {
/// Creates a new instance with the given overrides
pub const fn new(state: Option<StateOverride>, block: Option<Box<BlockOverrides>>) -> Self {
Self { state, block }
}
/// Creates a new instance with the given state overrides.
pub const fn state(state: Option<StateOverride>) -> Self {
Self { state, block: None }
}
/// Creates a new instance with the given block overrides.
pub const fn block(block: Option<Box<BlockOverrides>>) -> Self {
Self { state: None, block }
}
/// Returns `true` if the overrides contain state overrides.
pub const fn has_state(&self) -> bool {
self.state.is_some()
}
/// Returns `true` if the overrides contain block overrides.
pub const fn has_block(&self) -> bool {
self.block.is_some()
}
/// Adds state overrides to an existing instance.
pub fn with_state(mut self, state: StateOverride) -> Self {
self.state = Some(state);
self
}
/// Adds block overrides to an existing instance.
pub fn with_block(mut self, block: Box<BlockOverrides>) -> Self {
self.block = Some(block);
self
}
}
impl From<Option<StateOverride>> for EvmOverrides {
fn from(state: Option<StateOverride>) -> Self {
Self::state(state)
}
}
/// Helper type to work with different transaction types when configuring the EVM env.
///
/// This makes it easier to handle errors.

View File

@ -1,6 +1,6 @@
use crate::eth::{
error::{EthApiError, EthResult},
revm_utils::{prepare_call_env, EvmOverrides},
revm_utils::prepare_call_env,
utils::recover_raw_transaction,
EthTransactions,
};
@ -12,7 +12,7 @@ use reth_provider::{BlockReader, ChainSpecProvider, EvmEnvProvider, StateProvide
use reth_revm::database::StateProviderDatabase;
use reth_rpc_api::TraceApiServer;
use reth_rpc_types::{
state::StateOverride,
state::{EvmOverrides, StateOverride},
trace::{
filter::TraceFilter,
opcode::{BlockOpcodeGas, TransactionOpcodeGas},

View File

@ -8,5 +8,6 @@ license.workspace = true
[dependencies]
reth.workspace = true
reth-node-ethereum.workspace = true
reth-rpc-types.workspace = true
clap = { workspace = true, features = ["derive"] }
futures-util.workspace = true

View File

@ -21,13 +21,11 @@ use reth::{
interpreter::{Interpreter, OpCode},
Database, Evm, EvmContext, Inspector,
},
rpc::{
compat::transaction::transaction_to_call_request,
eth::{revm_utils::EvmOverrides, EthTransactions},
},
rpc::{compat::transaction::transaction_to_call_request, eth::EthTransactions},
transaction_pool::TransactionPool,
};
use reth_node_ethereum::node::EthereumNode;
use reth_rpc_types::state::EvmOverrides;
fn main() {
Cli::<RethCliTxpoolExt>::parse()