(#2) Alloy Migration: Migrate non-cheatcode inspectors#5770
Merged
Evalir merged 15 commits intoevalir/make-executor-alloyfrom Sep 15, 2023
Merged
(#2) Alloy Migration: Migrate non-cheatcode inspectors#5770Evalir merged 15 commits intoevalir/make-executor-alloyfrom
Evalir merged 15 commits intoevalir/make-executor-alloyfrom
Conversation
DaniPopes
requested changes
Sep 15, 2023
| opcode::DELEGATECALL | opcode::CALL | opcode::STATICCALL | opcode::CALLCODE => { | ||
| if let Ok(slot) = interpreter.stack().peek(1) { | ||
| let addr: Address = H256::from_uint(&ru256_to_u256(slot)).into(); | ||
| let addr: Address = Address::from_slice(&slot.to_be_bytes::<32>()[12..]); |
Member
There was a problem hiding this comment.
Probably better as Address::from_word(slot.into())
Member
Author
There was a problem hiding this comment.
nice, definitely more elegant
Member
There was a problem hiding this comment.
missing this line, you changed only the one above
DaniPopes
approved these changes
Sep 15, 2023
DaniPopes
reviewed
Sep 15, 2023
274c2ea to
6e4b0bf
Compare
DaniPopes
reviewed
Sep 15, 2023
| 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()); |
Member
There was a problem hiding this comment.
Can also drop to_be_bytes because of U256: From<B256>
19443b0 to
10899ee
Compare
DaniPopes
approved these changes
Sep 15, 2023
| opcode::DELEGATECALL | opcode::CALL | opcode::STATICCALL | opcode::CALLCODE => { | ||
| if let Ok(slot) = interpreter.stack().peek(1) { | ||
| let addr: Address = H256::from_uint(&ru256_to_u256(slot)).into(); | ||
| let addr: Address = Address::from_slice(&slot.to_be_bytes::<32>()[12..]); |
Member
There was a problem hiding this comment.
missing this line, you changed only the one above
Member
Author
|
aight, my bad! this should be it with 12d2de9 |
Member
Author
|
As soon as we merge i'll resolve comments on #5768 |
Evalir
added a commit
that referenced
this pull request
Sep 18, 2023
* feat: use alloy revm branch * fuzz/mod migrated * progress * progress, fmt * fix imdb * feat: cheatcodes compile * feat: fork backend compiles * feat: trace * fuzz * anvil progress * chore: mem, fmt * chore: db.rs * chore: it lives * fix test * chore: clippy * workin * main backend stuff migrated * chore: add glue on other crates * chore: make executor use alloy types * add glue for executor migration * chore: use workspace alloy * chore: undo revm bump changes * chore: remove unneded prefix * chore: fix fork fixture * chore: uncomment tests * chore: switch to up-to-date revm * chore: clippy * (#2) Alloy Migration: Migrate non-cheatcode inspectors (#5770) * feat: migrate non-cheatcode inspectors * fix: properly create both create and create2 addresses * chore: clippy * (#3) Alloy Migration: migrate fork-adjacent files to alloy primitives (#5771) * chore: use create2_from_code * borrow it brah * chore: use from word * chore: drop to_be_bytes * fmt * chore: use from_word on both palces * chore: use address::random * chore: make failure slot b256 * chore: use address::random * chore: fix indexes * chore: use contract.hash * chore: do not collect * chore: use display on alloy nums * use + operator * chore: unwrap bytes and replace import * chore: Into:: -> ::from * chore: fix test * chore: use alloy imports * chore: switch to alloy typesd * chore: fix test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Migrates the whole inspector stack to use alloy types. Composite types like
trace-related types will be migrated later..