Unit ID
qy+WV9k1XWBEcdhqSchc/rbaKyElQ2XsIWu4SbFv924=
Received
03.09.2019 09:38:49
Confirmation delay (full node)
3 minutes 31 seconds
Confirmation delay (light node)
6 minutes 9 seconds
Messages
Definition
Definition: [ "autonomous agent", { "messages": { "cases": [ { "if": "{ // RED vs BLUE the contentious game by [email protected] // usage: // 1) register to one or both red / blue "choose address AA" // 2) wait for received payment from this AA and // 3) send 25000 to request for a new round and do step 2) // setup: // 1) two "choose address AA" and replace below $red and $blue addresses // issues: // 1) I tried to call $red and $blue at the same time, but wallet would crash, so change to calling $red then follow with $blue $red = "UQRQVOLKSAIDKV3PFTQNOQHWETJEDCX3"; $blue = "XRNRERYBLKBXO6SGLN3E4FCTQMFE2TQT"; $minimum = 3; if( !var[ $red ][ "count" ] AND !var[ $blue ][ "count" ]) bounce( "$red or $blue 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": "{ // RECEIVED BLUE NOW START ROUND trigger.address == $blue AND trigger.data.message == "redvsblue" AND trigger.data.choosen }", "messages": [ { "app": "state", "state": "{ var[ "blue" ] += 1; }" } ] }, { "if": "{ // RECEIVED RED NOW GET BLUE ADDRESS trigger.address == $red AND trigger.data.message == "redvsblue" AND trigger.data.choosen }", "messages": [ { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{ $blue }", "amount": 10000 } ] } }, { "app": "data", "payload": { "message": "redvsblue", "nosend": true } }, { "app": "state", "state": "{ var[ "red" ] += 1; }" } ] }, { "if": "{ // REQUEST NEW ROUND if( !trigger.data.message AND trigger.output[[ asset=base ]] < 22000 ) bounce( "need to send 22000 to request a new round"); !trigger.data.message }", "messages": [ { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{ $red }", "amount": 10000 } ] } }, { "app": "data", "payload": { "message": "redvsblue", "nosend": true } } ] }, { "messages": [ { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "HFNBIQTUNVMRM7PDP6NT2QRKLR62FOGR" } ] } } ] } ] } } ] } } ]
Technical information
Fees:
2,475 bytes
(353 headers, 2122 payload)
Level:1042288
Witnessed level:1042281
Main chain index:1041061
Latest included mc index:1041060
Status:stable/confirmed/final