tx · CLpirwaS6k9K9CEqrFDHbYCGdK9RGZCFQkp5FM5ELsC9

3N3evGP2tTeuXuq3iHz13Wrjm7BonuiSMd2:  -0.05000000 Waves

2022.12.21 18:18 [2370222] smart account 3N3evGP2tTeuXuq3iHz13Wrjm7BonuiSMd2 > SELF 0.00000000 Waves

{ "type": 13, "id": "CLpirwaS6k9K9CEqrFDHbYCGdK9RGZCFQkp5FM5ELsC9", "fee": 5000000, "feeAssetId": null, "timestamp": 1671635961960, "version": 2, "chainId": 84, "sender": "3N3evGP2tTeuXuq3iHz13Wrjm7BonuiSMd2", "senderPublicKey": "3XEAduJnZeFRL74JfaQk7MgrGDo9a9xREYyfLvyivREU", "proofs": [ "KBwRU5YAWxwuFdxLT4sbcv9hGeoSwkXA9f3w6dtv2XSpkQRLo9tDfxuPqwG7bh9FrWfJmDULj96zzKVeKiAGogv" ], "script": "base64:BgIRCAISAwoBCBIDCgEIEgMKAQgEAA9NRVNTQUdFX0NPVU5URVICD21lc3NhZ2VfY291bnRlcgANRk9MTE9XX1NUUklORwIHZm9sbG93cwAQVFdFRVRfS0VZX1NUUklORwIGdHdlZXRfARFnZXRNZXNzYWdlQ291bnRlcgAJAQt2YWx1ZU9yRWxzZQIJAJ8IAQUPTUVTU0FHRV9DT1VOVEVSAAADAWkBBmZvbGxvdwEHYWRkcmVzcwQGc2VuZGVyCQClCAEIBQFpBmNhbGxlcgQJZm9sbG93S2V5CQCsAgIJAKwCAgkArAICCQCsAgIFBnNlbmRlcgIBXwUNRk9MTE9XX1NUUklORwIBXwUHYWRkcmVzcwkAzAgCCQEMQm9vbGVhbkVudHJ5AgUJZm9sbG93S2V5BgUDbmlsAWkBCHVuZm9sbG93AQdhZGRyZXNzBAZzZW5kZXIJAKUIAQgFAWkGY2FsbGVyBAlmb2xsb3dLZXkJAKwCAgkArAICCQCsAgIJAKwCAgUGc2VuZGVyAgFfBQ1GT0xMT1dfU1RSSU5HAgFfBQdhZGRyZXNzCQDMCAIJAQtEZWxldGVFbnRyeQEFCWZvbGxvd0tleQUDbmlsAWkBBXR3ZWV0AQdtZXNzYWdlBA5tZXNzYWdlQ291bnRlcgkAZAIJARFnZXRNZXNzYWdlQ291bnRlcgAAAQQGc2VuZGVyCQClCAEIBQFpBmNhbGxlcgQEdHhJZAkA2AQBCAUBaQ10cmFuc2FjdGlvbklkBAZtc2dLZXkJAKwCAgkArAICBQZzZW5kZXICAV8FBHR4SWQECHR3ZWV0S2V5CQCsAgIFEFRXRUVUX0tFWV9TVFJJTkcJAKQDAQUObWVzc2FnZUNvdW50ZXIJAMwIAgkBC1N0cmluZ0VudHJ5AgUGbXNnS2V5BQdtZXNzYWdlCQDMCAIJAQtTdHJpbmdFbnRyeQIFCHR3ZWV0S2V5BQZtc2dLZXkJAMwIAgkBDEludGVnZXJFbnRyeQIFD01FU1NBR0VfQ09VTlRFUgUObWVzc2FnZUNvdW50ZXIFA25pbAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXnjMG6R", "height": 2370222, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: PRE32GEqXMQr7GJyVYC7jyCJ8LsECErPzpFrT6inoiv Next: 7asKqh4U2DurHxd9sLRBYeWynuPoiby3kJEMvFEjjqix Diff:
OldNewDifferences
44 let MESSAGE_COUNTER = "message_counter"
55
66 let FOLLOW_STRING = "follows"
7+
8+let TWEET_KEY_STRING = "tweet_"
79
810 func getMessageCounter () = valueOrElse(getInteger(MESSAGE_COUNTER), 0)
911
2830
2931 @Callable(i)
3032 func tweet (message) = {
31- let messageCounter = getMessageCounter()
33+ let messageCounter = (getMessageCounter() + 1)
3234 let sender = toString(i.caller)
3335 let txId = toBase58String(i.transactionId)
3436 let msgKey = ((sender + "_") + txId)
35-[StringEntry(msgKey, message), IntegerEntry(MESSAGE_COUNTER, (messageCounter + 1))]
37+ let tweetKey = (TWEET_KEY_STRING + toString(messageCounter))
38+[StringEntry(msgKey, message), StringEntry(tweetKey, msgKey), IntegerEntry(MESSAGE_COUNTER, messageCounter)]
3639 }
3740
3841
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"
7+
8+let TWEET_KEY_STRING = "tweet_"
79
810 func getMessageCounter () = valueOrElse(getInteger(MESSAGE_COUNTER), 0)
911
1012
1113 @Callable(i)
1214 func follow (address) = {
1315 let sender = toString(i.caller)
1416 let followKey = ((((sender + "_") + FOLLOW_STRING) + "_") + address)
1517 [BooleanEntry(followKey, true)]
1618 }
1719
1820
1921
2022 @Callable(i)
2123 func unfollow (address) = {
2224 let sender = toString(i.caller)
2325 let followKey = ((((sender + "_") + FOLLOW_STRING) + "_") + address)
2426 [DeleteEntry(followKey)]
2527 }
2628
2729
2830
2931 @Callable(i)
3032 func tweet (message) = {
31- let messageCounter = getMessageCounter()
33+ let messageCounter = (getMessageCounter() + 1)
3234 let sender = toString(i.caller)
3335 let txId = toBase58String(i.transactionId)
3436 let msgKey = ((sender + "_") + txId)
35-[StringEntry(msgKey, message), IntegerEntry(MESSAGE_COUNTER, (messageCounter + 1))]
37+ let tweetKey = (TWEET_KEY_STRING + toString(messageCounter))
38+[StringEntry(msgKey, message), StringEntry(tweetKey, msgKey), IntegerEntry(MESSAGE_COUNTER, messageCounter)]
3639 }
3740
3841
3942 @Verifier(tx)
4043 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4144

github/deemru/w8io/169f3d6 
34.35 ms