Skip to main content

Escrow

Queries escrow information for a factory contract on a specified blockchain, including the escrow address and details about the denominations.

query Factory($chainUid: String!, $tokenId: String) {
factory(chain_uid: $chainUid) {
escrow(token_id: $tokenId) {
escrow_address
denoms {
... on NativeTokenType {
native {
denom
}
}
... on SmartTokenType {
smart {
contract_address
}
}
}
}
}
}

Example

curl --request POST \
--header 'content-type: application/json' \
--url 'https://testnet.api.euclidprotocol.com/graphql' \
--data '{"query":"query Escrow($chainUid: String!, $tokenId: String) {\n factory(chain_uid: $chainUid) {\n escrow(token_id: $tokenId) {\n escrow_address\n denoms {\n ... on NativeTokenType {\n native {\n denom\n }\n }\n ... on SmartTokenType {\n smart {\n contract_address\n }\n }\n }\n }\n }\n}","variables":{"chainUid":"nibiru","tokenId":"nibi"}}'

Open in Playground

Arguments

  • chainUid (String!): The unique identifier of the chain.
  • token_id (String!): The Id of the token to query in the escrow.

Return Fields

FieldTypeDescription
escrow_addressStringThe contract address of the escrow contract.
denomsDenomsThe denominations associated with the escrow.

Denoms

FieldTypeDescription
nativeNativeDetails of the native tokens (Denoms).
smartSmartDetails of the CW20 tokens (Contract addresses).

Native

FieldTypeDescription
denomStringThe denomination of the native token.

Smart

FieldTypeDescription
contractAddressStringThe contract address of the smart token.