---
title: "Generic Smart Contract Method"
method: POST
path: "/defi/v1/chain/genericsmartcontractmethod"
tags: ["chain"]
---

# Generic Smart Contract Method

`POST /defi/v1/chain/genericsmartcontractmethod`

## Request

- Base URL: `https://svc.blockdaemon.com`
- URL: `https://svc.blockdaemon.com/defi/v1/chain/genericsmartcontractmethod`
- Auth: API key in header `X-API-Key`

Executes read-only (view) functions on verified smart contracts, enabling queries like token balances or exchange rates without gas costs. The result includes on-chain data returned by the invoked function, facilitating up-to-date insights for decentralized applications.

> 💡 
**Compute Unit Value:** `40` (Fixed)

## Request body

- ChainGenericsmartcontractmethodRequest: The request body for a /defi/v1/chain/genericsmartcontractmethod
  - `chainId` '1' | '56' | '43114' | '42161' | '10' | '324' | '137' | '8453': The unique ID to direct queries or transactions to the correct blockchain. Find more [here](https://docs.blockdaemon.com/docs/defi-api-supported-protocols#supported-chains).
  - `chainSymbol` string: The abbreviated chain name for queries or transactions.
  - `contractAddress` string, required: The address of the smart contract to perform the read operation on.
  - `parameters` string: Array of parameters to pass to the read function.
  - `abi` '': ABI of the smart contract if unverified.
  - `methodName` string, required: Name of the read function to be executed.
  - `blockNumber` string: The block number to perform the query on. Defaults to the latest block.

## Response `200`

Successful response

- object
  - `status` integer
  - `msg` string
  - `data` object

---

[API](https://skmtc.dev/blockdaemon/apis/blockdaemon-defi-api.md) - [All operations](https://skmtc.dev/blockdaemon/apis/blockdaemon-defi-api/llms.txt) - [OpenAPI document](https://skmtc.dev/blockdaemon/apis/blockdaemon-defi-api/revisions/ec053b7c8041?raw)
