tx · D8YQpgX6f1Pv8XRBVStdKJwQmHWPBpMKa9uuzxgrsuGK

3N7WMWhY6LKwWujjmDbVeV4djQukpZfjA65:  -0.00200000 Waves

2024.11.22 00:10 [3381742] smart account 3N7WMWhY6LKwWujjmDbVeV4djQukpZfjA65 > SELF 0.00000000 Waves

{ "type": 13, "id": "D8YQpgX6f1Pv8XRBVStdKJwQmHWPBpMKa9uuzxgrsuGK", "fee": 200000, "feeAssetId": null, "timestamp": 1732223478448, "version": 2, "chainId": 84, "sender": "3N7WMWhY6LKwWujjmDbVeV4djQukpZfjA65", "senderPublicKey": "HH2qULKRBWphj4yTLEzzEzeLFKDuNr2vAD1DeZu1dyuY", "proofs": [ "3jRCKtCdhVpvQWRpnWzGSj2WYv5JwmZQ8ERp6aqe7F3D9EcejxCHEsHXhafVmX9hbjBKh3bLc4rqnxhXvSFH2AYV" ], "script": "base64:CAISCAISABIFCgMICAgSBQoDCAgBAAMBaQEJYWRkRmFybWVyAAQHYWRkcmVzcwkApQgBCAUBaQZjYWxsZXIEBmZhcm1lcgkAnwgBCQCsAgIFB2FkZHJlc3MCBl9jb3VudAMJAAACBQZmYXJtZXIFBHVuaXQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQdhZGRyZXNzAghfcGVuZGluZwIACQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFB2FkZHJlc3MCBl9jb3VudAAABQNuaWwJAAIBAhVGYXJtZXIgYWxyZWFkeSBleGlzdHMBaQEGYWRkQXVBAwpkYXRhRmFybWVyB2RhdGFWZXQGZmFybWVyBAVjb3VudAQHJG1hdGNoMAkAnwgBCQCsAgIFBmZhcm1lcgIGX2NvdW50AwkAAQIFByRtYXRjaDACA0ludAQBYQUHJG1hdGNoMAUBYQAABAdwZW5kaW5nCQCiCAEJAKwCAgUGZmFybWVyAghfcGVuZGluZwMJAQEhAQkBCWlzRGVmaW5lZAEFB3BlbmRpbmcJAAIBAhVGYXJtZXIgZG9lcyBub3QgZXhpc3QD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5vdCBleGlzdAQNcGVuZGluZ1N0cmluZwkAtQkCCQERQGV4dHJOYXRpdmUoMTA1OCkBCQCsAgIFBmZhcm1lcgIIX3BlbmRpbmcCASwEBWluZGV4CQDPCAIFDXBlbmRpbmdTdHJpbmcJAKQDAQUFZW50cnkDCQAAAgUFaW5kZXgFBHVuaXQJAAIBCQCsAgIJAKwCAgIGRW50cnkgCQCkAwEFBWVudHJ5Ag8gZG9lcyBub3QgZXhpc3QEEG5ld1BlbmRpbmdTdHJpbmcJALkJAgkA0QgCBQ1wZW5kaW5nU3RyaW5nCQEFdmFsdWUBBQVpbmRleAIBLAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJAKwCAgkArAICBQZmYXJtZXICAV8JAKQDAQUFZW50cnkCCV9WZXJpZmllZAUEZGF0YQkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFBmZhcm1lcgIIX3BlbmRpbmcFEG5ld1BlbmRpbmdTdHJpbmcFA25pbAChuHXC", "height": 3381742, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: J7Tnn83iPHMFeoqdQFVo6m6ogTEfUBTjPYNCto9NYyid Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 8 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func addFarmer () = {
88 let address = toString(i.caller)
99 let farmer = getInteger((address + "_count"))
1010 if ((farmer == unit))
1111 then [StringEntry((address + "_pending"), ""), IntegerEntry((address + "_count"), 0)]
1212 else throw("Farmer already exists")
1313 }
1414
1515
1616
1717 @Callable(i)
1818 func addAuA (dataFarmer,dataVet,farmer) = {
1919 let count = match getInteger((farmer + "_count")) {
2020 case a: Int =>
2121 a
2222 case _ =>
2323 0
2424 }
2525 let pending = getString((farmer + "_pending"))
2626 if (!(isDefined(pending)))
2727 then throw("Farmer does not exist")
2828 else if ((pending == ""))
2929 then [StringEntry((farmer + "_pending"), "0"), StringEntry((farmer + "_0_F"), dataFarmer), StringEntry((farmer + "_0_V"), dataVet), IntegerEntry((farmer + "_count"), 1)]
3030 else [StringEntry((farmer + "_pending"), ((value(pending) + ",") + toString(count))), StringEntry((((farmer + "_") + toString(count)) + "_F"), dataFarmer), StringEntry((((farmer + "_") + toString(count)) + "_V"), dataVet), IntegerEntry((farmer + "_count"), (count + 1))]
3131 }
3232
3333
3434
3535 @Callable(i)
3636 func verify (data,farmer,entry) = if (!(isDefined(getString((farmer + "_pending")))))
3737 then throw("Farmer does not exist")
3838 else if (isDefined(getString((((farmer + "_") + toString(entry)) + "_Verified"))))
3939 then throw("AuA Entry already verified")
4040 else if (!(isDefined(getString((((farmer + "_") + toString(entry)) + "_F")))))
4141 then throw((("Entry " + toString(entry)) + " does not exist"))
4242 else {
4343 let pendingString = split(getStringValue((farmer + "_pending")), ",")
4444 let index = indexOf(pendingString, toString(entry))
4545 if ((index == unit))
4646 then throw((("Entry " + toString(entry)) + " does not exist"))
4747 else {
4848 let newPendingString = makeString(removeByIndex(pendingString, value(index)), ",")
4949 [StringEntry((((farmer + "_") + toString(entry)) + "_Verified"), data), StringEntry((farmer + "_pending"), newPendingString)]
5050 }
5151 }
5252
5353

github/deemru/w8io/026f985 
17.81 ms