eth_maxPriorityFeePerGas

返回每单位 Gas 的费用,这是一个估计值,可以作为优先费用或“小费”支付,以便将交易包含在当前区块中。

通常情况下,您将使用此方法返回值来设置随后提交的交易中的maxFeePerGas。该方法是在EIP 1559中引入的。

Request

curl https://eth-mainnet.solarpath.io/v1/YOUR-API-KEY \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_maxPriorityFeePerGas", "params": []}'

Response

十六进制格式(以 Wei 为单位)。

{
  "id": 1,
  "jsonrpc": "2.0",
  "result": "0x12a05f1f9"
}

最后更新于