Estimates gas for a given off-ledger ISC request
POST/v1/chain/estimategas-offledger
Estimates gas for a given off-ledger ISC request
Request
- application/json
Body
required
Request
fromAddress stringrequired
The address to estimate gas for(Hex)
requestBytes stringrequired
Offledger Request (Hex)
Responses
- 200
ReceiptResponse
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
- Array [
- ]
- Array [
- ]
- Array [
- ]
- Array [
- ]
blockIndex int32required
Possible values: >= 1
errorMessage string
gasBudget stringrequired
The gas budget (uint64 as string)
gasBurnLog BurnRecord[]required
code int32required
gasBurned int64required
gasBurned stringrequired
The burned gas (uint64 as string)
gasFeeCharged stringrequired
The charged gas fee (uint64 as string)
rawError UnresolvedVMErrorJSON
code string
params string[]
request RequestJSONrequired
allowance AssetsJSONrequired
coins CoinJSON[]required
balance stringrequired
The balance (uint64 as string)
coinType stringrequired
objects IotaObject[]required
id int32[]required
type ObjectTyperequired
s string
assets AssetsJSONrequired
coins CoinJSON[]required
balance stringrequired
The balance (uint64 as string)
coinType stringrequired
objects IotaObject[]required
id int32[]required
type ObjectTyperequired
s string
callTarget CallTargetJSONrequired
contractHName stringrequired
The contract name as HName (Hex)
functionHName stringrequired
The function name as HName (Hex)
gasBudget stringrequired
The gas budget (uint64 as string)
isEVM booleanrequired
isOffLedger booleanrequired
params string[]required
requestId stringrequired
senderAccount stringrequired
requestIndex int32required
Possible values: >= 1
storageDepositCharged stringrequired
Storage deposit charged (uint64 as string)
{
"gasBurnLog": [
{
"code": 6,
"gasBurned": 1
},
{
"code": 6,
"gasBurned": 1
}
],
"request": {
"senderAccount": "senderAccount",
"assets": {
"coins": [
{
"coinType": "coinType",
"balance": "balance"
},
{
"coinType": "coinType",
"balance": "balance"
}
],
"objects": [
{
"id": [
5,
5
],
"type": {
"s": "s"
}
},
{
"id": [
5,
5
],
"type": {
"s": "s"
}
}
]
},
"isOffLedger": true,
"requestId": "requestId",
"callTarget": {
"contractHName": "contractHName",
"functionHName": "functionHName"
},
"gasBudget": "gasBudget",
"allowance": {
"coins": [
{
"coinType": "coinType",
"balance": "balance"
},
{
"coinType": "coinType",
"balance": "balance"
}
],
"objects": [
{
"id": [
5,
5
],
"type": {
"s": "s"
}
},
{
"id": [
5,
5
],
"type": {
"s": "s"
}
}
]
},
"params": [
"params",
"params"
],
"isEVM": true
},
"blockIndex": 1,
"rawError": {
"code": "code",
"params": [
"params",
"params"
]
},
"requestIndex": 1,
"storageDepositCharged": "storageDepositCharged",
"gasFeeCharged": "gasFeeCharged",
"errorMessage": "errorMessage",
"gasBudget": "gasBudget",
"gasBurned": "gasBurned"
}
Loading...