Unit ID
3qlXP9k0qJn6ci32JGO8Bc532CbGqqdWewW9FofVc44=
Received
22.10.2019 06:23:29
Confirmation delay (full node)
3 minutes 43 seconds
Messages
Definition
Definition: [ "autonomous agent", { "messages": { "cases": [ { "if": "{ // Obotic / MicroGrid by [email protected] // My best entry, combines techniques from all my previous AA, structure based on REDvsBLUE // 1) Scientist send args to be processed by obots $obots = "5IZAANLACSTY5ILLCJ6N5P4OX73ZWRJY" ; // Select Random Registered Address AA $minimum = 3 ; $storage = 1000 ; if( !var[ $obots ][ "count" ] ) bounce( "$obots AA missing 'count'") ; if( var[ $obots ][ "count" ] < $minimum ) bounce( "waiting for obots=" || $obots || " to have " || $minimum || " obots" ) ; if( trigger.data.computation_rounds ) bounce( " computation_rounds = " || var[ 'computation_rounds' ] ) ; $minimum >= 3 }", "messages": { "cases": [ { "if": "{ // REQUEST NEW ROUND if( !trigger.data.message AND !trigger.data.round AND trigger.output[[asset=base]] < 25000 ) bounce( "need to send minimum 25000 to request a new round"); // TODO check for trigger.data.args ( !trigger.data.message AND !trigger.data.round ) // means not messages from obots nor obot }", "messages": [ { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{ $obots }", "amount": "{ trigger.output[[asset=base]] - $storage }" } ] } }, { "app": "data", "payload": { "message": "obotic", "nosend": true } } ] }, { "if": "{ // START ROUND if ( trigger.address == $obots AND trigger.data.message AND trigger.data.choosen ){ $check = json_parse( trigger.data.message ) ; //if( !$message.round ) $message.round = var[ "round" ] + 1 ; if( !$check.round ) $message = "{ args: " || $message.args || ", round: " || ( var[ "round" ] + 1 ) || " }" ; else $message = "{ args: " || $message.args || ", round: " || $check.round || " }" ; $cruncher = trigger.data.choosen ; } ( trigger.address == $obots AND trigger.data.message AND trigger.data.choosen ) }", "messages": [ { "if": "{ trigger.output[[asset=base]] > 1000 }", "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{ $obots }", "amount": "{ trigger.output[[asset=base]] - $storage }" } ] } }, { "if": "{ trigger.output[[asset=base]] > 1000 }", "app": "data", "payload": { "message": "{ trigger.data.message }", "nosend": true } }, { "app": "state", "state": "{ // TASK JOB TRACKER response[ "message" ] = $message ; /* if( $round ){ var[ "g" || $round ] = timestamp + 43200; // start countdown response[ "message" ] = $message; response[ "round" ] = $round; response[ "redplayer" ] = $sendred; response[ "blueplayer" ] = $sendblue; } if( trigger.address == $obots ){ var[ "redaddr" ] += 1; // new red address var[ "r" || var[ "redaddr" ] ] = trigger.data.choosen; // save red address } if( trigger.address == $blue ){ var[ "blueaddr" ] += 1; // new blue address var[ "b" || var[ "blueaddr" ] ] = trigger.data.choosen; } */ }" } ] } ] } } ] } } ]
Technical information
Fees:
3,514 bytes
(353 headers, 3161 payload)
Level:1114440
Witnessed level:1114432
Main chain index:1113199
Latest included mc index:1113198
Status:stable/confirmed/final