Unit ID
jeq48wwpU2ZyKf837Oc3F9vzf4HK6Sw64MYXpPkgZ5Q=
Received
30.08.2019 11:27:30
Confirmation delay (full node)
7 minutes 46 seconds
Confirmation delay (light node)
12 minutes 26 seconds
Messages
Definition
Definition: [ "autonomous agent", { "messages": { "cases": [ { "if": "{ // RED vs BLUE the contentious game by [email protected] // usage // 1) setup two "choose address AA" and replace below $red and $blue addresses $red = "HTA4ZCRPIPCZ3S22LTUUWDWLP6PYLJY5"; $blue = "HTA4ZCRPIPCZ3S22LTUUWDWLP6PYLJY5"; $minimum = 3; if( !var[ $red ][ "count" ] AND !var[ $blue ][ "count" ]) bounce( "choose address AA not yet setup"); if( var[ $red ][ "count" ] < $minimum OR var[ $blue ][ "count" ] < $minimum ) bounce( "waiting for red=" || $red || " or blue=" || $blue || " sides to have " || $minimum || " players" ); if( trigger.data.needle ) bounce( "Round " || var[ 'round' ] || " Red = " || var[ 'red' ] || " vs Blue = " || var[ 'blue' ] ); $minimum }", "messages": { "cases": [ { "if": "{ trigger.data.round }", "messages": [ { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{$red}", "amount": 11000 }, { "address": "{$blue}", "amount": 11000 } ] } } ] }, { "if": "{ ( trigger.address == $red OR trigger.address == $blue ) AND trigger.data.message == "choosen" }", "messages": [ { "app": "state", "state": "{ if( trigger.address == $red ) var[ 'red' ] = trigger.data.choosen; if( trigger.address == $blue ) var[ 'blue' ] = trigger.data.choosen; var[ 'round' ] += 1; response[ 'message' ] = "Round " || var[ 'round' ] || " Red = " || var[ 'red' ] || " vs Blue = " || var[ 'blue' ]; }" } ] }, { "if": "{ if( trigger.output[[ asset=base ]] < 22000 ) bounce( "need to send 22000 to request a new round"); trigger.output[[ asset=base ]] >= 22000 }", "messages": [ { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{$red}", "amount": 11000 }, { "address": "{$blue}", "amount": 11000 } ] } }, { "app": "data", "payload": { "message": "choosen" } } ] } ] } } ] } } ]
Technical information
Fees:
2,166 bytes
(353 headers, 1813 payload)
Level:1034112
Witnessed level:1034104
Main chain index:1032924
Latest included mc index:1032923
Status:stable/confirmed/final