hardhat
hardhat copied to clipboard
Allow for input instead of data in eth_call and eth_sendTransaction
- [x] Because this PR includes a bug fix, relevant tests have been included.
A hardhat node only accepts a data
param in inbound eth_call
and eth_sendTransaction
. This behavior is not according to spec defined here, so I'd file it as a bug.
Most RPCs I've tested so far support both input
and data
.
This behavior creates a problem when one tries to use a hardhat node together with go-ethereum, because the latter sends data as input
.
This PR adds support for an input
param while retaining support for the data
param. If both input
and data
are provided input
takes precedence, because it's aligned with the spec.
⚠️ No Changeset found
Latest commit: d4e5a9424abb0b8fcedbe81423b9da67e250f729
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
hardhat | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Dec 26, 2023 8:54pm |
This PR should fix issue https://github.com/NomicFoundation/edr/issues/360
same p.b +1
@xjhweb any idea how to push this forward? what's the next step?
Any updates on this?
Applied these patches to my hardhat and it makes calls from modern ethclient code work again.
Confirmed this fixes the issue.
IMO it makes sense to just handle it as input internally everywhere rather than having input
and data
optional fields be settable and putting the value into data
. Then if you want to support passing the data parameter via jsonrpc still just have 1 transformation at the front end into the standardized format.
Looks like this PR supersedes https://github.com/NomicFoundation/hardhat/pull/4438. @fvictorio does it address the issues in https://github.com/NomicFoundation/hardhat/pull/4438#pullrequestreview-1788349955? The incompatibility with current go-ethereum client is a blocker and I don't know how to work around it without using a fork of one or the other. Thanks.
Oh, this was before the EDR refactor. I guess the provider bits don't apply anymore and there are changes needed in rs code now.
Yes, this will need to be done on the EDR side. This change is important, so we'll try to prioritize it. Sorry that it's taking so long!