tx · 5hd3fnRNko3ydTjUpgDeGq6Jw5qxKXqyumLac85SzMKR 3MyvtGdRKHC1zyNWmj7gfvVivtg7p2DzsDc: -0.00100000 Waves 2024.11.19 15:09 [3378308] smart account 3MyvtGdRKHC1zyNWmj7gfvVivtg7p2DzsDc > SELF 0.00000000 Waves
{ "type": 13, "id": "5hd3fnRNko3ydTjUpgDeGq6Jw5qxKXqyumLac85SzMKR", "fee": 100000, "feeAssetId": null, "timestamp": 1732018205579, "version": 2, "chainId": 84, "sender": "3MyvtGdRKHC1zyNWmj7gfvVivtg7p2DzsDc", "senderPublicKey": "ESD9NjL8QzqJWW5g41iWjW2JYwz7JbvTf7tUcZm3iEgj", "proofs": [ "2PbfXnxQD1yLi9FqN92H7g1TSuRMhaoXfwLecbDkAnV9MRD7ff3WXGxkKWHy2LQVpPCa1B4PtVi7VtThDBjF1TD" ], "script": "base64:CAIKCAISABIECgIICAACAWkBCWFkZEZhcm1lcgAEB2FkZHJlc3MJAKUIAQgFAWkGY2FsbGVyBAZmYXJtZXIJAJ8IAQUHYWRkcmVzcwMJAAACBQZmYXJtZXIFBHVuaXQJAMwIAgkBC1N0cmluZ0VudHJ5AgUHYWRkcmVzcwIACQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFB2FkZHJlc3MCBl9jb3VudAAABQNuaWwJAAIBAhVGYXJtZXIgYWxyZWFkeSBleGlzdHMBaQEGYWRkQXVBAgRkYXRhBmZhcm1lcgQFY291bnQEByRtYXRjaDAJAJ8IAQkArAICBQZmYXJtZXICBl9jb3VudAMJAAECBQckbWF0Y2gwAgNJbnQEAWEFByRtYXRjaDAFAWEAAAQHcGVuZGluZwkAoggBBQZmYXJtZXIDCQEBIQEJAQlpc0RlZmluZWQBCQCiCAEFBmZhcm1lcgkAAgECFUZhcm1lciBkb2VzIG5vdCBleGlzdAMJAAACBQdwZW5kaW5nAgAJAMwIAgkBC1N0cmluZ0VudHJ5AgUGZmFybWVyAgEwCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUGZmFybWVyAgJfMAUEZGF0YQkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQZmYXJtZXICBl9jb3VudAABBQNuaWwJAMwIAgkBC1N0cmluZ0VudHJ5AgUGZmFybWVyCQCsAgIJAKwCAgkBBXZhbHVlAQUHcGVuZGluZwIBLAkApAMBBQVjb3VudAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJAKwCAgUGZmFybWVyAgFfCQCkAwEFBWNvdW50BQRkYXRhCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFBmZhcm1lcgIGX2NvdW50CQBkAgUFY291bnQAAQUDbmlsAB7zYIk=", "height": 3378308, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2hy7mupkcDqB1Bi37QkkGtRY4ypsj4R5NASiLBv7gGfN Next: none Diff:
Old | New | Differences | |
---|---|---|---|
26 | 26 | if (!(isDefined(getString(farmer)))) | |
27 | 27 | then throw("Farmer does not exist") | |
28 | 28 | else if ((pending == "")) | |
29 | - | then [StringEntry( | |
30 | - | else [StringEntry( | |
29 | + | then [StringEntry(farmer, "0"), StringEntry((farmer + "_0"), data), IntegerEntry((farmer + "_count"), 1)] | |
30 | + | else [StringEntry(farmer, ((value(pending) + ",") + toString(count))), StringEntry(((farmer + "_") + toString(count)), data), IntegerEntry((farmer + "_count"), (count + 1))] | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 |
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 | - | then [StringEntry( | |
30 | - | else [StringEntry( | |
29 | + | then [StringEntry(farmer, "0"), StringEntry((farmer + "_0"), data), IntegerEntry((farmer + "_count"), 1)] | |
30 | + | else [StringEntry(farmer, ((value(pending) + ",") + toString(count))), StringEntry(((farmer + "_") + toString(count)), data), IntegerEntry((farmer + "_count"), (count + 1))] | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 |
github/deemru/w8io/169f3d6 33.41 ms ◑