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(rpc-types-anvil): add Index, fix compatibility #931

Merged
merged 10 commits into from
Jun 18, 2024

Conversation

zerosnacks
Copy link
Member

@zerosnacks zerosnacks commented Jun 18, 2024

Motivation

Closes: #838

Required for: foundry-rs/foundry#8084

Related PR in Foundry: foundry-rs/foundry#8186

Solution

Adds Index, previously missing from the rpc-types-anvil

Fixes deserialization issue in MineOptions

Also added some tests for Forking, Index and MineOptions serialization as this was giving trouble in Foundry

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@zerosnacks zerosnacks marked this pull request as draft June 18, 2024 09:51
@zerosnacks
Copy link
Member Author

Moved back to draft as some more compatibility fixes may be required

@zerosnacks zerosnacks force-pushed the zerosnacks/enhance-anvil-types branch from 0502553 to 767cd22 Compare June 18, 2024 10:57
crates/rpc-types-anvil/src/lib.rs Outdated Show resolved Hide resolved
@zerosnacks zerosnacks changed the title feat(rpc-types-anvil): add Index feat(rpc-types-anvil): add Index, fix compatibility Jun 18, 2024
@zerosnacks zerosnacks marked this pull request as ready for review June 18, 2024 11:46
@zerosnacks zerosnacks requested a review from DaniPopes June 18, 2024 11:46
@zerosnacks
Copy link
Member Author

zerosnacks commented Jun 18, 2024

Compatibility fixes have been applied, see passing CI: https://github.com/foundry-rs/foundry/actions/runs/9564223504

onbjerg

This comment was marked as resolved.

@onbjerg onbjerg self-requested a review June 18, 2024 13:05
@DaniPopes DaniPopes merged commit aeef834 into main Jun 18, 2024
22 checks passed
@DaniPopes DaniPopes deleted the zerosnacks/enhance-anvil-types branch June 18, 2024 13:27
ben186 pushed a commit to ben186/alloy that referenced this pull request Jul 27, 2024
* add Index

* add test

* fix clippy warning

* improve serialization test

* prefer in-line de::Error

* prefer name vs generic deserialized

* mark as untagged, handle block serialization

* attempt at more compatibility fixes

* add test cases with intended use

* switch back to quantity::opt, do not tag blocks
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.

[Bug] Ensure compatibility and correctness of Anvil types in alloy-rpc-types-anvil
4 participants