tx · C4YQRztc5gLKPXmBrTPj5pVrgBQWywWW78jU7STWi3Uu

3N9PyUqvE9weBXRngdMZ7DyKvzL2yYZU5u6:  -0.00200000 Waves

2024.12.18 19:16 [3420212] smart account 3N9PyUqvE9weBXRngdMZ7DyKvzL2yYZU5u6 > SELF 0.00000000 Waves

{ "type": 13, "id": "C4YQRztc5gLKPXmBrTPj5pVrgBQWywWW78jU7STWi3Uu", "fee": 200000, "feeAssetId": null, "timestamp": 1734538567064, "version": 2, "chainId": 84, "sender": "3N9PyUqvE9weBXRngdMZ7DyKvzL2yYZU5u6", "senderPublicKey": "9Uc1MuAoRrjMxpDt4GQpxbaM7G4SVJjkuKwYj3o4d6f9", "proofs": [ "2rHLXwSZndakZxSJAmBKrXJvt4gbP6YaMjEMsvXXKchNQLe1FMmH6whANwSq3xmeZNeLHcxyZqmjwgHoE7UJSWYW" ], "script": "base64:CAIVCAISBAoCCAgSBQoDCAgIEgQKAggBAAMBaQEJYWRkRmFybWVyAgxwdWJLZXlGYXJtZXIIdXNlcmRhdGEEBmZhcm1lcgkAnwgBCQCsAgIFDHB1YktleUZhcm1lcgIGX2NvdW50AwkBAiE9AggFAWkGY2FsbGVyBQR0aGlzCQACAQIqT25seSB0aGUgdmV0IG9mZmljZSBjYW4gY3JlYXRlIG5ldyBGYXJtZXJzAwkAAAIFBmZhcm1lcgUEdW5pdAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFDHB1YktleUZhcm1lcgIJX3VzZXJkYXRhBQh1c2VyZGF0YQkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFDHB1YktleUZhcm1lcgIIX3BlbmRpbmcCAAkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQxwdWJLZXlGYXJtZXICBl9jb3VudAAACQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJAKcIAQkA2QQBBQxwdWJLZXlGYXJtZXIA4NwqBQR1bml0BQNuaWwJAAIBAhVGYXJtZXIgYWxyZWFkeSBleGlzdHM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mllZAkAAgECGkF1QSBFbnRyeSBhbHJlYWR5IHZlcmlmaWVkAwkBASEBCQEJaXNEZWZpbmVkAQkAoggBCQCsAgIJAKwCAgUGcHViS2V5AgFfCQCkAwEFBWVudHJ5CQACAQkArAICCQCsAgICBkVudHJ5IAkApAMBBQVlbnRyeQIPIGRvZXMgbm90IGV4aXN0BAtwZW5kaW5nTGlzdAkAtQkCCQERQGV4dHJOYXRpdmUoMTA1OCkBCQCsAgIFBnB1YktleQIIX3BlbmRpbmcCASwEBWluZGV4CQDPCAIFC3BlbmRpbmdMaXN0CQCkAwEFBWVudHJ5AwkAAAIFBWluZGV4BQR1bml0CQACAQkArAICCQCsAgICBkVudHJ5IAkApAMBBQVlbnRyeQIPIGRvZXMgbm90IGV4aXN0BBBuZXdQZW5kaW5nU3RyaW5nCQC5CQIJANEIAgULcGVuZGluZ0xpc3QJAQV2YWx1ZQEFBWluZGV4AgEsCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgkArAICCQCsAgIFBnB1YktleQIBXwkApAMBBQVlbnRyeQIJX3ZlcmlmaWVkBQRkYXRhCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUGcHViS2V5AghfcGVuZGluZwUQbmV3UGVuZGluZ1N0cmluZwkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIAoMIeBQR1bml0BQNuaWwApyTDfQ==", "height": 3420212, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9ziERgTQtPbwwZTsT2o6ryEfh6pXpUBc6DyocHphHThX Next: Cgvtv667yhgoC7QF7kPHcvtnCWcRkQ3QVUhWZ9gonHso 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), ScriptTransfer(addressFromPublicKey(fromBase58String(b)), 700000, unit)]
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)), ScriptTransfer(a.caller, 500000, unit)]
3232 }
3333
3434
3535
3636 @Callable(a)
3737 func verify (l,m) = {
3838 let n = toBase58String(a.callerPublicKey)
3939 if (!(isDefined(getString((n + "_pending")))))
4040 then throw("Farmer does not exist")
4141 else if (isDefined(getString((((n + "_") + toString(m)) + "_verified"))))
4242 then throw("AuA Entry already verified")
4343 else if (!(isDefined(getString(((n + "_") + toString(m))))))
4444 then throw((("Entry " + toString(m)) + " does not exist"))
4545 else {
4646 let k = split(getStringValue((n + "_pending")), ",")
4747 let o = indexOf(k, toString(m))
4848 if ((o == unit))
4949 then throw((("Entry " + toString(m)) + " does not exist"))
5050 else {
5151 let p = makeString(removeByIndex(k, value(o)), ",")
5252 [StringEntry((((n + "_") + toString(m)) + "_verified"), l), StringEntry((n + "_pending"), p), ScriptTransfer(a.caller, 500000, unit)]
5353 }
5454 }
5555 }
5656
5757

github/deemru/w8io/169f3d6 
15.19 ms