tx · Ca8gHnSJX3xTwQZYG2Y7PPfRQTXA2bbVx4bz5yZWARzA 3MuDeVJtgnf32JCP1fx191gP6opExbcVKRD: -0.01000000 Waves 2020.09.23 03:44 [1189246] smart account 3MuDeVJtgnf32JCP1fx191gP6opExbcVKRD > SELF 0.00000000 Waves
{ "type": 13, "id": "Ca8gHnSJX3xTwQZYG2Y7PPfRQTXA2bbVx4bz5yZWARzA", "fee": 1000000, "feeAssetId": null, "timestamp": 1600821895404, "version": 2, "chainId": 84, "sender": "3MuDeVJtgnf32JCP1fx191gP6opExbcVKRD", "senderPublicKey": "8JfsGbtUyoZCTL7z6ZM6Et5V6q227EzzkXcJ42FMN3fy", "proofs": [ "4Qf3HKfFbA29W5QQrUMLAovroLKCNN9XDgNwJXVR4aeYKfKyYVJDDcKbYqd6h2BRhoM4vqNwFSTFKovPLHe985wB" ], "script": "base64:AAIEAAAAAAAAAAcIAhIDCgEIAAAAAwAAAAAGTEVTU09OAQAAACDo50h8OI7Nb62zoWsqagYFDIe8iqPg4/7715QkgwDg6QAAAAAEUEFSNwEAAAAgzlhA/ZjitMWTd+McxVJoK0GcLLGrEdV8aco355LpR4wAAAAACHN3YXBSYXRlAAAAAAAAAAABAAAAAQAAAAFpAQAAABFpc3N1ZUxlc3NvblRpY2tldAAAAAEAAAAEanNvbgQAAAADcG10CQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAwkBAAAAAiE9AAAAAggFAAAAA3BtdAAAAAdhc3NldElkBQAAAARQQVI3CQAAAgAAAAECAAAAFHdvcmtzIHdpdGggUEFSNyBvbmx5BAAAAApzd2FwQW1vdW50CQAAaAAAAAIIBQAAAANwbXQAAAAGYW1vdW50BQAAAAhzd2FwUmF0ZQQAAAANYXNzZXRJZFN0cmluZwkAAlgAAAABCQEAAAAFdmFsdWUAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQEAAAADWN1cnJlbnRBbW91bnQEAAAAByRtYXRjaDAJAAQaAAAAAgUAAA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AACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXk1XkJM", "height": 1189246, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: EPF5UsyGWxuE1eAZ3KrAXBAfia3qRYdHxefunaU9jRey Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let LESSON = base58'GgA8mL3SEYvuhYoZFd418Li4bqXAasGbYCKJshTt2MGU' | |
5 | + | ||
6 | + | let PAR7 = base58'EtV3CXQ4wqm28WPB1KaBv5B9ke2bpXRZMutYNEJUQcXm' | |
7 | + | ||
8 | + | let swapRate = 1 | |
9 | + | ||
10 | + | @Callable(i) | |
11 | + | func issueLessonTicket (json) = { | |
12 | + | let pmt = i.payments[0] | |
13 | + | if ((pmt.assetId != PAR7)) | |
14 | + | then throw("works with PAR7 only") | |
15 | + | else { | |
16 | + | let swapAmount = (pmt.amount * swapRate) | |
17 | + | let assetIdString = toBase58String(value(pmt.assetId)) | |
18 | + | let currentAmount = match getInteger(this, assetIdString) { | |
19 | + | case a: Int => | |
20 | + | a | |
21 | + | case _ => | |
22 | + | 0 | |
23 | + | } | |
24 | + | let newAmount = (currentAmount + pmt.amount) | |
25 | + | let issueCurrentKey = "issueNumber" | |
26 | + | let issueCurrentNumber = match getInteger(this, issueCurrentKey) { | |
27 | + | case a: Int => | |
28 | + | a | |
29 | + | case _ => | |
30 | + | 0 | |
31 | + | } | |
32 | + | let newIssueNumber = (issueCurrentNumber + 1) | |
33 | + | let newIssueNumberString = toString(newIssueNumber) | |
34 | + | let ticketDetaileCurrentKey = ("TICKET_" + newIssueNumberString) | |
35 | + | [IntegerEntry(assetIdString, newAmount), IntegerEntry(issueCurrentKey, newIssueNumber), StringEntry(ticketDetaileCurrentKey, json), ScriptTransfer(i.caller, swapAmount, LESSON)] | |
36 | + | } | |
37 | + | } | |
38 | + | ||
39 | + | ||
40 | + | @Verifier(tx) | |
41 | + | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
42 | + |
github/deemru/w8io/026f985 14.01 ms ◑