tx · 6rfVNUVW5g6UPbYL5P5C2s1gPkGJVkQaUpoE12KMyKJy

3N32GeQUdczGs7Z7ydw61pwvSiQBZzcw3JT:  -0.00100000 Waves

2024.11.16 22:47 [3374447] smart account 3N32GeQUdczGs7Z7ydw61pwvSiQBZzcw3JT > SELF 0.00000000 Waves

{ "type": 13, "id": "6rfVNUVW5g6UPbYL5P5C2s1gPkGJVkQaUpoE12KMyKJy", "fee": 100000, "feeAssetId": null, "timestamp": 1731786467460, "version": 2, "chainId": 84, "sender": "3N32GeQUdczGs7Z7ydw61pwvSiQBZzcw3JT", "senderPublicKey": "ET6ym4HVZdZ7NydKrh8XyxxRd45au4zvLQq7LieAFSs1", "proofs": [ "fZt4rKRSfs7kPbhSioTmnPLtxCHnvScb19HV9bt5JHjP5TFy4iFs1P64jdk3nuPjEtwWz5NcTUwaBDzJuXXKc1q" ], "script": "base64:CAIKCAISABIECgIICAACAWkBCWFkZEZhcm1lcgAEB2FkZHJlc3MJAKUIAQgFAWkGY2FsbGVyBAZmYXJtZXIJAJ8IAQUHYWRkcmVzcwMJAAACBQZmYXJtZXIFBHVuaXQJAMwIAgkBDEludGVnZXJFbnRyeQIFB2FkZHJlc3MAAAUDbmlsCQACAQIVRmFybWVyIGFscmVhZHkgZXhpc3RzAWkBBmFkZEF1QQIEZGF0YQZmYXJtZXIEB2FkZHJlc3MJAKUIAQgFAWkGY2FsbGVyBAVjb3VudAQHJG1hdGNoMAkAnwgBBQdhZGRyZXNzAwkAAQIFByRtYXRjaDACA0ludAQBYQUHJG1hdGNoMAUBYQAABAdwZW5kaW5nCQCiCAEJAKwCAgUHYWRkcmVzcwIIX3BlbmRpbmcDCQAAAgUHcGVuZGluZwUEdW5pdAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFB2FkZHJlc3MCCF9wZW5kaW5nAgEwCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUHYWRkcmVzcwICXzAFBGRhdGEJAMwIAgkBDEludGVnZXJFbnRyeQIFB2FkZHJlc3MAAQUDbmlsCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUHYWRkcmVzcwIIX3BlbmRpbmcJAKwCAgkArAICCQEFdmFsdWUBBQdwZW5kaW5nAgEsCQCkAwEFBWNvdW50CQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgkArAICBQdhZGRyZXNzAgFfCQCkAwEFBWNvdW50BQRkYXRhCQDMCAIJAQxJbnRlZ2VyRW50cnkCBQdhZGRyZXNzCQBkAgUFY291bnQAAQUDbmlsADppE7s=", "height": 3374447, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7MZ1nsdeUnaSJ8LRWBLp31rZPsiiFLERWT9QXX6DV5Cx Next: E1Gq2hLSxv75J7bYfhEyxJTovxkSj53qF1ZoqNja2gvY Diff:
OldNewDifferences
2323 case _ =>
2424 0
2525 }
26- if ((count == 0))
27- then throw("Farmer does not exist")
28- else match getString((address + "_pending")) {
29- case _: Unit =>
30-[StringEntry((address + "_pending"), "0"), StringEntry((address + "_0"), data), IntegerEntry(address, 1)]
31- case pending: String =>
32-[StringEntry((address + "_pending"), ((pending + ",") + toString(count))), StringEntry(((address + "_") + toString(count)), data), IntegerEntry(address, (count + 1))]
33- case _ =>
34- throw("Match error")
35- }
26+ let pending = getString((address + "_pending"))
27+ if ((pending == unit))
28+ then [StringEntry((address + "_pending"), "0"), StringEntry((address + "_0"), data), IntegerEntry(address, 1)]
29+ else [StringEntry((address + "_pending"), ((value(pending) + ",") + toString(count))), StringEntry(((address + "_") + toString(count)), data), IntegerEntry(address, (count + 1))]
3630 }
3731
3832
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 8 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func addFarmer () = {
88 let address = toString(i.caller)
99 let farmer = getInteger(address)
1010 if ((farmer == unit))
1111 then [IntegerEntry(address, 0)]
1212 else throw("Farmer already exists")
1313 }
1414
1515
1616
1717 @Callable(i)
1818 func addAuA (data,farmer) = {
1919 let address = toString(i.caller)
2020 let count = match getInteger(address) {
2121 case a: Int =>
2222 a
2323 case _ =>
2424 0
2525 }
26- if ((count == 0))
27- then throw("Farmer does not exist")
28- else match getString((address + "_pending")) {
29- case _: Unit =>
30-[StringEntry((address + "_pending"), "0"), StringEntry((address + "_0"), data), IntegerEntry(address, 1)]
31- case pending: String =>
32-[StringEntry((address + "_pending"), ((pending + ",") + toString(count))), StringEntry(((address + "_") + toString(count)), data), IntegerEntry(address, (count + 1))]
33- case _ =>
34- throw("Match error")
35- }
26+ let pending = getString((address + "_pending"))
27+ if ((pending == unit))
28+ then [StringEntry((address + "_pending"), "0"), StringEntry((address + "_0"), data), IntegerEntry(address, 1)]
29+ else [StringEntry((address + "_pending"), ((value(pending) + ",") + toString(count))), StringEntry(((address + "_") + toString(count)), data), IntegerEntry(address, (count + 1))]
3630 }
3731
3832

github/deemru/w8io/026f985 
29.78 ms