Skip to main content

Simulate Escrow Release

Simulates the release of funds from an escrow.

query Router($token: String!, $amount: Int, $crossChainAddresses: [CrossChainUserWithLimitInput]) {
router {
simulate_release_escrow(token: $token, amount: $amount, cross_chain_addresses: $crossChainAddresses) {
remaining_amount
release_amounts {
amount
cross_chain_user {
user {
chain_uid
address
}
limit
}
}
}
}
}

Example

curl --request POST \
--header 'content-type: application/json' \
--url 'https://api.euclidprotocol.com/graphql' \
--data '{"query":"query Router($token: String!, $amount: Int, $crossChainAddresses: [CrossChainUserWithLimitInput]) {\n router {\n simulate_release_escrow(token: $token, amount: $amount, cross_chain_addresses: $crossChainAddresses) {\n remaining_amount\n release_amounts {\n amount\n cross_chain_user {\n user {\n chain_uid\n address\n }\n limit\n }\n }\n }\n }\n}","variables":{"token":"usdc","amount":10,"crossChainAddresses":[{"limit":null,"user":{"address":"nibi14hcxlnwlqtq75ttaxf674vk6mafspg8x3ky6ts","chain_uid":"ethereum"}}]}}'

Open in Playground

Arguments

  • token (String!): The token Id of the token to be released.
  • amount (Int): The amount of tokens to be released from the escrows.
  • cross_chain_addresses (CrossChainUserWithLimit): The destination addresses and amount (for each address) for the tokens released.

Return Fields

FieldTypeDescription
amountStringThe amount of tokens to release.
cross_chain_userCrossChainUserWithLimitThe address and limit for the receiving address of the funds.
remaining_amountStringAny remaining tokens after the escrow releases.