tx · 8oRvGubtxgaZECCcx7XLbLHseRRH9DBBYbx6Lew7HU7z

3MwKnqod9t3XNNF5bEjtZEWcLeYsyWYkj4N:  -0.02800000 Waves

2023.08.07 11:25 [2699925] smart account 3MwKnqod9t3XNNF5bEjtZEWcLeYsyWYkj4N > SELF 0.00000000 Waves

{ "type": 13, "id": "8oRvGubtxgaZECCcx7XLbLHseRRH9DBBYbx6Lew7HU7z", "fee": 2800000, "feeAssetId": null, "timestamp": 1691396767730, "version": 2, "chainId": 84, "sender": "3MwKnqod9t3XNNF5bEjtZEWcLeYsyWYkj4N", "senderPublicKey": "FMALUcLqvi1hTKUsSzvLLGi3kTL4YwPxvKHo5QQaXiC4", "proofs": [ "2KjbSbiiKiUJ56fFdFVT8Mgr9QQAdoavGjLcpGpX7CfJbVpvwFrr5ujRjzuQFCVUrq8ZbK1PEDcLs5uA72Q9yVWa" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEBAAAAAgEAAAAHZ2V0RGF0YQAAAAIAAAADYWRyAAAAA2tleQQAAAAEZGF0YQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAANhZHIFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAAFAAAABGRhdGEBAAAACGF1dGhVc2VyAAAAAQAAAA9jYWxsZXJQdWJsaWNLZXkEAAAAE2NhbGxlclB1YmxpY0tleUhhc2gJAAJYAAAAAQkAAfcAAAABBQAAAA9jYWxsZXJQdWJsaWNLZXkEAAAACWRhdGFWYWx1ZQkBAAAAB2dldERhdGEAAAACBQAAAAR0aGlzCQABLAAAAAIJAAEsAAAAAgIAAAALY29ubmVjdGlvbi4FAAAAE2NhbGxlclB1YmxpY0tleUhhc2gCAAAABy5zY3JpcHQEAAAADWV4cGVjdGVkVmFsdWUCAAAACmF1dGhvcml6ZWQDCQAAAAAAAAIFAAAACWRhdGFWYWx1ZQUAAAANZXhwZWN0ZWRWYWx1ZQYHAAAAAQAAAAFpAQAAAAtyZWZ1bmRXYXZlcwAAAAEAAAAEY29zdAQAAAANYXV0aGVudGljYXRlZAkBAAAACGF1dGhVc2VyAAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5AwkBAAAAASEAAAABBQAAAA1hdXRoZW50aWNhdGVkCQAAAgAAAAECAAAAPUFjY291bnQgaGF0IG5pY2h0IGRpZSBuw7Z0aWdlIEJlcmVjaHRpZ3VuZyBmw7xyIGRpZXNlIEFrdGlvbi4JAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAARjb3N0BQAAAAR1bml0BQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleagB5D8=", "height": 2699925, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+func getData (adr,key) = {
5+ let data = match getString(adr, key) {
6+ case a: String =>
7+ a
8+ case _ =>
9+ ""
10+ }
11+ data
12+ }
13+
14+
15+func authUser (callerPublicKey) = {
16+ let callerPublicKeyHash = toBase58String(sha256(callerPublicKey))
17+ let dataValue = getData(this, (("connection." + callerPublicKeyHash) + ".script"))
18+ let expectedValue = "authorized"
19+ if ((dataValue == expectedValue))
20+ then true
21+ else false
22+ }
23+
24+
25+@Callable(i)
26+func refundWaves (cost) = {
27+ let authenticated = authUser(i.callerPublicKey)
28+ if (!(authenticated))
29+ then throw("Account hat nicht die nötige Berechtigung für diese Aktion.")
30+ else [ScriptTransfer(i.caller, cost, unit)]
31+ }
32+
33+
34+@Verifier(tx)
35+func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
36+

github/deemru/w8io/026f985 
28.20 ms