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
8SzH5tQI5l7002fBvt6ohfmaWIQK3KLrf5lqRIrHBUE=
Received
03.09.2020 18:49:57
Confirmation delay (full node)
2 minutes 52 seconds
Confirmation delay (light node)
4 minutes 58 seconds
Authors
EJC4A7WQGHEZEKW6RLO7F26SAR4LAQBU
Children
yX+b58vQ29wvXSoPjFVV9F7schX95H2JZiCtcSl2niI=
Parents
Qx8Cc5+Jh7/A24DDBZJOT+HnwrANOteRLso3zY1tZps=
Messages
Definition
Address:
6DD4WXPNL7LPLQFFAEES7FACFTXSA347
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"); }", "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}" } }, { "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_change_percent/100 * var['sent']); }", "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
2FF7PSL7FYXVU5UIQHCVDTTPUOOG75GX
2GPBEZTAXKWEXMWCTGZALIZDNWS5B3V7
4H2AMKF6YO2IWJ5MYWJS3N7Y2YU2T4Z5
DFVODTYGTS3ILVOQ5MFKJIERH6LGKELP
ERMF7V2RLCPABMX5AMNGUQBAH4CD5TK4
F4KHJUCLJKY4JV7M5F754LAJX4EB7M4N
IOF6PTBDTLSTBS5NWHUSD7I2NHK3BQ2T
O4K4QILG6VPGTYLRAI2RGYRFJZ7N2Q2O
OPNUXBRSSQQGHKQNEPD2GLWQYEUY5XLD
PA4QK46276MJJD5DBOLIBMYKNNXMUVDP
RJDYXC4YQ4AZKFYTJVCR5GQJF5J6KPRI
WELOXP3EOA75JWNO6S5ZJHOO3EYFKPIR
Technical information
Fees:
2,527
bytes
(452 headers, 2075 payload)
Level:
1594209
Witnessed level:
1594202
Last ball unit:
WieTKouIXiFpNzPUcDAaD0FsUXnp/XXXea11EZYwiIQ=
Main chain index:
1586968
Latest included mc index:
1586967
Status:
stable/confirmed/final