Skip to content

Commit 8dd8a4f

Browse files
authored
dep: bump alloy to 0.3.6 (#55)
* dep: bump alloy to 0.3.6 * fix: doc links
1 parent 365f9e0 commit 8dd8a4f

15 files changed

+68
-72
lines changed

Diff for: Cargo.toml

+3-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "trevm"
3-
version = "0.10.1"
3+
version = "0.11.0"
44
rust-version = "1.79.0"
55
edition = "2021"
66
authors = ["init4"]
@@ -30,14 +30,11 @@ redundant-clone = "warn"
3030
alloy-primitives = "0.8"
3131
alloy-sol-types = "0.8"
3232

33-
alloy-consensus = { version = "0.3", features = ["k256"] }
34-
alloy-eips = "0.3"
35-
alloy-rpc-types-eth = "0.3"
36-
alloy-rpc-types-mev = "0.3"
33+
alloy = { version = "=0.3.6", features = ["rpc-types-mev"] }
3734

3835
revm = { version = "14.0.0", default-features = false, features = ["std"] }
3936

40-
zenith-types = "0.7"
37+
zenith-types = "0.8"
4138

4239
thiserror = "1.0"
4340
alloy-rlp = "0.3"
@@ -46,13 +43,6 @@ alloy-rlp = "0.3"
4643
revm = { version = "14.0.0", features = ["test-utils", "serde-json", "std", "alloydb"] }
4744
tokio = { version = "1.39", features = ["macros", "rt-multi-thread"] }
4845

49-
# alloydb
50-
alloy-provider = "0.3"
51-
alloy-transport = "0.3"
52-
53-
alloy-signer = { version = "0.3", default-features = false }
54-
alloy-signer-local = { version = "0.3", default-features = false }
55-
5646
alloy-rlp = { version = "0.3", default-features = false }
5747

5848
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }

