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
90nD7cpaIgG2CZF/CDgrBuLYSnCSPsPyzn9doum4i3U=
Received
29.06.2020 16:06:41
Confirmation delay (full node)
44 minutes 17 seconds
Confirmation delay (light node)
1 hour 10 minutes 45 seconds
Authors
QF3NOVWHY2ZBVZZ2QHCUW7IPYXKLGIGG
Children
0kp9fPOyGCuuHhS9dRJNaZcuJJVDmkZjR+eM5mh1e2A=
Parents
8FByuGD8UtswaxDWFWygmNfnBHar/gCJSufcMO7NWJQ=
Messages
Definition
Address:
YVHAIFMATQKCRDYUIQKGCMR4OZ6IKIUD
Definition:
[ "autonomous agent", { "doc_url": "https://raw.githubusercontent.com/jldevelops/aa-lottery-oracle/master/description.json", "getters": "{ $ENTRY = => params.entry > 10000 ? params.entry : 10000; $TRIGGER_FEE = => params.trigger_fee; $ORACLE = => params.oracle; $FEED_NAME = => params.feed_name; $triggerPot = => var['tickets_sold'] * $TRIGGER_FEE(); $winnerPot = => var['tickets_sold'] * $ENTRY() - $triggerPot(); $actualWinner = => var['tickets_sold'] > 1 ? number_from_seed(data_feed[[oracles=$ORACLE(), feed_name=$FEED_NAME()]],var['tickets_sold']-1) : 0; $isWinnerTicket = $ti => var['amount_'||$ti[0]] ? (($ti[1]+0) <= var['winner_'||$ti[0]] AND ($ti[2]+0) > var['winner_'||$ti[0]]) : false; $now = => timestamp_to_string(timestamp, 'date'); $day = => var['today'] ? var['today'] : $now(); $isTriggerAvailable = => $now() != $day() AND var['tickets_sold'] > 0; }", "init": "{ $opFee = => (balance[base] - storage_size - var['user_bytes'] - trigger.output[[asset=base]]) > 20000 ? 0 : 5000; if(trigger.output[[asset!=base]].asset != 'none') bounce('no asset'); }", "messages": { "cases": [ { "if": "{trigger.data.trigger AND $isTriggerAvailable() AND trigger.output[[asset=base]] >= 10000}", "messages": [ { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{trigger.address}", "amount": "{$triggerPot() + trigger.output[[asset=base]] - $opFee()}" } ] } }, { "app": "state", "state": "{ $d = $day(); var['winner_'||$d] = $actualWinner(); var['amount_'||$d] = $winnerPot(); var['user_bytes'] -= $triggerPot(); var['today'] = $now(); var['tickets_sold'] = 0; response['message'] = 'Winner ticket '||$d||': '||var['winner_'||$d]; }" } ] }, { "init": "{ if($isTriggerAvailable()) bounce('Trigger reward available, send trigger = 1 to win '||$triggerPot()||' bytes'); if(trigger.data.trigger) bounce('Trigger reward not available'); $ticket = var[trigger.address]; if($ticket AND $ticket[0] == $day()) bounce('Address already registered'); }", "messages": [ { "if": "{$ticket AND $isWinnerTicket($ticket)}", "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{trigger.address}", "amount": "{var['amount_'||$ticket[0]] + trigger.output[[asset=base]] - $opFee()}" } ] } }, { "app": "state", "state": "{ if($ticket AND $isWinnerTicket($ticket)){ var['user_bytes'] -= var['amount_'||$ticket[0]]; var['amount_'||$ticket[0]] = false; var['winner_'||$ticket[0]] = false; response['message'] = 'You won '||$ticket[0]||' draw. Congratulations!'; } else{ if((trigger.output[[asset=base]] % $ENTRY()) != 0) bounce('Amount has to be multiple of '||$ENTRY()||' bytes. An address can buy tickets once a day.'); if(!var['today'] OR (var['tickets_sold'] == 0 AND $now() != $day())) var['today'] = $now(); $tickets = trigger.output[[asset=base]] / $ENTRY(); var[trigger.address] = [$day(), var['tickets_sold']+0, ($tickets + var['tickets_sold'])]; var['user_bytes'] += trigger.output[[asset=base]]; var['tickets_sold'] += $tickets; response['message'] = 'You bought '||$tickets||' tickets. Actual winner pot: '||$winnerPot()||' bytes. Actual trigger pot: '||$triggerPot()||' bytes'; } }" } ] } ] } } ]
Witnesses
2TO6NYBGX3NF5QS24MQLFR7KXYAMCIE5
4GDZSXHEFVFMHCUCSHZVXBVF5T2LJHMU
APABTE2IBKOIHLS2UNK6SAR4T5WRGH2J
DXYWHSZ72ZDNDZ7WYZXKWBBH425C6WZN
FAB6TH7IRAVHDLK2AAWY5YBE6CEBUACF
FOPUBEUPBC6YLIQDLKL6EW775BMV7YOH
GFK3RDAPQLLNCMQEVGGD2KCPZTLSG3HN
I2ADHGP4HL6J37NQAD73J7E5SKFIXJOT
JMFXY26FN76GWJJG7N36UI2LNONOGZJV
JPQKPRI5FMTQRJF4ZZMYZYDQVRD55OTC
TKT4UESIKTTRALRRLWS4SENSTJX6ODCW
UENJPVZ7HVHM6QGVGT6MWOJGGRTUTJXQ
Technical information
Fees:
4,407
bytes
(352 headers, 4055 payload)
Level:
5637316
Witnessed level:
5637306
Last ball unit:
qluUX//9voLe4dfWvD7i5G+6/daBdMsVN1GJkk77bUg=
Main chain index:
5494033
Latest included mc index:
5494029
Status:
stable/confirmed/final