---
title: "POST /cmd/read-only/callsc"
method: POST
path: "/cmd/read-only/callsc"
---

# POST /cmd/read-only/callsc

`POST /cmd/read-only/callsc`

Read-only calls the given function from the given smart contract.

## Request body

- object
  - `nickname` string, required — Account nickname used to sign the operation.
  - `name` string, required — Function name to call.
  - `at` string, required — Smart contract address exporting the function to call.
  - `args` string — Arguments to pass to the function.
  - `coins` string — Amount in integer string.
  - `fee` string — Set the fee amount (in massa) that will be given to the block creator.

## Response `200`

OK.

- ReadOnlyResult
  - `executed_at` Timestamp
    - `period` integer
    - `thread` integer
  - `result` Result
    - `Ok` object[]
    - `Error` string
  - `output_events` Event[]
    - `context` EventContext
      - `slot` Timestamp
        - `period` integer
        - `thread` integer
      - `block` object
      - `read_only` boolean
      - `index_in_slot` integer
      - `call_stack` string[]
      - `origin_operation_id` object
      - `is_final` boolean
      - `is_error` boolean
    - `data` string
  - `gas_cost` integer
  - `state_changes` StateChange
    - `ledger_changes` object
    - `async_pool_changes` object[]
    - `pos_changes` PosChanges
      - `seed_bits` SeedBitsInfo
        - `order` string
        - `head` BitVecHeadInfo
          - `width` integer
          - `index` integer
        - `bits` integer
        - `data` object[]
      - `roll_changes` object
      - `production_stats` object
      - `deferred_credits` DeferredCreditsInfo
        - `credits` object
    - `executed_ops_changes` object
    - `executed_denunciations_changes` object[]
    - `execution_trail_hash_change` object

## Other responses

- `400` — Bad request.
- `422` — Unprocessable Entity - syntax is correct, but the server was unable to process the contained instructions.
- `500` — Internal Server Error - The server has encountered a situation it does not know how to handle.

---

[API](https://skmtc.net/massalabs/apis/massastation.md) · [All operations](https://skmtc.net/massalabs/apis/massastation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/massalabs/massastation/versions/26b1a89baa49/schema)
