Skip to main content

Contracts

Queries contract information for the specified chain Id and Type.


query Contracts($type: String, $chainUId: String) {
chains {
contracts(type: $type, chainUId: $chainUId) {
ContractAddress
ChainUID
Type
}
}
}

Example

curl --request POST \
--header 'content-type: application/json' \
--url 'https://testnet.api.euclidprotocol.com/graphql' \
--data '{"query":"query Contracts($chainUId: String, $type: String) {\n chains {\n contracts(chainUId: $chainUId, type: $type) {\n ContractAddress\n ChainUID\n Type\n }\n }\n}","variables":{"chainUId":"coreum","type":"factory"}}'

Open in Playground

Arguments

  • chainUId (String): Optional chain to query for contracts. If not specified then all integrated chains are used.
  • type (String): Optional type for the contracts. If not specified, all contract types are returned.

Returned Fields

FieldTypeDescription
ContractAddressStringThe address of the contract on the blockchain.
ChainUIDStringThe unique identifier of the chain where the contract is deployed.
TypeStringThe type of the contract.