estimateGasCost
Calculate transaction gas costs in both native tokens and USD for Ethereum-based networks to help users budget blockchain operations accurately.
Instructions
Estimate the gas cost for a transaction in both native token and USD
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chainId": "<chainId>",
"gasUnits": "<gasUnits>"
},
"name": "estimateGasCost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chainId | Yes | Chain ID (e.g. 1 for Ethereum, 137 for Polygon) | |
| gasUnits | Yes | Estimated gas units for the transaction | |
| maxFeePerGas | No | Optional max fee per gas in gwei | |
| maxPriorityFeePerGas | No | Optional max priority fee per gas in gwei |