tx · 3Tc5ayk5RsmgKscPQyCvkp3fnzSAAvgQ6sA8eqdvh7DK 3NCxykDjQAVqFXdZCBbY2Y1MWuFPxfiaStd: -0.00200000 Waves 2025.01.12 12:45 [3455775] smart account 3NCxykDjQAVqFXdZCBbY2Y1MWuFPxfiaStd > SELF 0.00000000 Waves
{ "type": 13, "id": "3Tc5ayk5RsmgKscPQyCvkp3fnzSAAvgQ6sA8eqdvh7DK", "fee": 200000, "feeAssetId": null, "timestamp": 1736675129944, "version": 2, "chainId": 84, "sender": "3NCxykDjQAVqFXdZCBbY2Y1MWuFPxfiaStd", "senderPublicKey": "BvW674ouAqseb6zqNVy64ni4oct7WbqEXG6i99YCBL5M", "proofs": [ "494sA3itLoeToYzrHp9diyB2z269LqSMRCk4UTgVRRHa3odix43kyrhv1GTr9Ye5tMLcuYNoMekWCtwfNrRDkACD" ], "script": "base64:CAISCAISABIFCgMICAgSBQoDCAgBAAMBaQEJYWRkRmFybWVyAAQHYWRkcmVzcwkApQgBCAUBaQZjYWxsZXIEBmZhcm1lcgkAnwgBCQCsAgIFB2FkZHJlc3MCBl9jb3VudAMJAAACBQZmYXJtZXIFBHVuaXQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQdhZGRyZXNzAghfcGVuZGluZwIACQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFB2FkZHJlc3MCBl9jb3VudAAABQNuaWwJAAIBAhVGYXJtZXIgYWxyZWFkeSBleGlzdHMBaQEGYWRkQXVBAwpkYXRhRmFybWVyB2RhdGFWZXQGZmFybWVyBAVjb3VudAQHJG1hdGNoMAkAnwgBCQCsAgIFBmZhcm1lcgIGX2NvdW50AwkAAQIFByRtYXRjaDACA0ludAQBYQUHJG1hdGNoMAUBYQkAAgECFUZhcm1lciBkb2VzIG5vdCBleGlzdAQHcGVuZGluZwkBEUBleHRyTmF0aXZlKDEwNTgpAQkArAICBQZmYXJtZXICCF9wZW5kaW5nBAtwZW5kaW5nTGlzdAkAzAgCCQC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gZG9lcyBub3QgZXhpc3QEEG5ld1BlbmRpbmdTdHJpbmcJALkJAgkA0QgCBQtwZW5kaW5nTGlzdAkBBXZhbHVlAQUFaW5kZXgCASwJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICCQCsAgIJAKwCAgUGZmFybWVyAgFfCQCkAwEFBWVudHJ5AglfVmVyaWZpZWQFBGRhdGEJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQZmYXJtZXICCF9wZW5kaW5nBRBuZXdQZW5kaW5nU3RyaW5nBQNuaWwAyCUaXw==", "height": 3455775, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: La4nYTJsFEVfWcwX9JEVsPcLApEhKAQVAyYE2iBHHt2 Next: none 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 + "_count")) | |
10 | 10 | if ((farmer == unit)) | |
11 | 11 | then [StringEntry((address + "_pending"), ""), 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 (dataFarmer,dataVet,farmer) = { | |
19 | 19 | let count = match getInteger((farmer + "_count")) { | |
20 | 20 | case a: Int => | |
21 | 21 | a | |
22 | 22 | case _ => | |
23 | 23 | throw("Farmer does not exist") | |
24 | 24 | } | |
25 | 25 | let pending = getStringValue((farmer + "_pending")) | |
26 | 26 | let pendingList = [toString(count), split(pending, ",")] | |
27 | 27 | [StringEntry((farmer + "_pending"), makeString(pendingList, ",")), StringEntry((((farmer + "_") + toString(count)) + "_F"), dataFarmer), StringEntry((((((toString(i.caller) + "_") + farmer) + "_") + toString(count)) + "_V"), dataVet), IntegerEntry((farmer + "_count"), (count + 1))] | |
28 | 28 | } | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | ||
32 | 32 | @Callable(i) | |
33 | 33 | func verify (data,farmer,entry) = if (!(isDefined(getString((farmer + "_pending"))))) | |
34 | 34 | then throw("Farmer does not exist") | |
35 | 35 | else if (isDefined(getString((((farmer + "_") + toString(entry)) + "_Verified")))) | |
36 | 36 | then throw("AuA Entry already verified") | |
37 | 37 | else if (!(isDefined(getString((((farmer + "_") + toString(entry)) + "_F"))))) | |
38 | 38 | then throw((("Entry " + toString(entry)) + " does not exist")) | |
39 | 39 | else { | |
40 | 40 | let pendingList = split(getStringValue((farmer + "_pending")), ",") | |
41 | 41 | let index = indexOf(pendingList, toString(entry)) | |
42 | 42 | if ((index == unit)) | |
43 | 43 | then throw((("Entry " + toString(entry)) + " does not exist")) | |
44 | 44 | else { | |
45 | 45 | let newPendingString = makeString(removeByIndex(pendingList, value(index)), ",") | |
46 | 46 | [StringEntry((((farmer + "_") + toString(entry)) + "_Verified"), data), StringEntry((farmer + "_pending"), newPendingString)] | |
47 | 47 | } | |
48 | 48 | } | |
49 | 49 | ||
50 | 50 |
github/deemru/w8io/169f3d6 17.68 ms ◑