tx · 5pjZfQmnnhbWRuBsko1kBrTw6eRNrgPCjXrtvuQDvy9a

3N32GeQUdczGs7Z7ydw61pwvSiQBZzcw3JT:  -0.00100000 Waves

2024.11.16 22:50 [3374451] smart account 3N32GeQUdczGs7Z7ydw61pwvSiQBZzcw3JT > SELF 0.00000000 Waves

{ "type": 13, "id": "5pjZfQmnnhbWRuBsko1kBrTw6eRNrgPCjXrtvuQDvy9a", "fee": 100000, "feeAssetId": null, "timestamp": 1731786681030, "version": 2, "chainId": 84, "sender": "3N32GeQUdczGs7Z7ydw61pwvSiQBZzcw3JT", "senderPublicKey": "ET6ym4HVZdZ7NydKrh8XyxxRd45au4zvLQq7LieAFSs1", "proofs": [ "532crZVrxaxTqkDpSAgZzmgyvss31ozLfWY7t23Z7jsp2wtb2xfDMguSmmxAsx4QVjSpApUQ6YmYPXd8zH4XzjqY" ], "script": "base64:CAIKCAISABIECgIICAACAWkBCWFkZEZhcm1lcgAEB2FkZHJlc3MJAKUIAQgFAWkGY2FsbGVyBAZmYXJtZXIJAJ8IAQUHYWRkcmVzcwMJAAACBQZmYXJtZXIFBHVuaXQJAMwIAgkBDEludGVnZXJFbnRyeQIFB2FkZHJlc3MAAAUDbmlsCQACAQIVRmFybWVyIGFscmVhZHkgZXhpc3RzAWkBBmFkZEF1QQIEZGF0YQZmYXJtZXIEBWNvdW50BAckbWF0Y2gwCQCfCAEFBmZhcm1lcgMJAAECBQckbWF0Y2gwAgNJbnQEAWEFByRtYXRjaDAFAWEAAAQHcGVuZGluZwkAoggBCQCsAgIFBmZhcm1lcgIIX3BlbmRpbmcDCQEBIQEJAQlpc0RlZmluZWQBCQCfCAEFBmZhcm1lcgkAAgECFUZhcm1lciBkb2VzIG5vdCBleGlzdAMJAAACBQdwZW5kaW5nBQR1bml0CQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUGZmFybWVyAghfcGVuZGluZwIBMAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFBmZhcm1lcgICXzAFBGRhdGEJAMwIAgkBDEludGVnZXJFbnRyeQIFBmZhcm1lcgABBQNuaWwJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQZmYXJtZXICCF9wZW5kaW5nCQCsAgIJAKwCAgkBBXZhbHVlAQUHcGVuZGluZwIBLAkApAMBBQVjb3VudAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJAKwCAgUGZmFybWVyAgFfCQCkAwEFBWNvdW50BQRkYXRhCQDMCAIJAQxJbnRlZ2VyRW50cnkCBQZmYXJtZXIJAGQCBQVjb3VudAABBQNuaWwA5e6nSQ==", "height": 3374451, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DhSzEsTaQGedqNTWt5BZAywDW9qWRf3B629MPGNBPRHu Next: DEYCBSYmTsevBGxfUJXgdHmcMNAr4rW2y64Rc2Nane59 Diff:
OldNewDifferences
1616
1717 @Callable(i)
1818 func addAuA (data,farmer) = {
19- let address = toString(i.caller)
20- let count = match getInteger(address) {
19+ let count = match getInteger(farmer) {
2120 case a: Int =>
2221 a
2322 case _ =>
2423 0
2524 }
26- let pending = getString((address + "_pending"))
27- if (!(isDefined(getInteger(address))))
25+ let pending = getString((farmer + "_pending"))
26+ if (!(isDefined(getInteger(farmer))))
2827 then throw("Farmer does not exist")
2928 else if ((pending == unit))
30- then [StringEntry((address + "_pending"), "0"), StringEntry((address + "_0"), data), IntegerEntry(address, 1)]
31- else [StringEntry((address + "_pending"), ((value(pending) + ",") + toString(count))), StringEntry(((address + "_") + toString(count)), data), IntegerEntry(address, (count + 1))]
29+ then [StringEntry((farmer + "_pending"), "0"), StringEntry((farmer + "_0"), data), IntegerEntry(farmer, 1)]
30+ else [StringEntry((farmer + "_pending"), ((value(pending) + ",") + toString(count))), StringEntry(((farmer + "_") + toString(count)), data), IntegerEntry(farmer, (count + 1))]
3231 }
3332
3433
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) = {
19- let address = toString(i.caller)
20- let count = match getInteger(address) {
19+ let count = match getInteger(farmer) {
2120 case a: Int =>
2221 a
2322 case _ =>
2423 0
2524 }
26- let pending = getString((address + "_pending"))
27- if (!(isDefined(getInteger(address))))
25+ let pending = getString((farmer + "_pending"))
26+ if (!(isDefined(getInteger(farmer))))
2827 then throw("Farmer does not exist")
2928 else if ((pending == unit))
30- then [StringEntry((address + "_pending"), "0"), StringEntry((address + "_0"), data), IntegerEntry(address, 1)]
31- else [StringEntry((address + "_pending"), ((value(pending) + ",") + toString(count))), StringEntry(((address + "_") + toString(count)), data), IntegerEntry(address, (count + 1))]
29+ then [StringEntry((farmer + "_pending"), "0"), StringEntry((farmer + "_0"), data), IntegerEntry(farmer, 1)]
30+ else [StringEntry((farmer + "_pending"), ((value(pending) + ",") + toString(count))), StringEntry(((farmer + "_") + toString(count)), data), IntegerEntry(farmer, (count + 1))]
3231 }
3332
3433

github/deemru/w8io/026f985 
32.60 ms