Unit ID
UZT+Ll95WE5YXdZM2+FMQ1LCOGFjxECGTX/22nPhSpU=
Received
13.09.2019 10:33:27
Confirmation delay (full node)
3 minutes 12 seconds
Confirmation delay (light node)
6 minutes 47 seconds
Messages
Definition
Definition: [ "autonomous agent", { "messages": [ { "if": "{ $who = "HFNBIQTUNVMRM7PDP6NT2QRKLR62FOGR"; trigger.data.address }", "app": "data", "payload": { "friend": "{trigger.data.address}" } }, { "if": "{ trigger.data.address == $who AND ( balance[ base ] - $present ) > 0 }", "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{$who}", "amount": "{ balance[ base ] - $present }" } ] } }, { "app": "state", "state": "{ if( $today > $fiddle ){ // THE FIDDLE PLAYED var[ "present" ] = 0 ; // START NEW PRESENT var[ "fiddle" ] = $today + 60 * 3 ; // TESTING $year = substring( timestamp_to_string( $today , "date" ) , 0 , 4 ) + 1 ; response[ "year" ] = $year; //var[ "fiddle" ] = parse_date( $year || "-" || $month || "-" || $day ); // MOVE FIDDLE TO NEXT BIRTHDAY if( trigger.data.address == $who ) response[ "happy_birthday" ] = "send one more transaction to get your present"; } else var[ "present" ] += trigger.output[[asset=base]] - $storage ; // ADD TO PRESENT var[ "lifetime_amount" ] += trigger.output[[asset=base]] ; // hopefully the person didn't put in a lot of money himself, but we will never know response[ "fiddle" ] = "will be played on " || timestamp_to_string( var[ "fiddle" ] ) ; }" } ] } ]
Technical information
Fees:
1,744 bytes
(353 headers, 1391 payload)
Level:1058039
Witnessed level:1058032
Main chain index:1056812
Latest included mc index:1056811
Status:stable/confirmed/final