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

NameTypeDescription
chainUIdStringOptional chain to query for contracts. If not specified, all integrated chains are used.
typeStringOptional type of contracts. If not specified, all contract types are returned.

Return 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.