tx · Bx9ht7EedCbdEBnDNhhKnPhCWw6ZrL6DHLWpu5Rb59J3
3N3evGP2tTeuXuq3iHz13Wrjm7BonuiSMd2: -0.05000000 Waves
2022.12.21 13:49 [2369957] smart account 3N3evGP2tTeuXuq3iHz13Wrjm7BonuiSMd2 > SELF 0.00000000 Waves
{
"type": 13,
"id": "Bx9ht7EedCbdEBnDNhhKnPhCWw6ZrL6DHLWpu5Rb59J3",
"fee": 5000000,
"feeAssetId": null,
"timestamp": 1671619825728,
"version": 2,
"chainId": 84,
"sender": "3N3evGP2tTeuXuq3iHz13Wrjm7BonuiSMd2",
"senderPublicKey": "3XEAduJnZeFRL74JfaQk7MgrGDo9a9xREYyfLvyivREU",
"proofs": [
"54HrmY3PzRcTMvmaAYEWR6hcx4EYm2tVGyRA9AVJ44XzTPFRyJc9L1UdopePatP9T8yqQsVByJhN4VTkeGtTfsUv"
],
"script": "base64:BgIMCAISAwoBCBIDCgEIAwAPTUVTU0FHRV9DT1VOVEVSAg9tZXNzYWdlX2NvdW50ZXIADUZPTExPV19TVFJJTkcCB2ZvbGxvd3MBEWdldE1lc3NhZ2VDb3VudGVyAAkBC3ZhbHVlT3JFbHNlAgkAnwgBBQ9NRVNTQUdFX0NPVU5URVIAAAIBaQEGZm9sbG93AQdhZGRyZXNzBAZzZW5kZXIJAKUIAQgFAWkGY2FsbGVyBAlmb2xsb3dLZXkJAKwCAgkArAICCQCsAgIJAKwCAgUGc2VuZGVyAgFfBQ1GT0xMT1dfU1RSSU5HAgFfBQdhZGRyZXNzCQDMCAIJAQxCb29sZWFuRW50cnkCBQlmb2xsb3dLZXkGBQNuaWwBaQEFdHdlZXQBB21lc3NhZ2UEDm1lc3NhZ2VDb3VudGVyCQERZ2V0TWVzc2FnZUNvdW50ZXIABAZzZW5kZXIJAKUIAQgFAWkGY2FsbGVyBAR0eElkCQDYBAEIBQFpDXRyYW5zYWN0aW9uSWQEBm1zZ0tleQkArAICCQCsAgIFBnNlbmRlcgIBXwUEdHhJZAkAzAgCCQELU3RyaW5nRW50cnkCBQZtc2dLZXkFB21lc3NhZ2UJAMwIAgkBDEludGVnZXJFbnRyeQIFD01FU1NBR0VfQ09VTlRFUgkAZAIFDm1lc3NhZ2VDb3VudGVyAAEFA25pbAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXnQiOSq",
"height": 2369957,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 359kdoujesvz3rkkEnUsrcfivRbnBzHV8Xiwsq7CAkUW
Next: PRE32GEqXMQr7GJyVYC7jyCJ8LsECErPzpFrT6inoiv
Diff:
Old | New | | Differences |
---|
5 | 5 | | |
---|
6 | 6 | | let FOLLOW_STRING = "follows" |
---|
7 | 7 | | |
---|
8 | | - | func getMessageCounter () = match getIntegerValue(this, MESSAGE_COUNTER) { |
---|
9 | | - | case i: Int => |
---|
10 | | - | i |
---|
11 | | - | case _ => |
---|
12 | | - | 0 |
---|
13 | | - | } |
---|
| 8 | + | func getMessageCounter () = valueOrElse(getInteger(MESSAGE_COUNTER), 0) |
---|
14 | 9 | | |
---|
15 | 10 | | |
---|
16 | 11 | | @Callable(i) |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let MESSAGE_COUNTER = "message_counter" |
---|
5 | 5 | | |
---|
6 | 6 | | let FOLLOW_STRING = "follows" |
---|
7 | 7 | | |
---|
8 | | - | func getMessageCounter () = match getIntegerValue(this, MESSAGE_COUNTER) { |
---|
9 | | - | case i: Int => |
---|
10 | | - | i |
---|
11 | | - | case _ => |
---|
12 | | - | 0 |
---|
13 | | - | } |
---|
| 8 | + | func getMessageCounter () = valueOrElse(getInteger(MESSAGE_COUNTER), 0) |
---|
14 | 9 | | |
---|
15 | 10 | | |
---|
16 | 11 | | @Callable(i) |
---|
17 | 12 | | func follow (address) = { |
---|
18 | 13 | | let sender = toString(i.caller) |
---|
19 | 14 | | let followKey = ((((sender + "_") + FOLLOW_STRING) + "_") + address) |
---|
20 | 15 | | [BooleanEntry(followKey, true)] |
---|
21 | 16 | | } |
---|
22 | 17 | | |
---|
23 | 18 | | |
---|
24 | 19 | | |
---|
25 | 20 | | @Callable(i) |
---|
26 | 21 | | func tweet (message) = { |
---|
27 | 22 | | let messageCounter = getMessageCounter() |
---|
28 | 23 | | let sender = toString(i.caller) |
---|
29 | 24 | | let txId = toBase58String(i.transactionId) |
---|
30 | 25 | | let msgKey = ((sender + "_") + txId) |
---|
31 | 26 | | [StringEntry(msgKey, message), IntegerEntry(MESSAGE_COUNTER, (messageCounter + 1))] |
---|
32 | 27 | | } |
---|
33 | 28 | | |
---|
34 | 29 | | |
---|
35 | 30 | | @Verifier(tx) |
---|
36 | 31 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
37 | 32 | | |
---|