tx · G3uY3pL9gS81e5qk5GNYSEMa6wL72NSQu3k2A6K6ByJW

3N5gWG3xp8iqkyaQASichLUQqCBVGgRv3RN:  -0.00100000 Waves

2024.11.16 22:21 [3374423] smart account 3N5gWG3xp8iqkyaQASichLUQqCBVGgRv3RN > SELF 0.00000000 Waves

{ "type": 13, "id": "G3uY3pL9gS81e5qk5GNYSEMa6wL72NSQu3k2A6K6ByJW", "fee": 100000, "feeAssetId": null, "timestamp": 1731784925459, "version": 2, "chainId": 84, "sender": "3N5gWG3xp8iqkyaQASichLUQqCBVGgRv3RN", "senderPublicKey": "3Qq33JqcACq2sCuxQW8NCA4SwwbL93n4XgPQCvsdDJGu", "proofs": [ "2KC6wXpS6pUKw8DXN9A3PPWyUPWd9xS6Dx1WaZWbHUKhtFped91CAwgpgZtpEhbWE6HjX1zSEjjKYcjDMtWwMdeu" ], "script": "base64:CAIKCAISABIECgIICAACAWkBCWFkZEZhcm1lcgAEB2FkZHJlc3MJAKUIAQgFAWkGY2FsbGVyBAZmYXJtZXIJAJ8IAQUHYWRkcmVzcwMJAAACBQZmYXJtZXIFBHVuaXQJAMwIAgkBDEludGVnZXJFbnRyeQIFB2FkZHJlc3MAAAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFB2FkZHJlc3MCCF9wZW5kaW5nAgAFA25pbAkAAgECFUZhcm1lciBhbHJlYWR5IGV4aXN0cwFpAQZhZGRBdUECBGRhdGEGZmFybWVyBAdhZGRyZXNzCQClCAEIBQFpBmNhbGxlcgQFY291bnQEByRtYXRjaDAJAJ8IAQUHYWRkcmVzcwMJAAECBQckbWF0Y2gwAgNJbnQEAWEFByRtYXRjaDAFAWEAAAMJAAACBQVjb3VudAAACQACAQIVRmFybWVyIGRvZXMgbm90IGV4aXN0BAckbWF0Y2gwCQCiCAEJAKwCAgUHYWRkcmVzcwIIX3BlbmRpbmcDCQABAgUHJG1hdGNoMAIEVW5pdAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFB2FkZHJlc3MCCF9wZW5kaW5nAgEwCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUHYWRkcmVzcwICXzAFBGRhdGEJAMwIAgkBDEludGVnZXJFbnRyeQIFB2FkZHJlc3MAAQUDbmlsAwkAAQIFByRtYXRjaDACBlN0cmluZwQHcGVuZGluZwUHJG1hdGNoMAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFB2FkZHJlc3MCCF9wZW5kaW5nCQCsAgIJAKwCAgUHcGVuZGluZwIBLAkApAMBBQVjb3VudAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJAKwCAgUHYWRkcmVzcwIBXwkApAMBBQVjb3VudAUEZGF0YQkAzAgCCQEMSW50ZWdlckVudHJ5AgUHYWRkcmVzcwkAZAIFBWNvdW50AAEFA25pbAkAAgECC01hdGNoIGVycm9yACaMadg=", "height": 3374423, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BnA1o6iTpfScYc53JVwpsRd5GuJiEYTK7Xb4vKLEB9V Next: GW1ASWj8fux33eEhxq5Bvk9XepG18FE6VXbTGpZkBqsU Diff:
OldNewDifferences
1313 }
1414
1515
16+
17+@Callable(i)
18+func addAuA (data,farmer) = {
19+ let address = toString(i.caller)
20+ let count = match getInteger(address) {
21+ case a: Int =>
22+ a
23+ case _ =>
24+ 0
25+ }
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+ }
36+ }
37+
38+
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), StringEntry((address + "_pending"), "")]
1212 else throw("Farmer already exists")
1313 }
1414
1515
16+
17+@Callable(i)
18+func addAuA (data,farmer) = {
19+ let address = toString(i.caller)
20+ let count = match getInteger(address) {
21+ case a: Int =>
22+ a
23+ case _ =>
24+ 0
25+ }
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+ }
36+ }
37+
38+

github/deemru/w8io/026f985 
22.76 ms