[
"autonomous agent",
{
"init": "{
$aa_to_test = "
TKQZLI2CPA4WTTFG4ZBQJWRKNDPDRESO";
$listtest_name = "jaaws";
}",
"messages": {
"cases": [
{
"if": "{ trigger.data.c }",
"messages": [
{
"app": "data",
"payload": {
"create": "{$listtest_name}"
}
},
{
"app": "payment",
"payload": {
"asset": "{'base'}",
"outputs": [
{
"address": "{$aa_to_test}",
"amount": "{trigger.output[[asset=base]] - 1000}"
}
]
}
}
]
},
{
"if": "{ trigger.data.cp }",
"messages": [
{
"app": "data",
"payload": {
"create": "{$listtest_name}",
"public": "{true}"
}
},
{
"app": "payment",
"payload": {
"asset": "{'base'}",
"outputs": [
{
"address": "{$aa_to_test}",
"amount": "{trigger.output[[asset=base]] - 1000}"
}
]
}
}
]
},
{
"if": "{ trigger.data.aa }",
"init": "{
$listcount = var[$aa_to_test][$listtest_name||"_count"];
}",
"messages": [
{
"app": "data",
"payload": {
"list_name": "{$listtest_name}",
"add": "{"element999"}"
}
},
{
"app": "payment",
"payload": {
"asset": "{'base'}",
"outputs": [
{
"address": "{$aa_to_test}",
"amount": "{trigger.output[[asset=base]] - 1000}"
}
]
}
}
]
},
{
"if": "{ trigger.data.a }",
"init": "{
$listcount = var[$aa_to_test][$listtest_name||"_count"];
}",
"messages": [
{
"app": "data",
"payload": {
"list_name": "{$listtest_name}",
"add": "{"element"||($listcount+1)}"
}
},
{
"app": "payment",
"payload": {
"asset": "{'base'}",
"outputs": [
{
"address": "{$aa_to_test}",
"amount": "{trigger.output[[asset=base]] - 1000}"
}
]
}
}
]
},
{
"if": "{ trigger.data.r }",
"init": "{
}",
"messages": [
{
"app": "data",
"payload": {
"remove_last": "{$listtest_name}"
}
},
{
"app": "payment",
"payload": {
"asset": "{'base'}",
"outputs": [
{
"address": "{$aa_to_test}",
"amount": "{trigger.output[[asset=base]] - 1000}"
}
]
}
}
]
},
{
"if": "{ trigger.data.d }",
"messages": [
{
"app": "data",
"payload": {
"delete": "{$listtest_name}"
}
},
{
"app": "payment",
"payload": {
"asset": "{'base'}",
"outputs": [
{
"address": "{$aa_to_test}",
"amount": "{trigger.output[[asset=base]] - 1000}"
}
]
}
}
]
},
{
"messages": [
{
"app": "state",
"state": "{
}"
}
]
}
]
}
}
]