tx · EpTmyJ6r24SMT7ieV7nSVKhN5KHFyD9rrzimmSDEdCVQ

3NBvST4wVNnQSw9zjvfMrirCY5dxG3widc9:  -0.00600000 Waves

2022.08.17 11:16 [2188217] smart account 3NBvST4wVNnQSw9zjvfMrirCY5dxG3widc9 > SELF 0.00000000 Waves

{ "type": 13, "id": "EpTmyJ6r24SMT7ieV7nSVKhN5KHFyD9rrzimmSDEdCVQ", "fee": 600000, "feeAssetId": null, "timestamp": 1660724027786, "version": 2, "chainId": 84, "sender": "3NBvST4wVNnQSw9zjvfMrirCY5dxG3widc9", "senderPublicKey": "Ftxutnk5AzF4S1j6ZGLYyYLdmN2XzrRSS5EjwH4qJm4N", "proofs": [ "2a9HM16AEQkCnD3qzpZ9B3Jo1dKKEeKe2KS3mWnhrtNBkQX5XFJDKAaTiqvjgALxFgcmb1oHLViufHwVxjjBxYjp" ], "script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQgAAAACAQAAAA1nZXRBc3NldEJ5dGVzAAAAAQAAAAphc3NldElkU3RyAwkAAAAAAAACBQAAAAphc3NldElkU3RyAgAAAAVXQVZFUwUAAAAEdW5pdAkAAlkAAAABBQAAAAphc3NldElkU3RyAQAAAA5nZXRBc3NldFN0cmluZwAAAAEAAAAHYXNzZXRJZAQAAAAHJG1hdGNoMAUAAAAHYXNzZXRJZAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAKQnl0ZVZlY3RvcgQAAAABYgUAAAAHJG1hdGNoMAkAAlgAAAABBQAAAAFiAgAAAAVXQVZFUwAAAAIAAAABaQEAAAAHYWRkSXRlbQAAAAAEAAAAB3Rva2VuSWQICQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAAAAB2Fzc2V0SWQEAAAABmFtb3VudAgJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAAAAAGYW1vdW50BAAAAAh1bmlxdWVJZAkAAlgAAAABCAUAAAABaQAAAA10cmFuc2FjdGlvbklkCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIFAAAACHVuaXF1ZUlkAgAAAAZfY291bnQFAAAABmFtb3VudAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIFAAAACHVuaXF1ZUlkAgAAAAhfdG9rZW5JZAkBAAAADmdldEFzc2V0U3RyaW5nAAAAAQUAAAAHdG9rZW5JZAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIFAAAACHVuaXF1ZUlkAgAAAAVvd25lcgkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIFAAAAA25pbAAAAAFpAQAAAAdidXlJdGVtAAAAAQAAAAh1bmlxdWVJZAQAAAAHdG9rZW5JZAkBAAAAEUBleHRyTmF0aXZlKDEwNTgpAAAAAQkAASwAAAACBQAAAAh1bmlxdWVJZAIAAAAIX3Rva2VuSWQEAAAABmFtb3VudAkBAAAAEUBleHRyTmF0aXZlKDEwNTUpAAAAAQkAASwAAAACBQAAAAh1bmlxdWVJZAIAAAAGX2NvdW50CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGYW1vdW50CQEAAAANZ2V0QXNzZXRCeXRlcwAAAAEFAAAAB3Rva2VuSWQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5G3/vlQ==", "height": 2188217, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Fs5wRXxMiP3Jfjcj15XwNh4yKPrv2sgaNL9TCsiw2Uw7 Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+func a (b) = if ((b == "WAVES"))
5+ then unit
6+ else fromBase58String(b)
47
58
6-@Callable(a)
7-func addItem (b,c,d) = [IntegerEntry((b + "_count"), c), IntegerEntry((b + "_price"), d)]
9+func c (d) = {
10+ let e = d
11+ if ($isInstanceOf(e, "ByteVector"))
12+ then {
13+ let f = e
14+ toBase58String(f)
15+ }
16+ else "WAVES"
17+ }
18+
19+
20+@Callable(g)
21+func addItem () = {
22+ let h = g.payments[0].assetId
23+ let i = g.payments[0].amount
24+ let j = toBase58String(g.transactionId)
25+[IntegerEntry((j + "_count"), i), StringEntry((j + "_tokenId"), c(h)), StringEntry((j + "owner"), toString(g.caller))]
26+ }
827
928
1029
11-@Callable(a)
12-func changeItemPrice () = nil
30+@Callable(g)
31+func buyItem (j) = {
32+ let h = getStringValue((j + "_tokenId"))
33+ let i = getIntegerValue((j + "_count"))
34+[ScriptTransfer(g.caller, i, a(h))]
35+ }
1336
1437
15-
16-@Callable(a)
17-func buyItem () = nil
18-
19-
20-@Verifier(e)
21-func f () = sigVerify(e.bodyBytes, e.proofs[0], e.senderPublicKey)
38+@Verifier(k)
39+func l () = sigVerify(k.bodyBytes, k.proofs[0], k.senderPublicKey)
2240

github/deemru/w8io/026f985 
25.72 ms