tx · EPF5UsyGWxuE1eAZ3KrAXBAfia3qRYdHxefunaU9jRey
3MuDeVJtgnf32JCP1fx191gP6opExbcVKRD: -0.01400000 Waves
2020.09.23 07:56 [1189499] smart account 3MuDeVJtgnf32JCP1fx191gP6opExbcVKRD > SELF 0.00000000 Waves
{
"type": 13,
"id": "EPF5UsyGWxuE1eAZ3KrAXBAfia3qRYdHxefunaU9jRey",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1600837036284,
"version": 2,
"chainId": 84,
"sender": "3MuDeVJtgnf32JCP1fx191gP6opExbcVKRD",
"senderPublicKey": "8JfsGbtUyoZCTL7z6ZM6Et5V6q227EzzkXcJ42FMN3fy",
"proofs": [
"2urEHvbmHH8vfY8xP293Ew7Zvno7UDmMf3MbgcWYMK94c3B6HVDF71EWemCTAXaxQbckWHJwtUTjuuiEFnxNPwEY"
],
"script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAAwAAAAAGTEVTU09OAQAAACDo50h8OI7Nb62zoWsqagYFDIe8iqPg4/7715QkgwDg6QAAAAAEUEFSNwEAAAAgzlhA/ZjitMWTd+McxVJoK0GcLLGrEdV8aco355LpR4wAAAAACHN3YXBSYXRlAAAAAAAAAAABAAAAAQAAAAFpAQAAABFpc3N1ZUxlc3NvblRpY2tldAAAAAAEAAAAA3BtdAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAMJAQAAAAIhPQAAAAIIBQAAAANwbXQAAAAHYXNzZXRJZAUAAAAEUEFSNwkAAAIAAAABAgAAABR3b3JrcyB3aXRoIFBBUjcgb25seQQAAAAKc3dhcEFtb3VudAkAAGgAAAACCAUAAAADcG10AAAABmFtb3VudAUAAAAIc3dhcFJhdGUEAAAADWFzc2V0SWRTdHJpbmcJAAJYAAAAAQkBAAAABXZhbHVlAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkBAAAAA1jdXJyZW50QW1vdW50BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAD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HxE7guJWASudaf2
Diff:
Old | New | | Differences |
---|
8 | 8 | | let swapRate = 1 |
---|
9 | 9 | | |
---|
10 | 10 | | @Callable(i) |
---|
11 | | - | func issueLessonTicket (json) = { |
---|
| 11 | + | func issueLessonTicket () = { |
---|
12 | 12 | | let pmt = i.payments[0] |
---|
13 | 13 | | if ((pmt.assetId != PAR7)) |
---|
14 | 14 | | then throw("works with PAR7 only") |
---|
|
30 | 30 | | 0 |
---|
31 | 31 | | } |
---|
32 | 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)] |
---|
| 33 | + | [IntegerEntry(assetIdString, newAmount), IntegerEntry(issueCurrentKey, newIssueNumber), ScriptTransfer(i.caller, swapAmount, LESSON)] |
---|
36 | 34 | | } |
---|
37 | 35 | | } |
---|
38 | 36 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let LESSON = base58'GgA8mL3SEYvuhYoZFd418Li4bqXAasGbYCKJshTt2MGU' |
---|
5 | 5 | | |
---|
6 | 6 | | let PAR7 = base58'EtV3CXQ4wqm28WPB1KaBv5B9ke2bpXRZMutYNEJUQcXm' |
---|
7 | 7 | | |
---|
8 | 8 | | let swapRate = 1 |
---|
9 | 9 | | |
---|
10 | 10 | | @Callable(i) |
---|
11 | | - | func issueLessonTicket (json) = { |
---|
| 11 | + | func issueLessonTicket () = { |
---|
12 | 12 | | let pmt = i.payments[0] |
---|
13 | 13 | | if ((pmt.assetId != PAR7)) |
---|
14 | 14 | | then throw("works with PAR7 only") |
---|
15 | 15 | | else { |
---|
16 | 16 | | let swapAmount = (pmt.amount * swapRate) |
---|
17 | 17 | | let assetIdString = toBase58String(value(pmt.assetId)) |
---|
18 | 18 | | let currentAmount = match getInteger(this, assetIdString) { |
---|
19 | 19 | | case a: Int => |
---|
20 | 20 | | a |
---|
21 | 21 | | case _ => |
---|
22 | 22 | | 0 |
---|
23 | 23 | | } |
---|
24 | 24 | | let newAmount = (currentAmount + pmt.amount) |
---|
25 | 25 | | let issueCurrentKey = "issueNumber" |
---|
26 | 26 | | let issueCurrentNumber = match getInteger(this, issueCurrentKey) { |
---|
27 | 27 | | case a: Int => |
---|
28 | 28 | | a |
---|
29 | 29 | | case _ => |
---|
30 | 30 | | 0 |
---|
31 | 31 | | } |
---|
32 | 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)] |
---|
| 33 | + | [IntegerEntry(assetIdString, newAmount), IntegerEntry(issueCurrentKey, newIssueNumber), ScriptTransfer(i.caller, swapAmount, LESSON)] |
---|
36 | 34 | | } |
---|
37 | 35 | | } |
---|
38 | 36 | | |
---|
39 | 37 | | |
---|
40 | 38 | | @Verifier(tx) |
---|
41 | 39 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
42 | 40 | | |
---|