tx · 3SuFnu1nTXm17C8vYfsyQ719rhr5LGMUmytpbMMpJAT9 3N31AVfrBqK9g13t2yjixC8HvcozTEVCDS5: -0.00100000 Waves 2024.11.19 18:21 [3378506] smart account 3N31AVfrBqK9g13t2yjixC8HvcozTEVCDS5 > SELF 0.00000000 Waves
{ "type": 13, "id": "3SuFnu1nTXm17C8vYfsyQ719rhr5LGMUmytpbMMpJAT9", "fee": 100000, "feeAssetId": null, "timestamp": 1732029690846, "version": 2, "chainId": 84, "sender": "3N31AVfrBqK9g13t2yjixC8HvcozTEVCDS5", "senderPublicKey": "5rkm9KDP5qzWeNEXRH9VafbL9WYYKnxXxsKeemndVuCX", "proofs": [ "LwYrWSb8ra5r97Vbj4CyoVB4KSQBYtwuGhkV87fNswPdqAYuKU5rkVhHcWgbwu1mK4MyZx7nUhjRgStrAzLKSrD" ], "script": "base64:CAIRCAISABIECgIICBIFCgMICAEAAwFpAQlhZGRGYXJtZXIABAdhZGRyZXNzCQClCAEIBQFpBmNhbGxlcgQGZmFybWVyCQCfCAEFB2FkZHJlc3MDCQAAAgUGZmFybWVyBQR1bml0CQDMCAIJAQtTdHJpbmdFbnRyeQIFB2FkZHJlc3MCAAkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQdhZGRyZXNzAgZfY291bnQAAAUDbmlsCQACAQIVRmFybWVyIGFscmVhZHkgZXhpc3RzAWkBBmFkZEF1QQIEZGF0YQZmYXJtZXIEBWNvdW50BAckbWF0Y2gwCQCfCAEJAKwCAgUGZmFybWVyAgZfY291bnQDCQABAgUHJG1hdGNoMAIDSW50BAFhBQckbWF0Y2gwBQFhAAAEB3BlbmRpbmcJAKIIAQUGZmFybWVyAwkBASEBCQEJaXNEZWZpbmVkAQkAoggBBQZmYXJtZXIJAAIBAhVGYXJtZXIgZG9lcyBub3QgZXhpc3QDCQAAAgUHcGVuZGluZwIACQDMCAIJAQtTdHJpbmdFbnRyeQIFBmZhcm1lcgIBMAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFBmZhcm1lcgICXzAFBGRhdGEJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgUGZmFybWVyAgZfY291bnQAAQUDbmlsCQDMCAIJAQtTdHJpbmdFbnRyeQIFBmZhcm1lcgkArAICCQCsAgIJAQV2YWx1ZQEFB3BlbmRpbmcCASwJAKQDAQUFY291bnQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICCQCsAgIFBmZhcm1lcgIBXwkApAMBBQVjb3VudAUEZGF0YQkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQZmYXJtZXICBl9jb3VudAkAZAIFBWNvdW50AAEFA25pbAFpAQZ2ZXJpZnkDBGRhdGEGZmFybWVyBWVudHJ5AwkBCWlzRGVmaW5lZAEJAKIIAQkArAICBQZmYXJtZXICAl9WCQACAQIaQXVBIEVudHJ5IGFscmVhZHkgdmVyaWZpZWQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICCQCsAgIJAKwCAgUGZmFybWVyAgFfCQCkAwEFBWVudHJ5AgJfVgUEZGF0YQUDbmlsAPEzqeQ=", "height": 3378506, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8r5hjhxWYjg9GSedHgTCzi39td6E1K1xE3g5Gm8QUnff Next: Cfvc26TiC6ZEf7qetwWCC3eCVqES6yumvioiEnSjEazc Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 8 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func addFarmer () = { | |
8 | 8 | let address = toString(i.caller) | |
9 | 9 | let farmer = getInteger(address) | |
10 | 10 | if ((farmer == unit)) | |
11 | 11 | then [StringEntry(address, ""), IntegerEntry((address + "_count"), 0)] | |
12 | 12 | else throw("Farmer already exists") | |
13 | 13 | } | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | ||
17 | 17 | @Callable(i) | |
18 | 18 | func addAuA (data,farmer) = { | |
19 | 19 | let count = match getInteger((farmer + "_count")) { | |
20 | 20 | case a: Int => | |
21 | 21 | a | |
22 | 22 | case _ => | |
23 | 23 | 0 | |
24 | 24 | } | |
25 | 25 | let pending = getString(farmer) | |
26 | 26 | if (!(isDefined(getString(farmer)))) | |
27 | 27 | then throw("Farmer does not exist") | |
28 | 28 | else if ((pending == "")) | |
29 | 29 | then [StringEntry(farmer, "0"), StringEntry((farmer + "_0"), data), IntegerEntry((farmer + "_count"), 1)] | |
30 | 30 | else [StringEntry(farmer, ((value(pending) + ",") + toString(count))), StringEntry(((farmer + "_") + toString(count)), data), IntegerEntry((farmer + "_count"), (count + 1))] | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | ||
35 | 35 | @Callable(i) | |
36 | 36 | func verify (data,farmer,entry) = if (isDefined(getString((farmer + "_V")))) | |
37 | 37 | then throw("AuA Entry already verified") | |
38 | 38 | else [StringEntry((((farmer + "_") + toString(entry)) + "_V"), data)] | |
39 | 39 | ||
40 | 40 |
github/deemru/w8io/026f985 20.11 ms ◑