generate_fungible_post_condition
Create mandatory SIP-010 fungible token transfer post-conditions for Stacks blockchain transactions, ensuring secure token operations by specifying conditions like amount equality or comparison.
Instructions
Generate a fungible token post-condition for SIP-010 tokens. Post-conditions are MANDATORY for all token transfers.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
amount | Yes | The token amount in base units | |
assetName | Yes | The token asset name (usually same as contract name) | |
conditionCode | Yes | The condition type (usually 'equal' for exact transfers) | |
contractAddress | Yes | The token contract address | |
contractName | Yes | The token contract name | |
principal | Yes | The Stacks address for the post-condition |
Input Schema (JSON Schema)
{
"properties": {
"amount": {
"description": "The token amount in base units",
"type": "number"
},
"assetName": {
"description": "The token asset name (usually same as contract name)",
"type": "string"
},
"conditionCode": {
"description": "The condition type (usually 'equal' for exact transfers)",
"enum": [
"equal",
"greater",
"greater_equal",
"less",
"less_equal"
],
"type": "string"
},
"contractAddress": {
"description": "The token contract address",
"type": "string"
},
"contractName": {
"description": "The token contract name",
"type": "string"
},
"principal": {
"description": "The Stacks address for the post-condition",
"type": "string"
}
},
"required": [
"principal",
"conditionCode",
"amount",
"contractAddress",
"contractName",
"assetName"
],
"type": "object"
}