Unit ID
sIviZoOsAKoEw/+GieAizcoUrjtexDYv9K99HkbDCCA=
Received
02.09.2019 10:09:54
Confirmation delay (full node)
3 minutes 35 seconds
Confirmation delay (light node)
4 minutes 35 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": [ { "app": "state", "state": "{ if( trigger.address == $red ) var[ "red" ] += 1; if( trigger.address == $blue ) 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,274 bytes
(353 headers, 1921 payload)
Level:1040264
Witnessed level:1040256
Main chain index:1039049
Latest included mc index:1039048
Status:stable/confirmed/final