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

[Feature] Keep Anvil in Provider have same types as the rest of the project #1876

Merged
merged 5 commits into from
Jan 7, 2025

Conversation

programskillforverification
Copy link
Contributor

Motivation

close #1751

@zerosnacks
Copy link
Member

Hi @programskillforverification thanks for your PR

This change would also require an update in Foundry (https://github.com/foundry-rs/foundry/tree/master/crates/anvil) as seen in the CI errors, is this something you would be interested in adding?

cc @grandizzy I think this change is reasonable to be added pre-reth-anvil

@zerosnacks zerosnacks added the blocked This cannot move forward until something else changes label Jan 6, 2025
@programskillforverification
Copy link
Contributor Author

programskillforverification commented Jan 6, 2025

Hi @programskillforverification thanks for your PR

This change would also require an update in Foundry (https://github.com/foundry-rs/foundry/tree/master/crates/anvil) as seen in the CI errors, is this something you would be interested in adding?

cc @grandizzy I think this change is reasonable to be added pre-reth-anvil

It looks like that the error is due to type change of NodeEnvironment. I can't found the reason. Maybe I need help.

@zerosnacks
Copy link
Member

It looks like that the error is due to type change of NodeEnvironment. I can't found the reason. Maybe I need help.

The error occurs because Alloy uses the anvil binary from Forge for its tests (and also exposes it through crates like node-bindings

let mut cmd = self.program.as_ref().map_or_else(|| Command::new("anvil"), Command::new);

@programskillforverification
Copy link
Contributor Author

It looks like that the error is due to type change of NodeEnvironment. I can't found the reason. Maybe I need help.

The error occurs because Alloy uses the anvil binary from Forge for its tests (and also exposes it through crates like node-bindings

let mut cmd = self.program.as_ref().map_or_else(|| Command::new("anvil"), Command::new);

OK...Update anvil in this PR or open a new?

@zerosnacks
Copy link
Member

OK...Update anvil in this PR or open a new?

No further changes should be necessary here, the update of the types should happen in https://github.com/foundry-rs/foundry/tree/master/crates/anvil (in Foundry)

@programskillforverification
Copy link
Contributor Author

OK...Update anvil in this PR or open a new?

No further changes should be necessary here, the update of the types should happen in https://github.com/foundry-rs/foundry/tree/master/crates/anvil (in Foundry)

I see. I will open new PR in Foundry.

@DaniPopes
Copy link
Member

DaniPopes commented Jan 7, 2025

This doesn't and shouldn't require an anvil update: we don't want to change the serialization, just the API of the provider.

Please add the corresponding .map() to keep the serialization the same (u64 -> U64 etc.).

Edit: I've done it myself so we can include this in the next release.

@DaniPopes DaniPopes enabled auto-merge (squash) January 7, 2025 16:13
@DaniPopes DaniPopes merged commit 1b0bb9a into alloy-rs:main Jan 7, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked This cannot move forward until something else changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Anvil in Provider don't have same types as the rest of the project
3 participants