eth_syncing
eth_syncing RPC Method
Parameters:
none
Returns:
result - The result is false if JSON Object is not syncing otherwise it's true:
startingblock - The block at which the import started encoded as hexadecimal
currentblock - The current block, same as eth_blockNumber encoded as hexadecimal
highestblock - The estimated highest block encoded as hexadecimal
Code Examples:
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_syncing",
"params": [],
"id": 67
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.ebs.ezat.io/core/api/v1.0/rpc/bsc/mainnet?x-api-key-id=API-KEY-ID&x-api-key=API-KEY", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Last updated