Unit ID
mY4KiXiwnKXlwELiYls+6q+Hn1vkR0X+Nb5Msynj5nI=
Received
30.08.2019 10:28:58
Confirmation delay (full node)
5 minutes 26 seconds
Confirmation delay (light node)
10 minutes 52 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 = "XV7T64HGBBEWJKUXIYNCWDFW6YNK4BKY"; $blue = "XV7T64HGBBEWJKUXIYNCWDFW6YNK4BKY"; $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; if( var[ 'red' ] AND var[ 'blue' ] ) var[ 'round' ] += 1; var[ 'red' ] += 1; var[ 'blue' ] += 1; response[ 'message' ] = "Round " || var[ 'round' ] || " Red = " || var[ 'red' ] || " vs Blue = " || var[ 'blue' ]; }" } ] }, { "if": "{ if( trigger.output[[ asset=base ]] < 23000 ) bounce( "need to send 23000 to request a new round"); trigger.output[[ asset=base ]] >= 23000 }", "messages": [ { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{$red}", "amount": 11000 }, { "address": "{$blue}", "amount": 11000 }, { "address": "{trigger.address}", "amount": "{ trigger.output[[asset=base]] - 22000 }" } ] } }, { "app": "data", "payload": { "message": "choosen" } } ] } ] } } ] } } ]
Technical information
Fees:
2,341 bytes
(353 headers, 1988 payload)
Level:1033999
Witnessed level:1033992
Main chain index:1032811
Latest included mc index:1032810
Status:stable/confirmed/final