メインコンテンツへスキップ
POST
/
v2
/
transaction
/
{chain}
/
estimate-gas-limit
トランザクション - Gas Limit 推定
curl --request POST \
  --url https://api.chainstream.io/v2/transaction/{chain}/estimate-gas-limit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "from": "0x742d35Cc6634C0532925a3b8D8C9C4b8a8d4C8b8",
  "to": "0x742d35Cc6634C0532925a3b8D8C9C4b8a8d4C8b8",
  "data": "0xa9059cbb000000000000000000000000742d35cc6634c0532925a3b8d8c9c4b8a8d4c8b80000000000000000000000000000000000000000000000000de0b6b3a7640000",
  "value": "0x0"
}
'
{
  "gasLimit": "0x5208",
  "chain": "ethereum"
}

承認

Authorization
string
header
必須

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

パスパラメータ

chain
enum<string>
必須

サポートされているネットワークに記載されているチェーン名

利用可能なオプション:
bsc,
eth

ボディ

application/json

Gas 推定パラメータ

from
string
必須

From address

:

"0x742d35Cc6634C0532925a3b8D8C9C4b8a8d4C8b8"

to
string
必須

To address

:

"0x742d35Cc6634C0532925a3b8D8C9C4b8a8d4C8b8"

data
string
必須

Transaction data (hex)

:

"0xa9059cbb000000000000000000000000742d35cc6634c0532925a3b8d8c9c4b8a8d4c8b80000000000000000000000000000000000000000000000000de0b6b3a7640000"

value
string

Value to send (in wei, hex string)

:

"0x0"

レスポンス

200 - application/json
gasLimit
string
必須

Estimated gas limit (hex string)

:

"0x5208"

chain
string
必須

Chain symbol

:

"ethereum"