tx · 5WyioN3St7fBhm4YhrrGaenuZwaxXLhSBqyrtXX1QnSu

3MsNyiuucHjySwoeQ8FxeofPKJyYF4cqG28:  -0.00200000 Waves

2024.12.07 14:09 [3404133] smart account 3MsNyiuucHjySwoeQ8FxeofPKJyYF4cqG28 > SELF 0.00000000 Waves

{ "type": 13, "id": "5WyioN3St7fBhm4YhrrGaenuZwaxXLhSBqyrtXX1QnSu", "fee": 200000, "feeAssetId": null, "timestamp": 1733569822543, "version": 2, "chainId": 84, "sender": "3MsNyiuucHjySwoeQ8FxeofPKJyYF4cqG28", "senderPublicKey": "HJeoRksknZ8YoWG1bjM8cjCoh51MGhj2K7rcdzhEZn9h", "proofs": [ "4CGuNbFsD1W7wcTSuNfYg51ZaJfJh5i4awoXkLHhkfCGMxM7jvzP591T4TBRwNq43ukxzPRWm1oMrwxfLjyii4KF" ], "script": "base64:CAIWCAISBAoCCAgSBQoDCAgIEgUKAwgIAQADAWkBCWFkZEZhcm1lcgINd2FsbGV0QWRkcmVzcwh1c2VyZGF0YQQGZmFybWVyCQCfCAEJAKwCAgUNd2FsbGV0QWRkcmVzcwIGX2NvdW50AwkBAiE9AggFAWkGY2FsbGVyBQR0aGlzCQACAQIqT25seSB0aGUgdmV0IG9mZmljZSBjYW4gY3JlYXRlIG5ldyBGYXJtZXJzAwkAAAIFBmZhcm1lcgUEdW5pdAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFDXdhbGxldEFkZHJlc3MCCV91c2VyZGF0YQUIdXNlcmRhdGEJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQ13YWxsZXRBZGRyZXNzAghfcGVuZGluZwIACQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFDXdhbGxldEFkZHJlc3MCBl9jb3VudAAABQNuaWwJAAIBAhVGYXJtZXIgYWxyZWFkeSBleGlzdHMBaQEGYWRkQXVBAwpkYXRhRmFybWVyB2RhdGFWZXQGZmFybWVyBAVjb3VudAQHJG1hdGNoMAkAnwgB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xMDU4KQEJAKwCAgUGZmFybWVyAghfcGVuZGluZwIBLAQFaW5kZXgJAM8IAgULcGVuZGluZ0xpc3QJAKQDAQUFZW50cnkDCQAAAgUFaW5kZXgFBHVuaXQJAAIBCQCsAgIJAKwCAgIGRW50cnkgCQCkAwEFBWVudHJ5Ag8gZG9lcyBub3QgZXhpc3QEEG5ld1BlbmRpbmdTdHJpbmcJALkJAgkA0QgCBQtwZW5kaW5nTGlzdAkBBXZhbHVlAQUFaW5kZXgCASwJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICCQCsAgIJAKwCAgUGZmFybWVyAgFfCQCkAwEFBWVudHJ5AglfVmVyaWZpZWQFBGRhdGEJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQZmYXJtZXICCF9wZW5kaW5nBRBuZXdQZW5kaW5nU3RyaW5nBQNuaWwAYJIuew==", "height": 3404133, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 39hSnyCAmZZyvWaztnykKFPmXFpgSDBckwvuwAdK1oyW Next: none Diff:
OldNewDifferences
44
55
66 @Callable(i)
7-func addFarmer (walletAddress,address,firstName,lastName) = {
7+func addFarmer (walletAddress,userdata) = {
88 let farmer = getInteger((walletAddress + "_count"))
99 if ((i.caller != this))
1010 then throw("Only the vet office can create new Farmers")
1111 else if ((farmer == unit))
12- then [StringEntry((walletAddress + "_userdata"), ((((address + ",") + firstName) + ",") + lastName)), StringEntry((walletAddress + "_pending"), ""), IntegerEntry((walletAddress + "_count"), 0)]
12+ then [StringEntry((walletAddress + "_userdata"), userdata), StringEntry((walletAddress + "_pending"), ""), IntegerEntry((walletAddress + "_count"), 0)]
1313 else throw("Farmer already exists")
1414 }
1515
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 8 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
7-func addFarmer (walletAddress,address,firstName,lastName) = {
7+func addFarmer (walletAddress,userdata) = {
88 let farmer = getInteger((walletAddress + "_count"))
99 if ((i.caller != this))
1010 then throw("Only the vet office can create new Farmers")
1111 else if ((farmer == unit))
12- then [StringEntry((walletAddress + "_userdata"), ((((address + ",") + firstName) + ",") + lastName)), StringEntry((walletAddress + "_pending"), ""), IntegerEntry((walletAddress + "_count"), 0)]
12+ then [StringEntry((walletAddress + "_userdata"), userdata), StringEntry((walletAddress + "_pending"), ""), IntegerEntry((walletAddress + "_count"), 0)]
1313 else throw("Farmer already exists")
1414 }
1515
1616
1717
1818 @Callable(i)
1919 func addAuA (dataFarmer,dataVet,farmer) = {
2020 let count = match getInteger((farmer + "_count")) {
2121 case a: Int =>
2222 a
2323 case _ =>
2424 throw("Farmer does not exist")
2525 }
2626 let pending = getStringValue((farmer + "_pending"))
2727 let pendingList = [toString(count), split(pending, ",")]
2828 [StringEntry((farmer + "_pending"), makeString(pendingList, ",")), StringEntry(((farmer + "_") + toString(count)), dataFarmer), StringEntry(((((toString(i.caller) + "_") + farmer) + "_") + toString(count)), dataVet), IntegerEntry((farmer + "_count"), (count + 1))]
2929 }
3030
3131
3232
3333 @Callable(i)
3434 func verify (data,farmer,entry) = if (!(isDefined(getString((farmer + "_pending")))))
3535 then throw("Farmer does not exist")
3636 else if (isDefined(getString((((farmer + "_") + toString(entry)) + "_Verified"))))
3737 then throw("AuA Entry already verified")
3838 else if (!(isDefined(getString(((farmer + "_") + toString(entry))))))
3939 then throw((("Entry " + toString(entry)) + " does not exist"))
4040 else {
4141 let pendingList = split(getStringValue((farmer + "_pending")), ",")
4242 let index = indexOf(pendingList, toString(entry))
4343 if ((index == unit))
4444 then throw((("Entry " + toString(entry)) + " does not exist"))
4545 else {
4646 let newPendingString = makeString(removeByIndex(pendingList, value(index)), ",")
4747 [StringEntry((((farmer + "_") + toString(entry)) + "_Verified"), data), StringEntry((farmer + "_pending"), newPendingString)]
4848 }
4949 }
5050
5151

github/deemru/w8io/169f3d6 
16.51 ms