API Reference

Execute a query function on a contract

posthttps://api.circle.com/v1/w3s/contracts/query

  • Reference
  • Playground

Query the state of a contract by providing the address and blockchain.

Body parameters
blockchain
string
Required

The blockchain network that the resource is to be created on or is currently on. Required along with sourceAddress if you don't provide walletId. The blockchain and walletId fields are mutually exclusive.

Allowed valuesETHETH-SEPOLIAMATICMATIC-AMOYARBARB-SEPOLIAUNIUNI-SEPOLIABASEBASE-SEPOLIAOPOP-SEPOLIA
address
string
Required

Address of the contract to be queried.

abiFunctionSignature
string

The contract ABI function signature or callData field is required for interacting with the smart contract. The ABI function signature cannot be used simultaneously with callData. e.g. burn(uint256)

abiParameters
array of strings, integers, booleans, arrays

The contract ABI function signature parameters for executing the contract interaction. Supported parameter types include string, integer, boolean, and array. These parameters should be used exclusively with the abiFunctionSignature and cannot be used with callData.

option 1: string
option 2: integer
option 3: boolean
option 4: array
abiJson
string

The contract's ABI in a JSON stringified format.

callData
string

CallData is input data that encodes method and parameters.

fromAddress
string

FromAddress is the address that will populate msg.sender in the contract call.

Response
RequestChoose a language
ResponseChoose an example
1{
2  "data": {
3    "outputValues": [],
4    "outputData": ""
5  }
6}
Did this page help you?
© 2023-2025 Circle Technology Services, LLC. All rights reserved.