Examples
No transfers
(define-public (no-transfers)
(ok "no transfer events executed.")
)const response = await request("stx_callContract", {
contract: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.post-conditions",
functionName: "no-transfers",
network: "devnet",
postConditions: [],
postConditionMode: "deny"
}) Single STX transfer
(define-public (single-stx-transfer)
(stx-transfer? u10000000 tx-sender (as-contract tx-sender))
) const stxPostCondition: StxPostCondition = {
type: 'stx-postcondition',
address: 'ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM',
condition: 'eq',
amount: '10000000',
};
const response = await request("stx_callContract", {
contract: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.post-conditions",
functionName: "single-stx-transfer",
functionArgs: [],
postConditionMode: "deny",
postConditions: [stxPostCondition],
network: "devnet"
})Multiple STX transfers
Mint and Burn Events
Uncertain asset transfer amount
Hidden asset transfers
Last updated
Was this helpful?