-
Notifications
You must be signed in to change notification settings - Fork 27
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
PortalNetwork: Implement UltralightProvider Enhancements for EIP-1193 JSON-RPC Support #699
base: master
Are you sure you want to change the base?
PortalNetwork: Implement UltralightProvider Enhancements for EIP-1193 JSON-RPC Support #699
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great so far. One thing we need to address is that the provider should return JSON-RPC formatted data and not just the raw block/transaction/state data our portalnetwork.ETH
module returns. If you want to do that work as well, let me know and I can provide guidance on next steps or else I can do that in a subsequent PR.
Basically, we need to use these helpers with some slight edits that I can outline.
Please go ahead with the guidance. Would love to handle as well |
To make the provider fully EIP compliant, each of the supported methods needs to return the values formatted to match the Ethereum JSON-RPC specification. So for each method listed in the PR description, you need to verify that the values returned by that method correspond to the JSON-RPC spec. For the methods that return blocks, you can copy the the You'll need to update the For the other methods ( Also, if you can update your test script to make calls to these additional methods, that would be great. For the state related methods, you'll have to pick an account that was present in the Ethereum state in ancient chain history (so maybe before block 10000000) since the state network doesn't fully support current state yet. Let me know if you need help with this part of it. |
Got it |
Key Enhancements:
EIP-1193 Method Support:
eth_getBlockByHash
eth_getBlockByNumber
eth_getTransactionCount
eth_getCode
eth_getBalance
eth_getStorageAt
eth_call
Error Handling:
4200
for unsupported methods.-32602
for invalid parameters.-32603
for internal errors.Removed unused methods from
provider.spec.ts