eth_estimateGas,估算call或交易要使用的gas(这些call或交易不会添加到区块链中)。
参数
- 所有eth_call的参数
返回
- QUANTITY - 使用gas的总金额。
例子
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_estimateGas","params":[{see above}],"id":1}'
// Result
{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0x5208" // 21000
}
 
                             
        