Estimate gas fees
Using JSON-RPC to Estimate Gas Fees
bashCopycurl -X POST https://zkevmrpc.blastchain.org \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0", "method":"eth_gasPrice", "params":[], "id":1}'Understanding the Response
{
"id":1,
"jsonrpc": "2.0",
"result": "0x3b9aca00" // This is an example; actual value may vary
}Converting Wei to Gwei in JavaScript
Summary
Last updated