tx · 3MyEkLhJ6z2DJLFH3L2dvcnetYd22rowLmKW5cs7h86Z

3MuDeVJtgnf32JCP1fx191gP6opExbcVKRD:  -0.01400000 Waves

2020.09.26 11:29 [1194067] smart account 3MuDeVJtgnf32JCP1fx191gP6opExbcVKRD > SELF 0.00000000 Waves

{ "type": 13, "id": "3MyEkLhJ6z2DJLFH3L2dvcnetYd22rowLmKW5cs7h86Z", "fee": 1400000, "feeAssetId": null, "timestamp": 1601109022384, "version": 2, "chainId": 84, "sender": "3MuDeVJtgnf32JCP1fx191gP6opExbcVKRD", "senderPublicKey": "8JfsGbtUyoZCTL7z6ZM6Et5V6q227EzzkXcJ42FMN3fy", "proofs": [ "2XQDGRVUbgxgja7V7SgkUFVWqYe1mq7VxfjhMHxscEmVkAPQjwtJRgqZDhxmdQk8pF3oT8ts5wv5N7WDDtBjvJSR" ], "script": "base64:AAIEAAAAAAAAAAYIAhIAEgAAAAAEAAAAAAZMRVNTT04BAAAAIOjnSHw4js1vrbOhaypqBgUMh7yKo+Dj/vvXlCSDAODpAAAAAARQQVI3AQAAACDOWED9mOK0xZN34xzFUmgrQZwssasR1XxpyjfnkulHjAAAAAAIZWxlbWVudDcBAAAAIEtdmIFzzxIaN5YUPWUCLDXgYJocDCD80u+oMh4T0HwVAAAAAAhzd2FwUmF0ZQAAAAAAAAAAAQAAAAIAAAABaQEAAAAQaXNzdWVMZXNzb25Ub2tlbgAAAAAEAAAAA3BtdAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAMJAQAAAAIhPQAAAAIIBQAAAANwbXQAAAAHYXNzZXRJZAUAAAAEUEFSNwkAAAIAAAABAgAAABR3b3JrcyB3aXRoIFBBUjcgb25seQQAAAAKc3dhcEFtb3VudAkAAGgAAAACCAUAAAADcG10AAAABmFtb3VudAUAAAAIc3dhcFJhdGUEAAAADWFzc2V0SWRTdHJpbmcJAAJYAAAAAQkBAAAABXZhbHVlAAAAAQgFAAAAA3BtdAAAAAdhc3Nld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W1vdW50BQAAAAhlbGVtZW50NwUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXmUPQi1", "height": 1194067, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HS4CXydHG1KLcsbqVHKvcs7axpX3g6Zi7TSsH85vsLne Next: E5Bdt9PoaLrVi4K2NyPfJbKogEDfYLwvCPVxsJzZbzNj Diff:
OldNewDifferences
44 let LESSON = base58'GgA8mL3SEYvuhYoZFd418Li4bqXAasGbYCKJshTt2MGU'
55
66 let PAR7 = base58'EtV3CXQ4wqm28WPB1KaBv5B9ke2bpXRZMutYNEJUQcXm'
7+
8+let element7 = base58'65CMXQWHBRE4QstqUSENboXEDHTzY95Z9izADtQWiMNk'
79
810 let swapRate = 1
911
3537 }
3638
3739
40+
41+@Callable(i)
42+func issueElement7Token () = {
43+ let pmt = i.payments[0]
44+ if ((pmt.assetId != PAR7))
45+ then throw("works with PAR7 only")
46+ else {
47+ let swapAmount = (pmt.amount * swapRate)
48+ let assetIdString = toBase58String(value(pmt.assetId))
49+ let currentAmount = match getInteger(this, assetIdString) {
50+ case a: Int =>
51+ a
52+ case _ =>
53+ 0
54+ }
55+ let newAmount = (currentAmount + pmt.amount)
56+ let issuerCurrentKey = toBase58String(i.caller.bytes)
57+ let issuerCurrentAmount = match getInteger(this, issuerCurrentKey) {
58+ case a: Int =>
59+ a
60+ case _ =>
61+ 0
62+ }
63+ let newIssuerAmount = (issuerCurrentAmount + pmt.amount)
64+[Reissue(element7, swapAmount, true), IntegerEntry(assetIdString, newAmount), IntegerEntry(issuerCurrentKey, newIssuerAmount), ScriptTransfer(i.caller, swapAmount, element7)]
65+ }
66+ }
67+
68+
3869 @Verifier(tx)
3970 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4071
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let LESSON = base58'GgA8mL3SEYvuhYoZFd418Li4bqXAasGbYCKJshTt2MGU'
55
66 let PAR7 = base58'EtV3CXQ4wqm28WPB1KaBv5B9ke2bpXRZMutYNEJUQcXm'
7+
8+let element7 = base58'65CMXQWHBRE4QstqUSENboXEDHTzY95Z9izADtQWiMNk'
79
810 let swapRate = 1
911
1012 @Callable(i)
1113 func issueLessonToken () = {
1214 let pmt = i.payments[0]
1315 if ((pmt.assetId != PAR7))
1416 then throw("works with PAR7 only")
1517 else {
1618 let swapAmount = (pmt.amount * swapRate)
1719 let assetIdString = toBase58String(value(pmt.assetId))
1820 let currentAmount = match getInteger(this, assetIdString) {
1921 case a: Int =>
2022 a
2123 case _ =>
2224 0
2325 }
2426 let newAmount = (currentAmount + pmt.amount)
2527 let issuerCurrentKey = toBase58String(i.caller.bytes)
2628 let issuerCurrentAmount = match getInteger(this, issuerCurrentKey) {
2729 case a: Int =>
2830 a
2931 case _ =>
3032 0
3133 }
3234 let newIssuerAmount = (issuerCurrentAmount + pmt.amount)
3335 [IntegerEntry(assetIdString, newAmount), IntegerEntry(issuerCurrentKey, newIssuerAmount), ScriptTransfer(i.caller, swapAmount, LESSON)]
3436 }
3537 }
3638
3739
40+
41+@Callable(i)
42+func issueElement7Token () = {
43+ let pmt = i.payments[0]
44+ if ((pmt.assetId != PAR7))
45+ then throw("works with PAR7 only")
46+ else {
47+ let swapAmount = (pmt.amount * swapRate)
48+ let assetIdString = toBase58String(value(pmt.assetId))
49+ let currentAmount = match getInteger(this, assetIdString) {
50+ case a: Int =>
51+ a
52+ case _ =>
53+ 0
54+ }
55+ let newAmount = (currentAmount + pmt.amount)
56+ let issuerCurrentKey = toBase58String(i.caller.bytes)
57+ let issuerCurrentAmount = match getInteger(this, issuerCurrentKey) {
58+ case a: Int =>
59+ a
60+ case _ =>
61+ 0
62+ }
63+ let newIssuerAmount = (issuerCurrentAmount + pmt.amount)
64+[Reissue(element7, swapAmount, true), IntegerEntry(assetIdString, newAmount), IntegerEntry(issuerCurrentKey, newIssuerAmount), ScriptTransfer(i.caller, swapAmount, element7)]
65+ }
66+ }
67+
68+
3869 @Verifier(tx)
3970 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4071

github/deemru/w8io/169f3d6 
25.21 ms