RPC Methods

MELD network is a fully EVM compatible system that implements all the standard RPC methods following the official specification for Ethereum clients.

A full list with description of available methods in the specification can be found here : https://ethereum.github.io/execution-apis/api-documentation/

The RPC methods most commonly used for development are:

Retrieving information from the Blockchain

  • eth_blockNumer -> Returns the number of the most recent block on the network

  • eth_chainID -> Returns the chain ID of the network

  • eth_feeHistory -> Returns the base fee per gas for a range of selected blocks

  • eth_gasPrice -> Returns the current base gas price in wei

  • eth_getBalance -> Returns the balance of native coins for the selected address

  • eth_getBlockByHash // eth_getBlockByNumber -> Returns the information of a block by passing the number or hash of said block.

  • eth_getBlockTransactionCountByHash // eth_getBlockTransactionCountByNumber -> Returns the number of transactions that have been included in said block

  • eth_getTransactionByHash -> Returns the information of the transaction requested

Interacting with the network

  • eth_call -> Executes a new message call immediately without creating a transaction on the network, free of any transaction cost.

  • eth_estimateGas -> Simulates the execution of a transaction and returns how much gas is needed for said execution at the current time.

  • eth_sendTransaction -> Signs and sends a transaction

  • eth_sendRawTransaction -> Submits a previously signed transaction

  • eth_sign -> Signs a data msg

  • eth_signTransaction -> Signs a transaction data

Using the RPC methods

There are several ways to use this methods. You can directly query the raw APIs connecting to an RPC node using CURL (or any other http client)

curl https://rpc-1.meld.com/ \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"eth_blockNumber","params":[],"id":1,"jsonrpc":"2.0"}' 

Or you can use the different libraries that exists for interacting with the network. Examples:

Always refer to the different libraries for updated documentation on how to interact with the network

Last updated