tx · FqoYqGeoQY9oBWnuVYocbA67saWhQzw1cLwmcxfgX6Wn

3MwSUCtcFsczXspn2zXnuY2Qbc3ntMV5j9o:  -0.00200000 Waves

2024.12.15 16:54 [3415763] smart account 3MwSUCtcFsczXspn2zXnuY2Qbc3ntMV5j9o > SELF 0.00000000 Waves

{ "type": 13, "id": "FqoYqGeoQY9oBWnuVYocbA67saWhQzw1cLwmcxfgX6Wn", "fee": 200000, "feeAssetId": null, "timestamp": 1734270876908, "version": 2, "chainId": 84, "sender": "3MwSUCtcFsczXspn2zXnuY2Qbc3ntMV5j9o", "senderPublicKey": "2n2HckgwZhE4kaAhHqRKywLfAKYtZTXvAvCHB2hPLE4U", "proofs": [ "YhqQSv5vuH9F6hwaUSDtsSExGDx8B3vJkNn39oLUmzN1rvRJiYwefmBzX6f1NLGmzzdWVhLkiu72vWjN5MtsUhi" ], "script": "base64:CAIVCAISBAoCCAgSBQoDCAgIEgQKAggBAAMBaQEJYWRkRmFybWVyAgxwdWJLZXlGYXJtZXIIdXNlcmRhdGEEBmZhcm1lcgkAnwgBCQCsAgIFDHB1YktleUZhcm1lcgIGX2NvdW50AwkBAiE9AggFAWkGY2FsbGVyBQR0aGlzCQACAQIqT25seSB0aGUgdmV0IG9mZmljZSBjYW4gY3JlYXRlIG5ldyBGYXJtZXJzAwkAAAIFBmZhcm1lcgUEdW5pdAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFDHB1YktleUZhcm1lcgIJX3VzZXJkYXRhBQh1c2VyZGF0YQkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFDHB1YktleUZhcm1lcgIIX3BlbmRpbmcCAAkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQxwdWJLZXlGYXJtZXICBl9jb3VudAAACQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJAKcIAQkA2QQBBQxwdWJLZXlGYXJtZXIA4NwqBQR1bml0BQNuaWwJAAIBAhVGYXJtZXIgYWxyZWFkeSBleGlzdHMBa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ZAkAAgECGkF1QSBFbnRyeSBhbHJlYWR5IHZlcmlmaWVkAwkBASEBCQEJaXNEZWZpbmVkAQkAoggBCQCsAgIJAKwCAgUGcHViS2V5AgFfCQCkAwEFBWVudHJ5CQACAQkArAICCQCsAgICBkVudHJ5IAkApAMBBQVlbnRyeQIPIGRvZXMgbm90IGV4aXN0BAtwZW5kaW5nTGlzdAkAtQkCCQERQGV4dHJOYXRpdmUoMTA1OCkBCQCsAgIFBnB1YktleQIIX3BlbmRpbmcCASwEBWluZGV4CQDPCAIFC3BlbmRpbmdMaXN0CQCkAwEFBWVudHJ5AwkAAAIFBWluZGV4BQR1bml0CQACAQkArAICCQCsAgICBkVudHJ5IAkApAMBBQVlbnRyeQIPIGRvZXMgbm90IGV4aXN0BBBuZXdQZW5kaW5nU3RyaW5nCQC5CQIJANEIAgULcGVuZGluZ0xpc3QJAQV2YWx1ZQEFBWluZGV4AgEsCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgkArAICCQCsAgIFBnB1YktleQIBXwkApAMBBQVlbnRyeQIJX3ZlcmlmaWVkBQRkYXRhCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUGcHViS2V5AghfcGVuZGluZwUQbmV3UGVuZGluZ1N0cmluZwkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIAoMIeBQR1bml0BQNuaWwApyTDfQ==", "height": 3415763, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 8DK4HTpwJ3aQS6FfpwyrzqRnq7gzAVrSdfMapX83GDxq Full:
OldNewDifferences
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), ScriptTransfer(addressFromPublicKey(fromBase58String(b)), 700000, unit)]
13+ else throw("Farmer already exists")
14+ }
15+
16+
17+
18+@Callable(a)
19+func addAad (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(((((b + "_") + toBase58String(a.callerPublicKey)) + "_") + toString(g)), f), IntegerEntry((b + "_count"), (g + 1)), ScriptTransfer(a.caller, 500000, unit)]
32+ }
33+
34+
35+
36+@Callable(a)
37+func verify (l,m) = {
38+ let n = toBase58String(a.callerPublicKey)
39+ if (!(isDefined(getString((n + "_pending")))))
40+ then throw("Farmer does not exist")
41+ else if (isDefined(getString((((n + "_") + toString(m)) + "_verified"))))
42+ then throw("AuA Entry already verified")
43+ else if (!(isDefined(getString(((n + "_") + toString(m))))))
44+ then throw((("Entry " + toString(m)) + " does not exist"))
45+ else {
46+ let k = split(getStringValue((n + "_pending")), ",")
47+ let o = indexOf(k, toString(m))
48+ if ((o == unit))
49+ then throw((("Entry " + toString(m)) + " does not exist"))
50+ else {
51+ let p = makeString(removeByIndex(k, value(o)), ",")
52+[StringEntry((((n + "_") + toString(m)) + "_verified"), l), StringEntry((n + "_pending"), p), ScriptTransfer(a.caller, 500000, unit)]
53+ }
54+ }
55+ }
56+
57+

github/deemru/w8io/169f3d6 
29.35 ms