New eth_call RPC endpoint that takes a block hash as param #115

Closed
opened 2021-10-18 06:43:01 +00:00 by ashwinphatak · 2 comments
ashwinphatak commented 2021-10-18 06:43:01 +00:00 (Migrated from github.com)
  • We need to make our own eth_call endpoint that takes a block hash as param.
  • Required to support watchers operating in the "frothy" region.
  • If the block doesn't exist in the header_cids table, it will call out to the upstream geth instance to fill in the gap.
* We need to make our own `eth_call` endpoint that takes a block hash as param. * Required to support watchers operating in the "frothy" region. * If the block doesn't exist in the `header_cids` table, it will call out to the upstream geth instance to fill in the gap.
Member
Normal `eth_call` can take a blockhash as an arg: https://github.com/vulcanize/ipld-eth-server/blob/master/pkg/eth/api.go#L912
arijitAD commented 2021-10-21 10:03:28 +00:00 (Migrated from github.com)
 curl -H "Content-Type: application/json" localhost:8545 -X POST --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"from": "0x0000000000000000000000000000000000000000", "to": "0xB4cAedC720F2C4Fc7047D003a8070da24E1b5023", "data": "0x18160ddd"}, "0x24e66ec06439125a0389e1be846b558bc26d2f73499614ac0bf571ac3ba72d16"],"id":1}'

Screenshot 2021-10-21 at 12 56 28 PM

``` curl -H "Content-Type: application/json" localhost:8545 -X POST --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"from": "0x0000000000000000000000000000000000000000", "to": "0xB4cAedC720F2C4Fc7047D003a8070da24E1b5023", "data": "0x18160ddd"}, "0x24e66ec06439125a0389e1be846b558bc26d2f73499614ac0bf571ac3ba72d16"],"id":1}' ``` ![Screenshot 2021-10-21 at 12 56 28 PM](https://user-images.githubusercontent.com/5843604/138256336-286b6f9e-46c5-4be5-b06d-cd1e58159dc2.png)
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/ipld-eth-server#115
No description provided.