-
Notifications
You must be signed in to change notification settings - Fork 0
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
Extend available rpc calls to improve hardhat
compatibility
#27
Comments
Does HardHat supply their own testing node that expose those endpoints or do they rely on you using something like Ganache? I assume Geth doesn't implement those RPCs. |
Hardhat has their own in-memory node that handles the testing. It shares the Ethereum logic, therefore it's not useful for us nor for other non-EVM chains. That's why we have |
Okay I got it thanks. So we need to add them to the node. Can you out which are the most important from your point of view? i.e which are solving the current limitations we have:
What do you mean by in-memory? Where else should it live than in memory? Is not a separate node process or what does this mean? |
Priorities should be:
This are the most critical ones and are directly tied to |
We will also need to get something like this in, but my guess is that in order for that to fo through we'll need to have most if not all of those RPC calls in. |
evm_snapshot and evm_revert might be the most challenging, I wonder if we should build a sandbox around TestExternalities instead of using a real node, not sure how best to add it to the node otherwise |
maybe what we need here is something like https://use.ink/basics/contract-testing/drink to provide some kind of e2e backend for hardhat and others |
I see that Hardhat Node also supports forking from another networks. |
Hardhat
employs certain rpc calls to assert it is ahardhat
network, which enables the usage of a wide range of helper tools that areHardhatOnly
. It also enables configuration options such asallowUnlimitedContractSize
andallowUnlimitedInitCodeSize
, which overrides the native limit set byhardhat
and can help the tests adapt to the actual size limit of PolkaVM.The most critical rpc calls that are needed atm are:
evm_snapshot
evm_revert
evm_increaseTime
evm_mine
web3_clientVersion
hardhat_mine
hardhat_setBalance
hardhat_impersonateAccount
hardhat_stopImpersonatingAccount
hardhat_setStorageAt
hardhat_reset
A more comprehensive list of these rpc calls can be found in
era-test-node
'sevm
,hardhat
,eth
andweb3
namespaces.These rpc calls (excluding the
hardhat_*
ones) are also useful for users that are used to using testing frameworks like Ganache.The text was updated successfully, but these errors were encountered: