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:AAIEAAAAAAAAAAoIAhIGCgQBCAgBAAAAAAAAAAEAAAABaQEAAAARaXNzdWVMZXNzb25UaWNrZXQAAAAEAAAAC2lzc3VlQW1vdW50AAAABG5hbWUAAAAFaW1hZ2UAAAAKZXhwaXJhdGlvbgQAAAAKY3VycmVudEtleQIAAAALYXNzZXROdW1iZXIEAAAADWN1cnJlbnROdW1iZXIEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAAKY3VycmVudEtleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABAAAAAluZXdOdW1iZXIJAABkAAAAAgUAAAANY3VycmVudE51bWJlcgAAAAAAAAAAAQQAAAAJYXNzZXROYW1lCQABLAAAAAICAAAABVBBUjctCQABpAAAAAEFAAAACW5ld051bWJlcgQAAAAQYXNzZXREZXNjcmlwdGlvbgkAASwAAAACAgAAABlzY29yZUdPIGxlc3NvbiB0aWNrZXQgTm8uCQABpAAAAAEFAAAACW5ld051bWJlcgQAAAAFaXNzdWUJAARCA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applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: Hh6BCc1S1Y72pYq5gKdQhUmHc4do2WvDgX114V2GcUmb
Next: Bidcey6WqCe95TVty6h4RgFnpCCeEQmjEv45NCZoazZR
Diff:
Old | New | | Differences |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | | - | func issueLessonTicket (issueAmount,data) = { |
---|
| 7 | + | func issueLessonTicket (issueAmount,name,image,expiration) = { |
---|
8 | 8 | | let currentKey = "assetNumber" |
---|
9 | 9 | | let currentNumber = match getInteger(this, currentKey) { |
---|
10 | 10 | | case a: Int => |
---|
|
18 | 18 | | let issue = Issue(assetName, assetDescription, issueAmount, 0, true) |
---|
19 | 19 | | let id = calculateAssetId(issue) |
---|
20 | 20 | | 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)] |
---|
22 | 25 | | } |
---|
23 | 26 | | |
---|
24 | 27 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | | - | func issueLessonTicket (issueAmount,data) = { |
---|
| 7 | + | func issueLessonTicket (issueAmount,name,image,expiration) = { |
---|
8 | 8 | | let currentKey = "assetNumber" |
---|
9 | 9 | | let currentNumber = match getInteger(this, currentKey) { |
---|
10 | 10 | | case a: Int => |
---|
11 | 11 | | a |
---|
12 | 12 | | case _ => |
---|
13 | 13 | | 0 |
---|
14 | 14 | | } |
---|
15 | 15 | | let newNumber = (currentNumber + 1) |
---|
16 | 16 | | let assetName = ("PAR7-" + toString(newNumber)) |
---|
17 | 17 | | let assetDescription = ("scoreGO lesson ticket No." + toString(newNumber)) |
---|
18 | 18 | | let issue = Issue(assetName, assetDescription, issueAmount, 0, true) |
---|
19 | 19 | | let id = calculateAssetId(issue) |
---|
20 | 20 | | 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)] |
---|
22 | 25 | | } |
---|
23 | 26 | | |
---|
24 | 27 | | |
---|
25 | 28 | | @Verifier(tx) |
---|
26 | 29 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
27 | 30 | | |
---|