tx · omVy8S3uhiiPEBufgQDpsVviDkxqpewHt7QQymBGjuo 3N1MhoWPJcMyvhCRQJYTJE8LXbHeEFDXidW: -0.00200000 Waves 2024.12.12 15:00 [3411355] smart account 3N1MhoWPJcMyvhCRQJYTJE8LXbHeEFDXidW > SELF 0.00000000 Waves
{ "type": 13, "id": "omVy8S3uhiiPEBufgQDpsVviDkxqpewHt7QQymBGjuo", "fee": 200000, "feeAssetId": null, "timestamp": 1734004817142, "version": 2, "chainId": 84, "sender": "3N1MhoWPJcMyvhCRQJYTJE8LXbHeEFDXidW", "senderPublicKey": "CsDkcgFFD8xT5Dj6BsECWb12X41G1GHbxt41oYHWkb9p", "proofs": [ "3XGxf3TDKZ3dzJu7G48L4bNDipF9yM1CwzS9z7EPkiDzpoyGVXaUjp53hLK4FCGRmY9TkSep48NimSzHne3PW3bW" ], "script": "base64:CAIWCAISBAoCCAgSBQoDCAgIEgUKAwgIAQADAWkBCWFkZEZhcm1lcgIMcHViS2V5RmFybWVyCHVzZXJkYXRhBAZmYXJtZXIJAJ8IAQkArAICBQxwdWJLZXlGYXJtZXICBl9jb3VudAMJAQIhPQIIBQFpBmNhbGxlcgUEdGhpcwkAAgECKk9ubHkgdGhlIHZldCBvZmZpY2UgY2FuIGNyZWF0ZSBuZXcgRmFybWVycwMJAAACBQZmYXJtZXIFBHVuaXQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQxwdWJLZXlGYXJtZXICCV91c2VyZGF0YQUIdXNlcmRhdGEJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQxwdWJLZXlGYXJtZXICCF9wZW5kaW5nAgAJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgUMcHViS2V5RmFybWVyAgZfY291bnQAAAUDbmlsCQACAQIVRmFybWVyIGFscmVhZHkgZXhpc3RzAWkBBmFkZEF1QQMKZGF0YUZhcm1lcgdkYXRhVmV0DHB1YktleUZhcm1lcgQFY291bnQEByRtYXRjaDAJAJ8IAQkArAICBQxw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RvZXMgbm90IGV4aXN0BAtwZW5kaW5nTGlzdAkAtQkCCQERQGV4dHJOYXRpdmUoMTA1OCkBCQCsAgIFDHB1YktleUZhcm1lcgIIX3BlbmRpbmcCASwEBWluZGV4CQDPCAIFC3BlbmRpbmdMaXN0CQCkAwEFBWVudHJ5AwkAAAIFBWluZGV4BQR1bml0CQACAQkArAICCQCsAgICBkVudHJ5IAkApAMBBQVlbnRyeQIPIGRvZXMgbm90IGV4aXN0BBBuZXdQZW5kaW5nU3RyaW5nCQC5CQIJANEIAgULcGVuZGluZ0xpc3QJAQV2YWx1ZQEFBWluZGV4AgEsCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgkArAICCQCsAgIFDHB1YktleUZhcm1lcgIBXwkApAMBBQVlbnRyeQIJX1ZlcmlmaWVkBQRkYXRhCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUMcHViS2V5RmFybWVyAghfcGVuZGluZwUQbmV3UGVuZGluZ1N0cmluZwUDbmlsAJ8YYeU=", "height": 3411355, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 8 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | ||
5 | + | ||
6 | + | @Callable(a) | |
7 | + | func addFarmer (b,c) = { | |
8 | + | let d = getInteger((b + "_count")) | |
9 | + | if ((a.caller != this)) | |
10 | + | then throw("Only the vet office can create new Farmers") | |
11 | + | else if ((d == unit)) | |
12 | + | then [StringEntry((b + "_userdata"), c), StringEntry((b + "_pending"), ""), IntegerEntry((b + "_count"), 0)] | |
13 | + | else throw("Farmer already exists") | |
14 | + | } | |
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | @Callable(a) | |
19 | + | func addAuA (e,f,b) = { | |
20 | + | let g = { | |
21 | + | let h = getInteger((b + "_count")) | |
22 | + | if ($isInstanceOf(h, "Int")) | |
23 | + | then { | |
24 | + | let i = h | |
25 | + | i | |
26 | + | } | |
27 | + | else throw("Farmer does not exist") | |
28 | + | } | |
29 | + | let j = getStringValue((b + "_pending")) | |
30 | + | let k = [toString(g), split(j, ",")] | |
31 | + | [StringEntry((b + "_pending"), makeString(k, ",")), StringEntry(((b + "_") + toString(g)), e), StringEntry(((((toString(a.caller) + "_") + b) + "_") + toString(g)), f), IntegerEntry((b + "_count"), (g + 1))] | |
32 | + | } | |
33 | + | ||
34 | + | ||
35 | + | ||
36 | + | @Callable(a) | |
37 | + | func verify (l,b,m) = if (!(isDefined(getString((b + "_pending"))))) | |
38 | + | then throw("Farmer does not exist") | |
39 | + | else if (isDefined(getString((((b + "_") + toString(m)) + "_Verified")))) | |
40 | + | then throw("AuA Entry already verified") | |
41 | + | else if (!(isDefined(getString(((b + "_") + toString(m)))))) | |
42 | + | then throw((("Entry " + toString(m)) + " does not exist")) | |
43 | + | else { | |
44 | + | let k = split(getStringValue((b + "_pending")), ",") | |
45 | + | let n = indexOf(k, toString(m)) | |
46 | + | if ((n == unit)) | |
47 | + | then throw((("Entry " + toString(m)) + " does not exist")) | |
48 | + | else { | |
49 | + | let o = makeString(removeByIndex(k, value(n)), ",") | |
50 | + | [StringEntry((((b + "_") + toString(m)) + "_Verified"), l), StringEntry((b + "_pending"), o)] | |
51 | + | } | |
52 | + | } | |
53 | + | ||
54 | + |
github/deemru/w8io/026f985 13.79 ms ◑