Skip to main content
POST
/
api
/
v1
/
metadata
/
eth-call
Call a view/pure function on an EVM contract
import requests

url = "https://api.example.com/api/v1/metadata/eth-call"

payload = {
    "chain_id": "<string>",
    "to": "<string>",
    "data": "<string>",
    "from": "<string>",
    "block": "latest"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "result": {
    "result": "<string>"
  },
  "success": true,
  "suggestion": "",
  "message": "",
  "meta": {
    "total": 123,
    "offset": 123,
    "limit": 123,
    "has_more": true,
    "after": "<string>",
    "before": "<string>"
  }
}

Headers

X-API-Key
string | null

Body

application/json

Request body for the eth_call proxy endpoint.

chain_id
string
required

Cobo chain ID (e.g. SETH, BASE_ETH).

Required string length: 1 - 100
to
string
required

Contract address to call.

Required string length: 1 - 255
data
string
required

ABI-encoded calldata as a hex string (with or without 0x prefix).

Minimum string length: 1
from
string | null

Optional msg.sender override.

block
string
default:latest

Block tag or hex block number (default: latest).

Response

Successful Response

result
EthCallResult · object
required

Result of an eth_call proxy request.

success
boolean
default:true
suggestion
string
default:""
message
string
default:""
meta
PaginationMeta · object

Pagination metadata for list responses.

Supports both legacy offset-based and cursor-based pagination. Cursor fields (has_more, after, before) are populated for cursor-paginated endpoints. Legacy fields (offset, limit) are populated when the caller uses the deprecated offset parameter.