tx · 2Xic7DN3dJWEroAcKrRmZ57qNyg8gK6sG2DVJ9mXHLHG 3N8uQmX3Esj6vdK2aZSFYLh3WpNfAxW9EeL: -0.01400000 Waves 2021.04.05 22:23 [1469560] smart account 3N8uQmX3Esj6vdK2aZSFYLh3WpNfAxW9EeL > SELF 0.00000000 Waves
{ "type": 13, "id": "2Xic7DN3dJWEroAcKrRmZ57qNyg8gK6sG2DVJ9mXHLHG", "fee": 1400000, "feeAssetId": null, "timestamp": 1617650630628, "version": 2, "chainId": 84, "sender": "3N8uQmX3Esj6vdK2aZSFYLh3WpNfAxW9EeL", "senderPublicKey": "AhjTu5SRpw4dBJCiJx8UnBvEj3kPX7QYF23MEsJGtT1t", "proofs": [ "5bcY6acQM5LMuSE5XYSBgWFRWuJDtjqFRer6NhCJoWTW6aYGKHBCFejNSHuCUTtz8dNn7GY5E8vApdmtLiBm4eYV" ], "script": "base64:AAIEAAAAAAAAAAwIAhIDCgEBEgMKAQEAAAAAAAAAAgAAAAFpAQAAAAdSZUlzc3VlAAAAAQAAAAhRdWFudGl0eQQAAAADcG10CQEAAAAFdmFsdWUAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAAdhc3NldGlkAQAAAAMBuXsDCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQAAAgAAAAECAAAALkluY29ycmVjdCBhc3NldCBhdHRhY2hlZCwgcGxlYXNlIHNlbmQgVE4gb25seS4JAARMAAAAAgkBAAAAB1JlaXNzdWUAAAADBQAAAAdhc3NldGlkBQAAAAhRdWFudGl0eQYJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyCAUAAAADcG10AAAABmFtb3VudAUAAAAHYXNzZXRpZAUAAAADbmlsAAAAAWkBAAAABEJ1cm4AAAABAAAACFF1YW50aXR5BAAAAANwbXQJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAAB2Fzc2V0aWQBAAAAAwG5ewMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAuSW5jb3JyZWN0IGFzc2V0IGF0dGFjaGVkLCBwbGVhc2Ugc2VuZCBUTiBvbmx5LgkABEwAAAACCQEAAAAEQnVybgAAAAIFAAAAB2Fzc2V0aWQFAAAACFF1YW50aXR5CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcggFAAAAA3BtdAAAAAZhbW91bnQFAAAABHVuaXQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdJbnZva2VTY3JpcHRUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAYHVlartQ==", "height": 1469560, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EfG5vssTTwgqc4CbDmw7MFcGkMXKSVjqREPK3BLx6Yb5 Next: none Diff:
Old | New | Differences | |
---|---|---|---|
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | - | func Create () = { | |
8 | - | let asset = Issue("Wippe", "A Token Based on Real Collateral of TN. 1 Wippe = 1TN Locked in Smart Contract. You can ReIssue Any Quantity of Tokens Only Against 1:1 Collateral.", 5, 0, true, unit, 0) | |
9 | - | let assetId = calculateAssetId(asset) | |
10 | - | [asset, ScriptTransfer(i.caller, 5, assetId)] | |
7 | + | func ReIssue (Quantity) = { | |
8 | + | let pmt = value(i.payments[0]) | |
9 | + | let assetid = base58'abc' | |
10 | + | if (isDefined(pmt.assetId)) | |
11 | + | then throw("Incorrect asset attached, please send TN only.") | |
12 | + | else [Reissue(assetid, Quantity, true), ScriptTransfer(i.caller, pmt.amount, assetid)] | |
11 | 13 | } | |
12 | 14 | ||
15 | + | ||
16 | + | ||
17 | + | @Callable(i) | |
18 | + | func Burn (Quantity) = { | |
19 | + | let pmt = value(i.payments[0]) | |
20 | + | let assetid = base58'abc' | |
21 | + | if (isDefined(pmt.assetId)) | |
22 | + | then throw("Incorrect asset attached, please send TN only.") | |
23 | + | else [Burn(assetid, Quantity), ScriptTransfer(i.caller, pmt.amount, unit)] | |
24 | + | } | |
25 | + | ||
26 | + | ||
27 | + | @Verifier(tx) | |
28 | + | func verify () = match tx { | |
29 | + | case t: InvokeScriptTransaction => | |
30 | + | true | |
31 | + | case _ => | |
32 | + | false | |
33 | + | } | |
13 | 34 |
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 Create () = { | |
8 | - | let asset = Issue("Wippe", "A Token Based on Real Collateral of TN. 1 Wippe = 1TN Locked in Smart Contract. You can ReIssue Any Quantity of Tokens Only Against 1:1 Collateral.", 5, 0, true, unit, 0) | |
9 | - | let assetId = calculateAssetId(asset) | |
10 | - | [asset, ScriptTransfer(i.caller, 5, assetId)] | |
7 | + | func ReIssue (Quantity) = { | |
8 | + | let pmt = value(i.payments[0]) | |
9 | + | let assetid = base58'abc' | |
10 | + | if (isDefined(pmt.assetId)) | |
11 | + | then throw("Incorrect asset attached, please send TN only.") | |
12 | + | else [Reissue(assetid, Quantity, true), ScriptTransfer(i.caller, pmt.amount, assetid)] | |
11 | 13 | } | |
12 | 14 | ||
15 | + | ||
16 | + | ||
17 | + | @Callable(i) | |
18 | + | func Burn (Quantity) = { | |
19 | + | let pmt = value(i.payments[0]) | |
20 | + | let assetid = base58'abc' | |
21 | + | if (isDefined(pmt.assetId)) | |
22 | + | then throw("Incorrect asset attached, please send TN only.") | |
23 | + | else [Burn(assetid, Quantity), ScriptTransfer(i.caller, pmt.amount, unit)] | |
24 | + | } | |
25 | + | ||
26 | + | ||
27 | + | @Verifier(tx) | |
28 | + | func verify () = match tx { | |
29 | + | case t: InvokeScriptTransaction => | |
30 | + | true | |
31 | + | case _ => | |
32 | + | false | |
33 | + | } | |
13 | 34 |
github/deemru/w8io/026f985 32.94 ms ◑