> ## 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.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://developers.fireblocks.com/feedback

```json
{
  "path": "/api-reference/contract-interactions/call-a-read-function-on-a-deployed-contract",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Call a read function on a deployed contract

> Call a read function on a deployed contract by blockchain native asset id and contract address



## OpenAPI

````yaml https://docs.fireblocks.com/api/v1/swagger.yaml post /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/read
openapi: 3.0.0
info:
  title: Fireblocks API
  description: >
    Fireblocks provides a suite of applications to manage digital asset
    operations and a complete development platform to build your business on the
    blockchain.


    - Visit our website for more information: [Fireblocks
    Website](https://fireblocks.com)

    - Visit our developer docs: [Fireblocks
    DevPortal](https://developers.fireblocks.com)
  version: 1.6.2
  contact:
    email: developers@fireblocks.com
servers:
  - url: https://api.fireblocks.io/v1
    description: Fireblocks Production Environment Base URL
  - url: https://sandbox-api.fireblocks.io/v1
    description: Fireblocks Sandbox Environment Base URL
security: []
paths:
  /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/read:
    post:
      tags:
        - Contract Interactions
      summary: Call a read function on a deployed contract
      description: >-
        Call a read function on a deployed contract by blockchain native asset
        id and contract address
      operationId: readCallFunction
      parameters:
        - $ref: '#/components/parameters/X-Idempotency-Key'
        - name: contractAddress
          required: true
          in: path
          description: The contract's onchain address
          example: '0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66'
          schema:
            type: string
        - name: baseAssetId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReadCallFunctionDto'
      responses:
        '200':
          description: Read Call Retrieved Successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ParameterWithValueList'
        default:
          $ref: '#/components/responses/Error'
      x-codeSamples:
        - lang: TypeScript
          source: >-
            const response: Promise<FireblocksResponse<ParameterWithValueList>>
            =
            fireblocks.contractInteractions.readCallFunction(contractInteractionsApiReadCallFunctionRequest);
        - lang: Java
          source: >-
            CompletableFuture<ApiResponse<List<ParameterWithValue>>> response =
            fireblocks.contractInteractions().readCallFunction(readCallFunctionDto,
            contractAddress, baseAssetId, idempotencyKey);
        - lang: Python
          source: >-
            response =
            fireblocks.contract_interactions.read_call_function(read_call_function_dto,
            contract_address, base_asset_id, idempotency_key);
components:
  parameters:
    X-Idempotency-Key:
      name: Idempotency-Key
      in: header
      description: >-
        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.
      required: false
      schema:
        type: string
  schemas:
    ReadCallFunctionDto:
      type: object
      properties:
        abiFunction:
          oneOf:
            - $ref: '#/components/schemas/ReadAbiFunction'
            - $ref: '#/components/schemas/SolanaInstructionWithValue'
      required:
        - abiFunction
    ParameterWithValueList:
      type: array
      items:
        $ref: '#/components/schemas/ParameterWithValue'
    ReadAbiFunction:
      type: object
      properties:
        stateMutability:
          type: string
          enum:
            - pure
            - view
          example: pure
        outputs:
          type: array
          items:
            $ref: '#/components/schemas/Parameter'
        name:
          type: string
        type:
          type: string
        inputs:
          type: array
          items:
            $ref: '#/components/schemas/ParameterWithValue'
        description:
          type: string
      required:
        - stateMutability
        - type
        - inputs
    SolanaInstructionWithValue:
      type: object
      properties:
        name:
          type: string
          description: The name of the instruction
          example: approve
        discriminator:
          type: array
          items:
            type: number
          description: The discriminator for the instruction. Acts as a function selector
          example:
            - 13
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/SOLAccountWithValue'
        args:
          type: array
          description: The arguments of the instruction
          items:
            $ref: '#/components/schemas/SolParameterWithValue'
      required:
        - name
        - discriminator
        - accounts
        - args
    ParameterWithValue:
      type: object
      properties:
        name:
          type: string
          example: _name
          description: The name of the parameter as it appears in the ABI
        description:
          type: string
          example: The name of the token
          description: >-
            A description of the parameter, fetched from the devdoc of this
            contract
        internalType:
          type: string
          example: string
          description: The  internal type of the parameter as it appears in the ABI
        type:
          type: string
          example: string
          description: The type of the parameter as it appears in the ABI
        components:
          type: array
          items:
            $ref: '#/components/schemas/Parameter'
        value:
          example: 'true'
          description: The value of the parameter. can also be ParameterWithValue
          type: string
        functionValue:
          description: >-
            The function value of this param (if has one). If this is set, the
            `value` shouldn`t be. Used for proxies
          allOf:
            - $ref: '#/components/schemas/LeanAbiFunction'
      required:
        - name
        - type
    ErrorSchema:
      type: object
      properties:
        message:
          type: string
        code:
          type: number
    Parameter:
      type: object
      properties:
        name:
          type: string
          example: _name
          description: The name of the parameter as it appears in the ABI
        description:
          type: string
          example: The name of the token
          description: >-
            A description of the parameter, fetched from the devdoc of this
            contract
        internalType:
          type: string
          example: string
          description: The internal type of the parameter as it appears in the ABI
        type:
          type: string
          example: string
          description: The type of the parameter as it appears in the ABI
        components:
          type: array
          items:
            $ref: '#/components/schemas/Parameter'
      required:
        - name
        - type
    SOLAccountWithValue:
      type: object
      properties:
        name:
          type: string
          description: The name of the account
          example: mint
        signer:
          type: boolean
          description: >-
            Indicates if the account needs to sign the instruction. If true a
            signature for this account must be provided
          example: false
        writable:
          type: boolean
          description: Indicates if the account's data can be changed by the instruction.
          example: true
        address:
          type: string
          description: The address of the account
          example: 4PVcDXAkAgQkVx4puiSXdZ5H8BrTqUzstJBKKWFy3XsH
      required:
        - name
        - address
    SolParameterWithValue:
      type: object
      properties:
        value:
          type: string
          description: The value of the parameter
          example: '1000000'
        name:
          type: string
          description: The name of the parameter
          example: mint
        type:
          $ref: '#/components/schemas/IdlType'
      required:
        - name
        - type
        - value
    LeanAbiFunction:
      type: object
      properties:
        name:
          type: string
          example: initialize
          description: The function name
        inputs:
          description: The function inputs
          type: array
          items:
            $ref: '#/components/schemas/ParameterWithValue'
        outputs:
          description: The function outputs
          type: array
          items:
            $ref: '#/components/schemas/ParameterWithValue'
        stateMutability:
          type: string
          enum:
            - view
            - pure
            - nonpayable
            - payable
          example: nonpayable
          description: >-
            The state mutability of the function (e.g., view, pure, nonpayable,
            payable)
      required:
        - inputs
    IdlType:
      type: string
      enum:
        - bool
        - u8
        - i8
        - u16
        - i16
        - u32
        - i32
        - f32
        - u64
        - i64
        - f64
        - u128
        - i128
        - u256
        - i256
        - bytes
        - string
        - pubkey
      description: The type of the parameter
      example: u8
  responses:
    Error:
      description: Error Response
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorSchema'
  headers:
    X-Request-ID:
      schema:
        type: string
      description: >-
        Unique ID correlated to the API request. Please provide it in any
        support ticket you create or on Github issues related to Fireblocks SDKs

````