tx · 1MqF5q4L2cMXrz94kADpfBA22Z2n6nEj65qRJEcvEN6

3Mxj3JU6AwxDCYVsqGf3Jw44FQkoQb78SSh:  -0.00200000 Waves

2024.12.12 22:13 [3411780] smart account 3Mxj3JU6AwxDCYVsqGf3Jw44FQkoQb78SSh > SELF 0.00000000 Waves

{ "type": 13, "id": "1MqF5q4L2cMXrz94kADpfBA22Z2n6nEj65qRJEcvEN6", "fee": 200000, "feeAssetId": null, "timestamp": 1734030841186, "version": 2, "chainId": 84, "sender": "3Mxj3JU6AwxDCYVsqGf3Jw44FQkoQb78SSh", "senderPublicKey": "CNmdqskTBUYceuzhiJYdPRktAdzMudYntgg7P1H92MNc", "proofs": [ "38rHpWD6CSkGNTwcwiZDir5FvJCEXujKRQ2sj6YUGdYafvZCtHSj3GYwbQFDEFpycfaafPy9bsRoJc3481ZM98A4" ], "script": "base64:CAIWCAISBAoCCAgSBQoDCAgIEgUKAwgIAQADAWkBCWFkZEZhcm1lcgIMcHViS2V5RmFybWVyCHVzZXJkYXRhBAZmYXJtZXIJAJ8IAQkArAICBQxwdWJLZXlGYXJtZXICBl9jb3VudAMJAQIhPQIIBQFpBmNhbGxlcgUEdGhpcwkAAgECKk9ubHkgdGhlIHZldCBvZmZpY2UgY2FuIGNyZWF0ZSBuZXcgRmFybWVycwMJAAACBQZmYXJtZXIFBHVuaXQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQxwdWJLZXlGYXJtZXICCV91c2VyZGF0YQUIdXNlcmRhdGEJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQxwdWJLZXlGYXJtZXICCF9wZW5kaW5nAgAJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgUMcHViS2V5RmFybWVyAgZfY291bnQAAAUDbmlsCQACAQIVRmFybWVyIGFscmVhZHkgZXhpc3RzAWkBBmFkZEFhZAMKZGF0YUZhcm1lcgdkYXRhVmV0DHB1YktleUZhcm1lcgQFY291bnQEByRtYXRjaDAJAJ8IAQkArA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AMBBQVlbnRyeQIPIGRvZXMgbm90IGV4aXN0BAtwZW5kaW5nTGlzdAkAtQkCCQERQGV4dHJOYXRpdmUoMTA1OCkBCQCsAgIFDHB1YktleUZhcm1lcgIIX3BlbmRpbmcCASwEBWluZGV4CQDPCAIFC3BlbmRpbmdMaXN0CQCkAwEFBWVudHJ5AwkAAAIFBWluZGV4BQR1bml0CQACAQkArAICCQCsAgICBkVudHJ5IAkApAMBBQVlbnRyeQIPIGRvZXMgbm90IGV4aXN0BBBuZXdQZW5kaW5nU3RyaW5nCQC5CQIJANEIAgULcGVuZGluZ0xpc3QJAQV2YWx1ZQEFBWluZGV4AgEsCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgkArAICCQCsAgIFDHB1YktleUZhcm1lcgIBXwkApAMBBQVlbnRyeQIJX3ZlcmlmaWVkBQRkYXRhCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUMcHViS2V5RmFybWVyAghfcGVuZGluZwUQbmV3UGVuZGluZ1N0cmluZwUDbmlsAE+oMZA=", "height": 3411780, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: E3WHd8ot1VCvjDKkFyaW3GcBrZyzcdtk6d5fv9dBBB3H Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 8 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(a)
77 func addFarmer (b,c) = {
88 let d = getInteger((b + "_count"))
99 if ((a.caller != this))
1010 then throw("Only the vet office can create new Farmers")
1111 else if ((d == unit))
1212 then [StringEntry((b + "_userdata"), c), StringEntry((b + "_pending"), ""), IntegerEntry((b + "_count"), 0)]
1313 else throw("Farmer already exists")
1414 }
1515
1616
1717
1818 @Callable(a)
1919 func addAad (e,f,b) = {
2020 let g = {
2121 let h = getInteger((b + "_count"))
2222 if ($isInstanceOf(h, "Int"))
2323 then {
2424 let i = h
2525 i
2626 }
2727 else throw("Farmer does not exist")
2828 }
2929 let j = getStringValue((b + "_pending"))
3030 let k = [toString(g), split(j, ",")]
3131 [StringEntry((b + "_pending"), makeString(k, ",")), StringEntry(((b + "_") + toString(g)), e), StringEntry(((((b + "_") + toBase58String(a.callerPublicKey)) + "_") + toString(g)), f), IntegerEntry((b + "_count"), (g + 1))]
3232 }
3333
3434
3535
3636 @Callable(a)
3737 func verify (l,b,m) = if (!(isDefined(getString((b + "_pending")))))
3838 then throw("Farmer does not exist")
3939 else if (isDefined(getString((((b + "_") + toString(m)) + "_verified"))))
4040 then throw("AuA Entry already verified")
4141 else if (!(isDefined(getString(((b + "_") + toString(m))))))
4242 then throw((("Entry " + toString(m)) + " does not exist"))
4343 else {
4444 let k = split(getStringValue((b + "_pending")), ",")
4545 let n = indexOf(k, toString(m))
4646 if ((n == unit))
4747 then throw((("Entry " + toString(m)) + " does not exist"))
4848 else {
4949 let o = makeString(removeByIndex(k, value(n)), ",")
5050 [StringEntry((((b + "_") + toString(m)) + "_verified"), l), StringEntry((b + "_pending"), o)]
5151 }
5252 }
5353
5454

github/deemru/w8io/026f985 
19.32 ms