tx · D4Q7dT7KW8UKaJPskYFrH6FRRjmJ7ANkRv3GuP9DLaXJ 3Mr97MBt1TwRZHBK8R1EFDz8S8mxui5U4zB: -0.01000000 Waves 2021.05.26 12:51 [1542471] smart account 3Mr97MBt1TwRZHBK8R1EFDz8S8mxui5U4zB > SELF 0.00000000 Waves
{ "type": 13, "id": "D4Q7dT7KW8UKaJPskYFrH6FRRjmJ7ANkRv3GuP9DLaXJ", "fee": 1000000, "feeAssetId": null, "timestamp": 1622022710897, "version": 2, "chainId": 84, "sender": "3Mr97MBt1TwRZHBK8R1EFDz8S8mxui5U4zB", "senderPublicKey": "CQ7vntBAYh2QZcKcqiiyEnQWWXsr98ysDptD23Wgxmvb", "proofs": [ "4TwCCVcs5d8YDLrj6Zgn6MNf25qqkDyBcjpW7k8imoaqJdsQYBzTFEA8Gsb9H9QikZeqT3SR7fwK1e3YKQzNWvLE" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAAQEAAAAKZ2VuZXJhdGlvbgAAAAEAAAADbnVtAwMJAABmAAAAAgUAAAADbnVtAAAAAAAAAAAABgkAAGcAAAACAAAAAAAAAABkBQAAAANudW0CAAAAAkcxAwMJAABmAAAAAgUAAAADbnVtAAAAAAAAAABkBgkAAGcAAAACAAAAAAAAAAOEBQAAAANudW0CAAAAAkcyAgAAAAJHMwAAAAEAAAABaQEAAAAPZ2l2ZUJpcnRoS2l0dGVuAAAAAAQAAAADcG10CQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAAxraXR0ZW5BbW91bnQIBQAAAANwbXQAAAAGYW1vdW50BAAAAAhraXR0ZW5JZAkAAlgAAAABCQEAAAAFdmFsdWUAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQEAAAADWlzc3VlUXVhbnRpdHkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwIAAAANaXNzdWVRdWFudGl0eQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABAAAAAtuZXdRdWFudGl0eQkAAGQAAAACBQAAAA1pc3N1ZVF1YW50aXR5AAAAAAAAAAABBAAAAA5nZW5lcmF0aW9uVHlwZQkBAAAACmdlbmVyYXRpb24AAAABBQAAAAtuZXdRdWFudGl0eQMJAABmAAAAAgUAAAAMa2l0dGVuQW1vdW50AAAAAAAAAAADCQAAAgAAAAECAAAAKUFtb3VudCBvZiBLaXR0ZW4gdG9rZW5zIHNlbnQgaXMgMyB0b2tlbnMuAwkAAGYAAAACAAAAAAAAAAADBQAAAAxraXR0ZW5BbW91bnQJAAACAAAAAQIAAAApQW1vdW50IG9mIEtpdHRlbiB0b2tlbnMgc2VudCBpcyAzIHRva2Vucy4EAAAACWtpdHRlbk5mdAkABEIAAAAFAgAAAA9LaXR0ZW4oPV7jg7tePSkJAAEsAAAAAgIAAAALZ2VuZXJhdGlvbjoFAAAADmdlbmVyYXRpb25UeXBlAAAAAAAAAAABAAAAAAAAAAAABwQAAAALa2l0dGVuTmZ0SWQJAAQ4AAAAAQUAAAAJa2l0dGVuTmZ0CQAETAAAAAIFAAAACWtpdHRlbk5mdAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIAAAAAAAAAAAEFAAAAC2tpdHRlbk5mdElkBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleWxseFQ=", "height": 1542471, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: AdysQvGg9eoyZnb6cQffiMisNBgJVDczND1uaywn4Bvg Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | func generation (num) = if (if ((num > 0)) | |
5 | + | then true | |
6 | + | else (100 >= num)) | |
7 | + | then "G1" | |
8 | + | else if (if ((num > 100)) | |
9 | + | then true | |
10 | + | else (900 >= num)) | |
11 | + | then "G2" | |
12 | + | else "G3" | |
13 | + | ||
14 | + | ||
15 | + | @Callable(i) | |
16 | + | func giveBirthKitten () = { | |
17 | + | let pmt = i.payments[0] | |
18 | + | let kittenAmount = pmt.amount | |
19 | + | let kittenId = toBase58String(value(pmt.assetId)) | |
20 | + | let issueQuantity = match getInteger(this, "issueQuantity") { | |
21 | + | case a: Int => | |
22 | + | a | |
23 | + | case _ => | |
24 | + | 0 | |
25 | + | } | |
26 | + | let newQuantity = (issueQuantity + 1) | |
27 | + | let generationType = generation(newQuantity) | |
28 | + | if ((kittenAmount > 3)) | |
29 | + | then throw("Amount of Kitten tokens sent is 3 tokens.") | |
30 | + | else if ((3 > kittenAmount)) | |
31 | + | then throw("Amount of Kitten tokens sent is 3 tokens.") | |
32 | + | else { | |
33 | + | let kittenNft = Issue("Kitten(=^・^=)", ("generation:" + generationType), 1, 0, false) | |
34 | + | let kittenNftId = calculateAssetId(kittenNft) | |
35 | + | [kittenNft, ScriptTransfer(i.caller, 1, kittenNftId)] | |
36 | + | } | |
37 | + | } | |
38 | + | ||
39 | + | ||
40 | + | @Verifier(tx) | |
41 | + | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
42 | + |
github/deemru/w8io/026f985 19.30 ms ◑