tx · 8xrsZJPBWQhKkfLMbjDtixiS5S6uHUSjrvQvd4jc7Yu 3N31AVfrBqK9g13t2yjixC8HvcozTEVCDS5: -0.00100000 Waves 2024.11.19 18:22 [3378507] smart account 3N31AVfrBqK9g13t2yjixC8HvcozTEVCDS5 > SELF 0.00000000 Waves
{ "type": 13, "id": "8xrsZJPBWQhKkfLMbjDtixiS5S6uHUSjrvQvd4jc7Yu", "fee": 100000, "feeAssetId": null, "timestamp": 1732029825937, "version": 2, "chainId": 84, "sender": "3N31AVfrBqK9g13t2yjixC8HvcozTEVCDS5", "senderPublicKey": "5rkm9KDP5qzWeNEXRH9VafbL9WYYKnxXxsKeemndVuCX", "proofs": [ "3efTyRe3kmj4vP84Zh3D7EfHMct3FGPopfFn6AYH4c6WwVL1x2QRMXDiozTMGStcuQ9VysoFx2GwJ6WBHm7hydcC" ], "script": "base64:CAIRCAISABIECgIICBIFCgMICAEAAwFpAQlhZGRGYXJtZXIABAdhZGRyZXNzCQClCAEIBQFpBmNhbGxlcgQGZmFybWVyCQCiCAEFB2FkZHJlc3MDCQAAAgUGZmFybWVyBQR1bml0CQDMCAIJAQtTdHJpbmdFbnRyeQIFB2FkZHJlc3MCAAkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQdhZGRyZXNzAgZfY291bnQAAAUDbmlsCQACAQIVRmFybWVyIGFscmVhZHkgZXhpc3RzAWkBBmFkZEF1QQIEZGF0YQZmYXJtZXIEBWNvdW50BAckbWF0Y2gwCQCfCAEJAKwCAgUGZmFybWVyAgZfY291bnQDCQABAgUHJG1hdGNoMAIDSW50BAFhBQckbWF0Y2gwBQFhAAAEB3BlbmRpbmcJAKIIAQUGZmFybWVyAwkBASEBCQEJaXNEZWZpbmVkAQkAoggBBQZmYXJtZXIJAAIBAhVGYXJtZXIgZG9lcyBub3QgZXhpc3QDCQAAAgUHcGVuZGluZwIACQDMCAIJAQtTdHJpbmdFbnRyeQIFBmZhcm1lcgIBMAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFBmZhcm1lcgICXzAFBGRhdGEJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgUGZmFybWVyAgZfY291bnQAAQUDbmlsCQDMCAIJAQtTdHJpbmdFbnRyeQIFBmZhcm1lcgkArAICCQCsAgIJAQV2YWx1ZQEFB3BlbmRpbmcCASwJAKQDAQUFY291bnQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICCQCsAgIFBmZhcm1lcgIBXwkApAMBBQVjb3VudAUEZGF0YQkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQZmYXJtZXICBl9jb3VudAkAZAIFBWNvdW50AAEFA25pbAFpAQZ2ZXJpZnkDBGRhdGEGZmFybWVyBWVudHJ5AwkBCWlzRGVmaW5lZAEJAKIIAQkArAICBQZmYXJtZXICAl9WCQACAQIaQXVBIEVudHJ5IGFscmVhZHkgdmVyaWZpZWQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICCQCsAgIJAKwCAgUGZmFybWVyAgFfCQCkAwEFBWVudHJ5AgJfVgUEZGF0YQUDbmlsAJGEwUU=", "height": 3378507, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Cfvc26TiC6ZEf7qetwWCC3eCVqES6yumvioiEnSjEazc Next: DLWp33ExSL2cibdYe8NFpEknSSNkxZ4RCFrcXmwxBh1X 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 = getString(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 14.60 ms ◑