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

feat(evm): migrate to alloy-genesis, rm ethers-core #6880

Merged
merged 8 commits into from
Jan 24, 2024
Merged

Conversation

Evalir
Copy link
Member

@Evalir Evalir commented Jan 22, 2024

Motivation

Migrates to using alloy genesis instead of ethers core types for genesis utils.

Solution

Removes ethers core, migrates to alloy genesis.

The loadAllocs cheatcode was modified to try reading from a json file which only contains allocs, if the allocs read from the genesis file is empty. This is because now Genesis can be deserialized as default, and will not fail if the alloc field is missing.

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

I noticed we also have this duplicated here:

https://github.com/foundry-rs/foundry/blob/c6790a02bb80b163469e2e3bb0b16ae95ad7334f/crates/anvil/src/genesis.rs

which we can now also replace

@mattsse
Copy link
Member

mattsse commented Jan 22, 2024

failing tests look related

@Evalir
Copy link
Member Author

Evalir commented Jan 22, 2024

Yeah tests are failing because it seems storage is not being set properly—need to take a look

@mattsse
Copy link
Member

mattsse commented Jan 24, 2024

bump here

@Evalir Evalir requested a review from mattsse January 24, 2024 17:15
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

what's the issue exactly that prompted the other PR

still not clear to me

crates/cheatcodes/src/evm.rs Outdated Show resolved Hide resolved
@Evalir
Copy link
Member Author

Evalir commented Jan 24, 2024

@mattsse for the issue, see: alloy-rs/alloy#151 (comment)

@mattsse
Copy link
Member

mattsse commented Jan 24, 2024

thanks, now this makes sense to me 🙏

@Evalir Evalir requested a review from mattsse January 24, 2024 17:45
Cargo.lock Show resolved Hide resolved
crates/cheatcodes/src/evm.rs Outdated Show resolved Hide resolved
@Evalir Evalir merged commit 070297f into master Jan 24, 2024
20 checks passed
@Evalir Evalir deleted the evalir/mig-genesis branch January 24, 2024 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants