Skip to content

Commit efd5751

Browse files
committed
chore: use alloy imports
1 parent f40198a commit efd5751

File tree

23 files changed

+53
-49
lines changed

23 files changed

+53
-49
lines changed

crates/evm/src/debug.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
use crate::{abi::HEVM_ABI, CallKind};
2-
use revm::{
3-
interpreter::{Memory, OpCode},
4-
primitives::{Address, U256},
5-
};
2+
use alloy_primitives::{Address, U256};
3+
use revm::interpreter::{Memory, OpCode};
64
use serde::{Deserialize, Serialize};
75
use std::fmt::Display;
86

crates/evm/src/executor/backend/fuzz.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ use crate::executor::{
77
fork::{CreateFork, ForkId},
88
inspector::cheatcodes::Cheatcodes,
99
};
10+
use alloy_primitives::{Address, B256, U256};
1011
use revm::{
1112
db::DatabaseRef,
12-
primitives::{AccountInfo, Address, Bytecode, Env, ResultAndState, B256, U256},
13+
primitives::{AccountInfo, Bytecode, Env, ResultAndState},
1314
Database, Inspector, JournaledState,
1415
};
1516
use std::borrow::Cow;

crates/evm/src/executor/backend/in_memory_db.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
//! The in memory DB
22
use crate::executor::backend::error::DatabaseError;
3+
use alloy_primitives::{Address, B256, U256};
34
use revm::{
45
db::{CacheDB, DatabaseRef, EmptyDB},
5-
primitives::{Account, AccountInfo, Address, Bytecode, HashMap as Map, B256, U256},
6+
primitives::{Account, AccountInfo, Bytecode, HashMap as Map},
67
Database, DatabaseCommit,
78
};
89

crates/evm/src/executor/backend/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::{
1111
utils::{b256_to_h256, h160_to_b160, h256_to_b256, ru256_to_u256, u256_to_ru256, u64_to_ru64},
1212
CALLER, TEST_CONTRACT_ADDRESS,
1313
};
14-
use alloy_primitives::{b256, U256, U64};
14+
use alloy_primitives::{b256, Address, B256, U256, U64};
1515
use ethers::{
1616
prelude::Block,
1717
types::{BlockNumber, Transaction},
@@ -22,8 +22,8 @@ use revm::{
2222
db::{CacheDB, DatabaseRef},
2323
precompile::{Precompiles, SpecId},
2424
primitives::{
25-
Account, AccountInfo, Address, Bytecode, CreateScheme, Env, HashMap as Map, Log,
26-
ResultAndState, TransactTo, B256, KECCAK_EMPTY,
25+
Account, AccountInfo, Bytecode, CreateScheme, Env, HashMap as Map, Log, ResultAndState,
26+
TransactTo, KECCAK_EMPTY,
2727
},
2828
Database, DatabaseCommit, Inspector, JournaledState, EVM,
2929
};

crates/evm/src/executor/backend/snapshot.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
use alloy_primitives::{Address, B256, U256};
12
use revm::{
2-
primitives::{AccountInfo, Address, Env, HashMap as Map, B256, U256},
3+
primitives::{AccountInfo, Env, HashMap as Map},
34
JournaledState,
45
};
56
use serde::{Deserialize, Serialize};

crates/evm/src/executor/builder.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use super::{inspector::InspectorStackBuilder, Executor};
22
use crate::executor::backend::Backend;
3-
use revm::primitives::{Env, SpecId, U256};
3+
use alloy_primitives::U256;
4+
use revm::primitives::{Env, SpecId};
45

56
/// The builder that allows to configure an evm [`Executor`] which a stack of optional
67
/// [`revm::Inspector`]s, such as [`Cheatcodes`].

crates/evm/src/executor/fork/backend.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use crate::{
66
},
77
utils::{b160_to_h160, b256_to_h256, h256_to_b256, u256_to_ru256},
88
};
9+
use alloy_primitives::{Address, Bytes, B256, U256};
910
use ethers::{
1011
core::abi::ethereum_types::BigEndianHash,
1112
providers::Middleware,
@@ -21,7 +22,7 @@ use futures::{
2122
};
2223
use revm::{
2324
db::DatabaseRef,
24-
primitives::{AccountInfo, Address, Bytecode, Bytes, B256, KECCAK_EMPTY, U256},
25+
primitives::{AccountInfo, Bytecode, KECCAK_EMPTY},
2526
};
2627
use std::{
2728
collections::{hash_map::Entry, HashMap, VecDeque},

crates/evm/src/executor/fork/cache.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
//! Cache related abstraction
22
use crate::executor::backend::snapshot::StateSnapshot;
3+
use alloy_primitives::{Address, B256, U256};
34
use parking_lot::RwLock;
45
use revm::{
5-
primitives::{
6-
Account, AccountInfo, AccountStatus, Address, HashMap as Map, B256, KECCAK_EMPTY, U256,
7-
},
6+
primitives::{Account, AccountInfo, AccountStatus, HashMap as Map, KECCAK_EMPTY},
87
DatabaseCommit,
98
};
109
use serde::{ser::SerializeMap, Deserialize, Deserializer, Serialize, Serializer};

crates/evm/src/executor/fork/database.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ use crate::{
88
},
99
revm::db::CacheDB,
1010
};
11+
use alloy_primitives::{Address, B256, U256};
1112
use ethers::types::BlockId;
1213
use parking_lot::Mutex;
1314
use revm::{
1415
db::DatabaseRef,
15-
primitives::{Account, AccountInfo, Address, Bytecode, HashMap as Map, B256, U256},
16+
primitives::{Account, AccountInfo, Bytecode, HashMap as Map},
1617
Database, DatabaseCommit,
1718
};
1819
use std::sync::Arc;

crates/evm/src/executor/inspector/access_list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
use alloy_primitives::{Address, B256};
12
use ethers::types::transaction::eip2930::{AccessList, AccessListItem};
23
use hashbrown::{HashMap, HashSet};
34
use revm::{
45
interpreter::{opcode, InstructionResult, Interpreter},
5-
primitives::{Address, B256},
66
Database, EVMData, Inspector,
77
};
88

0 commit comments

Comments
 (0)