Diff for: examples/basic_transact.rs

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
//! Simple TREVM example that demonstrates how to execute a transaction on a contract.
22
//! It simply loads the contract bytecode and executes a transaction.
33
4-
use revm::{
5-
inspector_handle_register,
6-
inspectors::TracerEip3155,
7-
primitives::{hex, AccountInfo, Address, Bytecode, TransactTo, U256},
8-
EvmBuilder, InMemoryDB,
4+
use trevm::{
5+
revm::{
6+
inspector_handle_register,
7+
inspectors::TracerEip3155,
8+
primitives::{hex, AccountInfo, Address, Bytecode, TransactTo, U256},
9+
EvmBuilder, InMemoryDB,
10+
},
11+
trevm_aliases, NoopBlock, NoopCfg, TrevmBuilder, Tx,
912
};
10-
use trevm::{trevm_aliases, NoopBlock, NoopCfg, TrevmBuilder, Tx};
1113

1214
/// Foundry's default Counter.sol contract bytecode.
1315
const CONTRACT_BYTECODE: &str = "0x6080604052348015600f57600080fd5b5060043610603c5760003560e01c80633fb5c1cb1460415780638381f58a146053578063d09de08a14606d575b600080fd5b6051604c3660046083565b600055565b005b605b60005481565b60405190815260200160405180910390f35b6051600080549080607c83609b565b9190505550565b600060208284031215609457600080fd5b5035919050565b60006001820160ba57634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220091e48831e9eee32d4571d6291233a4fdaaa34b7dced8770f36f5368be825c5264736f6c63430008190033";

Diff for: examples/fork_ref_transact.rs

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
//! This example demonstrates how to query storage slots of a contract, using AlloyDB.
22
3-
use alloy_eips::BlockId;
4-
use alloy_primitives::Address;
5-
use alloy_provider::ProviderBuilder;
6-
use alloy_sol_types::sol;
7-
use alloy_sol_types::SolCall;
8-
use revm::{
9-
db::{AlloyDB, CacheDB},
10-
primitives::{address, TxKind, U256},
11-
Evm,
3+
use alloy::{eips::BlockId, providers::ProviderBuilder};
4+
use alloy_primitives::{address, Address, TxKind, U256};
5+
use alloy_sol_types::{sol, SolCall};
6+
use trevm::{
7+
revm::{
8+
db::{AlloyDB, CacheDB},
9+
Evm,
10+
},
11+
NoopBlock, NoopCfg, TrevmBuilder, Tx,
1212
};
13-
use trevm::{NoopBlock, NoopCfg, TrevmBuilder, Tx};
1413

1514
sol! {
1615
#[allow(missing_docs)]

Diff for: src/driver/alloy.rs

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
use crate::{
22
trevm_bail, trevm_ensure, unwrap_or_trevm_err, Block, BundleDriver, DriveBundleResult,
33
};
4-
use alloy_consensus::{Transaction, TxEip4844Variant, TxEnvelope};
5-
use alloy_eips::{eip2718::Decodable2718, BlockNumberOrTag};
6-
use alloy_primitives::{bytes::Buf, keccak256, Address, Bytes, TxKind, U256};
7-
use alloy_rpc_types_mev::{
8-
EthBundleHash, EthCallBundle, EthCallBundleResponse, EthCallBundleTransactionResult,
9-
EthSendBundle,
4+
use alloy::{
5+
consensus::{Transaction, TxEip4844Variant, TxEnvelope},
6+
eips::{eip2718::Decodable2718, BlockNumberOrTag},
7+
rpc::types::mev::{
8+
EthBundleHash, EthCallBundle, EthCallBundleResponse, EthCallBundleTransactionResult,
9+
EthSendBundle,
10+
},
1011
};
12+
use alloy_primitives::{bytes::Buf, keccak256, Address, Bytes, TxKind, U256};
1113
use revm::primitives::{EVMError, ExecutionResult, MAX_BLOB_GAS_PER_BLOCK};
1214
use thiserror::Error;
1315

@@ -34,7 +36,7 @@ pub enum BundleError<Db: revm::Database> {
3436
UnsupportedTransactionType,
3537
/// An error occurred while decoding a transaction contained in the bundle.
3638
#[error("transaction decoding error")]
37-
TransactionDecodingError(#[from] alloy_eips::eip2718::Eip2718Error),
39+
TransactionDecodingError(#[from] alloy::eips::eip2718::Eip2718Error),
3840
/// An error ocurred while recovering the sender of a transaction
3941
#[error("transaction sender recovery error")]
4042
TransactionSenderRecoveryError(#[from] alloy_primitives::SignatureError),

Diff for: src/fill/alloy.rs

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
use alloy_consensus::Signed;
1+
use alloy::consensus::Signed;
22
use alloy_primitives::U256;
33
use revm::primitives::{BlobExcessGasAndPrice, BlockEnv, TxEnv};
44

55
use crate::{Block, Tx};
66

7-
impl Tx for Signed<alloy_consensus::TxLegacy> {
7+
impl Tx for Signed<alloy::consensus::TxLegacy> {
88
fn fill_tx_env(&self, tx_env: &mut revm::primitives::TxEnv) {
99
let TxEnv {
1010
caller,
@@ -37,7 +37,7 @@ impl Tx for Signed<alloy_consensus::TxLegacy> {
3737
}
3838
}
3939

40-
impl Tx for Signed<alloy_consensus::TxEip2930> {
40+
impl Tx for Signed<alloy::consensus::TxEip2930> {
4141
fn fill_tx_env(&self, tx_env: &mut revm::primitives::TxEnv) {
4242
let TxEnv {
4343
caller,
@@ -70,7 +70,7 @@ impl Tx for Signed<alloy_consensus::TxEip2930> {
7070
}
7171
}
7272

73-
impl Tx for Signed<alloy_consensus::TxEip1559> {
73+
impl Tx for Signed<alloy::consensus::TxEip1559> {
7474
fn fill_tx_env(&self, tx_env: &mut revm::primitives::TxEnv) {
7575
let TxEnv {
7676
caller,
@@ -103,7 +103,7 @@ impl Tx for Signed<alloy_consensus::TxEip1559> {
103103
}
104104
}
105105

106-
impl Tx for Signed<alloy_consensus::TxEip4844> {
106+
impl Tx for Signed<alloy::consensus::TxEip4844> {
107107
fn fill_tx_env(&self, tx_env: &mut revm::primitives::TxEnv) {
108108
let TxEnv {
109109
caller,
@@ -136,7 +136,7 @@ impl Tx for Signed<alloy_consensus::TxEip4844> {
136136
}
137137
}
138138

139-
impl Tx for Signed<alloy_consensus::TxEip4844WithSidecar> {
139+
impl Tx for Signed<alloy::consensus::TxEip4844WithSidecar> {
140140
fn fill_tx_env(&self, tx_env: &mut revm::primitives::TxEnv) {
141141
let TxEnv {
142142
caller,
@@ -169,7 +169,7 @@ impl Tx for Signed<alloy_consensus::TxEip4844WithSidecar> {
169169
}
170170
}
171171

172-
impl Tx for Signed<alloy_consensus::TxEip4844Variant> {
172+
impl Tx for Signed<alloy::consensus::TxEip4844Variant> {
173173
fn fill_tx_env(&self, tx_env: &mut revm::primitives::TxEnv) {
174174
let TxEnv {
175175
caller,
@@ -187,8 +187,8 @@ impl Tx for Signed<alloy_consensus::TxEip4844Variant> {
187187
authorization_list,
188188
} = tx_env;
189189
let tx = match self.tx() {
190-
alloy_consensus::TxEip4844Variant::TxEip4844(tx) => tx,
191-
alloy_consensus::TxEip4844Variant::TxEip4844WithSidecar(tx) => &tx.tx,
190+
alloy::consensus::TxEip4844Variant::TxEip4844(tx) => tx,
191+
alloy::consensus::TxEip4844Variant::TxEip4844WithSidecar(tx) => &tx.tx,
192192
};
193193
*caller = self.recover_signer().unwrap();
194194
*gas_limit = tx.gas_limit as u64;
@@ -206,7 +206,7 @@ impl Tx for Signed<alloy_consensus::TxEip4844Variant> {
206206
}
207207
}
208208

209-
impl Tx for alloy_consensus::TxEnvelope {
209+
impl Tx for alloy::consensus::TxEnvelope {
210210
fn fill_tx_env(&self, tx_env: &mut revm::primitives::TxEnv) {
211211
match self {
212212
Self::Legacy(t) => t.fill_tx_env(tx_env),
@@ -218,7 +218,7 @@ impl Tx for alloy_consensus::TxEnvelope {
218218
}
219219
}
220220

221-
impl Block for alloy_consensus::Header {
221+
impl Block for alloy::consensus::Header {
222222
fn fill_block_env(&self, block_env: &mut revm::primitives::BlockEnv) {
223223
let BlockEnv {
224224
number,
@@ -249,7 +249,7 @@ impl Block for alloy_consensus::Header {
249249
}
250250
}
251251

252-
impl Block for alloy_rpc_types_eth::Header {
252+
impl Block for alloy::rpc::types::eth::Header {
253253
fn fill_block_env(&self, block_env: &mut revm::primitives::BlockEnv) {
254254
let BlockEnv {
255255
number,
@@ -273,7 +273,7 @@ impl Block for alloy_rpc_types_eth::Header {
273273
}
274274
}
275275

276-
impl<T> Block for alloy_rpc_types_eth::Block<T> {
276+
impl<T> Block for alloy::rpc::types::eth::Block<T> {
277277
fn fill_block_env(&self, block_env: &mut revm::primitives::BlockEnv) {
278278
self.header.fill_block_env(block_env);
279279
}
@@ -286,7 +286,7 @@ impl<T> Block for alloy_rpc_types_eth::Block<T> {
286286
#[cfg(test)]
287287
mod tests {
288288
use crate::{NoopBlock, NoopCfg, TrevmBuilder};
289-
use alloy_consensus::{Header, TxEnvelope, EMPTY_ROOT_HASH};
289+
use alloy::consensus::{Header, TxEnvelope, EMPTY_ROOT_HASH};
290290

291291
use alloy_rlp::Decodable;
292292

Diff for: src/fill/traits.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ pub trait Cfg {
7777

7878
#[cfg(test)]
7979
mod test {
80-
use alloy_consensus::constants::GWEI_TO_WEI;
80+
use alloy::consensus::constants::GWEI_TO_WEI;
8181
use alloy_primitives::{B256, U256};
8282
use revm::primitives::{BlobExcessGasAndPrice, BlockEnv, CfgEnv};
8383

Diff for: src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@
350350
//! [`eip6110`]: crate::system::eip6110
351351
//! [`eip7002`]: crate::system::eip7002
352352
//! [`eip7251`]: crate::system::eip7251
353-
//! [`WithdrawalRequest`]: alloy_eips::eip7002::WithdrawalRequest
354-
//! [`ConsolidationRequest`]: alloy_eips::eip7251::ConsolidationRequest
353+
//! [`WithdrawalRequest`]: alloy::eips::eip7002::WithdrawalRequest
354+
//! [`ConsolidationRequest`]: alloy::eips::eip7251::ConsolidationRequest
355355
356356
#![doc(
357357
html_logo_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/alloy.jpg",

Diff for: src/lifecycle/output.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
use alloy_consensus::{ReceiptEnvelope, TxReceipt};
2-
use alloy_eips::eip6110::DepositRequest;
1+
use alloy::{
2+
consensus::{ReceiptEnvelope, TxReceipt},
3+
eips::eip6110::DepositRequest,
4+
};
35
use alloy_primitives::{Address, Bloom, Log};
46
use std::sync::OnceLock;
57

Diff for: src/lifecycle/receipt.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
use alloy_consensus::{Receipt, ReceiptWithBloom};
1+
use alloy::consensus::{Receipt, ReceiptWithBloom};
22
use revm::primitives::ExecutionResult;
33

44
/// Create an Ethereum [`ReceiptEnvelope`] from an execution result.
55
///
6-
/// [`ReceiptEnvelope`]: alloy_consensus::ReceiptEnvelope
6+
/// [`ReceiptEnvelope`]: alloy::consensus::ReceiptEnvelope
77
pub fn ethereum_receipt(result: ExecutionResult, prior_gas_used: u128) -> ReceiptWithBloom {
88
let cumulative_gas_used = prior_gas_used.saturating_add(result.gas_used() as u128);
99

Diff for: src/system/eip2935.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use revm::{
55
Database, DatabaseCommit,
66
};
77

8-
pub use alloy_eips::eip2935::{HISTORY_STORAGE_ADDRESS, HISTORY_STORAGE_CODE};
8+
pub use alloy::eips::eip2935::{HISTORY_STORAGE_ADDRESS, HISTORY_STORAGE_CODE};
99

1010
use super::checked_insert_code;
1111

Diff for: src/system/eip4788.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use revm::{
99
/// The number of beacon roots to store in the beacon roots contract.
1010
pub const HISTORY_BUFFER_LENGTH: u64 = 8191;
1111

12-
pub use alloy_eips::eip4788::{BEACON_ROOTS_ADDRESS, BEACON_ROOTS_CODE};
12+
pub use alloy::eips::eip4788::{BEACON_ROOTS_ADDRESS, BEACON_ROOTS_CODE};
1313

1414
impl SystemTx {
1515
/// Instantiate a system call for the pre-block beacon roots as specified in

Diff for: src/system/eip4895.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::{EvmExtUnchecked, EvmNeedsTx};
2-
use alloy_eips::eip4895::Withdrawal;
2+
use alloy::eips::eip4895::Withdrawal;
33
use alloy_primitives::U256;
44
use revm::{primitives::EVMError, Database, DatabaseCommit};
55
use std::collections::HashMap;
@@ -37,7 +37,7 @@ impl<'a, Ext, Db: Database + DatabaseCommit> EvmNeedsTx<'a, Ext, Db> {
3737

3838
#[cfg(test)]
3939
mod test {
40-
use alloy_eips::eip4895::{Withdrawal, GWEI_TO_WEI};
40+
use alloy::eips::eip4895::{Withdrawal, GWEI_TO_WEI};
4141
use alloy_primitives::{Address, U256};
4242

4343
use crate::{NoopBlock, NoopCfg};

Diff for: src/system/eip6110.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
use alloy_consensus::ReceiptEnvelope;
2-
use alloy_eips::eip6110::DepositRequest;
1+
use alloy::{consensus::ReceiptEnvelope, eips::eip6110::DepositRequest};
32
use alloy_primitives::Log;
43
use alloy_sol_types::{sol, SolEvent};
54

65
/// The address for the Ethereum 2.0 deposit contract on the mainnet.
7-
pub use alloy_eips::eip6110::MAINNET_DEPOSIT_CONTRACT_ADDRESS;
6+
pub use alloy::eips::eip6110::MAINNET_DEPOSIT_CONTRACT_ADDRESS;
87

98
sol! {
109
#[allow(missing_docs)]
@@ -119,8 +118,10 @@ pub fn check_receipt_for_deposits(
119118

120119
#[cfg(test)]
121120
mod test {
122-
use alloy_consensus::{Receipt, ReceiptEnvelope};
123-
use alloy_eips::eip6110::MAINNET_DEPOSIT_CONTRACT_ADDRESS;
121+
use alloy::{
122+
consensus::{Receipt, ReceiptEnvelope},
123+
eips::eip6110::MAINNET_DEPOSIT_CONTRACT_ADDRESS,
124+
};
124125
use alloy_primitives::{Log, LogData};
125126
use alloy_sol_types::SolEvent;
126127

Diff for: src/system/eip7002.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::{checked_insert_code, execute_system_tx};
22
use crate::{system::SystemTx, EvmNeedsTx};
3-
use alloy_eips::eip7002::{WithdrawalRequest, WITHDRAWAL_REQUEST_PREDEPLOY_CODE};
3+
use alloy::eips::eip7002::{WithdrawalRequest, WITHDRAWAL_REQUEST_PREDEPLOY_CODE};
44
use alloy_primitives::{Address, Bytes};
55
use revm::{
66
primitives::{EVMError, SpecId},
@@ -10,7 +10,7 @@ use revm::{
1010
/// The address for the [EIP-7002] withdrawal requests contract.
1111
///
1212
/// [EIP-7002]: https://eips.ethereum.org/EIPS/eip-7002
13-
pub use alloy_eips::eip7002::WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS;
13+
pub use alloy::eips::eip7002::WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS;
1414

1515
/// The size of a withdrawal request in bytes.
1616
pub const WITHDRAWAL_REQUEST_BYTES: usize = 20 + 48 + 8;
@@ -94,7 +94,7 @@ impl<'a, Ext, Db: Database + DatabaseCommit> EvmNeedsTx<'a, Ext, Db> {
9494
#[cfg(test)]
9595
mod test {
9696
use super::*;
97-
use alloy_consensus::constants::ETH_TO_WEI;
97+
use alloy::consensus::constants::ETH_TO_WEI;
9898
use alloy_primitives::{fixed_bytes, FixedBytes, TxKind, U256};
9999

100100
use crate::{NoopBlock, NoopCfg, Tx};

Diff for: src/system/eip7251.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::{checked_insert_code, execute_system_tx};
22
use crate::{system::SystemTx, EvmNeedsTx};
3-
use alloy_eips::eip7251::{ConsolidationRequest, CONSOLIDATION_REQUEST_PREDEPLOY_CODE};
3+
use alloy::eips::eip7251::{ConsolidationRequest, CONSOLIDATION_REQUEST_PREDEPLOY_CODE};
44
use alloy_primitives::{Address, Bytes};
55
use revm::{
66
primitives::{EVMError, SpecId},
@@ -10,7 +10,7 @@ use revm::{
1010
/// The address for the [EIP-7251] consolidation requests contract
1111
///
1212
/// [`EIP-7251`]: https://eips.ethereum.org/EIPS/eip-7251
13-
pub use alloy_eips::eip7251::CONSOLIDATION_REQUEST_PREDEPLOY_ADDRESS;
13+
pub use alloy::eips::eip7251::CONSOLIDATION_REQUEST_PREDEPLOY_ADDRESS;
1414

1515
/// The size of a consolidation request in bytes.
1616
pub const CONSOLIDATION_REQUEST_BYTES: usize = 20 + 48 + 48;
@@ -94,7 +94,7 @@ impl<'a, Ext, Db: Database + DatabaseCommit> EvmNeedsTx<'a, Ext, Db> {
9494
#[cfg(test)]
9595
mod test {
9696
use super::*;
97-
use alloy_consensus::constants::ETH_TO_WEI;
97+
use alloy::consensus::constants::ETH_TO_WEI;
9898
use alloy_primitives::{fixed_bytes, FixedBytes, TxKind, U256};
9999

100100
use crate::{NoopBlock, NoopCfg, Tx};

0 commit comments

Comments
 (0)