Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "trevm"
version = "0.30.1"
version = "0.31.0"
rust-version = "1.83.0"
edition = "2021"
authors = ["init4"]
Expand Down Expand Up @@ -44,8 +44,8 @@ alloy = { version = "1.0.35", default-features = false, features = [
"sol-types",
] }

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

dashmap = { version = "6.1.0", optional = true }
tracing = { version = "0.1.41", optional = true }
Expand All @@ -54,7 +54,7 @@ thiserror = "2.0.11"
tokio = { version = "1.44", optional = true }

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

alloy = { version = "1.0.35", features = ["providers", "transports"] }
Expand Down
10 changes: 10 additions & 0 deletions src/evm/has_cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ where
Insp: Inspector<Ctx<Db>>,
TrevmState: HasCfg,
{
/// Get a reference to the current EVM configuration.
pub fn cfg(&self) -> &revm::context::CfgEnv {
self.inner.ctx.cfg()
}

/// Get the current chain ID.
pub fn chain_id(&self) -> u64 {
self.cfg().chain_id
}

/// Set the [EIP-170] contract code size limit. By default this is set to
/// 0x6000 bytes (~25KiB). Contracts whose bytecode is larger than this
/// limit cannot be deployed and will produce a [`CreateInitCodeSizeLimit`]
Expand Down
Loading