tx · 2fPHMgCXeHEEaNq73gjENgpzy1Yq2xLX3xwyhyPTdCTX 3NBpQq52q11826tWYLwts9XP5ThKrXvPnAN: -0.00200000 Waves 2024.11.23 17:34 [3384216] smart account 3NBpQq52q11826tWYLwts9XP5ThKrXvPnAN > SELF 0.00000000 Waves
{ "type": 13, "id": "2fPHMgCXeHEEaNq73gjENgpzy1Yq2xLX3xwyhyPTdCTX", "fee": 200000, "feeAssetId": null, "timestamp": 1732372526955, "version": 2, "chainId": 84, "sender": "3NBpQq52q11826tWYLwts9XP5ThKrXvPnAN", "senderPublicKey": "9iPKKDFisRwELdZFUAPPT3UhR7v23GA4BWaqPL7xjHay", "proofs": [ "vjrgeFoVqqkDRZsdFV9M3dNxJf3vxSQxqFeXgspkcp2P2KB9XSgYgo1nMeh6FzVsR8JjryLNxYTPRGCyedvCuXf" ], "script": "base64:CAISCAISABIFCgMICAgSBQoDCAgBAAMBaQEJYWRkRmFybWVyAAQHYWRkcmVzcwkApQgBCAUBaQZjYWxsZXIEBmZhcm1lcgkAnwgBCQCsAgIFB2FkZHJlc3MCBl9jb3VudAMJAAACBQZmYXJtZXIFBHVuaXQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQdhZGRyZXNzAghfcGVuZGluZwIACQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFB2FkZHJlc3MCBl9jb3VudAAABQNuaWwJAAIBAhVGYXJtZXIgYWxyZWFkeSBleGlzdHMBaQEGYWRkQXVBAwpkYXRhRmFybWVyB2RhdGFWZXQGZmFybWVyBAVjb3VudAQHJG1hdGNoMAkAnwgBCQCsAgIFBmZhcm1lcgIGX2NvdW50AwkAAQIFByRtYXRjaDACA0ludAQBYQUHJG1hdGNoMAUBYQAABAdwZW5kaW5nCQCiCAEJAKwCAgUGZmFybWVyAghfcGVuZGluZwMJAQEhAQkBCWlzRGVmaW5lZAEFB3BlbmRpbmcJAAIBAhVGYXJtZXIgZG9lcyBub3QgZXhpc3QDCQAAAgUHcGV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BBQVlbnRyeQICX0YJAAIBCQCsAgIJAKwCAgIGRW50cnkgCQCkAwEFBWVudHJ5Ag8gZG9lcyBub3QgZXhpc3QEDXBlbmRpbmdTdHJpbmcJALUJAgkBEUBleHRyTmF0aXZlKDEwNTgpAQkArAICBQZmYXJtZXICCF9wZW5kaW5nAgEsBAVpbmRleAkAzwgCBQ1wZW5kaW5nU3RyaW5nCQCkAwEFBWVudHJ5AwkAAAIFBWluZGV4BQR1bml0CQACAQkArAICCQCsAgICBkVudHJ5IAkApAMBBQVlbnRyeQIPIGRvZXMgbm90IGV4aXN0BBBuZXdQZW5kaW5nU3RyaW5nCQC5CQIJANEIAgUNcGVuZGluZ1N0cmluZwkBBXZhbHVlAQUFaW5kZXgCASwJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICCQCsAgIJAKwCAgUGZmFybWVyAgFfCQCkAwEFBWVudHJ5AglfVmVyaWZpZWQFBGRhdGEJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQZmYXJtZXICCF9wZW5kaW5nBRBuZXdQZW5kaW5nU3RyaW5nBQNuaWwAExHSMA==", "height": 3384216, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6rLDGc3LbqLUJ3PZpgk1Qk767UaRebabVp756Tep7zw6 Next: ACyydSRtR73QC6bkSyAu8sZmCFiAw632iMyTiL3LksD9 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(a) | |
7 | 7 | func addFarmer () = { | |
8 | 8 | let b = toString(a.caller) | |
9 | 9 | let c = getInteger((b + "_count")) | |
10 | 10 | if ((c == unit)) | |
11 | 11 | then [StringEntry((b + "_pending"), ""), IntegerEntry((b + "_count"), 0)] | |
12 | 12 | else throw("Farmer already exists") | |
13 | 13 | } | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | ||
17 | 17 | @Callable(a) | |
18 | 18 | func addAuA (d,e,c) = { | |
19 | 19 | let f = { | |
20 | 20 | let g = getInteger((c + "_count")) | |
21 | 21 | if ($isInstanceOf(g, "Int")) | |
22 | 22 | then { | |
23 | 23 | let h = g | |
24 | 24 | h | |
25 | 25 | } | |
26 | 26 | else 0 | |
27 | 27 | } | |
28 | 28 | let i = getString((c + "_pending")) | |
29 | 29 | if (!(isDefined(i))) | |
30 | 30 | then throw("Farmer does not exist") | |
31 | 31 | else if ((i == "")) | |
32 | 32 | then [StringEntry((c + "_pending"), "0"), StringEntry((c + "_0_F"), d), StringEntry((((toString(a.caller) + "_") + c) + "_0_V"), e), IntegerEntry((c + "_count"), 1)] | |
33 | 33 | else [StringEntry((c + "_pending"), ((value(i) + ",") + toString(f))), StringEntry((((c + "_") + toString(f)) + "_F"), d), StringEntry((((((toString(a.caller) + "_") + c) + "_") + toString(f)) + "_V"), e), IntegerEntry((c + "_count"), (f + 1))] | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | ||
38 | 38 | @Callable(a) | |
39 | 39 | func verify (j,c,k) = if (!(isDefined(getString((c + "_pending"))))) | |
40 | 40 | then throw("Farmer does not exist") | |
41 | 41 | else if (isDefined(getString((((c + "_") + toString(k)) + "_Verified")))) | |
42 | 42 | then throw("AuA Entry already verified") | |
43 | 43 | else if (!(isDefined(getString((((c + "_") + toString(k)) + "_F"))))) | |
44 | 44 | then throw((("Entry " + toString(k)) + " does not exist")) | |
45 | 45 | else { | |
46 | 46 | let l = split(getStringValue((c + "_pending")), ",") | |
47 | 47 | let m = indexOf(l, toString(k)) | |
48 | 48 | if ((m == unit)) | |
49 | 49 | then throw((("Entry " + toString(k)) + " does not exist")) | |
50 | 50 | else { | |
51 | 51 | let n = makeString(removeByIndex(l, value(m)), ",") | |
52 | 52 | [StringEntry((((c + "_") + toString(k)) + "_Verified"), j), StringEntry((c + "_pending"), n)] | |
53 | 53 | } | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 |
github/deemru/w8io/026f985 15.09 ms ◑