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
3MWHs5JamZafE08UxSNBLvYbThSSDjhS07hul0+jVMo=
Received
24.06.2020 09:21:56
Confirmation delay (full node)
16 minutes 29 seconds
Confirmation delay (light node)
24 minutes 37 seconds
Authors
W7UTUEDCATSMB7SZ6ZH763MAXMFSUBQB
Children
WNzqKvFxfkIPvRU3cm7Ed4Q8ayJ7PVFEYF9DbApzdvQ=
Parents
kEPFXGD4Y9URzBjpw9Boslq04GWSi+VRm/ZHiKoi0Ck=
Messages
Definition
Address:
VRGX5IP3XFGEG43YR2XJAKNMLOV2FMY2
Definition:
[ "autonomous agent", { "bounce_fees": { "base": 10000 }, "init": "{ $type = trigger.data.type; if(!exists($type)){ bounce("'type' required"); } $owner = params.owner; $asset = params.asset; $goal = params.goal; $days = params.days; $unit = params.unit; $start_timestamp = params.timestamp; $balance = var['balance'] OTHERWISE 0; }", "messages": { "cases": [ { "if": "{$type == 'addReward'}", "init": "{ if($owner != trigger.address){ bounce("you are not admin"); } $unit_data = unit[$unit].messages[[.app='data']].payload; $amount = trigger.data.amount; if(exists($unit_data['reward_' || $amount]) OR exists(var['reward_' || $amount])){ bounce('reward already exists'); } }", "messages": [ { "app": "state", "state": "{ var['reward_' || $amount] = 1; response['result'] = 'new_reward:' || $amount; }" } ] }, { "if": "{$type == 'buy'}", "init": "{ $amount = trigger.output[[asset=$asset]]; if(!exists($amount)){ if(exists(var['O6H6ZIFI57X3PLTYHOCVYPP5A553CYFQ']['a2s_' || $asset])) { $name = var['O6H6ZIFI57X3PLTYHOCVYPP5A553CYFQ']['a2s_' || $asset]; } else { $name = $asset; } bounce("Donations can only occur in " || $name); } $unit_data = unit[$unit].messages[[.app='data']].payload; $unit_reward = $unit_data['reward_' || $amount]; $local_reward = var['reward_' || $amount]; $finish_timestamp = (86400 * $days) + $start_timestamp; if(timestamp > $finish_timestamp){ bounce("project finished"); } }", "messages": [ { "app": "state", "state": "{ if(!exists($unit_reward) AND !exists($local_reward)){ response['result'] = 'gratuitous donation'; } else { response['result'] = 'reward_amount'; } var['balance'] += $amount; var['amount_' || trigger.address] += $amount; response['amount'] = $amount; }" } ] }, { "if": "{$type == 'withdraw'}", "init": "{ if($owner != trigger.address){ bounce("you are not admin"); } if($balance < $goal){ bounce("goal not reached"); } $withdrawn = var['withdrawn'] OTHERWISE 0; if($balance - $withdrawn <= 0){ bounce('not enough money'); } }", "messages": [ { "app": "payment", "payload": { "asset": "{$asset}", "outputs": [ { "address": "{trigger.address}", "amount": "{$balance - $withdrawn}" } ] } }, { "app": "state", "state": "{ var['withdrawn'] += $balance - $withdrawn; }" } ] }, { "if": "{$type == 'refund'}", "init": "{ $finish_timestamp = (86400 * $days) + $start_timestamp; if(timestamp < $finish_timestamp){ bounce("project didn't finish"); } if($balance >= $goal){ bounce("goal achieved"); } $peer_amount = var['amount_' || trigger.address] OTHERWISE 0; if($peer_amount > 0){ bounce("I do not have your money"); } }", "messages": [ { "app": "payment", "payload": { "asset": "{$asset}", "outputs": [ { "address": "{trigger.address}", "amount": "{$peer_amount}" } ] } }, { "app": "state", "state": "{ var['amount_' || trigger.address] = false; response['result'] = 'done'; }" } ] } ] } } ]
Witnesses
2TO6NYBGX3NF5QS24MQLFR7KXYAMCIE5
4GDZSXHEFVFMHCUCSHZVXBVF5T2LJHMU
APABTE2IBKOIHLS2UNK6SAR4T5WRGH2J
DXYWHSZ72ZDNDZ7WYZXKWBBH425C6WZN
FAB6TH7IRAVHDLK2AAWY5YBE6CEBUACF
FOPUBEUPBC6YLIQDLKL6EW775BMV7YOH
GFK3RDAPQLLNCMQEVGGD2KCPZTLSG3HN
I2ADHGP4HL6J37NQAD73J7E5SKFIXJOT
JMFXY26FN76GWJJG7N36UI2LNONOGZJV
JPQKPRI5FMTQRJF4ZZMYZYDQVRD55OTC
TKT4UESIKTTRALRRLWS4SENSTJX6ODCW
UENJPVZ7HVHM6QGVGT6MWOJGGRTUTJXQ
Technical information
Fees:
3,336
bytes
(352 headers, 2984 payload)
Level:
5626066
Witnessed level:
5626057
Last ball unit:
T3wXjt/FZAh4tbwPAYleE5U5cY3RuPCa4G83vWmQZpk=
Main chain index:
5482825
Latest included mc index:
5482824
Status:
stable/confirmed/final