Skip to content

Commit 86d3d40

Browse files
authored
chore: version 0.31.0 (#132)
1 parent 2504622 commit 86d3d40

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "trevm"
3-
version = "0.30.1"
3+
version = "0.31.0"
44
rust-version = "1.83.0"
55
edition = "2021"
66
authors = ["init4"]
@@ -44,8 +44,8 @@ alloy = { version = "1.0.35", default-features = false, features = [
4444
"sol-types",
4545
] }
4646

47-
revm = { version = "30.1.2", default-features = false }
48-
revm-inspectors = { version = "0.31", optional = true }
47+
revm = { version = "31", default-features = false }
48+
revm-inspectors = { version = "0.32", optional = true }
4949

5050
dashmap = { version = "6.1.0", optional = true }
5151
tracing = { version = "0.1.41", optional = true }
@@ -54,7 +54,7 @@ thiserror = "2.0.11"
5454
tokio = { version = "1.44", optional = true }
5555

5656
[dev-dependencies]
57-
revm = { version = "30.1.1", features = ["serde-json", "std", "alloydb"] }
57+
revm = { version = "31", features = ["serde-json", "std", "alloydb"] }
5858
trevm = { path = ".", features = ["test-utils"] }
5959

6060
alloy = { version = "1.0.35", features = ["providers", "transports"] }

src/evm/has_cfg.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ where
77
Insp: Inspector<Ctx<Db>>,
88
TrevmState: HasCfg,
99
{
10+
/// Get a reference to the current EVM configuration.
11+
pub fn cfg(&self) -> &revm::context::CfgEnv {
12+
self.inner.ctx.cfg()
13+
}
14+
15+
/// Get the current chain ID.
16+
pub fn chain_id(&self) -> u64 {
17+
self.cfg().chain_id
18+
}
19+
1020
/// Set the [EIP-170] contract code size limit. By default this is set to
1121
/// 0x6000 bytes (~25KiB). Contracts whose bytecode is larger than this
1222
/// limit cannot be deployed and will produce a [`CreateInitCodeSizeLimit`]

0 commit comments

Comments
 (0)