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 Escrow($chainUid: String!, $tokenId: String) {
factory(chain_uid: $chainUid) {
escrow(token_id: $tokenId) {
escrow_address
denoms {
... on NativeTokenType {
native {
denom
}
}
... on SmartTokenType {
smart {
contract_address
}
}
... on VoucherTokenType {
voucher
}
}
}
}
}

Example​

curl --request POST \
    --header 'content-type: application/json' \
    --url 'https://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        ... on VoucherTokenType {\n          voucher\n        }\n      }\n    }\n  }\n}","variables":{"chainUid":"injective","tokenId":"usdt"}}'

Open in Playground

Arguments​

ArgumentTypeDescription
chainUidString!The unique identifier of the chain.
tokenIdStringThe ID of the token to get escrow information for.

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).
VoucherStringDetails about the Voucher token.

Native​

FieldTypeDescription
denomStringThe denomination of the native token.

Smart​

FieldTypeDescription
contractAddressStringThe contract address of the smart token.