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:
Old | New | | Differences |
---|
13 | 13 | | } |
---|
14 | 14 | | |
---|
15 | 15 | | |
---|
| 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:
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 [IntegerEntry(address, 0), StringEntry((address + "_pending"), "")] |
---|
12 | 12 | | else throw("Farmer already exists") |
---|
13 | 13 | | } |
---|
14 | 14 | | |
---|
15 | 15 | | |
---|
| 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 | + | |
---|