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
2K1m0QwCCGoMwbqH4NTkvLahaD7TlXciwbB9bdooIsg=
Received
21.09.2021 04:22:36
Confirmation delay (full node)
1 minute 17 seconds
Confirmation delay (light node)
3 minutes 52 seconds
Authors
T2I6RLGGJ25KSJZKRNZZH52VMEAQ3722
Children
1+lrGstgudePtUqHhJDJqn0H7sbXlMKqfJFNZ+a0J2E=
Parents
x9MG9vZSmfZWOwRZsTTpjnoy1tOTzM0FQbscuPyffA8=
Messages
Definition
Address:
I4UUJEAWHMZFW6KJRPD2NOQIZTDTBQWR
Definition:
[ "autonomous agent", { "bounce_fees": { "base": 10000 }, "init": "{ $POOL_BASE_AA = "5DNICJLNOBPANH536Y7YVBN5ZDBLQ4LE"; $definition = definition[trigger.data["_pl"]][1]; $asset = trigger.output[[asset!="base"]].asset == "none" ? trigger.output[[asset!="base"]].asset : "base"; if (definition["base_aa"] != $POOL_BASE_AA) bounce("That pool version is unsupported"); if (NOT trigger.data["_fwto"]) bounce("_fwto field is mandatory"); if (NOT is_valid_address(trigger.data["_fwto"])) bounce("_fwto field is not a valid address"); if (trigger.output[[asset!="base"]].asset == "ambiguous") bounce("AAs cannot handle payments with multiple assets"); if (NOT trigger.data["_opr"]) bounce("_opr field is mandatory"); if (NOT is_valid_amount(trigger.data["_opr"])) bounce("_opr must be a positive amount"); $getAmount = ($outputAmount, $outputReserve, $inputReserve, $fee)=>{ $swapNoFee = 1e11 - $fee; $numerator = $outputAmount * $inputReserve * 1e11; $denominator = ($outputReserve - $outputAmount) * $swapNoFee; return ceil($numerator / $denominator, 0); }; $calculateNeededAmount = ()=>{ $asset0 = definition["params"]["asset0"]; $asset1 = definition["params"]["asset1"]; $fee = definition["params"]["swap_fee"]; $buy = $asset == $asset0; $reserve0 = balance[trigger.data["_pl"]][$asset0]; $reserve1 = balance[trigger.data["_pl"]][$asset1]; if ($buy) return $getAmount(trigger.data["_opr"], $reserve1, $reserve0, $fee); return $getAmount(trigger.data["_opr"], $reserve0, $reserve1, $fee); }; $price = $calculateNeededAmount(); $remaining = trigger.output[[asset=$asset]].amount - $price; }", "messages": [ { "app": "payment", "payload": { "asset": "{$asset}", "outputs": [ { "address": "{trigger.initial_address}", "amount": "{$remaining}" }, { "address": "{trigger.data["_fwto"]}", "amount": "{$price}" } ] } }, { "app": "data", "payload": { "to": "{trigger.initial_address}" } } ] } ]
Witnesses
2FF7PSL7FYXVU5UIQHCVDTTPUOOG75GX
2GPBEZTAXKWEXMWCTGZALIZDNWS5B3V7
4H2AMKF6YO2IWJ5MYWJS3N7Y2YU2T4Z5
DFVODTYGTS3ILVOQ5MFKJIERH6LGKELP
ERMF7V2RLCPABMX5AMNGUQBAH4CD5TK4
F4KHJUCLJKY4JV7M5F754LAJX4EB7M4N
IOF6PTBDTLSTBS5NWHUSD7I2NHK3BQ2T
O4K4QILG6VPGTYLRAI2RGYRFJZ7N2Q2O
OPNUXBRSSQQGHKQNEPD2GLWQYEUY5XLD
PA4QK46276MJJD5DBOLIBMYKNNXMUVDP
RJDYXC4YQ4AZKFYTJVCR5GQJF5J6KPRI
WELOXP3EOA75JWNO6S5ZJHOO3EYFKPIR
Technical information
Fees:
2,957
bytes
(452 headers, 2505 payload)
Level:
2334801
Witnessed level:
2334792
Last ball unit:
rW95XmVnv2fgj6FbraeXV2sGvFYpdplaX1KUUAKvrBs=
Main chain index:
2322515
Latest included mc index:
2322514
Status:
stable/confirmed/final