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
ZGvkPluwOCHPwzCWzScEIuVPYF+l4NfiTD7fFKGluzA=
Received
21.02.2022 16:11:28
Confirmation delay (full node)
4 minutes 6 seconds
Authors
HMFR76BEZXV5T7X4QVWXFKADT73DKS2G
Children
naGNiU38O8yQ1pq2QcRk9ik8U4ommFBUrq+v/116C8M=
Parents
4gxdcvi1CpUBMsRLyPBrJavg1SQCJoPjOg3/bBk2DEY=
Messages
Definition
Address:
DTMTKQ6YDC4Q4MINGBAR3DGAXNDOOL6G
Definition:
[ "autonomous agent", { "getters": "{ $getCreator = ()=>params.creator_address; $getAsset = ()=>params.asset OTHERWISE "base"; $getPeriod = ()=>params.period OTHERWISE 24*60*60*30; //1m by default $isPatronStale = ()=>{ $end = (NOT var["start"]) ? 0 : (var["start"] + $getPeriod()); return $end < timestamp; }; $getStart = ()=>$isPatronStale() ? false : var["start"]; $getEnd = ()=>$getStart() + $getPeriod(); $getPatron = ()=>$isPatronStale() ? false : var["patron"]; $getIPFS = ()=>{ if ($isPatronStale()) return false; return var["ipfs"]; }; $getMinBid = ()=>$isPatronStale() ? (params.asset == "base" OR NOT params.asset) ? 10000 : 1 : ceil(var["paid"] * 1.05); $getToS = ()=>data_feed[[oracles=params.creator_address, feed_name=this_address || "_tos", ifnone=false]]; }", "init": "{ require(trigger.data.ipfs, "IPFS field is mandatory"); require(is_valid_address(params.creator_address), "This smart contract setup failed. The creator address is invalid"); $ASSET = $getAsset(); require(asset[$ASSET].exists, "That smart contract setup failed. An unknown asset was set for payouts"); $CREATOR_ADDRESS = params.creator_address; $PERIOD = $getPeriod(); $IS_PATRON_STALE = $isPatronStale(); $CT_CUT = 0.02; $CT_ADDRESS = "HMFR76BEZXV5T7X4QVWXFKADT73DKS2G"; $LAST_PAID = var["paid"]; $CURRENT_PATRON = var["patron"]; $END = $getEnd(); $START = $getStart(); $paid = $ASSET == 'base' ? balance[base] - 4000 : trigger.output[[asset=$ASSET]].amount; if (NOT $IS_PATRON_STALE) //Check if they can outright kick the current patron require(trigger.output[[asset=$ASSET]].amount >= $LAST_PAID * 1.05, "You have to pay at least 5% more than the current patron"); $elapsed = $IS_PATRON_STALE ? 1 : 1 - ($END - timestamp) / ($END - $START); $usage = $IS_PATRON_STALE ? 0 : floor($elapsed * $LAST_PAID); $to_creator = ($IS_PATRON_STALE ? $paid : $paid - ($paid - $usage)) * (1-$CT_CUT); }", "messages": [ { "app": "payment", "payload": { "asset": "{$ASSET}", "outputs": [ { "if": "{NOT $IS_PATRON_STALE}", "address": "{$CURRENT_PATRON}", "amount": "{max($LAST_PAID - $usage, 0)}" }, { "address": "{$CREATOR_ADDRESS}", "amount": "{max(floor($to_creator), 0)}" }, { "address": "{$CT_ADDRESS}", "amount": "{floor($paid * $CT_CUT)}" } ] } }, { "app": "state", "state": "{ //Update current patron data var["whois"] = trigger.data.whois; var["start"] = timestamp; var["end"] = timestamp + $PERIOD; var["patron"] = trigger.data["patron"] OTHERWISE trigger.address; var["paid"] = trigger.output[[asset=$ASSET]].amount; var["ipfs"] = trigger.data["ipfs"]; var["earnings"]+= floor($to_creator); }" } ] } ]
Witnesses
2TO6NYBGX3NF5QS24MQLFR7KXYAMCIE5
4GDZSXHEFVFMHCUCSHZVXBVF5T2LJHMU
APABTE2IBKOIHLS2UNK6SAR4T5WRGH2J
DXYWHSZ72ZDNDZ7WYZXKWBBH425C6WZN
FAB6TH7IRAVHDLK2AAWY5YBE6CEBUACF
FOPUBEUPBC6YLIQDLKL6EW775BMV7YOH
GFK3RDAPQLLNCMQEVGGD2KCPZTLSG3HN
I2ADHGP4HL6J37NQAD73J7E5SKFIXJOT
JMFXY26FN76GWJJG7N36UI2LNONOGZJV
JPQKPRI5FMTQRJF4ZZMYZYDQVRD55OTC
TKT4UESIKTTRALRRLWS4SENSTJX6ODCW
UE25S4GRWZOLNXZKY4VWFHNJZWUSYCQC
Technical information
Fees:
3,778
bytes
(451 headers, 3327 payload)
Level:
8805122
Witnessed level:
8805114
Last ball unit:
+3SF+HFGcLTJ6Yaq8L11RsUa5WzAI7JUtXcvNN2OBkg=
Main chain index:
8472805
Latest included mc index:
8472804
Status:
stable/confirmed/final