chains

Estimates gas for a given off-ledger ISC request

post/v1/chains/{chainID}/estimategas-offledger

Path parameters

chainIDstring string required

ChainID (Bech32)

Request body

fromAddressstring string required

The address to estimate gas for(Hex)

requestBytesstring string required

Offledger Request (Hex)

Example request

{
  "requestBytes": "requestBytes",
  "fromAddress": "fromAddress"
}

Response

ReceiptResponse

blockIndexinteger required
errorMessagestring string
gasBudgetstring string required

The gas budget (uint64 as string)

gasBurnedstring string required

The burned gas (uint64 as string)

gasFeeChargedstring string required

The charged gas fee (uint64 as string)

requestIndexinteger required
storageDepositChargedstring string required

Storage deposit charged (uint64 as string)

Example response

{
  "gasBurnLog": [
    {
      "code": 6,
      "gasBurned": 1
    },
    {
      "code": 6,
      "gasBurned": 1
    }
  ],
  "request": {
    "fungibleTokens": {
      "nfts": [
        "nfts",
        "nfts"
      ],
      "baseTokens": "baseTokens",
      "nativeTokens": [
        {
          "amount": "amount",
          "id": "id"
        },
        {
          "amount": "amount",
          "id": "id"
        }
      ]
    },
    "senderAccount": "senderAccount",
    "isOffLedger": true,
    "requestId": "requestId",
    "callTarget": {
      "contractHName": "contractHName",
      "functionHName": "functionHName"
    },
    "gasBudget": "gasBudget",
    "targetAddress": "targetAddress",
    "allowance": {
      "nfts": [
        "nfts",
        "nfts"
      ],
      "baseTokens": "baseTokens",
      "nativeTokens": [
        {
          "amount": "amount",
          "id": "id"
        },
        {
          "amount": "amount",
          "id": "id"
        }
      ]
    },
    "params": {
      "Items": [
        {
          "value": "value",
          "key": "key"
        },
        {
          "value": "value",
          "key": "key"
        }
      ]
    },
    "nft": {
      "owner": "owner",
      "metadata": "metadata",
      "id": "id",
      "issuer": "issuer"
    },
    "isEVM": true
  },
  "blockIndex": 1,
  "rawError": {
    "code": "code",
    "params": [
      "params",
      "params"
    ]
  },
  "requestIndex": 1,
  "storageDepositCharged": "storageDepositCharged",
  "gasFeeCharged": "gasFeeCharged",
  "errorMessage": "errorMessage",
  "gasBudget": "gasBudget",
  "gasBurned": "gasBurned"
}

Changes

Changed in 7 of the 50 revisions of this API.19325

    • added the new required request property fromAddress

      new-required-request-property

    This revision also has 6 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 742f81ef87e6112See the full diff
    • the request response's property type/format changed from string/string to object/ for status 200

      response-property-type-changed

    • added the required property request/allowance to the response with the 200 status

      response-required-property-added

    • added the required property request/callTarget to the response with the 200 status

      response-required-property-added

    • added the required property request/fungibleTokens to the response with the 200 status

      response-required-property-added

    • added the required property request/gasBudget to the response with the 200 status

      response-required-property-added

    • added the required property request/isEVM to the response with the 200 status

      response-required-property-added

    • added the required property request/isOffLedger to the response with the 200 status

      response-required-property-added

    • added the required property request/nft to the response with the 200 status

      response-required-property-added

    • added the required property request/params to the response with the 200 status

      response-required-property-added

    • added the required property request/requestId to the response with the 200 status

      response-required-property-added

    • added the required property request/senderAccount to the response with the 200 status

      response-required-property-added

    • added the required property request/targetAddress to the response with the 200 status

      response-required-property-added

    • added the required property storageDepositCharged to the response with the 200 status

      response-required-property-added

    This revision also has 4 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • e4bc0f91c082112See the full diff
    • the request response's property type/format changed from string/string to object/ for status 200

      response-property-type-changed

    • added the required property request/allowance to the response with the 200 status

      response-required-property-added

    • added the required property request/callTarget to the response with the 200 status

      response-required-property-added

    • added the required property request/fungibleTokens to the response with the 200 status

      response-required-property-added

    • added the required property request/gasBudget to the response with the 200 status

      response-required-property-added

    • added the required property request/isEVM to the response with the 200 status

      response-required-property-added

    • added the required property request/isOffLedger to the response with the 200 status

      response-required-property-added

    • added the required property request/nft to the response with the 200 status

      response-required-property-added

    • added the required property request/params to the response with the 200 status

      response-required-property-added

    • added the required property request/requestId to the response with the 200 status

      response-required-property-added

    • added the required property request/senderAccount to the response with the 200 status

      response-required-property-added

    • added the required property request/targetAddress to the response with the 200 status

      response-required-property-added

    • added the required property storageDepositCharged to the response with the 200 status

      response-required-property-added

    This revision also has 5 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • c2a1a897ea13131See the full diff
    • the request response's property type/format changed from object/ to string/string for status 200

      response-property-type-changed

    • removed the required property request/allowance from the response with the 200 status

      response-required-property-removed

    • removed the required property request/callTarget from the response with the 200 status

      response-required-property-removed

    • removed the required property request/fungibleTokens from the response with the 200 status

      response-required-property-removed

    • removed the required property request/gasBudget from the response with the 200 status

      response-required-property-removed

    • removed the required property request/isEVM from the response with the 200 status

      response-required-property-removed

    • removed the required property request/isOffLedger from the response with the 200 status

      response-required-property-removed

    • removed the required property request/nft from the response with the 200 status

      response-required-property-removed

    • removed the required property request/params from the response with the 200 status

      response-required-property-removed

    • removed the required property request/requestId from the response with the 200 status

      response-required-property-removed

    • removed the required property request/senderAccount from the response with the 200 status

      response-required-property-removed

    • removed the required property request/targetAddress from the response with the 200 status

      response-required-property-removed

    • removed the required property storageDepositCharged from the response with the 200 status

      response-required-property-removed

    • removed the optional property rawError/hash from the response with the 200 status

      response-optional-property-removed

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • e874a52a4f5222See the full diff
    • the rawError/code response's property type/format changed from object/ to string/string for status 200

      response-property-type-changed

    • the rawError/hash response's property type/format changed from integer/int32 to string/string for status 200

      response-property-type-changed

    • removed the optional property rawError/code/ContractID from the response with the 200 status

      response-optional-property-removed

    • removed the optional property rawError/code/ID from the response with the 200 status

      response-optional-property-removed

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • endpoint added

      endpoint-added

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • api path removed without deprecation

      api-path-removed-without-deprecation

    This revision also has 20 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog