Skip to content

Commit 6a8410e

Browse files
authored
chore(deps): update alloy-evm to 0.15 (#11057)
update alloy-evm
1 parent cfea8fa commit 6a8410e

File tree

4 files changed

+37
-11
lines changed

4 files changed

+37
-11
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ revm-inspectors = { version = "0.26.5", features = ["serde"] }
268268
op-revm = { version = "8.0.3", default-features = false }
269269

270270
## alloy-evm
271-
alloy-evm = "0.14.0"
272-
alloy-op-evm = "0.14.0"
271+
alloy-evm = "0.15.0"
272+
alloy-op-evm = "0.15.0"
273273

274274
## cli
275275
anstream = "0.6"

crates/evm/core/src/either_evm.rs

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,31 @@ where
107107
type Precompiles = P;
108108
type Spec = SpecId;
109109

110+
fn block(&self) -> &BlockEnv {
111+
match self {
112+
Self::Eth(evm) => evm.block(),
113+
Self::Op(evm) => evm.block(),
114+
}
115+
}
116+
110117
fn chain_id(&self) -> u64 {
111118
match self {
112119
Self::Eth(evm) => evm.chain_id(),
113120
Self::Op(evm) => evm.chain_id(),
114121
}
115122
}
116123

117-
fn block(&self) -> &BlockEnv {
124+
fn components(&self) -> (&Self::DB, &Self::Inspector, &Self::Precompiles) {
118125
match self {
119-
Self::Eth(evm) => evm.block(),
120-
Self::Op(evm) => evm.block(),
126+
Self::Eth(evm) => evm.components(),
127+
Self::Op(evm) => evm.components(),
128+
}
129+
}
130+
131+
fn components_mut(&mut self) -> (&mut Self::DB, &mut Self::Inspector, &mut Self::Precompiles) {
132+
match self {
133+
Self::Eth(evm) => evm.components_mut(),
134+
Self::Op(evm) => evm.components_mut(),
121135
}
122136
}
123137

crates/evm/core/src/evm.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,24 @@ impl<'db, I: InspectorExt> Evm for FoundryEvm<'db, I> {
178178
type Spec = SpecId;
179179
type Tx = TxEnv;
180180

181+
fn block(&self) -> &BlockEnv {
182+
&self.inner.block
183+
}
184+
181185
fn chain_id(&self) -> u64 {
182186
self.inner.ctx.cfg.chain_id
183187
}
184188

185-
fn block(&self) -> &BlockEnv {
186-
&self.inner.block
189+
fn components(&self) -> (&Self::DB, &Self::Inspector, &Self::Precompiles) {
190+
(&self.inner.ctx.journaled_state.database, &self.inner.inspector, &self.inner.precompiles)
191+
}
192+
193+
fn components_mut(&mut self) -> (&mut Self::DB, &mut Self::Inspector, &mut Self::Precompiles) {
194+
(
195+
&mut self.inner.ctx.journaled_state.database,
196+
&mut self.inner.inspector,
197+
&mut self.inner.precompiles,
198+
)
187199
}
188200

189201
fn db_mut(&mut self) -> &mut Self::DB {

0 commit comments

Comments
 (0)