tx · ABaqmFA2AAKDZZqyrEXPrCCjxNRnsriyvGxnVYYRspr 3Mr97MBt1TwRZHBK8R1EFDz8S8mxui5U4zB: -0.01400000 Waves 2021.05.31 11:48 [1549630] smart account 3Mr97MBt1TwRZHBK8R1EFDz8S8mxui5U4zB > SELF 0.00000000 Waves
{ "type": 13, "id": "ABaqmFA2AAKDZZqyrEXPrCCjxNRnsriyvGxnVYYRspr", "fee": 1400000, "feeAssetId": null, "timestamp": 1622450908157, "version": 2, "chainId": 84, "sender": "3Mr97MBt1TwRZHBK8R1EFDz8S8mxui5U4zB", "senderPublicKey": "CQ7vntBAYh2QZcKcqiiyEnQWWXsr98ysDptD23Wgxmvb", "proofs": [ "3XMrP1Lo2McA6dkPmFC4Agj6fC9B76eZLQS4tyb5KBdFr3EFUHNqXEKCPaeKa9c2E8WeAkQ7Jwz1iJQAeLsV9WoC" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAAwAAAAAIa2l0dGVuSWQCAAAALEd1b2JjSHZXOVdxb3Rua0dVajdKa3BjYlh0Z1ZmQjM3VEE0SmtnU2o5UWJiAQAAAApnZW5lcmF0aW9uAAAAAQAAAANudW0DAwkAAGYAAAACBQAAAANudW0AAAAAAAAAAAAGCQAAZwAAAAIAAAAAAAAAASwFAAAAA251bQIAAAACRzEDAwkAAGYAAAACBQAAAANudW0AAAAAAAAAASwGCQAAZwAAAAIAAAAAAAAAA+gFAAAAA251bQIAAAACRzICAAAAAkczAQAAAA1pc3N1ZUdlbmVDb2RlAAAAAAQAAAAJdGltZXN0YW1wCAUAAAAJbGFzdEJsb2NrAAAACXRpbWVzdGFtcAQAAAAMdGltZXN0YW1wU3RyCQABpAAAAAEFAAAACXRpbWVzdGFtcAQAAAAKdGltZXN0YW1wMgkBAAAACXRha2VSaWdodAAAAAIFAAAADHRpbWVzdGFtcFN0cgAAAAAAAAAAAgQAAAAHcGVyY2VudAkBAAAADXBhcnNlSW50VmFsdWUAAAABBQAAAAp0aW1lc3RhbXAy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dWUAAAABBQAAAAppc3N1ZU5mdElkBQAAAAhnZW5lQ29kZQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAANaXNzdWVRdWFudGl0eQUAAAALbmV3UXVhbnRpdHkFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V53JuBaQ==", "height": 1549630, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5DPyQmq66BmE1fjxHf74JKCNVmFHPt6MQoiJKyHD8rby Next: 45ZZNqrw9UT9PdNW6d36kFL8WQmotksgYCw4TSW8LfHo Diff:
Old | New | Differences | |
---|---|---|---|
20 | 20 | let timestamp2 = takeRight(timestampStr, 2) | |
21 | 21 | let percent = parseIntValue(timestamp2) | |
22 | 22 | if ((percent == 0)) | |
23 | - | then " | |
23 | + | then "II-II-II-II" | |
24 | 24 | else if (if ((percent > 0)) | |
25 | 25 | then (3 >= percent) | |
26 | 26 | else false) | |
45 | 45 | then (48 >= percent) | |
46 | 46 | else false) | |
47 | 47 | then "GG-GG-GG-GG" | |
48 | - | else "HH-HH-HH-HH" | |
48 | + | else if (if ((percent > 48)) | |
49 | + | then (51 >= percent) | |
50 | + | else false) | |
51 | + | then "AA-AA-AA-AA" | |
52 | + | else "HH-HH-HH-HH" | |
49 | 53 | } | |
50 | 54 | ||
51 | 55 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let kittenId = "GuobcHvW9WqotnkGUj7JkpcbXtgVfB37TA4JkgSj9Qbb" | |
5 | 5 | ||
6 | 6 | func generation (num) = if (if ((num > 0)) | |
7 | 7 | then true | |
8 | 8 | else (300 >= num)) | |
9 | 9 | then "G1" | |
10 | 10 | else if (if ((num > 300)) | |
11 | 11 | then true | |
12 | 12 | else (1000 >= num)) | |
13 | 13 | then "G2" | |
14 | 14 | else "G3" | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func issueGeneCode () = { | |
18 | 18 | let timestamp = lastBlock.timestamp | |
19 | 19 | let timestampStr = toString(timestamp) | |
20 | 20 | let timestamp2 = takeRight(timestampStr, 2) | |
21 | 21 | let percent = parseIntValue(timestamp2) | |
22 | 22 | if ((percent == 0)) | |
23 | - | then " | |
23 | + | then "II-II-II-II" | |
24 | 24 | else if (if ((percent > 0)) | |
25 | 25 | then (3 >= percent) | |
26 | 26 | else false) | |
27 | 27 | then "BB-BB-BB-BB" | |
28 | 28 | else if (if ((percent > 3)) | |
29 | 29 | then (8 >= percent) | |
30 | 30 | else false) | |
31 | 31 | then "CC-CC-CC-CC" | |
32 | 32 | else if (if ((percent > 8)) | |
33 | 33 | then (15 >= percent) | |
34 | 34 | else false) | |
35 | 35 | then "DD-DD-DD-DD" | |
36 | 36 | else if (if ((percent > 15)) | |
37 | 37 | then (24 >= percent) | |
38 | 38 | else false) | |
39 | 39 | then "EE-EE-EE-EE" | |
40 | 40 | else if (if ((percent > 24)) | |
41 | 41 | then (35 >= percent) | |
42 | 42 | else false) | |
43 | 43 | then "FF-FF-FF-FF" | |
44 | 44 | else if (if ((percent > 35)) | |
45 | 45 | then (48 >= percent) | |
46 | 46 | else false) | |
47 | 47 | then "GG-GG-GG-GG" | |
48 | - | else "HH-HH-HH-HH" | |
48 | + | else if (if ((percent > 48)) | |
49 | + | then (51 >= percent) | |
50 | + | else false) | |
51 | + | then "AA-AA-AA-AA" | |
52 | + | else "HH-HH-HH-HH" | |
49 | 53 | } | |
50 | 54 | ||
51 | 55 | ||
52 | 56 | @Callable(i) | |
53 | 57 | func giveBirthKitten () = { | |
54 | 58 | let pmt = i.payments[0] | |
55 | 59 | let pmtId = toBase58String(value(pmt.assetId)) | |
56 | 60 | if ((pmtId != kittenId)) | |
57 | 61 | then throw("Please send Kitten token.") | |
58 | 62 | else { | |
59 | 63 | let kittenAmount = pmt.amount | |
60 | 64 | let issueQuantity = match getInteger(this, "issueQuantity") { | |
61 | 65 | case a: Int => | |
62 | 66 | a | |
63 | 67 | case _ => | |
64 | 68 | 0 | |
65 | 69 | } | |
66 | 70 | let newQuantity = (issueQuantity + 1) | |
67 | 71 | let generationType = generation(newQuantity) | |
68 | 72 | if ((kittenAmount > 300)) | |
69 | 73 | then throw("Amount of Kitten tokens sent is 3 tokens.") | |
70 | 74 | else if ((300 > kittenAmount)) | |
71 | 75 | then throw("Amount of Kitten tokens sent is 3 tokens.") | |
72 | 76 | else { | |
73 | 77 | let issueNft = Issue("Kitten(=^・^=)", ("generation:" + generationType), 1, 0, false) | |
74 | 78 | let issueNftId = calculateAssetId(issueNft) | |
75 | 79 | let nftTransfer = ScriptTransfer(i.caller, 1, issueNftId) | |
76 | 80 | let geneCode = issueGeneCode() | |
77 | 81 | [issueNft, nftTransfer, StringEntry(toBase58String(value(issueNftId)), geneCode), IntegerEntry("issueQuantity", newQuantity)] | |
78 | 82 | } | |
79 | 83 | } | |
80 | 84 | } | |
81 | 85 | ||
82 | 86 | ||
83 | 87 | @Verifier(tx) | |
84 | 88 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
85 | 89 |
github/deemru/w8io/026f985 46.62 ms ◑