tx · PRE32GEqXMQr7GJyVYC7jyCJ8LsECErPzpFrT6inoiv
3N3evGP2tTeuXuq3iHz13Wrjm7BonuiSMd2: -0.05000000 Waves
2022.12.21 14:06 [2369970] smart account 3N3evGP2tTeuXuq3iHz13Wrjm7BonuiSMd2 > SELF 0.00000000 Waves
{
"type": 13,
"id": "PRE32GEqXMQr7GJyVYC7jyCJ8LsECErPzpFrT6inoiv",
"fee": 5000000,
"feeAssetId": null,
"timestamp": 1671620837981,
"version": 2,
"chainId": 84,
"sender": "3N3evGP2tTeuXuq3iHz13Wrjm7BonuiSMd2",
"senderPublicKey": "3XEAduJnZeFRL74JfaQk7MgrGDo9a9xREYyfLvyivREU",
"proofs": [
"5BfxN3KbkDAurSnTQwP8gA8JDWK5MuYmxHGtkGtKAc6vp28csQVcYXNdvHaehW4haagbtn6K8zvZzSTmxciqZwer"
],
"script": "base64:BgIRCAISAwoBCBIDCgEIEgMKAQgDAA9NRVNTQUdFX0NPVU5URVICD21lc3NhZ2VfY291bnRlcgANRk9MTE9XX1NUUklORwIHZm9sbG93cwERZ2V0TWVzc2FnZUNvdW50ZXIACQELdmFsdWVPckVsc2UCCQCfCAEFD01FU1NBR0VfQ09VTlRFUgAAAwFpAQZmb2xsb3cBB2FkZHJlc3MEBnNlbmRlcgkApQgBCAUBaQZjYWxsZXIECWZvbGxvd0tleQkArAICCQCsAgIJAKwCAgkArAICBQZzZW5kZXICAV8FDUZPTExPV19TVFJJTkcCAV8FB2FkZHJlc3MJAMwIAgkBDEJvb2xlYW5FbnRyeQIFCWZvbGxvd0tleQYFA25pbAFpAQh1bmZvbGxvdwEHYWRkcmVzcwQGc2VuZGVyCQClCAEIBQFpBmNhbGxlcgQJZm9sbG93S2V5CQCsAgIJAKwCAgkArAICCQCsAgIFBnNlbmRlcgIBXwUNRk9MTE9XX1NUUklORwIBXwUHYWRkcmVzcwkAzAgCCQELRGVsZXRlRW50cnkBBQlmb2xsb3dLZXkFA25pbAFpAQV0d2VldAEHbWVzc2FnZQQObWVzc2FnZUNvdW50ZXIJARFnZXRNZXNzYWdlQ291bnRlcgAEBnNlbmRlcgkApQgBCAUBaQZjYWxsZXIEBHR4SWQJANgEAQgFAWkNdHJhbnNhY3Rpb25JZAQGbXNnS2V5CQCsAgIJAKwCAgUGc2VuZGVyAgFfBQR0eElkCQDMCAIJAQtTdHJpbmdFbnRyeQIFBm1zZ0tleQUHbWVzc2FnZQkAzAgCCQEMSW50ZWdlckVudHJ5AgUPTUVTU0FHRV9DT1VOVEVSCQBkAgUObWVzc2FnZUNvdW50ZXIAAQUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleVVApJI=",
"height": 2369970,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: Bx9ht7EedCbdEBnDNhhKnPhCWw6ZrL6DHLWpu5Rb59J3
Next: CLpirwaS6k9K9CEqrFDHbYCGdK9RGZCFQkp5FM5ELsC9
Diff:
Old | New | | Differences |
---|
13 | 13 | | let sender = toString(i.caller) |
---|
14 | 14 | | let followKey = ((((sender + "_") + FOLLOW_STRING) + "_") + address) |
---|
15 | 15 | | [BooleanEntry(followKey, true)] |
---|
| 16 | + | } |
---|
| 17 | + | |
---|
| 18 | + | |
---|
| 19 | + | |
---|
| 20 | + | @Callable(i) |
---|
| 21 | + | func unfollow (address) = { |
---|
| 22 | + | let sender = toString(i.caller) |
---|
| 23 | + | let followKey = ((((sender + "_") + FOLLOW_STRING) + "_") + address) |
---|
| 24 | + | [DeleteEntry(followKey)] |
---|
16 | 25 | | } |
---|
17 | 26 | | |
---|
18 | 27 | | |
---|
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 | 8 | | func getMessageCounter () = valueOrElse(getInteger(MESSAGE_COUNTER), 0) |
---|
9 | 9 | | |
---|
10 | 10 | | |
---|
11 | 11 | | @Callable(i) |
---|
12 | 12 | | func follow (address) = { |
---|
13 | 13 | | let sender = toString(i.caller) |
---|
14 | 14 | | let followKey = ((((sender + "_") + FOLLOW_STRING) + "_") + address) |
---|
15 | 15 | | [BooleanEntry(followKey, true)] |
---|
| 16 | + | } |
---|
| 17 | + | |
---|
| 18 | + | |
---|
| 19 | + | |
---|
| 20 | + | @Callable(i) |
---|
| 21 | + | func unfollow (address) = { |
---|
| 22 | + | let sender = toString(i.caller) |
---|
| 23 | + | let followKey = ((((sender + "_") + FOLLOW_STRING) + "_") + address) |
---|
| 24 | + | [DeleteEntry(followKey)] |
---|
16 | 25 | | } |
---|
17 | 26 | | |
---|
18 | 27 | | |
---|
19 | 28 | | |
---|
20 | 29 | | @Callable(i) |
---|
21 | 30 | | func tweet (message) = { |
---|
22 | 31 | | let messageCounter = getMessageCounter() |
---|
23 | 32 | | let sender = toString(i.caller) |
---|
24 | 33 | | let txId = toBase58String(i.transactionId) |
---|
25 | 34 | | let msgKey = ((sender + "_") + txId) |
---|
26 | 35 | | [StringEntry(msgKey, message), IntegerEntry(MESSAGE_COUNTER, (messageCounter + 1))] |
---|
27 | 36 | | } |
---|
28 | 37 | | |
---|
29 | 38 | | |
---|
30 | 39 | | @Verifier(tx) |
---|
31 | 40 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
32 | 41 | | |
---|