tx · 7SDQTbtCmdJTASKbd7bXJXRjw9MCTS497ZTbtKGm8V7m

3MrU31CUyjdemLKatmPPPWGHsBRCdr6hCbp:  -0.01400000 Waves

2020.09.12 05:53 [1173514] smart account 3MrU31CUyjdemLKatmPPPWGHsBRCdr6hCbp > SELF 0.00000000 Waves

{ "type": 13, "id": "7SDQTbtCmdJTASKbd7bXJXRjw9MCTS497ZTbtKGm8V7m", "fee": 1400000, "feeAssetId": null, "timestamp": 1599879188062, "version": 2, "chainId": 84, "sender": "3MrU31CUyjdemLKatmPPPWGHsBRCdr6hCbp", "senderPublicKey": "G7BybYezmegscruMwVjDJVuRFshqmWNKBHmEctYr9Zjm", "proofs": [ "KjR7jCjTv4PWZsvh9U3rMkHD4gb434iz2CeCZoejVDxRXT1PibsBztEWVcEuPqfC8W6rxvwHg1o9vatJcdR2DVP" ], "script": "base64:AAIEAAAAAAAAAAoIAhIGCgQBCAgBAAAAAAAAAAEAAAABaQEAAAARaXNzdWVMZXNzb25UaWNrZXQAAAAEAAAAC2lzc3VlQW1vdW50AAAABG5hbWUAAAAFaW1hZ2UAAAAKZXhwaXJhdGlvbgQAAAAKY3VycmVudEtleQIAAAALYXNzZXROdW1iZXIEAAAADWN1cnJlbnROdW1iZXIEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAAKY3VycmVudEtleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABAAAAAluZXdOdW1iZXIJAABkAAAAAgUAAAANY3VycmVudE51bWJlcgAAAAAAAAAAAQQAAAAJYXNzZXROYW1lCQABLAAAAAICAAAABVBBUjctCQABpAAAAAEFAAAACW5ld051bWJlcgQAAAAQYXNzZXREZXNjcmlwdGlvbgkAASwAAAACAgAAABlzY29yZUdPIGxlc3NvbiB0aWNrZXQgTm8uCQABpAAAAAEFAAAACW5ld051bWJlcgQAAAAFaXNzdWUJAARCAAAABQUAAAA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ded", "spentComplexity": 0 } View: original | compacted Prev: Hh6BCc1S1Y72pYq5gKdQhUmHc4do2WvDgX114V2GcUmb Next: Bidcey6WqCe95TVty6h4RgFnpCCeEQmjEv45NCZoazZR Diff:
OldNewDifferences
44
55
66 @Callable(i)
7-func issueLessonTicket (issueAmount,data) = {
7+func issueLessonTicket (issueAmount,name,image,expiration) = {
88 let currentKey = "assetNumber"
99 let currentNumber = match getInteger(this, currentKey) {
1010 case a: Int =>
1818 let issue = Issue(assetName, assetDescription, issueAmount, 0, true)
1919 let id = calculateAssetId(issue)
2020 let assetId = toBase58String(id)
21-[StringEntry(assetId, data), IntegerEntry(currentKey, newNumber), issue, ScriptTransfer(i.caller, issue.quantity, id)]
21+ let issuerAddress = toBase58String(i.caller.bytes)
22+ let expirationString = toString(expiration)
23+ let jsonData = (((((((((("{name:" + name) + ",image:") + image) + ",expiration:") + expirationString) + ",assetId:") + assetId) + ",issuer:") + issuerAddress) + "}")
24+[StringEntry(assetId, jsonData), IntegerEntry(currentKey, newNumber), issue, ScriptTransfer(i.caller, issue.quantity, id)]
2225 }
2326
2427
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
7-func issueLessonTicket (issueAmount,data) = {
7+func issueLessonTicket (issueAmount,name,image,expiration) = {
88 let currentKey = "assetNumber"
99 let currentNumber = match getInteger(this, currentKey) {
1010 case a: Int =>
1111 a
1212 case _ =>
1313 0
1414 }
1515 let newNumber = (currentNumber + 1)
1616 let assetName = ("PAR7-" + toString(newNumber))
1717 let assetDescription = ("scoreGO lesson ticket No." + toString(newNumber))
1818 let issue = Issue(assetName, assetDescription, issueAmount, 0, true)
1919 let id = calculateAssetId(issue)
2020 let assetId = toBase58String(id)
21-[StringEntry(assetId, data), IntegerEntry(currentKey, newNumber), issue, ScriptTransfer(i.caller, issue.quantity, id)]
21+ let issuerAddress = toBase58String(i.caller.bytes)
22+ let expirationString = toString(expiration)
23+ let jsonData = (((((((((("{name:" + name) + ",image:") + image) + ",expiration:") + expirationString) + ",assetId:") + assetId) + ",issuer:") + issuerAddress) + "}")
24+[StringEntry(assetId, jsonData), IntegerEntry(currentKey, newNumber), issue, ScriptTransfer(i.caller, issue.quantity, id)]
2225 }
2326
2427
2528 @Verifier(tx)
2629 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
2730

github/deemru/w8io/026f985 
23.14 ms