tx · E5Bdt9PoaLrVi4K2NyPfJbKogEDfYLwvCPVxsJzZbzNj 3MuDeVJtgnf32JCP1fx191gP6opExbcVKRD: -0.01400000 Waves 2020.09.26 11:38 [1194075] smart account 3MuDeVJtgnf32JCP1fx191gP6opExbcVKRD > SELF 0.00000000 Waves
{ "type": 13, "id": "E5Bdt9PoaLrVi4K2NyPfJbKogEDfYLwvCPVxsJzZbzNj", "fee": 1400000, "feeAssetId": null, "timestamp": 1601109528947, "version": 2, "chainId": 84, "sender": "3MuDeVJtgnf32JCP1fx191gP6opExbcVKRD", "senderPublicKey": "8JfsGbtUyoZCTL7z6ZM6Et5V6q227EzzkXcJ42FMN3fy", "proofs": [ "4evck6Vqkgy4VH8VyV6CHUSnCfE1bCnZXHxGMaskDyneEjRHxJ3z6GouPurpfT8UGccf7HiRq7kvNqr9C1DA3v8T" ], "script": "base64:AAIEAAAAAAAAAAYIAhIAEgAAAAAEAAAAAAZMRVNTT04BAAAAIOjnSHw4js1vrbOhaypqBgUMh7yKo+Dj/vvXlCSDAODpAAAAAARQQVI3AQAAACDOWED9mOK0xZN34xzFUmgrQZwssasR1XxpyjfnkulHjAAAAAAIZWxlbWVudDcBAAAAIEtdmIFzzxIaN5YUPWUCLDXgYJocDCD80u+oMh4T0HwVAAAAAAhzd2FwUmF0ZQAAAAAAAAAAAQAAAAIAAAABaQEAAAAQaXNzdWVMZXNzb25Ub2tlbgAAAAAEAAAAA3BtdAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAMJAQAAAAIhPQAAAAIIBQAAAANwbXQAAAAHYXNzZXRJZAUAAAAEUEFSNwkAAAIAAAABAgAAABR3b3JrcyB3aXRoIFBBUjcgb25seQQAAAAKc3dhcEFtb3VudAkAAGgAAAACCAUAAAADcG10AAAABmFtb3VudAUAAAAIc3dhcFJhdGUEAAAADWFzc2V0SWRTdHJpbmcJAAJYAAAAAQkBAAAABXZhbHVlAAAAAQgFAAAAA3BtdAAAAAdhc3NldEl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b3VudAUAAAAIZWxlbWVudDcFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5dlZ8Fw==", "height": 1194075, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3MyEkLhJ6z2DJLFH3L2dvcnetYd22rowLmKW5cs7h86Z Next: none Diff:
Old | New | Differences | |
---|---|---|---|
39 | 39 | ||
40 | 40 | ||
41 | 41 | @Callable(i) | |
42 | - | func | |
42 | + | func issueElement7 () = { | |
43 | 43 | let pmt = i.payments[0] | |
44 | 44 | if ((pmt.assetId != PAR7)) | |
45 | 45 | 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 element7 = base58'65CMXQWHBRE4QstqUSENboXEDHTzY95Z9izADtQWiMNk' | |
9 | 9 | ||
10 | 10 | let swapRate = 1 | |
11 | 11 | ||
12 | 12 | @Callable(i) | |
13 | 13 | func issueLessonToken () = { | |
14 | 14 | let pmt = i.payments[0] | |
15 | 15 | if ((pmt.assetId != PAR7)) | |
16 | 16 | then throw("works with PAR7 only") | |
17 | 17 | else { | |
18 | 18 | let swapAmount = (pmt.amount * swapRate) | |
19 | 19 | let assetIdString = toBase58String(value(pmt.assetId)) | |
20 | 20 | let currentAmount = match getInteger(this, assetIdString) { | |
21 | 21 | case a: Int => | |
22 | 22 | a | |
23 | 23 | case _ => | |
24 | 24 | 0 | |
25 | 25 | } | |
26 | 26 | let newAmount = (currentAmount + pmt.amount) | |
27 | 27 | let issuerCurrentKey = toBase58String(i.caller.bytes) | |
28 | 28 | let issuerCurrentAmount = match getInteger(this, issuerCurrentKey) { | |
29 | 29 | case a: Int => | |
30 | 30 | a | |
31 | 31 | case _ => | |
32 | 32 | 0 | |
33 | 33 | } | |
34 | 34 | let newIssuerAmount = (issuerCurrentAmount + pmt.amount) | |
35 | 35 | [IntegerEntry(assetIdString, newAmount), IntegerEntry(issuerCurrentKey, newIssuerAmount), ScriptTransfer(i.caller, swapAmount, LESSON)] | |
36 | 36 | } | |
37 | 37 | } | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | ||
41 | 41 | @Callable(i) | |
42 | - | func | |
42 | + | func issueElement7 () = { | |
43 | 43 | let pmt = i.payments[0] | |
44 | 44 | if ((pmt.assetId != PAR7)) | |
45 | 45 | then throw("works with PAR7 only") | |
46 | 46 | else { | |
47 | 47 | let swapAmount = (pmt.amount * swapRate) | |
48 | 48 | let assetIdString = toBase58String(value(pmt.assetId)) | |
49 | 49 | let currentAmount = match getInteger(this, assetIdString) { | |
50 | 50 | case a: Int => | |
51 | 51 | a | |
52 | 52 | case _ => | |
53 | 53 | 0 | |
54 | 54 | } | |
55 | 55 | let newAmount = (currentAmount + pmt.amount) | |
56 | 56 | let issuerCurrentKey = toBase58String(i.caller.bytes) | |
57 | 57 | let issuerCurrentAmount = match getInteger(this, issuerCurrentKey) { | |
58 | 58 | case a: Int => | |
59 | 59 | a | |
60 | 60 | case _ => | |
61 | 61 | 0 | |
62 | 62 | } | |
63 | 63 | let newIssuerAmount = (issuerCurrentAmount + pmt.amount) | |
64 | 64 | [Reissue(element7, swapAmount, true), IntegerEntry(assetIdString, newAmount), IntegerEntry(issuerCurrentKey, newIssuerAmount), ScriptTransfer(i.caller, swapAmount, element7)] | |
65 | 65 | } | |
66 | 66 | } | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | @Verifier(tx) | |
70 | 70 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
71 | 71 |
github/deemru/w8io/169f3d6 26.76 ms ◑