Unit ID
eVE76nrqiJM9WE8uGS1g1y5WKP9BDy45kBBgbg0d2nI=
Received
18.08.2019 11:37:43
Confirmation delay (full node)
2 minutes 19 seconds
Confirmation delay (light node)
3 minutes 23 seconds
Messages
Definition
Definition: [ "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. $RAAndomore = "MR3GL4JFWF3UTTSN42LRPCPWZSABO7WR"; $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; // check if wealthy enough for another round; $existing_user_balance = var['balance_'||$user] otherwise 0; $user_balance = $existing_balance + trigger.output[[asset=base]]; $wealthy = ( $user_balance > $to_raa_price + $from_raa_price + $to_user_price); }", "messages": { "cases": [ { "if": "{$from_user}", "init": "{ if (var['rounds_'||$user]) bounce ("You have a randomisation in progress"); if (!$wealthy) bounce ('gimme more bytes (and an optional seed)'); $seed = trigger.data.seed otherwise sha256($user); }", "messages": [ { "app": "data", "payload": { "seed": "{$seed}", "address": "{$user}" } }, { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{$RAAndomore}", "amount": "{$from_raa_price}" } ] } }, { "app": "state", "state": "{ var['balance_'||$user] = $user_balance - $to_raa_price - $from_raa_price; var['rounds_'||$user] = 1; response['message'] = 'Randomisation in progress by $RAAndomore'; }" } ] }, { "if": "{$from_raa AND $wealthy}", "init": "{ }", "messages": [ { "app": "data", "payload": { "seed": "{trigger.data.rhash}", "address": "{$user}" } }, { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{$RAAndomore}", "amount": "{$from_raa_price}" } ] } }, { "app": "state", "state": "{ var['rounds_'||$user] += 1; }" } ] }, { "init": "{}", "messages": [ { "app": "data", "payload": { "rhash": "{trigger.data.rhash}" } }, { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{$user}", "amount": "{$user_balance}" } ] } }, { "app": "state", "state": "{ var['balance_'||$user] =false; response['message'] = 'rash after '||var['rounds_'||$user]||' round(s) is '|| trigger.data.rhash; var['rounds_'||$user] = false; }" } ] } ] } } ]
Technical information
Fees:
2,495 bytes
(353 headers, 2142 payload)
Level:1007765
Witnessed level:1007757
Main chain index:1006584
Latest included mc index:1006582
Status:stable/confirmed/final