Query the state of a contract by providing the address and blockchain.
Represents the input parameters for deploying a contract.
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).
The contract's ABI in a JSON stringified format.
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
.
Address of the contract to be queried.
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.
CallData is input data that encodes method and parameters.
FromAddress is the address that will populate msg.sender in the contract call.
1const response = await client.queryContract({
2 blockchain: "MATIC-AMOY",
3 address: "0xfea0e6a371a0eb204dbfae2ee38eeedeebe15ed7",
4 callData: "0x0000000000000000000000000000000000000000000000000000000000000000",
5})
6console.log(response.data)
1{
2 "data": {
3 "outputValues": [],
4 "outputData": ""
5 }
6}