Skip to content
Draft
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
638 changes: 238 additions & 400 deletions Cargo.lock

Large diffs are not rendered by default.

44 changes: 22 additions & 22 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -411,13 +411,13 @@ op-alloy-rpc-types = "0.24.0"
op-alloy-flz = "0.13.1"

## alloy-evm
alloy-evm = "0.32.0"
alloy-evm = "0.33.2"
alloy-op-evm = "0.30.0"

# revm
revm = { version = "37.0.0", default-features = false }
revm-inspectors = { version = "0.38.1", features = ["serde"] }
op-revm = { version = "18.0.0", default-features = false }
revm = { version = "38.0.0", default-features = false }
revm-inspectors = { version = "0.39.0", features = ["serde"] }
op-revm = { version = "17.0.0", default-features = false }

## cli
anstream = "1.0"
Expand Down Expand Up @@ -514,16 +514,16 @@ mpp = { git = "https://github.com/tempoxyz/mpp-rs", rev = "310c9a1f3fe485fa9c7a8
"client",
"reqwest-rustls-tls",
] }
tempo-chainspec = { git = "https://github.com/tempoxyz/tempo", rev = "bb08bb9", default-features = false }
tempo-primitives = { git = "https://github.com/tempoxyz/tempo", rev = "bb08bb9", default-features = false, features = [
tempo-chainspec = { git = "https://github.com/tempoxyz/tempo", rev = "007f582", default-features = false }
tempo-primitives = { git = "https://github.com/tempoxyz/tempo", rev = "007f582", default-features = false, features = [
"serde",
"reth-codec",
] }
tempo-alloy = { git = "https://github.com/tempoxyz/tempo", rev = "bb08bb9", default-features = false }
tempo-evm = { git = "https://github.com/tempoxyz/tempo", rev = "bb08bb9", default-features = false }
tempo-revm = { git = "https://github.com/tempoxyz/tempo", rev = "bb08bb9", default-features = false, features = ["serde"] }
tempo-contracts = { git = "https://github.com/tempoxyz/tempo", rev = "bb08bb9" }
tempo-precompiles = { git = "https://github.com/tempoxyz/tempo", rev = "bb08bb9" }
tempo-alloy = { git = "https://github.com/tempoxyz/tempo", rev = "007f582", default-features = false }
tempo-evm = { git = "https://github.com/tempoxyz/tempo", rev = "007f582", default-features = false }
tempo-revm = { git = "https://github.com/tempoxyz/tempo", rev = "007f582", default-features = false, features = ["serde"] }
tempo-contracts = { git = "https://github.com/tempoxyz/tempo", rev = "007f582" }
tempo-precompiles = { git = "https://github.com/tempoxyz/tempo", rev = "007f582" }

## Pinned dependencies. Enabled for the workspace in crates/test-utils.

Expand Down Expand Up @@ -593,26 +593,26 @@ rexpect = { git = "https://github.com/rust-cli/rexpect", rev = "2ed0b1898d7edaf6
# reth-codecs-derive = { git = "https://github.com/paradigmxyz/reth-core", rev = "af2174c" }
# reth-rpc-traits = { git = "https://github.com/paradigmxyz/reth-core", rev = "af2174c" }

## op-alloy / alloy-op-evm
op-alloy-consensus = { git = "https://github.com/foundry-rs/optimism", branch = "develop" }
op-alloy-network = { git = "https://github.com/foundry-rs/optimism", branch = "develop" }
op-alloy-rpc-types = { git = "https://github.com/foundry-rs/optimism", branch = "develop" }
op-alloy = { git = "https://github.com/foundry-rs/optimism", branch = "develop" }
alloy-op-evm = { git = "https://github.com/foundry-rs/optimism", branch = "develop" }
alloy-op-hardforks = { git = "https://github.com/foundry-rs/optimism", branch = "develop" }
## op-alloy / alloy-op-evm — extracted to foundry-core
op-alloy-consensus = { git = "https://github.com/foundry-rs/foundry-core", branch = "op-crates" }
op-alloy-network = { git = "https://github.com/foundry-rs/foundry-core", branch = "op-crates" }
op-alloy-rpc-types = { git = "https://github.com/foundry-rs/foundry-core", branch = "op-crates" }
alloy-op-evm = { git = "https://github.com/foundry-rs/foundry-core", branch = "op-crates" }
alloy-op-hardforks = { git = "https://github.com/foundry-rs/foundry-core", branch = "op-crates" }
op-revm = { git = "https://github.com/foundry-rs/foundry-core", branch = "op-crates" }

## revm
# revm = { git = "https://github.com/bluealloy/revm.git", rev = "7e59936" }
# op-revm = { git = "https://github.com/bluealloy/revm.git", rev = "7e59936" }
# revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors.git", rev = "22dcee2" }

## foundry-fork-db
# foundry-fork-db = { git = "https://github.com/foundry-rs/foundry-fork-db", rev = "b139c57c2b54bc06a9e4c9783941f5bbd4bd3a1f" }
foundry-fork-db = { git = "https://github.com/foundry-rs/foundry-core", branch = "main" }

## tempo — unify crates.io versions (pulled by mpp) with git rev
tempo-primitives = { git = "https://github.com/tempoxyz/tempo", rev = "bb08bb9" }
tempo-alloy = { git = "https://github.com/tempoxyz/tempo", rev = "bb08bb9" }
tempo-contracts = { git = "https://github.com/tempoxyz/tempo", rev = "bb08bb9" }
tempo-primitives = { git = "https://github.com/tempoxyz/tempo", rev = "007f582" }
tempo-alloy = { git = "https://github.com/tempoxyz/tempo", rev = "007f582" }
tempo-contracts = { git = "https://github.com/tempoxyz/tempo", rev = "007f582" }

# solar
solar = { package = "solar-compiler", git = "https://github.com/paradigmxyz/solar", rev = "530f129" }
Expand Down
8 changes: 8 additions & 0 deletions crates/anvil/src/eth/backend/tempo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ impl PrecompileStorageProvider for AnvilStorageProvider<'_> {
self.block_number
}

fn gas_limit(&self) -> u64 {
0
}

fn state_gas_used(&self) -> u64 {
0
}

fn set_code(&mut self, address: Address, code: Bytecode) -> Result<(), TempoPrecompileError> {
self.db.insert_account(
address,
Expand Down
1 change: 1 addition & 0 deletions crates/anvil/src/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ mod tests {
status: PrecompileStatus::Success,
bytes: Bytes::copy_from_slice(input.data),
gas_used: 0,
gas_refunded: 0,
state_gas_used: 0,
reservoir: input.reservoir,
})
Expand Down
1 change: 1 addition & 0 deletions crates/anvil/tests/it/fork.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1940,6 +1940,7 @@ async fn test_config_with_osaka_hardfork_with_precompile_factory() {
Ok(revm::precompile::PrecompileOutput {
bytes: Bytes::copy_from_slice(input.data),
gas_used: 0,
gas_refunded: 0,
status: PrecompileStatus::Success,
state_gas_used: 0,
reservoir: input.reservoir,
Expand Down
1 change: 1 addition & 0 deletions crates/cheatcodes/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ fn deploy_code<FEN: FoundryEvmNetwork>(
value.unwrap_or(U256::ZERO),
bytecode.into(),
ccx.gas_limit,
0,
),
ccx,
)?;
Expand Down
1 change: 1 addition & 0 deletions crates/common/fmt/src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ impl UIfmt for OpTxEnvelope {
Self::Eip1559(tx) => tx.pretty(),
Self::Eip7702(tx) => tx.pretty(),
Self::Deposit(tx) => tx.pretty(),
Self::PostExec(tx) => format!("PostExec {{ hash: {:?} }}", tx.hash_ref()),
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion crates/evm/core/src/evm/op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl FoundryEvmFactory for OpEvmFactory {
) -> Self::FoundryEvm<'db, I> {
let spec_id = *evm_env.spec_id();
let inner = Context::mainnet()
.with_tx(OpTx(OpTransaction::builder().build_fill()))
.with_tx(OpTx(OpTransaction::default()))
.with_cfg(CfgEnv::new_with_spec(OpSpecId::BEDROCK))
.with_chain(L1BlockInfo::default())
.with_db(db)
Expand Down Expand Up @@ -108,6 +108,10 @@ impl<'db, I: FoundryInspectorExt<OpContext<&'db mut dyn DatabaseExt<OpEvmFactory
&self.inner.ctx_ref().block
}

fn cfg_env(&self) -> &revm::context::CfgEnv<Self::Spec> {
&self.inner.ctx_ref().cfg
}

fn chain_id(&self) -> u64 {
self.inner.ctx_ref().cfg.chain_id
}
Expand Down
7 changes: 7 additions & 0 deletions crates/primitives/src/transaction/envelope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ impl OpTransactionTrait for FoundryTxEnvelope {
_ => None,
}
}

fn as_post_exec(&self) -> Option<&Sealed<op_alloy_consensus::TxPostExec>> {
None
}
}

impl TryFrom<FoundryTxEnvelope> for TxEnvelope {
Expand Down Expand Up @@ -191,6 +195,9 @@ impl From<op_alloy_consensus::OpTxEnvelope> for FoundryTxEnvelope {
op_alloy_consensus::OpTxEnvelope::Eip1559(tx) => Self::Eip1559(tx),
op_alloy_consensus::OpTxEnvelope::Eip7702(tx) => Self::Eip7702(tx),
op_alloy_consensus::OpTxEnvelope::Deposit(tx) => Self::Deposit(tx),
op_alloy_consensus::OpTxEnvelope::PostExec(_) => {
panic!("PostExec transactions are not supported in FoundryTxEnvelope")
}
}
}
}
Expand Down
Loading