Skip to main content
POST
/
contract_interactions
/
base_asset_id
/
{baseAssetId}
/
contract_address
/
{contractAddress}
/
decode
TypeScript
const response: Promise<FireblocksResponse<ContractDataDecodedResponse>> = fireblocks.contractInteractions.decodeContractData(contractInteractionsApiDecodeContractDataRequest);
{
  "result": [
    {
      "name": "transfer",
      "signature": "transfer(address,uint256)",
      "args": [
        {
          "name": "_name",
          "type": "string",
          "description": "The name of the token",
          "internalType": "string",
          "components": [
            {
              "name": "_name",
              "type": "string",
              "description": "The name of the token",
              "internalType": "string",
              "components": "<array>"
            }
          ],
          "value": "true",
          "functionValue": {
            "inputs": "<array>",
            "name": "initialize",
            "outputs": "<array>",
            "stateMutability": "nonpayable"
          }
        }
      ]
    }
  ],
  "type": "FUNCTION"
}

Documentation Index

Fetch the complete documentation index at: https://developers.fireblocks.com/llms.txt

Use this file to discover all available pages before exploring further.

Headers

Idempotency-Key
string

A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.

Path Parameters

contractAddress
string
required

The contract's onchain address

baseAssetId
string
required

The blockchain native asset identifier

Body

application/json
data
required

The data to decode, which can be a string or an object containing the data and its type.

Example:

"0x1234567890abcdef"

dataType
enum<string>
required

The type of the data to decode.

Available options:
ERROR,
LOG,
FUNCTION
Example:

"FUNCTION"

abi
object[]

The abi of the function/error/log to decode.

Example:
[
  {
    "inputs": [
      { "name": "to", "type": "address" },
      { "name": "amount", "type": "uint256" }
    ],
    "stateMutability": "nonpayable",
    "type": "function",
    "name": "transfer"
  }
]

Response

Decoded data retrieved successfully

result
object[]
required

The decoded parameters of the contract function call.

type
enum<string>
required

The type of the data to decode.

Available options:
ERROR,
LOG,
FUNCTION
Example:

"FUNCTION"