Unit ID
YThejwVuY475/QS1sx66+vKyZiEhTk5NYVxCRuHO5Yk=
Received
28.08.2019 15:22:31
Confirmation delay (full node)
4 minutes 23 seconds
Confirmation delay (light node)
5 minutes 31 seconds
Messages
Definition
Definition: [ "autonomous agent", { "messages": { "cases": [ { "if": "{ // select random registered address and send a message to it, by [email protected] // usage: // 1) interested parties sends 10000 to this AA to register address for future selection, they will be paid back when selected // 2) send 11000 and data.choose with a link or address to another AA which represent the job which the choosen address should do if( trigger.data.choose ){ if( !var[ "count" ] ) bounce( "There is currently no registered address to choose from"); if( trigger.output[ [ asset=base ]] < 11000 ) bounce( "need to send 11000 with data.choose"); if( var[ "count" ] == 1 ) $choose = 1; // special case, number from seed doesn't work with start = end else $choose = number_from_seed( trigger.address || "{timestamp}" , 1 , var[ "count" ] ); // SEMI RANDOM CHOOSE } trigger.data.choose }", "messages": [ { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{ var[ $choose || "" ] }", "amount": 10000 } ] } }, { "app": "data", "payload": { "job": "{trigger.data.choose}" } }, { "app": "state", "state": "{ response[ "message" ] = "job sent to choosed"; response[ "job" ] = "{ trigger.data.choose }"; response[ "choosed" ] = var[ $choose || "" ]; }" } ] }, { "messages": [ { "app": "state", "state": "{ if( var[ trigger.initial_address ] ) bounce( trigger.initial_address || " had registered with " || var [ trigger.initial_address ] || ", there are total of " || var[ "count" ] || " addresses to chose from "); // NEW REGISTRATION var[ "count" ] += 1; var[ var[ "count" ] || "" ] = trigger.initial_address; var[ trigger.initial_address ] = trigger.output[ [ asset = base ] ] ; response[ 'message' ] = trigger.initial_address || " registered, there are now " || var[ "count" ] || " addresses"; }" } ] } ] } } ]
Technical information
Fees:
2,325 bytes
(353 headers, 1972 payload)
Level:1030209
Witnessed level:1030202
Main chain index:1029022
Latest included mc index:1029021
Status:stable/confirmed/final