Transfers view
UTXO view
Obyte.org
Unit Legend
- not on main chain, not stable
- main chain, not stable
- bad unit
- not on main chain, stable/confirmed/final
- main chain, stable/confirmed/final
- not on main chain, selected
- main chain, selected
Close
Close
Unit ID
o/at4QvCg8Wnfw5oY5S+T1ArszNmJMQBC2SFVP9wDp8=
Received
04.09.2019 15:07:19
Confirmation delay (full node)
3 minutes 7 seconds
Confirmation delay (light node)
4 minutes 42 seconds
Authors
DPYEPM34AUBLZFLCJKKGSJ3R34373IUA
Children
MhA/QreSQtbd3uAVn0KxAfFxNQRtpgOl/w2c7Roo6gM=
Parents
mTBYQlABWjKQ5wZer8DCbxl+4pxNSIo1wIB4H/4dTYY=
Messages
Definition
Address:
VRGQZN7EOW7GRB4E5CYQLE32HICKVVXT
Definition:
[ "autonomous agent", { "messages": { "cases": [ { "if": "{ // RED vs BLUE the contentious game by
[email protected]
// how to play: // 1) register to one or both $red / $blue "choose address AA" below // 2) wait for received 10,000 payment from this AA and check the response unit // which has data payload which indicates round, redplayer and blueplayer // 3) use that 10,000 and round number and send a payment back to this AA to vote // OR just be evil and take the amount // 4) anyone can send 25000 to request for a new round // setup: // 1) setup two "choose random address AA" with different salt and replace below $red and $blue addresses // 2) sign up more than below minimum players for both $red and $blue $red = "AQJ3KEVUHX22RUGLG5K7HCJTTBZC4BIT"; $blue = "QPI4YI2UZH5MEVGIWJR4FRWRUQ4XIUHK"; $minimum = 3; if( !var[ $red ][ "count" ] AND !var[ $blue ][ "count" ]) bounce( "$red or $blue AA missing 'count'"); 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( " Red = " || var[ 'red' ] || " vs Blue = " || var[ 'blue' ] ); $minimum >= 3 }", "messages": { "cases": [ { "if": "{ // REQUEST NEW ROUND if( !trigger.data.message AND !trigger.data.round AND trigger.output[[ asset=base ]] < 25000 ) bounce( "need to send 25000 to request a new round"); ( !trigger.data.message AND !trigger.data.round ) }", "messages": [ { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{ $red }", "amount": 10000 }, { "address": "{ $blue }", "amount": 10000 } ] } }, { "app": "data", "payload": { "message": "redvsblue", "nosend": true } } ] }, { "if": "{ // START ROUND , only possible from $red or $blue ( trigger.address == $red OR trigger.address == $blue ) AND trigger.data.message == "redvsblue" AND trigger.data.choosen }", "init": "{ if( trigger.address == $red AND var[ "blueaddr" ] AND ( var[ "redaddr" ] + 1 ) <= var[ "blueaddr" ] ){ $round = var[ "redaddr" ] + 1; // start round at red $sendred = trigger.data.choosen; // use message choose for red $sendblue = var[ "b" || $round ]; // use blue at round } if( trigger.address == $blue AND var[ "redaddr" ] AND ( var[ "blueaddr" ] + 1 ) <= var[ "redaddr" ] ){ $round = var[ "blueaddr" ] + 1; // start round at blue $sendred = var[ "r" || $round ]; $sendblue = trigger.data.choosen; } if( $round ) $message = "send 10,000 back to this unit's Authors within 12 hours with data { field: round , data: " || $round || " }"; }", "messages": [ { "if": "{ $round }", "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{ $sendred }", "amount": 10000 }, { "address": "{ $sendblue }", "amount": 10000 } ] } }, { "if": "{ $round }", "app": "data", "payload": { "message": "{$message}", "round ": "{$round}", "redplayer ": "{$sendred}", "blueplayer ": "{$sendblue}" } }, { "app": "state", "state": "{ if( $round ){ // duplicate data payload as response var[ "g" || $round ] = timestamp + 43200; // start countdown response[ "message" ] = $message; response[ "round" ] = $round; response[ "redplayer" ] = $sendred; response[ "blueplayer" ] = $sendblue; } if( trigger.address == $red ){ var[ "redaddr" ] += 1; // new red address var[ "r" || var[ "redaddr" ] ] = trigger.data.choosen; // save red address } if( trigger.address == $blue ){ var[ "blueaddr" ] += 1; // new blue address var[ "b" || var[ "blueaddr" ] ] = trigger.data.choosen; } }" } ] }, { "if": "{ // VOTE IN ROUND if( trigger.data.round ){ $round = trigger.data.round; if( !var[ "g" || $round ] ) bounce( "not a valid round"); if( ( !var[ "r" || $round ] OR var[ "r" || $round ] != trigger.address ) AND ( !var[ "b" || $round ] OR var[ "b" || $round ] != trigger.address ) ) bounce( "not a player in this round" ); if( var[ "g" || $round ] < timestamp ) bounce( "round is already over" ); } $round }", "messages": [ { "app": "state", "state": "{ if( var[ "r" || $round ] AND trigger.address == var[ "r" || $round ] ){ var[ "red" ] += 1; var[ "r" || $round ] = false; // clear redaddr } if( var[ "b" || $round ] AND trigger.address == var[ "b" || $round ] ){ var[ "blue" ] += 1; var[ "b" || $round ] = false; // clear blueaddr } response[ "red" ] = var[ "red" ]; response[ "blue" ] = var[ "blue" ]; //if( !var[ "r" || $round ] AND !var[ "b" || $round ] ) var[ "g" || $round ] = false; // both voted clear round }" } ] }, { "messages": [ { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "HFNBIQTUNVMRM7PDP6NT2QRKLR62FOGR" } ] } }, { "app": "state", "state": "{ if( !var[ "owner" ] ) var[ "owner" ] = "HFNBIQTUNVMRM7PDP6NT2QRKLR62FOGR"; }" } ] } ] } } ] } } ]
Witnesses
2FF7PSL7FYXVU5UIQHCVDTTPUOOG75GX
2GPBEZTAXKWEXMWCTGZALIZDNWS5B3V7
4H2AMKF6YO2IWJ5MYWJS3N7Y2YU2T4Z5
DFVODTYGTS3ILVOQ5MFKJIERH6LGKELP
ERMF7V2RLCPABMX5AMNGUQBAH4CD5TK4
F4KHJUCLJKY4JV7M5F754LAJX4EB7M4N
IOF6PTBDTLSTBS5NWHUSD7I2NHK3BQ2T
O4K4QILG6VPGTYLRAI2RGYRFJZ7N2Q2O
OPNUXBRSSQQGHKQNEPD2GLWQYEUY5XLD
PA4QK46276MJJD5DBOLIBMYKNNXMUVDP
RJDYXC4YQ4AZKFYTJVCR5GQJF5J6KPRI
WELOXP3EOA75JWNO6S5ZJHOO3EYFKPIR
Technical information
Fees:
5,632
bytes
(353 headers, 5279 payload)
Level:
1045500
Witnessed level:
1045493
Last ball unit:
+C7GKnxGuJfv26cAl5h8xHNAdSke5nHhKIsMW5EMNWY=
Main chain index:
1044273
Latest included mc index:
1044272
Status:
stable/confirmed/final