tx · 31Li9KkucfFGWok6WYQ8cSQz8dtqEgFVrF9YqpivZn61 3Mr97MBt1TwRZHBK8R1EFDz8S8mxui5U4zB: -0.01400000 Waves 2021.06.01 04:12 [1550615] smart account 3Mr97MBt1TwRZHBK8R1EFDz8S8mxui5U4zB > SELF 0.00000000 Waves
{ "type": 13, "id": "31Li9KkucfFGWok6WYQ8cSQz8dtqEgFVrF9YqpivZn61", "fee": 1400000, "feeAssetId": null, "timestamp": 1622509956339, "version": 2, "chainId": 84, "sender": "3Mr97MBt1TwRZHBK8R1EFDz8S8mxui5U4zB", "senderPublicKey": "CQ7vntBAYh2QZcKcqiiyEnQWWXsr98ysDptD23Wgxmvb", "proofs": [ "2Tyfb7Xtp2W36VpzKBjyp4vYuU4prB3w15vbHXnvvod4W84UWDddfuPdWuoUbigGvsokCz3TWgbkhhNiWN97zhs8" ], "script": "base64:AAIEAAAAAAAAAAkIAhIDCgEBEgAAAAAFAAAAAAhraXR0ZW5JZAIAAAAsR3VvYmNIdlc5V3FvdG5rR1VqN0prcGNiWHRnVmZCMzdUQTRKa2dTajlRYmIBAAAAD2dldFJhbmRvbU51bWJlcgAAAAQAAAAIdmFyaWFudHMAAAAEdHhJZAAAABRoYXRjaGluZ0ZpbmlzaEhlaWdodAAAAAZvZmZzZXQEAAAAD3JhbmRvbVNlZWRCbG9jawkBAAAABXZhbHVlAAAAAQkAA+0AAAABCQAAZQAAAAIFAAAAFGhhdGNoaW5nRmluaXNoSGVpZ2h0AAAAAAAAAAABBAAAAApyYW5kb21IYXNoCQAB9wAAAAEJAADLAAAAAgUAAAAEdHhJZAkBAAAABXZhbHVlAAAAAQgFAAAAD3JhbmRvbVNlZWRCbG9jawAAAAN2cmYJAABqAAAAAgkABLIAAAACBQAAAApyYW5kb21IYXNoCQAAaAAAAAIFAAAABm9mZnNldAAAAAAAAAAACAUAAAAIdmFyaWFudHMBAAAACmdlbmVyYXRpb24AAAABAAAAA251bQMDCQAAZgAAAAIFAAAAA251bQAAAAAA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IBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleao0YMM=", "height": 1550615, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: H9wVYAkyxVazSsacyfk1L7MpNAyDkmUDUttX2kDAwuua Next: 5KVpEg1NmCPxeYhejDGVYdv5FZt5Gi97DNKkLE1GaLU5 Diff:
Old | New | Differences | |
---|---|---|---|
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | - | func p (j) = { | |
64 | - | let l = lastBlock.timestamp | |
65 | - | let m = toString(l) | |
66 | - | let n = takeRight(m, 2) | |
67 | - | let o = parseIntValue(n) | |
68 | - | if ((o == 0)) | |
69 | - | then "II-II-II-II" | |
70 | - | else if (if ((o > 0)) | |
71 | - | then (3 >= o) | |
63 | + | func p (j) = if ((j == 100)) | |
64 | + | then "II-II-II-II" | |
65 | + | else if (if ((j >= 1)) | |
66 | + | then (3 >= j) | |
67 | + | else false) | |
68 | + | then "BB-BB-BB-BB" | |
69 | + | else if (if ((j > 3)) | |
70 | + | then (8 >= j) | |
72 | 71 | else false) | |
73 | - | then " | |
74 | - | else if (if (( | |
75 | - | then ( | |
72 | + | then "CC-CC-CC-CC" | |
73 | + | else if (if ((j > 8)) | |
74 | + | then (15 >= j) | |
76 | 75 | else false) | |
77 | - | then " | |
78 | - | else if (if (( | |
79 | - | then ( | |
76 | + | then "DD-DD-DD-DD" | |
77 | + | else if (if ((j > 15)) | |
78 | + | then (24 >= j) | |
80 | 79 | else false) | |
81 | - | then " | |
82 | - | else if (if (( | |
83 | - | then ( | |
80 | + | then "EE-EE-EE-EE" | |
81 | + | else if (if ((j > 24)) | |
82 | + | then (35 >= j) | |
84 | 83 | else false) | |
85 | - | then " | |
86 | - | else if (if (( | |
87 | - | then ( | |
84 | + | then "FF-FF-FF-FF" | |
85 | + | else if (if ((j > 35)) | |
86 | + | then (48 >= j) | |
88 | 87 | else false) | |
89 | - | then " | |
90 | - | else if (if (( | |
91 | - | then ( | |
88 | + | then "GG-GG-GG-GG" | |
89 | + | else if (if ((j > 48)) | |
90 | + | then (51 >= j) | |
92 | 91 | else false) | |
93 | - | then "GG-GG-GG-GG" | |
94 | - | else if (if ((o > 48)) | |
95 | - | then (51 >= o) | |
96 | - | else false) | |
97 | - | then "AA-AA-AA-AA" | |
98 | - | else "HH-HH-HH-HH" | |
99 | - | } | |
92 | + | then "AA-AA-AA-AA" | |
93 | + | else "HH-HH-HH-HH" | |
100 | 94 | ||
101 | 95 | ||
102 | 96 | @Callable(q) | |
127 | 121 | let A = calculateAssetId(z) | |
128 | 122 | let B = lastBlock.height | |
129 | 123 | let C = b(100, A, B, 0) | |
124 | + | let D = p(C) | |
130 | 125 | if ((j == 0)) | |
131 | - | then throw(((("blockHeight:" + toString(B)) + "/typeRandom:") + toString(C))) | |
132 | - | else { | |
133 | - | let D = p(C) | |
134 | - | [z, ScriptTransfer(q.caller, 1, A), StringEntry(toBase58String(value(A)), D), IntegerEntry("issueQuantity", x)] | |
135 | - | } | |
126 | + | then throw(((((("blockHeight:" + toString(B)) + "/typeRandom:") + toString(C)) + "/geneCode:") + D)) | |
127 | + | else [z, ScriptTransfer(q.caller, 1, A), StringEntry(toBase58String(value(A)), D), IntegerEntry("issueQuantity", x)] | |
136 | 128 | } | |
137 | 129 | } | |
138 | 130 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "GuobcHvW9WqotnkGUj7JkpcbXtgVfB37TA4JkgSj9Qbb" | |
5 | 5 | ||
6 | 6 | func b (c,d,e,f) = { | |
7 | 7 | let g = value(blockInfoByHeight((e - 1))) | |
8 | 8 | let h = sha256((d + value(g.vrf))) | |
9 | 9 | (toInt(h, (f * 8)) % c) | |
10 | 10 | } | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func i (j) = if (if ((j > 0)) | |
14 | 14 | then true | |
15 | 15 | else (300 >= j)) | |
16 | 16 | then "G1" | |
17 | 17 | else if (if ((j > 300)) | |
18 | 18 | then true | |
19 | 19 | else (1000 >= j)) | |
20 | 20 | then "G2" | |
21 | 21 | else "G3" | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func k () = { | |
25 | 25 | let l = lastBlock.timestamp | |
26 | 26 | let m = toString(l) | |
27 | 27 | let n = takeRight(m, 2) | |
28 | 28 | let o = parseIntValue(n) | |
29 | 29 | if ((o == 0)) | |
30 | 30 | then "II-II-II-II" | |
31 | 31 | else if (if ((o > 0)) | |
32 | 32 | then (3 >= o) | |
33 | 33 | else false) | |
34 | 34 | then "BB-BB-BB-BB" | |
35 | 35 | else if (if ((o > 3)) | |
36 | 36 | then (8 >= o) | |
37 | 37 | else false) | |
38 | 38 | then "CC-CC-CC-CC" | |
39 | 39 | else if (if ((o > 8)) | |
40 | 40 | then (15 >= o) | |
41 | 41 | else false) | |
42 | 42 | then "DD-DD-DD-DD" | |
43 | 43 | else if (if ((o > 15)) | |
44 | 44 | then (24 >= o) | |
45 | 45 | else false) | |
46 | 46 | then "EE-EE-EE-EE" | |
47 | 47 | else if (if ((o > 24)) | |
48 | 48 | then (35 >= o) | |
49 | 49 | else false) | |
50 | 50 | then "FF-FF-FF-FF" | |
51 | 51 | else if (if ((o > 35)) | |
52 | 52 | then (48 >= o) | |
53 | 53 | else false) | |
54 | 54 | then "GG-GG-GG-GG" | |
55 | 55 | else if (if ((o > 48)) | |
56 | 56 | then (51 >= o) | |
57 | 57 | else false) | |
58 | 58 | then "AA-AA-AA-AA" | |
59 | 59 | else "HH-HH-HH-HH" | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | - | func p (j) = { | |
64 | - | let l = lastBlock.timestamp | |
65 | - | let m = toString(l) | |
66 | - | let n = takeRight(m, 2) | |
67 | - | let o = parseIntValue(n) | |
68 | - | if ((o == 0)) | |
69 | - | then "II-II-II-II" | |
70 | - | else if (if ((o > 0)) | |
71 | - | then (3 >= o) | |
63 | + | func p (j) = if ((j == 100)) | |
64 | + | then "II-II-II-II" | |
65 | + | else if (if ((j >= 1)) | |
66 | + | then (3 >= j) | |
67 | + | else false) | |
68 | + | then "BB-BB-BB-BB" | |
69 | + | else if (if ((j > 3)) | |
70 | + | then (8 >= j) | |
72 | 71 | else false) | |
73 | - | then " | |
74 | - | else if (if (( | |
75 | - | then ( | |
72 | + | then "CC-CC-CC-CC" | |
73 | + | else if (if ((j > 8)) | |
74 | + | then (15 >= j) | |
76 | 75 | else false) | |
77 | - | then " | |
78 | - | else if (if (( | |
79 | - | then ( | |
76 | + | then "DD-DD-DD-DD" | |
77 | + | else if (if ((j > 15)) | |
78 | + | then (24 >= j) | |
80 | 79 | else false) | |
81 | - | then " | |
82 | - | else if (if (( | |
83 | - | then ( | |
80 | + | then "EE-EE-EE-EE" | |
81 | + | else if (if ((j > 24)) | |
82 | + | then (35 >= j) | |
84 | 83 | else false) | |
85 | - | then " | |
86 | - | else if (if (( | |
87 | - | then ( | |
84 | + | then "FF-FF-FF-FF" | |
85 | + | else if (if ((j > 35)) | |
86 | + | then (48 >= j) | |
88 | 87 | else false) | |
89 | - | then " | |
90 | - | else if (if (( | |
91 | - | then ( | |
88 | + | then "GG-GG-GG-GG" | |
89 | + | else if (if ((j > 48)) | |
90 | + | then (51 >= j) | |
92 | 91 | else false) | |
93 | - | then "GG-GG-GG-GG" | |
94 | - | else if (if ((o > 48)) | |
95 | - | then (51 >= o) | |
96 | - | else false) | |
97 | - | then "AA-AA-AA-AA" | |
98 | - | else "HH-HH-HH-HH" | |
99 | - | } | |
92 | + | then "AA-AA-AA-AA" | |
93 | + | else "HH-HH-HH-HH" | |
100 | 94 | ||
101 | 95 | ||
102 | 96 | @Callable(q) | |
103 | 97 | func testKitten (j) = { | |
104 | 98 | let r = q.payments[0] | |
105 | 99 | let s = toBase58String(value(r.assetId)) | |
106 | 100 | if ((s != a)) | |
107 | 101 | then throw("Please send Kitten token.") | |
108 | 102 | else { | |
109 | 103 | let t = r.amount | |
110 | 104 | if ((t > 300)) | |
111 | 105 | then throw("Amount of Kitten tokens sent is 3 tokens.") | |
112 | 106 | else if ((300 > t)) | |
113 | 107 | then throw("Amount of Kitten tokens sent is 3 tokens.") | |
114 | 108 | else { | |
115 | 109 | let u = { | |
116 | 110 | let v = getInteger(this, "issueQuantity") | |
117 | 111 | if ($isInstanceOf(v, "Int")) | |
118 | 112 | then { | |
119 | 113 | let w = v | |
120 | 114 | w | |
121 | 115 | } | |
122 | 116 | else 0 | |
123 | 117 | } | |
124 | 118 | let x = (u + 1) | |
125 | 119 | let y = i(x) | |
126 | 120 | let z = Issue("Kitten(=^・^=)", ("generation:" + y), 1, 0, false) | |
127 | 121 | let A = calculateAssetId(z) | |
128 | 122 | let B = lastBlock.height | |
129 | 123 | let C = b(100, A, B, 0) | |
124 | + | let D = p(C) | |
130 | 125 | if ((j == 0)) | |
131 | - | then throw(((("blockHeight:" + toString(B)) + "/typeRandom:") + toString(C))) | |
132 | - | else { | |
133 | - | let D = p(C) | |
134 | - | [z, ScriptTransfer(q.caller, 1, A), StringEntry(toBase58String(value(A)), D), IntegerEntry("issueQuantity", x)] | |
135 | - | } | |
126 | + | then throw(((((("blockHeight:" + toString(B)) + "/typeRandom:") + toString(C)) + "/geneCode:") + D)) | |
127 | + | else [z, ScriptTransfer(q.caller, 1, A), StringEntry(toBase58String(value(A)), D), IntegerEntry("issueQuantity", x)] | |
136 | 128 | } | |
137 | 129 | } | |
138 | 130 | } | |
139 | 131 | ||
140 | 132 | ||
141 | 133 | ||
142 | 134 | @Callable(q) | |
143 | 135 | func giveBirthKitten () = { | |
144 | 136 | let r = q.payments[0] | |
145 | 137 | let s = toBase58String(value(r.assetId)) | |
146 | 138 | if ((s != a)) | |
147 | 139 | then throw("Please send Kitten token.") | |
148 | 140 | else { | |
149 | 141 | let t = r.amount | |
150 | 142 | let u = { | |
151 | 143 | let v = getInteger(this, "issueQuantity") | |
152 | 144 | if ($isInstanceOf(v, "Int")) | |
153 | 145 | then { | |
154 | 146 | let w = v | |
155 | 147 | w | |
156 | 148 | } | |
157 | 149 | else 0 | |
158 | 150 | } | |
159 | 151 | let x = (u + 1) | |
160 | 152 | let y = i(x) | |
161 | 153 | if ((t > 300)) | |
162 | 154 | then throw("Amount of Kitten tokens sent is 3 tokens.") | |
163 | 155 | else if ((300 > t)) | |
164 | 156 | then throw("Amount of Kitten tokens sent is 3 tokens.") | |
165 | 157 | else { | |
166 | 158 | let z = Issue("Kitten(=^・^=)", ("generation:" + y), 1, 0, false) | |
167 | 159 | let A = calculateAssetId(z) | |
168 | 160 | let E = ScriptTransfer(q.caller, 1, A) | |
169 | 161 | let D = k() | |
170 | 162 | [z, E, StringEntry(toBase58String(value(A)), D), IntegerEntry("issueQuantity", x)] | |
171 | 163 | } | |
172 | 164 | } | |
173 | 165 | } | |
174 | 166 | ||
175 | 167 | ||
176 | 168 | @Verifier(F) | |
177 | 169 | func G () = sigVerify(F.bodyBytes, F.proofs[0], F.senderPublicKey) | |
178 | 170 |
github/deemru/w8io/026f985 46.39 ms ◑