[
"autonomous agent",
{
"bounce_fees": {
"base": 10000
},
"init": "{
$asset = var['asset'];
}",
"messages": {
"cases": [
{
"if": "{trigger.data.define AND !$asset}",
"messages": [
{
"app": "asset",
"payload": {
"is_private": false,
"is_transferrable": true,
"auto_destroy": true,
"fixed_denominations": false,
"issued_by_definer_only": true,
"cosigned_by_definer": false,
"spender_attested": false
}
},
{
"app": "state",
"state": "{
var['asset'] = response_unit;
response['asset'] = response_unit;
}"
}
]
},
{
"if": "{$asset AND trigger.data.send}",
"messages": [
{
"app": "payment",
"payload": {
"asset": "{$asset}",
"outputs": [
{
"address": "{trigger.address}",
"amount": "{1000}"
}
]
}
}
]
}
]
}
}
]