[
"autonomous agent",
{
"bounce_fees": {
"base": 10000
},
"init": "{
// RAAdomoney: the more money, the more random.
// Base on the functionnal funds you provide to RAAdomoney, it will trigger several rounds of randomisation with RAAndomore at a pace depending on the DAG confirmation time.
// As RAAndomore uses several data feeds that vary in time and as it is triggered at a time that cannot be predicted because depending of the speed of the DAG, the randomness is insure.
$loopaa = "
XYK5Q3T57HEZO46ANT2ZLVDHZTM6DDD4";
$to_raa_price = 1000;
$from_raa_price = 1000;
$to_user_price = 1000;
// rooting;
$from_raa = trigger.address == $RAAndomore;
$from_user = !$from_randomiser;
$user = ($from_raa) ? trigger.data.address : trigger.address;
}",
"messages": {
"cases": [
{
"if": "{ $from_user OR ($from_raa AND ( balance[base] > 3000 ) ) }",
"init": "{}",
"messages": [
{
"app": "data",
"payload": {
"input": "{trigger.data.input}",
"address": "{$user}"
}
},
{
"app": "payment",
"payload": {
"asset": "base",
"outputs": [
{
"address": "{$loopaa}",
"amount": "{$from_raa_price}"
}
]
}
},
{
"app": "state",
"state": "{}"
}
]
},
{
"init": "{}",
"messages": [
{
"app": "data",
"payload": {
"input": "{trigger.data.input}"
}
},
{
"app": "payment",
"payload": {
"asset": "base",
"outputs": [
{
"address": "{$user}",
"amount": "{balance[base]}"
}
]
}
},
{
"app": "state",
"state": "{}"
}
]
}
]
}
}
]