Estimating Gas Price

This Estimating Gas Price using this method.

API Specification

Estimating Gas Price

POST http://localhost:8888/wallet/estimateGas

Submit Transaction under the given instance.

Request Body

NameTypeDescription

to*

String

The recipient's address

walletId*

String

The ID of the wallet

params*

String

Additional parameters for the transaction

method*

String

The method for the transaction

isContractTxn*

String

Indicates whether the transaction is a contract transaction

contractABI*

String

The Application Binary Interface (ABI) of the contract

{
  "Status": "SUCCESS",
  "Message": "",
  "Data": {
    "address": "0xa287e3DE5f629fc49321De34F40da40aAd799fa7",
    "estimatedGas": 23912
  }
}

Take a look at how you might call this method using our official libraries, or via curl:

curl -X POST http://localhost:8888/wallet/estimateGas \
-H "Content-Type: application/json" \
-d '{
  "walletId": "effae2b6-3ee3-xxxxxxxxxxxxxxxxxxxxxxxxx",
  "to": "0xc2de797fab7d2d2b26xxxxxxxxxxxxxxxxxxxxxxxxx",
  "method": "store",
  "params": [
    {
      "type": "uint256",
      "value": "35"
    }
  ],
  "isContractTxn": true,
  "contractABI": "[]"
}'

Last updated