Gas and Fee
estimateGas
Getting Started
Smart Contracts
API Libaries
- JavaScript Libraries
- Postman
API Playground
- JSON-RPC Overview
- Addresses
- Blocks
- Transactions
- Gas and Fee
- Txpool
- Debug
- Net
- Miner
- Other
- Conversion
Gas and Fee
estimateGas
Estimates the gas required to execute the given transaction
POST
curl --request POST \
--url https://rpc.quai.network/cyprus1/ \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "quai_estimateGas",
"params": [
{
"from": "0x03b1b2fcbaa6e4a3b44ac348b00ed0a68546d26b",
"to": "0x1856f346b67615e9acb4dc3da6ebceb2bc2f8940",
"data": "0xe3424c93"
},
"latest"
],
"id": 1
}'
{
"jsonrpc": "2.0",
"result": "0x5208",
"id": 1
}
Body
application/json
Response
200 - application/json
Successful response
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://rpc.quai.network/cyprus1/ \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "quai_estimateGas",
"params": [
{
"from": "0x03b1b2fcbaa6e4a3b44ac348b00ed0a68546d26b",
"to": "0x1856f346b67615e9acb4dc3da6ebceb2bc2f8940",
"data": "0xe3424c93"
},
"latest"
],
"id": 1
}'
{
"jsonrpc": "2.0",
"result": "0x5208",
"id": 1
}