[
"autonomous agent",
{
"bounce_fees": {
"base": 10000
},
"init": "{
$owner='V3TNIM6Y6E6ARYA3IDHBUKGZJKO2FKQ2';
$aa='VLKI3XMMX5YULOBA6ZXBXDPI6TXF6V3D';
$asset='eCpmov+r6LOVNj8KD0EWTyfKPrqsG3i2GgxV4P+zE6A=';
}",
"messages": {
"cases": [
{
"if": "{ trigger.data.withdraw }",
"messages": [
{
"app": "payment",
"payload": {
"asset": "{trigger.data.asset}",
"outputs": [
{
"address": "{$owner}"
}
]
}
}
]
},
{
"if": "{ trigger.data.tokens2 AND trigger.address==$owner }",
"messages": [
{
"app": "payment",
"payload": {
"asset": "base",
"outputs": [
{
"address": "{$aa}"
}
]
}
},
{
"app": "data",
"payload": {
"tokens2": "{trigger.data.tokens2}"
}
}
]
},
{
"if": "{ trigger.output[[asset=$asset]]>0 AND trigger.address==$aa }",
"messages": [
{
"app": "payment",
"payload": {
"asset": "{$asset}",
"outputs": [
{
"address": "{$aa}"
}
]
}
}
]
},
{
"if": "{ trigger.output[[asset=$asset]]==0 AND trigger.address==$aa }",
"messages": [
{
"app": "payment",
"payload": {
"asset": "base",
"outputs": [
{
"address": "{$owner}"
}
]
}
}
]
}
]
}
}
]