메인 콘텐츠로 건너뛰기
POST
/
v2
/
transaction
/
{chain}
/
estimate-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

가스 추정 파라미터

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"