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

fix(providers): handle zst params in retry provider correctly #1481

Merged
merged 1 commit into from Jul 14, 2022

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Jul 14, 2022

Motivation

Closes foundry-rs/foundry#2318

because we previously always serialized params in the RetryProvider, zero sized types like (), which are skipped by Request ended up as params: "null", instead of being empty which is incompatible with hardhat for example.

so instead of {"id":1,"jsonrpc":"2.0","method":"eth_chainId"} the retry provider was sending {"id":1,"jsonrpc":"2.0","method":"eth_chainId", "params": "null"}

Solution

add zero size check and delegate to wrapped provider

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog

@gakonst gakonst merged commit d509f7a into gakonst:master Jul 14, 2022
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.

Unable to run Foundry Scripts against Hardhat mainnet fork
2 participants