We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 818a38e commit a57a150Copy full SHA for a57a150
crates/bundle/src/call/ty.rs
@@ -156,7 +156,7 @@ impl SignetCallBundle {
156
}
157
158
/// Decode and validate the transactions in the bundle.
159
- pub fn decode_and_validate_txs<Db: trevm::revm::Database>(
+ pub fn decode_and_validate_txs<Db: Database>(
160
&self,
161
) -> Result<Vec<TxEnvelope>, BundleError<Db>> {
162
let txs = self
crates/evm/src/driver.rs
@@ -29,7 +29,7 @@ use trevm::{
29
database::State,
30
Database, DatabaseCommit, Inspector,
31
},
32
- trevm_try, BlockDriver, BlockOutput, Tx,
+ trevm_try, Block, BlockDriver, BlockOutput, Cfg, Tx,
33
};
34
35
/// Used internally to signal that the transaction should be discarded.
@@ -562,7 +562,7 @@ impl<'a, 'b, C: Extractable> SignetDriver<'a, 'b, C> {
562
563
564
565
-impl<C: Extractable> trevm::Cfg for SignetDriver<'_, '_, C> {
+impl<C: Extractable> Cfg for SignetDriver<'_, '_, C> {
566
fn fill_cfg_env(&self, cfg_env: &mut CfgEnv) {
567
cfg_env.chain_id = self.extracts.chain_id;
568
@@ -630,7 +630,7 @@ where
630
631
632
633
-impl<C: Extractable> trevm::Block for SignetDriver<'_, '_, C> {
+impl<C: Extractable> Block for SignetDriver<'_, '_, C> {
634
fn fill_block_env(&self, block_env: &mut BlockEnv) {
635
let BlockEnv {
636
number,
crates/evm/src/types.rs
@@ -1,12 +1,13 @@
1
use super::*;
2
#[allow(unused_imports)]
3
use trevm::{
4
+ inspectors::Layered,
5
revm::{context::result::EVMError, inspector::NoOpInspector, Database},
6
Block, Cfg, Trevm,
7
8
9
/// Layered inspector containing an [`OrderDetector`].
-pub type SignetLayered<I> = trevm::inspectors::Layered<I, OrderDetector>;
10
+pub type SignetLayered<I> = Layered<I, OrderDetector>;
11
12
/// A [`Trevm`] that requires a [`Cfg`].
13
///
crates/journal/src/meta.rs
@@ -1,6 +1,5 @@
-use std::borrow::Cow;
-
use alloy::{consensus::Header, primitives::B256};
+use std::borrow::Cow;
use trevm::journal::{JournalDecode, JournalDecodeError, JournalEncode};
/// Metadata for a block journal. This includes the block header, the host
crates/journal/src/versions.rs
@@ -1,7 +1,6 @@
-use alloy::{consensus::Header, primitives::B256};
-use trevm::journal::{JournalDecode, JournalEncode};
use crate::HostJournal;
+use alloy::{consensus::Header, primitives::B256};
+use trevm::journal::{JournalDecode, JournalDecodeError, JournalEncode};
/// Journal versions.
#[derive(Debug, Clone, PartialEq, Eq)]
@@ -74,11 +73,11 @@ impl JournalEncode for Journal<'_> {
74
73
75
76
impl JournalDecode for Journal<'static> {
77
- fn decode(buf: &mut &[u8]) -> Result<Self, trevm::journal::JournalDecodeError> {
+ fn decode(buf: &mut &[u8]) -> Result<Self, JournalDecodeError> {
78
let version: u8 = JournalDecode::decode(buf)?;
79
match version {
80
1 => JournalDecode::decode(buf).map(Journal::V1),
81
- _ => Err(trevm::journal::JournalDecodeError::InvalidTag {
+ _ => Err(JournalDecodeError::InvalidTag {
82
ty_name: "Journal",
83
tag: version,
84
max_expected: 1,
crates/sim/src/lib.rs
@@ -15,6 +15,7 @@
15
#![cfg_attr(docsrs, feature(doc_cfg))]
16
17
mod built;
18
+
19
pub use built::BuiltBlock;
20
21
mod cache;
@@ -35,11 +36,18 @@ pub use outcome::SimOutcomeWithCache;
36
mod task;
37
pub use task::BlockBuild;
38
39
+use std::sync::Arc;
40
+use trevm::{
41
+ db::cow::CacheOnWrite,
42
+ inspectors::{Layered, TimeLimit},
43
+ revm::database::CacheDB,
44
+};
45
46
/// A type alias for the database underlying the simulation.
-pub type InnerDb<Db> = std::sync::Arc<trevm::revm::database::CacheDB<Db>>;
47
+pub type InnerDb<Db> = Arc<CacheDB<Db>>;
48
49
/// A type alias for the database used in the simulation.
-pub type SimDb<Db> = trevm::db::cow::CacheOnWrite<InnerDb<Db>>;
50
+pub type SimDb<Db> = CacheOnWrite<InnerDb<Db>>;
51
52
/// A time-limited layered inspector.
-pub type TimeLimited<Insp> = trevm::inspectors::Layered<trevm::inspectors::TimeLimit, Insp>;
53
+pub type TimeLimited<Insp> = Layered<TimeLimit, Insp>;
crates/test-utils/src/evm.rs
@@ -27,7 +27,7 @@ use trevm::{
27
state::{Account, AccountInfo, Bytecode, EvmState, EvmStorageSlot},
28
- NoopBlock,
+ Cfg, NoopBlock,
/// Create a new Signet EVM with an in-memory database for testing.
@@ -70,7 +70,7 @@ where
70
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
71
pub struct TestCfg;
72
-impl trevm::Cfg for TestCfg {
+impl Cfg for TestCfg {
let CfgEnv { chain_id, spec, .. } = cfg_env;
@@ -83,7 +83,7 @@ impl trevm::Cfg for TestCfg {
pub struct HostTestCfg;
85
86
-impl trevm::Cfg for HostTestCfg {
+impl Cfg for HostTestCfg {
87
88
89
0 commit comments