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
18 changes: 9 additions & 9 deletions crates/fbal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ workspace = true
[dependencies]
alloy-primitives.workspace = true
alloy-eip7928 = {workspace = true, features = ["serde", "rlp"]}
reth-evm.workspace = true
reth-optimism-evm.workspace = true
reth-optimism-chainspec.workspace = true
alloy-consensus.workspace = true
alloy-rlp = {workspace = true, features = ["derive"]}
alloy-sol-macro = { workspace = true, features = ["json"] }
alloy-sol-types.workspace = true
alloy-contract.workspace = true

revm.workspace = true
op-revm.workspace = true

serde.workspace = true
serde_json.workspace = true

[dev-dependencies]
alloy-consensus.workspace = true
alloy-contract.workspace = true
alloy-sol-macro = { workspace = true, features = ["json"] }
alloy-sol-types.workspace = true
op-revm.workspace = true
reth-evm.workspace = true
reth-optimism-chainspec.workspace = true
reth-optimism-evm.workspace = true
serde_json.workspace = true
8 changes: 4 additions & 4 deletions crates/fbal/src/inspector.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
use alloy_eip7928::{AccountChanges, BalanceChange, CodeChange, NonceChange};
use alloy_primitives::{Address, FixedBytes, U256, map::foldhash::HashMap};
use alloy_primitives::{Address, FixedBytes, map::foldhash::HashMap};
use revm::{
Inspector,
bytecode::opcode,
context::{ContextTr, JournalTr, Transaction},
context::ContextTr,
inspector::JournalExt,
interpreter::{
CallInputs, CallOutcome, CreateInputs, CreateOutcome, Interpreter,
interpreter_types::{InputsTr, Jumps},
},
primitives::StorageKey,
};

/// Inspector that tracks all accounts and storage slots touched during execution.
#[derive(Debug, Default)]
pub struct TouchedAccountsInspector {
/// Map of touched accounts to the storage slots accessed.
pub touched_accounts: HashMap<Address, Vec<FixedBytes<32>>>,
// pub account_changes: HashMap<Address, AccountChanges>,
}
Expand Down
2 changes: 1 addition & 1 deletion crates/fbal/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl FlashblockAccessList {
}
}

if (!found) {
if !found {
self.account_changes.push(new.clone());
}
}
Expand Down
12 changes: 5 additions & 7 deletions crates/fbal/tests/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@ use alloy_primitives::{Address, B256, TxKind, U256};
use alloy_sol_macro::sol;
use alloy_sol_types::SolCall;
use base_fbal::{FlashblockAccessList, TouchedAccountsInspector};
use op_revm::{DefaultOp, OpBuilder, OpContext, OpSpecId, OpTransaction};
use op_revm::OpTransaction;
use reth_evm::{ConfigureEvm, Evm};
use reth_optimism_chainspec::{BASE_MAINNET, OpChainSpec};
use reth_optimism_evm::{OpEvmConfig, OpNextBlockEnvAttributes};
use reth_optimism_chainspec::OpChainSpec;
use reth_optimism_evm::OpEvmConfig;
use revm::{
Context, DatabaseCommit, DatabaseRef, ExecuteCommitEvm, ExecuteEvm, InspectEvm, MainBuilder,
MainContext,
context::{CfgEnv, ContextTr, TxEnv, result::ResultAndState, tx::TxEnvBuilder},
DatabaseCommit, DatabaseRef,
context::{TxEnv, result::ResultAndState},
database::InMemoryDB,
inspector::JournalExt,
interpreter::instructions::utility::IntoAddress,
primitives::{KECCAK_EMPTY, ONE_ETHER},
state::{AccountInfo, Bytecode},
Expand Down