pulsechain.box
eth

eth_estimateGas

Estimates the amount of gas required to execute a transaction. The transaction is not actually sent to the network. The estimate may be higher than the actual gas used because of EVM mechanics and nod

Estimates the amount of gas required to execute a transaction. The transaction is not actually sent to the network. The estimate may be higher than the actual gas used because of EVM mechanics and node safety margins.

Parameters

#TypeDescription
1objectTransaction call object.

The transaction call object supports these fields:

FieldTypeRequiredDescription
tostringYesThe address the transaction is directed to.
fromstringNoThe address the transaction is sent from.
valuestringNoValue transferred in wei (hex).
datastringNoEncoded function call data.
gasstringNoGas limit (hex). Used as an upper bound for the estimate.

Returns

string -- The estimated gas amount as a hexadecimal string.

Example

Estimate gas for a simple PLS transfer:

curl -s -X POST https://rpc.pulsechain.box \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_estimateGas",
    "params": [{
      "to": "0x0000000000000000000000000000000000000000",
      "value": "0xde0b6b3a7640000"
    }],
    "id": 1
  }'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x5208"
}
TRY IT

Notes

  • A simple PLS (native token) transfer always costs exactly 21000 gas (0x5208).
  • Contract interactions will return higher estimates depending on the complexity of the execution.
  • If the call would revert, the method returns an error with the revert reason (if available).
  • The from field is optional but may affect the estimate if the contract logic depends on msg.sender.
  • It is good practice to add a small buffer (e.g., 10-20%) to the estimate when setting the gas limit for a real transaction, as actual execution may vary.
Copyright © 2026 AvecdrA. Made with love.