tx · HN4iZCyeZZF51XTw3M3DzytsAE2Shaw7zuxCCoWKfsPB

3N3evGP2tTeuXuq3iHz13Wrjm7BonuiSMd2:  -0.05000000 Waves

2022.12.22 14:49 [2371462] smart account 3N3evGP2tTeuXuq3iHz13Wrjm7BonuiSMd2 > SELF 0.00000000 Waves

{ "type": 13, "id": "HN4iZCyeZZF51XTw3M3DzytsAE2Shaw7zuxCCoWKfsPB", "fee": 5000000, "feeAssetId": null, "timestamp": 1671709679530, "version": 2, "chainId": 84, "sender": "3N3evGP2tTeuXuq3iHz13Wrjm7BonuiSMd2", "senderPublicKey": "3XEAduJnZeFRL74JfaQk7MgrGDo9a9xREYyfLvyivREU", "proofs": [ "4D6uC8CPjHJyEg6V2ZpQrZVkVyb55BYHJCEZV9AM1pMm2r6sruEyjSE8nSLznQjMxLnUS2f19dE4x63oewN5iHm8" ], "script": "base64:BgIRCAISAwoBCBIDCgEIEgMKAQgGAA9NRVNTQUdFX0NPVU5URVICD21lc3NhZ2VfY291bnRlcgANRk9MTE9XX1NUUklORwIHZm9sbG93cwAQVFdFRVRfS0VZX1NUUklORwIGdHdlZXRfARFnZXRNZXNzYWdlQ291bnRlcgAJAQt2YWx1ZU9yRWxzZQIJAJ8IAQUPTUVTU0FHRV9DT1VOVEVSAAABKWdldExhdGVzdFR3ZWV0SWZGcm9tU29tZW9uZUFkZHJlc3NGb2xsb3dzAgVhY2N1bQZwYXJhbXMEB2FkZHJlc3MEByRtYXRjaDAJAJEDAgUGcGFyYW1zAAEDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAFzBQckbWF0Y2gwBQFzAgAEBm9mZnNldAQHJG1hdGNoMAkAkQMCBQZwYXJhbXMAAAMJAAECBQckbWF0Y2gwAgNJbnQEAWkFByRtYXRjaDAFAWkAAAQObWVzc2FnZUNvdW50ZXIJARFnZXRNZXNzYWdlQ291bnRlcgAEB3R3ZWV0SWQJAQt2YWx1ZU9yRWxzZQIJAKIIAQkArAICBRBUV0VFVF9LRVlfU1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QNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5PbOshQ==", "height": 2371462, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: ELmRELFADPT7UAgT7bo8HdMB35Pt5A7LYEqe68MUWMxu Next: HN2kPArSP8XEVsyLnxwMR12CwdrrMPzw7VoG7WPBV7Wa Diff:
OldNewDifferences
3636
3737
3838 func getLatestTweetsFromFollowingAddresses (address) = {
39- let list = [[0, address], [1, address], [2, address], [3, address], [4, address], [5, address], [6, address], [7, address], [8, address], [9, address], [10, address]]
39+ let list = [[0, address], [1, address], [2, address], [3, address], [4, address], [5, address], [6, address], [7, address], [8, address], [9, address]]
4040 let $l = list
4141 let $s = size($l)
4242 let $acc0 = nil
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let MESSAGE_COUNTER = "message_counter"
55
66 let FOLLOW_STRING = "follows"
77
88 let TWEET_KEY_STRING = "tweet_"
99
1010 func getMessageCounter () = valueOrElse(getInteger(MESSAGE_COUNTER), 0)
1111
1212
1313 func getLatestTweetIfFromSomeoneAddressFollows (accum,params) = {
1414 let address = match params[1] {
1515 case s: String =>
1616 s
1717 case _ =>
1818 ""
1919 }
2020 let offset = match params[0] {
2121 case i: Int =>
2222 i
2323 case _ =>
2424 0
2525 }
2626 let messageCounter = getMessageCounter()
2727 let tweetId = valueOrElse(getString((TWEET_KEY_STRING + toString((messageCounter - offset)))), "")
2828 let parts = split(tweetId, "_")
2929 let sender = parts[0]
3030 let keyToCheckFollowing = ((((address + "_") + FOLLOW_STRING) + "_") + sender)
3131 let following = valueOrElse(getBoolean(keyToCheckFollowing), false)
3232 if (following)
3333 then (accum :+ getString(tweetId))
3434 else accum
3535 }
3636
3737
3838 func getLatestTweetsFromFollowingAddresses (address) = {
39- let list = [[0, address], [1, address], [2, address], [3, address], [4, address], [5, address], [6, address], [7, address], [8, address], [9, address], [10, address]]
39+ let list = [[0, address], [1, address], [2, address], [3, address], [4, address], [5, address], [6, address], [7, address], [8, address], [9, address]]
4040 let $l = list
4141 let $s = size($l)
4242 let $acc0 = nil
4343 func $f0_1 ($a,$i) = if (($i >= $s))
4444 then $a
4545 else getLatestTweetIfFromSomeoneAddressFollows($a, $l[$i])
4646
4747 func $f0_2 ($a,$i) = if (($i >= $s))
4848 then $a
4949 else throw("List size exceeds 10")
5050
5151 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
5252 }
5353
5454
5555 @Callable(i)
5656 func follow (address) = {
5757 let sender = toString(i.caller)
5858 let followKey = ((((sender + "_") + FOLLOW_STRING) + "_") + address)
5959 [BooleanEntry(followKey, true)]
6060 }
6161
6262
6363
6464 @Callable(i)
6565 func unfollow (address) = {
6666 let sender = toString(i.caller)
6767 let followKey = ((((sender + "_") + FOLLOW_STRING) + "_") + address)
6868 [DeleteEntry(followKey)]
6969 }
7070
7171
7272
7373 @Callable(i)
7474 func tweet (message) = {
7575 let messageCounter = (getMessageCounter() + 1)
7676 let sender = toString(i.caller)
7777 let txId = toBase58String(i.transactionId)
7878 let msgKey = ((sender + "_") + txId)
7979 let tweetKey = (TWEET_KEY_STRING + toString(messageCounter))
8080 [StringEntry(msgKey, message), StringEntry(tweetKey, msgKey), IntegerEntry(MESSAGE_COUNTER, messageCounter)]
8181 }
8282
8383
8484 @Verifier(tx)
8585 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
8686

github/deemru/w8io/169f3d6 
51.07 ms