[
"autonomous agent",
{
"bounce_fees": {
"base": 10000
},
"init": "{
$aa = "
XYK5Q3T57HEZO46ANT2ZLVDHZTM6DDD4";
$count = var['count'] otherwise 0;
}",
"messages": {
"cases": [
{
"if": "{ trigger.address == $aa}",
"init": "{}",
"messages": [
{
"app": "data",
"payload": {
"input": "{trigger.data.input}"
}
},
{
"app": "payment",
"payload": {
"asset": "base",
"outputs": [
{
"address": "{trigger.data.address}",
"amount": "{balance[base]-1000}"
}
]
}
},
{
"app": "state",
"state": "{
var['count'] = false;
}"
}
]
},
{
"init": "{}",
"messages": [
{
"app": "data",
"payload": {
"input": "{trigger.data.input}",
"address": "{trigger.address}"
}
},
{
"app": "payment",
"payload": {
"asset": "base",
"outputs": [
{
"address": "{$aa}",
"amount": 1000
}
]
}
},
{
"app": "state",
"state": "{ var['count'] = $count +1;}"
}
]
}
]
}
}
]