Marketplace has launched, further enabling blockchain developers! Learn more

Contents

eth_syncing RPC method

The eth_syncing EVM method is only supported on the Avalanche C-Chain.

Parameters:

  1. None

Returns:

  1. Result - Boolean (false) when not syncing or a JSON Object when syncing:

    startingBlock - The block at which the import started encoded as a hexadecimal.

    currentBlock - The current block, same as eth_blockNumber encoded as a hexadecimal.

    highestBlock - The estimated highest block encoded as a hexadecimal.

Code Examples:

To use the eth_syncing EVM method on the Avalanche C-Chain, ensure that the end of your URL includes ext/bc/C/rpc.

require 'ethereum.rb'
client = Ethereum::HttpClient.new('http://sample-endpoint-name.network.quiknode.pro/token-goes-here/')
response = client.eth_syncing
puts response["result"]
Ready to get started? Create a free account