Unit ID
vBTaPDusIwyA5xsrrvY8dUWvqnuhJSQKkrrn8sFCQaM=
Received
02.09.2019 09:52:28
Confirmation delay (full node)
1 minute 52 seconds
Confirmation delay (light node)
4 minutes 16 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 am doing $red = "UQRQVOLKSAIDKV3PFTQNOQHWETJEDCX3"; $blue = "XRNRERYBLKBXO6SGLN3E4FCTQMFE2TQT"; $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": "{ // START ROUND, must be called from $red or $blue ( trigger.address == $red OR trigger.address == $blue ) AND trigger.data.message == "redvsblue" AND trigger.data.choosen }", "messages": { "cases": [ { "if": "{ trigger.address == $red }", "messages": [ { "app": "state", "state": "{ var[ "red" ] += 1; }" } ] }, { "if": "{ trigger.address == $blue }", "messages": [ { "app": "state", "state": "{ var[ "blue" ] += 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 }, { "address": "{ $blue }", "amount": 10000 } ] } }, { "app": "data", "payload": { "message": "redvsblue", "nosend": true } } ] }, { "messages": [ { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "HFNBIQTUNVMRM7PDP6NT2QRKLR62FOGR" } ] } } ] } ] } } ] } } ]
Technical information
Fees:
2,315 bytes
(353 headers, 1962 payload)
Level:1040174
Witnessed level:1040166
Main chain index:1038959
Latest included mc index:1038958
Status:stable/confirmed/final