tx · H3f8Cg39p4qta3q37m9u9Fm6q3oDWH1zLtUmPnH4ZBG1

3Mw4ccUXcnEvasnZE2zv3im3BCQRCekCGP9:  -0.00200000 Waves

2025.01.04 17:20 [3444556] smart account 3Mw4ccUXcnEvasnZE2zv3im3BCQRCekCGP9 > SELF 0.00000000 Waves

{ "type": 13, "id": "H3f8Cg39p4qta3q37m9u9Fm6q3oDWH1zLtUmPnH4ZBG1", "fee": 200000, "feeAssetId": null, "timestamp": 1736000493909, "version": 2, "chainId": 84, "sender": "3Mw4ccUXcnEvasnZE2zv3im3BCQRCekCGP9", "senderPublicKey": "3MLB8DYAFa5RZ4u9HUP38ppgiGj8gu734TR8Y1KMJJXw", "proofs": [ "3UZnNjimszXzU7ryP842B3jddm7g3PVCn8pQz1MsgvaQKUMwrc3KssJf9vZEC93Q73v5Xmhj2pCasQqvkAe1Bbyf" ], "script": "base64:CAIVCAISBAoCCAgSBQoDCAgIEgQKAggBAAMBaQEJYWRkRmFybWVyAgxwdWJLZXlGYXJtZXIIdXNlcmRhdGEEBmZhcm1lcgkAnwgBCQCsAgIFDHB1YktleUZhcm1lcgIGX2NvdW50AwkBAiE9AggFAWkGY2FsbGVyBQR0aGlzCQACAQIqT25seSB0aGUgdmV0IG9mZmljZSBjYW4gY3JlYXRlIG5ldyBGYXJtZXJzAwkAAAIFBmZhcm1lcgUEdW5pdAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFDHB1YktleUZhcm1lcgIJX3VzZXJkYXRhBQh1c2VyZGF0YQkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFDHB1YktleUZhcm1lcgIIX3BlbmRpbmcCAAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFDHB1YktleUZhcm1lcgIFX3JvbGUCBmZhcm1lcgkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQxwdWJLZXlGYXJtZXICBl9jb3VudAAACQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJAKcIAQkA2QQBBQxwd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mVkAQkAoggBCQCsAgIJAKwCAgkArAICBQZwdWJLZXkCAV8JAKQDAQUFZW50cnkCCV92ZXJpZmllZAkAAgECGkF1QSBFbnRyeSBhbHJlYWR5IHZlcmlmaWVkAwkBASEBCQEJaXNEZWZpbmVkAQkAoggBCQCsAgIJAKwCAgUGcHViS2V5AgFfCQCkAwEFBWVudHJ5CQACAQkArAICCQCsAgICBkVudHJ5IAkApAMBBQVlbnRyeQIPIGRvZXMgbm90IGV4aXN0BAtwZW5kaW5nTGlzdAkAtQkCCQERQGV4dHJOYXRpdmUoMTA1OCkBCQCsAgIFBnB1YktleQIIX3BlbmRpbmcCASwEBWluZGV4CQDPCAIFC3BlbmRpbmdMaXN0CQCkAwEFBWVudHJ5AwkAAAIFBWluZGV4BQR1bml0CQACAQkArAICCQCsAgICBkVudHJ5IAkApAMBBQVlbnRyeQIPIGRvZXMgbm90IGV4aXN0BBBuZXdQZW5kaW5nU3RyaW5nCQC5CQIJANEIAgULcGVuZGluZ0xpc3QJAQV2YWx1ZQEFBWluZGV4AgEsCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgkArAICCQCsAgIFBnB1YktleQIBXwkApAMBBQVlbnRyeQIJX3ZlcmlmaWVkBQRkYXRhCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUGcHViS2V5AghfcGVuZGluZwUQbmV3UGVuZGluZ1N0cmluZwkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIAoMIeBQR1bml0BQNuaWwAKJEqng==", "height": 3444556, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none 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"), ""), StringEntry((b + "_role"), "farmer"), IntegerEntry((b + "_count"), 0), ScriptTransfer(addressFromPublicKey(fromBase58String(b)), 500000, 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 
12.72 ms