-
Notifications
You must be signed in to change notification settings - Fork 197
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
Celo RPC API is incompatible with ethers.js #1945
Comments
This is preventing us from deploying on Celo/Alfajores atm as we require hardhat forking and ethers compatibility, see NomicFoundation/hardhat#1966 |
ethers.js expects even length hex number for gasLimit: We have been using ethers.js with an override to the formatter function to allow it to be used without gasLimit being present in the rpc responce. About 2 days ago we started picking up errors on alfajores, I have removed our override and the error is still coming up
It seems that ethers.js expects this hex number to be of even length |
Any update on this issue? +1 for blocking deployment |
Celo is compatible with Ethers.js since December. Announcement here. |
Description
Celo's block type differs from the block used in ethereum, this causes our RPC API to be incompatible with ethers.js (and most likely many other web3 clients)
See these issues where people have encountered problems
ethers-io/ethers.js#1735
ethers-io/ethers.js#2919
ethers-io/ethers.js#2558
#1738
Celo's block header lacks the following fields that exist in ethereum.
So in order to provide an API that is compatible with ethers.js we should seek to somehow re-instate these missing fields. We could do this by actually adding the fields to the block or simply by filling them with fake data in RPC responses.
Although BaseFee and GasLimit are not currently part of the Celo block they are parameters of the system and are managed by smart contracts. So these can be added to the block in a meaningful way.
It's not so clear however what to do with UncleHash, Difficulty, MixDigest and Nonce, since these fields really do not exist in the Celo system. We could add them to the block or RPC responses, but we would need to fill them with dummy data. This could be more problematic than just not having them since people may then try to make important decisions based off the dummy data. Or may find that the dummy data causes other problems within their system.
The text was updated successfully, but these errors were encountered: