tx · E9LGvCbTpkZfFWxHZCkTSX3LHeYvJpMLkQXJauv862H1

3Mxj3JU6AwxDCYVsqGf3Jw44FQkoQb78SSh:  -0.00200000 Waves

2024.12.13 21:52 [3413199] smart account 3Mxj3JU6AwxDCYVsqGf3Jw44FQkoQb78SSh > SELF 0.00000000 Waves

{ "type": 13, "id": "E9LGvCbTpkZfFWxHZCkTSX3LHeYvJpMLkQXJauv862H1", "fee": 200000, "feeAssetId": null, "timestamp": 1734115970381, "version": 2, "chainId": 84, "sender": "3Mxj3JU6AwxDCYVsqGf3Jw44FQkoQb78SSh", "senderPublicKey": "CNmdqskTBUYceuzhiJYdPRktAdzMudYntgg7P1H92MNc", "proofs": [ "28N3r11LkHs7aagLSbJtYKRnxWJao8u5CMaNAGgscVa682WLCdCuJ3M2W4GTPABzrV14Qqzq9JJNrkuSJHz6C89S" ], "script": "base64:CAIWCAISBAoCCAgSBQoDCAgIEgUKAwgIAQADAWkBCWFkZEZhcm1lcgIMcHViS2V5RmFybWVyCHVzZXJkYXRhBAZmYXJtZXIJAJ8IAQkArAICBQxwdWJLZXlGYXJtZXICBl9jb3VudAMJAQIhPQIIBQFpBmNhbGxlcgUEdGhpcwkAAgECKk9ubHkgdGhlIHZldCBvZmZpY2UgY2FuIGNyZWF0ZSBuZXcgRmFybWVycwMJAAACBQZmYXJtZXIFBHVuaXQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQxwdWJLZXlGYXJtZXICCV91c2VyZGF0YQUIdXNlcmRhdGEJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQxwdWJLZXlGYXJtZXICCF9wZW5kaW5nAgAJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgUMcHViS2V5RmFybWVyAgZfY291bnQAAAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQERQGV4dHJOYXRpdmUoMTA2MikBBQxwdWJLZXlGYXJtZXIAoMIeBQR1bml0BQNuaWwJAAIBAhVGYXJtZXIgYWxyZWFkeSBleG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WQBCQCiCAEJAKwCAgkArAICBQxwdWJLZXlGYXJtZXICAV8JAKQDAQUFZW50cnkJAAIBCQCsAgIJAKwCAgIGRW50cnkgCQCkAwEFBWVudHJ5Ag8gZG9lcyBub3QgZXhpc3QEC3BlbmRpbmdMaXN0CQC1CQIJARFAZXh0ck5hdGl2ZSgxMDU4KQEJAKwCAgUMcHViS2V5RmFybWVyAghfcGVuZGluZwIBLAQFaW5kZXgJAM8IAgULcGVuZGluZ0xpc3QJAKQDAQUFZW50cnkDCQAAAgUFaW5kZXgFBHVuaXQJAAIBCQCsAgIJAKwCAgIGRW50cnkgCQCkAwEFBWVudHJ5Ag8gZG9lcyBub3QgZXhpc3QEEG5ld1BlbmRpbmdTdHJpbmcJALkJAgkA0QgCBQtwZW5kaW5nTGlzdAkBBXZhbHVlAQUFaW5kZXgCASwJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICCQCsAgIJAKwCAgUMcHViS2V5RmFybWVyAgFfCQCkAwEFBWVudHJ5AglfdmVyaWZpZWQFBGRhdGEJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQxwdWJLZXlGYXJtZXICCF9wZW5kaW5nBRBuZXdQZW5kaW5nU3RyaW5nBQNuaWwASC9uzA==", "height": 3413199, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BC3oSEDgnsXxeZZWuoUzPscxYhUWPYdhHXiGDJ2f9Um8 Next: 8eBv5qsxs7dqbCpFWHvQn2zRqQCjo4mrPsb4R5rb1zqP Full:
OldNewDifferences
11 {-# STDLIB_VERSION 8 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func addFarmer (pubKeyFarmer,userdata) = {
88 let farmer = getInteger((pubKeyFarmer + "_count"))
99 if ((i.caller != this))
1010 then throw("Only the vet office can create new Farmers")
1111 else if ((farmer == unit))
1212 then [StringEntry((pubKeyFarmer + "_userdata"), userdata), StringEntry((pubKeyFarmer + "_pending"), ""), IntegerEntry((pubKeyFarmer + "_count"), 0), ScriptTransfer(addressFromStringValue(pubKeyFarmer), 500000, unit)]
1313 else throw("Farmer already exists")
1414 }
1515
1616
1717
1818 @Callable(i)
1919 func addAad (dataFarmer,dataVet,pubKeyFarmer) = {
2020 let count = match getInteger((pubKeyFarmer + "_count")) {
2121 case a: Int =>
2222 a
2323 case _ =>
2424 throw("Farmer does not exist")
2525 }
2626 let pending = getStringValue((pubKeyFarmer + "_pending"))
2727 let pendingList = [toString(count), split(pending, ",")]
2828 [StringEntry((pubKeyFarmer + "_pending"), makeString(pendingList, ",")), StringEntry(((pubKeyFarmer + "_") + toString(count)), dataFarmer), StringEntry(((((pubKeyFarmer + "_") + toBase58String(i.callerPublicKey)) + "_") + toString(count)), dataVet), IntegerEntry((pubKeyFarmer + "_count"), (count + 1))]
2929 }
3030
3131
3232
3333 @Callable(i)
3434 func verify (data,pubKeyFarmer,entry) = if (!(isDefined(getString((pubKeyFarmer + "_pending")))))
3535 then throw("Farmer does not exist")
3636 else if (isDefined(getString((((pubKeyFarmer + "_") + toString(entry)) + "_verified"))))
3737 then throw("AuA Entry already verified")
3838 else if (!(isDefined(getString(((pubKeyFarmer + "_") + toString(entry))))))
3939 then throw((("Entry " + toString(entry)) + " does not exist"))
4040 else {
4141 let pendingList = split(getStringValue((pubKeyFarmer + "_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((((pubKeyFarmer + "_") + toString(entry)) + "_verified"), data), StringEntry((pubKeyFarmer + "_pending"), newPendingString)]
4848 }
4949 }
5050
5151

github/deemru/w8io/169f3d6 
19.01 ms