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
9NCxmfI7VjaNID6HeI8KWfjdQyKfYtx6sPXDk3WNl8s=
Received
16.02.2021 00:22:25
Confirmation delay (full node)
10 minutes 19 seconds
Confirmation delay (light node)
11 minutes 30 seconds
Authors
3Y24IXW57546PQAPQ2SXYEPEDNX4KC6Y
Children
EVEuRmM0IbTujJmdDE4As/4MmTkhHxWU1un0KWmCjIo=
Parents
HbyuMki0bogecLrBMqlYu97HZ3Y0x0HG1/HvCCBFwMA=
Messages
Definition
Address:
6UZ3XA5M6B6ZL5YSBLTIDCCVAQGSYYWR
Definition:
[ "autonomous agent", { "doc_url": "https://ostable.org/bonded-stablecoin-buffer.json", "init": "{ if (trigger.output[[asset!=base]]) bounce("only bytes payments are accepted"); if (!is_aa(params.curve_aa)) bounce("bad curve_aa"); if (!is_valid_address(params.address)) bounce("bad address"); $max_fee_percent = params.max_fee_percent OTHERWISE 1; if (typeof($max_fee_percent) != 'number') bounce("bad max_fee_percent"); $max_change_percent = params.max_change_percent OTHERWISE 0.5; if (typeof($max_change_percent) != 'number') bounce("bad max_change_percent"); }", "messages": { "cases": [ { "if": "{ trigger.data.execute }", "init": "{ $tokens2 = trigger.data.tokens2; if (!is_integer($tokens2) OR $tokens2 <= 0) bounce("bad tokens2"); if (balance[base] <= 1e5) bounce("buffer balance is too low"); }", "messages": [ { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{params.curve_aa}" } ] } }, { "app": "data", "payload": { "tokens2_to": "{params.address}", "max_fee_percent": "{$max_fee_percent}", "tokens2": "{$tokens2}", "ref": "{trigger.data.ref OTHERWISE ''}" } }, { "app": "state", "state": "{ var['executing_at'] = mci; var['sent'] = balance[base]; }" } ] }, { "if": "{trigger.address == params.curve_aa AND var['executing_at'] == mci}", "init": "{ $amount = trigger.output[[asset=base]]; // if the change is less than max_change_percent % of the purchase amount, send it to the user. // Otherwise, the remaining bytes can be used to buy more tokens2 $bSendBytes = ($amount >= 1000 AND $amount <= max($max_change_percent/100 * var['sent'], 1e5)); }", "messages": [ { "if": "{$bSendBytes}", "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{params.address}" } ] } }, { "app": "state", "state": "{ var['executing_at'] = false; var['sent'] = false; response['message'] = $bSendBytes ? "Done" : "Amount left: " || $amount; }" } ] }, { "messages": [ { "app": "state", "state": "{ // do nothing }" } ] } ] } } ]
Witnesses
2TO6NYBGX3NF5QS24MQLFR7KXYAMCIE5
4GDZSXHEFVFMHCUCSHZVXBVF5T2LJHMU
APABTE2IBKOIHLS2UNK6SAR4T5WRGH2J
DXYWHSZ72ZDNDZ7WYZXKWBBH425C6WZN
FAB6TH7IRAVHDLK2AAWY5YBE6CEBUACF
FOPUBEUPBC6YLIQDLKL6EW775BMV7YOH
GFK3RDAPQLLNCMQEVGGD2KCPZTLSG3HN
I2ADHGP4HL6J37NQAD73J7E5SKFIXJOT
JMFXY26FN76GWJJG7N36UI2LNONOGZJV
JPQKPRI5FMTQRJF4ZZMYZYDQVRD55OTC
TKT4UESIKTTRALRRLWS4SENSTJX6ODCW
UE25S4GRWZOLNXZKY4VWFHNJZWUSYCQC
Technical information
Fees:
2,644
bytes
(451 headers, 2193 payload)
Level:
7376394
Witnessed level:
7376366
Last ball unit:
N26bAy5yy3o/rpSdGtfUJ8mawLszonKFol43yIRQhW8=
Main chain index:
7063204
Latest included mc index:
7063203
Status:
stable/confirmed/final