Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#2) Alloy Migration: Migrate non-cheatcode inspectors #5770

Merged
merged 15 commits into from
Sep 15, 2023
Merged
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion crates/evm/src/executor/inspector/access_list.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use alloy_primitives::FixedBytes;
use ethers::types::transaction::eip2930::{AccessList, AccessListItem};
use hashbrown::{HashMap, HashSet};
use revm::{
Expand Down Expand Up @@ -68,7 +69,7 @@ impl<DB: Database> Inspector<DB> for AccessListTracer {
opcode::BALANCE |
opcode::SELFDESTRUCT => {
if let Ok(slot) = interpreter.stack().peek(0) {
let addr: Address = Address::from_slice(&slot.to_be_bytes::<32>()[12..]);
let addr: Address = Address::from_word(slot.to_be_bytes::<32>().into());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can also drop to_be_bytes because of U256: From<B256>

if !self.excluded.contains(&addr) {
self.access_list.entry(addr).or_default();
}
Expand Down
Loading