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
0F8/XFfD25DqQdrAxIhDnH5IvtpcryEvMhGkPFBdRxI=
Received
24.10.2019 16:34:44
Confirmation delay (full node)
3 minutes 34 seconds
Authors
DPYEPM34AUBLZFLCJKKGSJ3R34373IUA
Children
l7VkYsbNkZZjzrdnVAEIbPIJejX7wIDzLa6FuU4AfPY=
Parents
RCG2f/A71gYzRKMEienlqQDnw1RcomNA8kEzUDE4JD0=
Messages
Definition
Address:
TVP5CG54ICOXUKZHSCW6YNJD6I6RT4OP
Definition:
[ "autonomous agent", { "init": "{ // Contest Runner by
[email protected]
// Open Transparent Contest // A contest creator creates this AA and set number of judges, deadline (last entry submission date), judgement (last judge vote date) // only the creator can register judges, using "judge":"judge_address" // anyone can register an entry into the contest before deadline date and set whatever parameters in Add send data... // duplicate entry is not allowed // AA will return an entry hash which should be communicated to the judge via side channel // judges can vote once anytime before judgement day, using "entry":"<above entry id>" // after judgement date, all input to this AA will bounce with winning entry announcement $creator = "HFNBIQTUNVMRM7PDP6NT2QRKLR62FOGR" ; // only one who can register judges $judges = 5 ; $deadline = "2019-10-28" ; // format must be yyyy-mm-dd $judgement = "2019-10-29" ; $judge = 'judge_' || trigger.address ; $today = timestamp ; $storage = 1000 ; if( $today > parse_date( $judgement ) ) bounce( "contest ended on " || $judgement || " best entry " || var[ "best_entry" ] ) ; }", "messages": { "cases": [ { "if": "{ trigger.address == $creator AND trigger.data.judge }", "init": "{ // REGISTER JUDGE if( var[ 'judges' ] > $judges ) bounce( 'max number of judges reached' ) ; if( var[ $judge ] ) bounce( 'judge already registered' ) ; }", "messages": [ { "app": "state", "state": "{ var[ 'judges' ] += 1 ; var[ $judge ] = "awaiting vote" ; }" } ] }, { "if": "{ var[ $judge ] }", "init": "{ // JUDGE VOTE $entry = trigger.data.entry ; if( !$entry ) bounce( 'missing entry' ) ; if( !var[ $entry || '_submitter' ] ) bounce( 'entry ' || $entry || "doesn't exists" ) ; if( var[ $judge ] != "awaiting vote" ) bounce( 'already voted' ) ; }", "messages": [ { "app": "state", "state": "{ // TODO handle changing vote //if( var[ $judge ] != "awaiting vote" ){ // $prior = var[ $judge ] ; // var[ $prior ] -= 1 ; // var[ "highest_rank" ] -= 1 ; // var[ "second_best" ] //} var[ $judge ] = $entry ; // save vote var[ $entry ] += 1 ; if( !var[ "highest_rank" ] ) var[ "highest_rank" ] = 0 ; if( var[ $entry ] > var[ "highest_rank" ] ){ var[ "best_entry" ] = $entry ; var[ "highest_rank" ] = var[ $entry ] ; } }" } ] }, { "messages": [ { "app": "state", "init": "{ // REGISTER ENTRY $entry = sha256( json_stringify( trigger.data ) ) ; }", "state": "{ if( $today > parse_date( $deadline ) ) bounce( "contest ended on " || $deadline || " awaiting judgement" ) ; if( var[ $entry ] ) bounce( "entry already exists" ) ; var[ $entry || '_submitter' ] = trigger.address ; var[ $entry || '_details' ] = json_stringify( trigger.data ) ; var[ $entry ] = 0 ; response[ "entry" ] = $entry ; }" } ] } ] } } ]
Witnesses
2FF7PSL7FYXVU5UIQHCVDTTPUOOG75GX
2GPBEZTAXKWEXMWCTGZALIZDNWS5B3V7
4H2AMKF6YO2IWJ5MYWJS3N7Y2YU2T4Z5
DFVODTYGTS3ILVOQ5MFKJIERH6LGKELP
ERMF7V2RLCPABMX5AMNGUQBAH4CD5TK4
F4KHJUCLJKY4JV7M5F754LAJX4EB7M4N
IOF6PTBDTLSTBS5NWHUSD7I2NHK3BQ2T
O4K4QILG6VPGTYLRAI2RGYRFJZ7N2Q2O
OPNUXBRSSQQGHKQNEPD2GLWQYEUY5XLD
PA4QK46276MJJD5DBOLIBMYKNNXMUVDP
RJDYXC4YQ4AZKFYTJVCR5GQJF5J6KPRI
WELOXP3EOA75JWNO6S5ZJHOO3EYFKPIR
Technical information
Fees:
3,377
bytes
(353 headers, 3024 payload)
Level:
1120589
Witnessed level:
1120582
Last ball unit:
VpinxY7bAN6sR3DXDzxYDtZstkcK1w//yiTt4i7UKVA=
Main chain index:
1119347
Latest included mc index:
1119346
Status:
stable/confirmed/final