Skip to content
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

Add eth namespace methods for specificity #104

Merged
merged 7 commits into from
Feb 28, 2024
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 58 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,7 @@

FlowEVM Gateway implements the Ethereum JSON-RPC API for the [FlowEVM](https://developers.flow.com/evm/about) which conforms to the Ethereum [JSON-RPC specification](https://ethereum.github.io/execution-apis/api-documentation/). FlowEVM Gateway is specifically designed to integrate with the FlowEVM environment on the Flow blockchain. Rather than implementing the full `geth` stack, the JSON-RPC API available in FlowEVM Gateway is a lightweight implementation which uses Flow's underlying consensus and smart contract language, [Cadence](https://cadence-lang.org/docs/), to handle calls received by the FlowEVM Gateway. For those interested in the underlying implementation details please refer to the [FLIP #243](https://github.com/onflow/flips/issues/243) (FlowEVM Gateway) and [FLIP #223](https://github.com/onflow/flips/issues/223) (FlowEVM Core) improvement proposals.

FlowEVM Gateway is compatible with the majority of standard Ethereum JSON-RPC APIs allowing seamless integration with existing Ethereum-compatible web3 tools via HTTP. FlowEVM Gateway honors Ethereum's JSON-RPC namespace system, grouping RPC methods into categories based on their specific purpose. Each method name is constructed using the namespace, an underscore, and the specific method name in that namespace. For example, the `eth_call` method is located within the `eth` namespace.

Listed below are the JSON-RPC namespaces currently supported by the FlowEVM Gateway:

* `eth`
* `web3`
* `net`

We also plan to add support for the `admin` namespace in the near future.
FlowEVM Gateway is compatible with the majority of standard Ethereum JSON-RPC APIs allowing seamless integration with existing Ethereum-compatible web3 tools via HTTP. FlowEVM Gateway honors Ethereum's JSON-RPC namespace system, grouping RPC methods into categories based on their specific purpose. Each method name is constructed using the namespace, an underscore, and the specific method name in that namespace. For example, the `eth_call` method is located within the `eth` namespace. See below for details on methods currently supported or planned.

## Event subscription and filters

Expand Down Expand Up @@ -111,6 +103,63 @@ FlowEVM has public RPC endpoints available for the following environments:
| Currency Symbol | FLOW |
| Block Explorer | https://flowdiver.io |

# Supported namespaces and methods

Listed below are the JSON-RPC namespaces and methods currently supported by the FlowEVM Gateway:

* `eth`
* Supported
* eth_chainId
* eth_blockNumber
* eth_coinbase
* eth_getLogs
* eth_getTransactionCount
* eth_getTransactionReceipt
* eth_getBlockByNumber
* eth_call
* eth_sendRawTransaction
* eth_getTransactionByHash
* eth_gasPrice
* eth_getBalance
* eth_estimateGas
* eth_getTransactionByBlockNumberAndIndex
* eth_getTransactionByBlockHashAndIndex
* eth_getBlockByHash
* eth_getBlockReceipts
* eth_getBlockTransactionCountByHash
* eth_getBlockTransactionCountByNumber
* eth_getUncleCountByBlockHash // return 0
* eth_getUncleCountByBlockNumber // return 0
* eth_syncing // return false for now
* Unsupported but coming soon
* eth_createAccessList
* eth_feeHistory
* eth_maxPriorityFeePerGas
* eth_getCode
* eth_getProof
* eth_getStorageAt
* eth_newFilter
* eth_uninstallFilter
* eth_getFilterLogs
* eth_getFilterChanges
* eth_newBlockFilter
* eth_newPendingTransactionFilter
* eth_accounts
* eth_sign
* eth_signTransaction
* eth_sendTransaction
* `web3`
* Supported
* web3_clientVersion
* web_sha3
* `net`
* Supported
* net_listening
* net_peerCount
* net_version

We also plan to add support for the `admin` namespace in the near future.

# Example queries

Following is a list of pre-made JSON-RPC API calls, using `curl`:
Expand Down
Loading