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
PEDmR9lZFR4vzky4Dp4Mta4j8OyhqqjkRwmaMN+YS7M=
Received
13.09.2019 16:12:33
Confirmation delay (full node)
2 minutes 15 seconds
Confirmation delay (light node)
4 minutes 36 seconds
Authors
DPYEPM34AUBLZFLCJKKGSJ3R34373IUA
Children
DljBSC+FlfqH/36wMpIJvBjQAGMOZ2vD2hrRdqWCXgA=
u9wmETiJLUUypmflV5KHhLTF4kE8tsasDa8bHBBXWBc=
Parents
ZHyUUmyVPXlt+OKcOfAeHF1ypgT9dncEFQ7N8lM06V0=
Messages
Definition
Address:
O2BNUBJPIJBS3RC3S7ZDZQGEEKL2I5N6
Definition:
[ "autonomous agent", { "init": "{ $who = "HFNBIQTUNVMRM7PDP6NT2QRKLR62FOGR" ; $day = 13 ; $month = 9 ; // Time for Birthday Fiddle AA by
[email protected]
// usage: // friends or strangers can contribute to the annual fiddle fund anytime // the person who has birthday can release the fiddle every year on their birthday to fulfil their wishes // to release surprise - just send a transaction anytime after the birthday to get the previous year's surprise // the AA will also keep track of lifetime accumulated amount // setup: // set the person who has birthday address, day and month ( year might be a secret ) above // maybe better to use real attestation, but let's keep it simple for now $today = timestamp ; $today_string = timestamp_to_string( $today , "date" ) ; $storage = 1000 ; $surprise = var[ "surprise" ] otherwise $storage ; $fiddle = var[ "fiddle" ] otherwise 1 ; }", "messages": [ { "if": "{ trigger.address != $who }", "app": "data", "payload": { "friend": "{ trigger.address }" } }, { "if": "{ trigger.address == $who AND ( balance[ base ] - $surprise ) > 0 }", "app": "payment", "payload": { "cases": [ { "if": "{ $today <= $fiddle }", "payload": { "asset": "base", "outputs": [ { "address": "{$who}", "amount": "{ balance[ base ] - $surprise }" } ] } }, { "if": "{ $today > $fiddle }", "payload": { "asset": "base", "outputs": [ { "address": "{$who}", "amount": "{ balance[ base ] - $storage }" } ] } } ] } }, { "app": "state", "state": "{ // TIME GATE TECHNIQUE if( $today > $fiddle ){ // THE FIDDLE PLAYED var[ "surprise" ] = trigger.output[[asset=base]] - $storage ; // START NEW SURPRISE $year = json_parse( substring( $today_string , 0 , 4 ) ) + 1 ; // GET NEXT YEAR var[ "fiddle" ] = parse_date( $year || "-" || $month || "-" || $day ) ; // MOVE FIDDLE TO NEXT YEAR } else var[ "surprise" ] += trigger.output[[asset=base]] - $storage ; // ADD TO SURPRISE var[ "lifetime_amount" ] += trigger.output[[asset=base]] ; // hopefully the person didn't put in a lot of money himself, but we will never know if( trigger.address == $who ) response[ "happy_birthday" ] = "may your wish come true" ; response[ "birthday" ] = substring( $today_string , 5 , 5 ) ; response[ "fiddle" ] = $year || "-" || $month || "-" || $day ; //response[ "fiddle" ] = "will be played on " || timestamp_to_string( var[ "fiddle" ] ) ; }" } ] } ]
Witnesses
2FF7PSL7FYXVU5UIQHCVDTTPUOOG75GX
2GPBEZTAXKWEXMWCTGZALIZDNWS5B3V7
4H2AMKF6YO2IWJ5MYWJS3N7Y2YU2T4Z5
DFVODTYGTS3ILVOQ5MFKJIERH6LGKELP
ERMF7V2RLCPABMX5AMNGUQBAH4CD5TK4
F4KHJUCLJKY4JV7M5F754LAJX4EB7M4N
IOF6PTBDTLSTBS5NWHUSD7I2NHK3BQ2T
O4K4QILG6VPGTYLRAI2RGYRFJZ7N2Q2O
OPNUXBRSSQQGHKQNEPD2GLWQYEUY5XLD
PA4QK46276MJJD5DBOLIBMYKNNXMUVDP
RJDYXC4YQ4AZKFYTJVCR5GQJF5J6KPRI
WELOXP3EOA75JWNO6S5ZJHOO3EYFKPIR
Technical information
Fees:
2,755
bytes
(353 headers, 2402 payload)
Level:
1058819
Witnessed level:
1058810
Last ball unit:
d+KVo5L41jsUo2xO2EUBGoo4T5IfIpkJZTn23ekrBtg=
Main chain index:
1057592
Latest included mc index:
1057591
Status:
stable/confirmed/final