Definition: [
"autonomous agent",
{
"init": "{
$aa_to_test = "YJL3PUBGN3KYLB72R6MQDCH75MHLWXXG";
$unit_tester_address = "MYESSCFGDERS3YIEGNZDOG2BI5HKQHLU";
$listtest_name = "list1";
}",
"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.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": {
"account": "{"joint_account_1"}",
"amount": "{"555"}",
"address": "{"AGFB2ZNL4GEO2GEY4YSKNZX6U7XUGGPG"}"
}
},
{
"app": "payment",
"payload": {
"asset": "{'base'}",
"outputs": [
{
"address": "{$aa_to_test}",
"amount": "{trigger.output[[asset=base]] - 1000}"
}
]
}
}
]
},
{
"messages": [
{
"app": "state",
"state": "{
}"
}
]
}
]
}
}
]