tx · HhkodbarqXAdZyN6zRT7cuoBiqXKrnQa6KN2FXkpMx1D 3MuDeVJtgnf32JCP1fx191gP6opExbcVKRD: -0.01400000 Waves 2020.09.24 04:25 [1190717] smart account 3MuDeVJtgnf32JCP1fx191gP6opExbcVKRD > SELF 0.00000000 Waves
{ "type": 13, "id": "HhkodbarqXAdZyN6zRT7cuoBiqXKrnQa6KN2FXkpMx1D", "fee": 1400000, "feeAssetId": null, "timestamp": 1600910772291, "version": 2, "chainId": 84, "sender": "3MuDeVJtgnf32JCP1fx191gP6opExbcVKRD", "senderPublicKey": "8JfsGbtUyoZCTL7z6ZM6Et5V6q227EzzkXcJ42FMN3fy", "proofs": [ "4UFMupBRS177ciSxHGaBneRYefEKxjJvaVdLQ1hAjSjecPzbRNAd4uPRhrAVYW41tZraXpzUqSAC1SuP8YuxSvVg" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAAwAAAAAGTEVTU09OAQAAACDo50h8OI7Nb62zoWsqagYFDIe8iqPg4/7715QkgwDg6QAAAAAEUEFSNwEAAAAgzlhA/ZjitMWTd+McxVJoK0GcLLGrEdV8aco355LpR4wAAAAACHN3YXBSYXRlAAAAAAAAAAABAAAAAQAAAAFpAQAAABBpc3N1ZUxlc3NvblRva2VuAAAAAAQAAAADcG10CQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAwkBAAAAAiE9AAAAAggFAAAAA3BtdAAAAAdhc3NldElkBQAAAARQQVI3CQAAAgAAAAECAAAAFHdvcmtzIHdpdGggUEFSNyBvbmx5BAAAAApzd2FwQW1vdW50CQAAaAAAAAIIBQAAAANwbXQAAAAGYW1vdW50BQAAAAhzd2FwUmF0ZQQAAAANYXNzZXRJZFN0cmluZwkAAlgAAAABCQEAAAAFdmFsdWUAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQEAAAADWN1cnJlbnRBbW91bnQEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAANYXNzZXRJZF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QW1vdW50CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAKc3dhcEFtb3VudAUAAAAGTEVTU09OBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tled62gpo=", "height": 1190717, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HVWnTxqeg6GuKFtBiWuAoJbMUGAscHxE7guJWASudaf2 Next: HS4CXydHG1KLcsbqVHKvcs7axpX3g6Zi7TSsH85vsLne Diff:
Old | New | Differences | |
---|---|---|---|
8 | 8 | let swapRate = 1 | |
9 | 9 | ||
10 | 10 | @Callable(i) | |
11 | - | func | |
11 | + | func issueLessonToken () = { | |
12 | 12 | let pmt = i.payments[0] | |
13 | 13 | if ((pmt.assetId != PAR7)) | |
14 | 14 | then throw("works with PAR7 only") |
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 | |
11 | + | func issueLessonToken () = { | |
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 issuerCurrentKey = toBase58String(i.caller.bytes) | |
26 | 26 | let issuerCurrentAmount = match getInteger(this, issuerCurrentKey) { | |
27 | 27 | case a: Int => | |
28 | 28 | a | |
29 | 29 | case _ => | |
30 | 30 | 0 | |
31 | 31 | } | |
32 | 32 | let newIssuerAmount = (issuerCurrentAmount + pmt.amount) | |
33 | 33 | let issueCurrentKey = "issueNumber" | |
34 | 34 | let issueCurrentNumber = match getInteger(this, issueCurrentKey) { | |
35 | 35 | case a: Int => | |
36 | 36 | a | |
37 | 37 | case _ => | |
38 | 38 | 0 | |
39 | 39 | } | |
40 | 40 | let newIssueNumber = (issueCurrentNumber + 1) | |
41 | 41 | [IntegerEntry(assetIdString, newAmount), IntegerEntry(issueCurrentKey, newIssueNumber), IntegerEntry(issuerCurrentKey, newIssuerAmount), ScriptTransfer(i.caller, swapAmount, LESSON)] | |
42 | 42 | } | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | @Verifier(tx) | |
47 | 47 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
48 | 48 |
github/deemru/w8io/169f3d6 48.78 ms ◑