tx · FWfSK1QuXN9nyNVTxCg2xRe2MB2uzYhD6ChDA7KnegdW 3MrfLFw1uz3BDr45RQLvrRnAwT2nHpB4KiX: -0.01000000 Waves 2023.06.13 14:07 [2620817] smart account 3MrfLFw1uz3BDr45RQLvrRnAwT2nHpB4KiX > SELF 0.00000000 Waves
{ "type": 13, "id": "FWfSK1QuXN9nyNVTxCg2xRe2MB2uzYhD6ChDA7KnegdW", "fee": 1000000, "feeAssetId": null, "timestamp": 1686654490289, "version": 2, "chainId": 84, "sender": "3MrfLFw1uz3BDr45RQLvrRnAwT2nHpB4KiX", "senderPublicKey": "5iiNX4Sz3qZzcerumQLc1y7u9TH2X46jDV4f9Xivtmtv", "proofs": [ "5e5t9H5p5YxPnnJgiRh1k15XMEnHKNaUMgJvLon9o6KgaP4BGhsPSKQPUmcQsovBxghUzV1k6todVaYZg5aTsivo" ], "script": "base64:BgILCAISBQoDAREIEgAbAQpudW1Ub1dhdmVzAQNudW0JAGgCBQNudW0AgMLXLwELaXNQYXltZW50T2sCAWkDc3VtBBFhY2NlcHRhYmxlQXNzZXRJZAEEE6vZMwQBcAkAkQMCCAUBaQhwYXltZW50cwAAAwkAZwIIBQFwBmFtb3VudAkBCm51bVRvV2F2ZXMBBQNzdW0JAAACCAUBcAdhc3NldElkBQR1bml0BwELbWFwSW50VG9TdHICBWFjY3VtBG5leHQJAMwIAgkApAMBBQRuZXh0BQVhY2N1bQELbWFwU3RyVG9JbnQCBWFjY3VtBG5leHQJAMwIAgkBDXBhcnNlSW50VmFsdWUBBQRuZXh0BQVhY2N1bQELbWFwSW50VG9TdW0CBWFjY3VtBG5leHQJAGQCBQVhY2N1bQUEbmV4dAEMbGlzdEludFRvU3VtAQNhcnIKAAIkbAUDYXJyCgACJHMJAJADAQUCJGwKAAUkYWNjMAAACgEFJGYwXzECAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAQttYXBJbnRUb1N1bQIFAiRhCQCRAwIFAiRsBQIkaQoBBSRmMF8yAgIkY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W91bnRLZXkBBQFpCQDMCAIJAQtEZWxldGVFbnRyeQEJARdSX2dldFNlbGVjdGVkTnVtYmVyc0tleQEFAWkJAMwIAgkBC0RlbGV0ZUVudHJ5AQkBEVJfZ2V0RGlyZWN0aW9uS2V5AQUBaQkAzAgCCQEMSW50ZWdlckVudHJ5AgkBC1JfZ2V0TG9nS2V5AQUBaQUNd2lubmluZ0Ftb3VudAkAzAgCCQELU3RyaW5nRW50cnkCCQELUl9nZXRMb2dLZXkBBQFpBQZsb2dTdHIJAMwIAgkBC1N0cmluZ0VudHJ5AgkBDlJfZ2V0U3RhdHVzS2V5AQUBaQUJc3RhdHVzU3RyBQNuaWwAYhvSFA==", "height": 2620817, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4GxP3YVcn6owHfcTPiNoNcWdCiuei7ATCoFWjzJTaUxw Next: BPEtffxgdJxzb9yCa8ABB5ugFhb2AhR6DLJjxF7ooiCu Diff:
Old | New | Differences | |
---|---|---|---|
94 | 94 | func J (E) = { | |
95 | 95 | let H = sha256((value(value(blockInfoByHeight(E)).vrf) + toBytes(E))) | |
96 | 96 | let K = toInt(H, 24) | |
97 | - | (K % 37) | |
97 | + | let L = sha256((value(value(blockInfoByHeight(E)).vrf) + toBytes((E - 2)))) | |
98 | + | let M = toInt(L, 24) | |
99 | + | let N = sha256((value(value(blockInfoByHeight(E)).vrf) + toBytes((E - 4)))) | |
100 | + | let O = toInt(N, 24) | |
101 | + | let P = (K % 37) | |
102 | + | let Q = (M % 37) | |
103 | + | let R = (O % 37) | |
104 | + | if ((P == 0)) | |
105 | + | then P | |
106 | + | else if (if ((P > 12)) | |
107 | + | then ((E % 2) != 0) | |
108 | + | else false) | |
109 | + | then P | |
110 | + | else if (if ((25 > P)) | |
111 | + | then ((E % 2) != 0) | |
112 | + | else false) | |
113 | + | then Q | |
114 | + | else R | |
98 | 115 | } | |
99 | 116 | ||
100 | 117 | ||
101 | - | func | |
102 | - | let | |
103 | - | let | |
104 | - | if (( | |
105 | - | then if (containsElement( | |
106 | - | then ( | |
118 | + | func S (P,T,U,V) = { | |
119 | + | let W = [32, 19, 21, 25, 34, 27, 36, 30, 23, 5, 16, 1, 14, 9, 18, 7, 12, 3] | |
120 | + | let X = [2, 4, 6, 8, 10, 11, 13, 15, 17, 20, 22, 24, 26, 28, 29, 31, 33, 35] | |
121 | + | if ((V == "red")) | |
122 | + | then if (containsElement(W, P)) | |
123 | + | then (T * 2) | |
107 | 124 | else 0 | |
108 | - | else if (( | |
109 | - | then if (containsElement( | |
110 | - | then ( | |
125 | + | else if ((V == "black")) | |
126 | + | then if (containsElement(X, P)) | |
127 | + | then (T * 2) | |
111 | 128 | else 0 | |
112 | - | else if ((P == "odd")) | |
113 | - | then if (((M % 2) != 0)) | |
114 | - | then (N * 2) | |
129 | + | else if ((V == "odd")) | |
130 | + | then if (if (((P % 2) == 0)) | |
131 | + | then (P != 0) | |
132 | + | else false) | |
133 | + | then (T * 2) | |
115 | 134 | else 0 | |
116 | - | else if ((P == "even")) | |
117 | - | then if (((M % 2) == 0)) | |
118 | - | then (N * 2) | |
135 | + | else if ((V == "even")) | |
136 | + | then if (if (((P % 2) != 0)) | |
137 | + | then (P != 0) | |
138 | + | else false) | |
139 | + | then (T * 2) | |
119 | 140 | else 0 | |
120 | - | else if (if ((size( | |
121 | - | then ( | |
141 | + | else if (if ((size(U) == 1)) | |
142 | + | then (V == "num") | |
122 | 143 | else false) | |
123 | - | then if (( | |
124 | - | then ( | |
144 | + | then if ((U[0] == P)) | |
145 | + | then (T * 36) | |
125 | 146 | else 0 | |
126 | - | else if ((size( | |
127 | - | then if (containsElement( | |
128 | - | then ( | |
147 | + | else if ((size(U) == 2)) | |
148 | + | then if (containsElement(U, P)) | |
149 | + | then (T * 18) | |
129 | 150 | else 0 | |
130 | - | else if ((size( | |
131 | - | then if (containsElement( | |
132 | - | then ( | |
151 | + | else if ((size(U) == 3)) | |
152 | + | then if (containsElement(U, P)) | |
153 | + | then (T * 12) | |
133 | 154 | else 0 | |
134 | - | else if ((size( | |
135 | - | then if (containsElement( | |
136 | - | then ( | |
155 | + | else if ((size(U) == 4)) | |
156 | + | then if (containsElement(U, P)) | |
157 | + | then (T * 9) | |
137 | 158 | else 0 | |
138 | - | else if ((size(O) == 12)) | |
139 | - | then if (containsElement(O, M)) | |
140 | - | then (N * 3) | |
159 | + | else if ((size(U) == 12)) | |
160 | + | then if (if (containsElement(U, P)) | |
161 | + | then (P != 0) | |
162 | + | else false) | |
163 | + | then (T * 3) | |
141 | 164 | else 0 | |
142 | - | else if ((size(O) == 18)) | |
143 | - | then if (containsElement(O, M)) | |
144 | - | then (N * 2) | |
165 | + | else if ((size(U) == 18)) | |
166 | + | then if (if (containsElement(U, P)) | |
167 | + | then (P != 0) | |
168 | + | else false) | |
169 | + | then (T * 2) | |
145 | 170 | else 0 | |
146 | 171 | else 0 | |
147 | 172 | } | |
148 | 173 | ||
149 | 174 | ||
150 | - | func | |
175 | + | func Y (d) = ("bet_Roulette_" + toString(d.caller)) | |
151 | 176 | ||
152 | 177 | ||
153 | - | func | |
178 | + | func Z (d) = ("betAmount_Roulette_" + toString(d.caller)) | |
154 | 179 | ||
155 | 180 | ||
156 | - | func | |
181 | + | func aa (d) = ("selectedNumbers_Roulette_" + toString(d.caller)) | |
157 | 182 | ||
158 | 183 | ||
159 | - | func | |
184 | + | func ab (d) = ("direction_Roulette_" + toString(d.caller)) | |
160 | 185 | ||
161 | 186 | ||
162 | - | func | |
187 | + | func ac (d) = ((("log_Roulette_" + toString(d.caller)) + "_") + toBase58String(d.transactionId)) | |
163 | 188 | ||
164 | 189 | ||
165 | - | func | |
190 | + | func ad (d) = ("status_Roulette_" + toString(d.caller)) | |
166 | 191 | ||
167 | 192 | ||
168 | - | func | |
193 | + | func ae (d) = ("bet_LuckyWheel_" + toString(d.caller)) | |
169 | 194 | ||
170 | 195 | ||
171 | - | func | |
196 | + | func af (d) = ("won_LuckyWheel_" + toString(d.caller)) | |
172 | 197 | ||
173 | 198 | ||
174 | - | func | |
199 | + | func ag (d) = ("randomNumber_LuckyWheel_" + toString(d.caller)) | |
175 | 200 | ||
176 | 201 | ||
177 | - | func | |
202 | + | func ah (d) = ((("log_LuckyWheel_" + toString(d.caller)) + "_") + toBase58String(d.transactionId)) | |
178 | 203 | ||
179 | 204 | ||
180 | - | func | |
181 | - | let | |
182 | - | if ((1 == | |
205 | + | func ai (aj) = { | |
206 | + | let ak = aj | |
207 | + | if ((1 == ak)) | |
183 | 208 | then a(2) | |
184 | - | else if ((3 == | |
209 | + | else if ((3 == ak)) | |
185 | 210 | then a(1) | |
186 | - | else if ((7 == | |
211 | + | else if ((7 == ak)) | |
187 | 212 | then a(6) | |
188 | - | else if ((9 == | |
213 | + | else if ((9 == ak)) | |
189 | 214 | then a(1) | |
190 | 215 | else 0 | |
191 | 216 | } | |
192 | 217 | ||
193 | 218 | ||
194 | - | func | |
219 | + | func al (d) = ("status_Roulette_" + toString(d.caller)) | |
195 | 220 | ||
196 | 221 | ||
197 | 222 | @Callable(d) | |
198 | - | func Roulette_commit ( | |
223 | + | func Roulette_commit (T,U,V) = { | |
199 | 224 | let g = d.payments[0] | |
200 | - | if (!(c(d, | |
225 | + | if (!(c(d, T))) | |
201 | 226 | then throw("Wrong payment amount or asset!") | |
202 | - | else [IntegerEntry( | |
227 | + | else [IntegerEntry(Y(d), (height + 1)), IntegerEntry(Z(d), T), StringEntry(aa(d), A(U)), StringEntry(ab(d), V), StringEntry(ad(d), ((((("| status: commit | revealBlock: " + toString((height + 1))) + " | betAmount: ") + toString(T)) + " | selectedNumbers: ") + A(U)))] | |
203 | 228 | } | |
204 | 229 | ||
205 | 230 | ||
206 | 231 | ||
207 | 232 | @Callable(d) | |
208 | 233 | func Roulette_reveal () = { | |
209 | - | let E = valueOrErrorMessage(getIntegerValue( | |
210 | - | let | |
211 | - | let | |
212 | - | let | |
213 | - | let | |
234 | + | let E = valueOrErrorMessage(getIntegerValue(Y(d)), "Bet not found") | |
235 | + | let T = valueOrErrorMessage(getIntegerValue(Z(d)), "Bet amount not found") | |
236 | + | let am = valueOrErrorMessage(getStringValue(aa(d)), "Selected numbers not found") | |
237 | + | let an = valueOrErrorMessage(getStringValue(ab(d)), "Direction not found") | |
238 | + | let ao = B(am) | |
214 | 239 | if ((E > height)) | |
215 | 240 | then throw((("Wait " + toString((E - height))) + " blocks to reveal this id")) | |
216 | 241 | else { | |
217 | - | let M = J(E) | |
218 | - | let aj = a(L(M, N, ai, ah)) | |
219 | - | let ak = ((((((((("| commitHeight: " + toString(E)) + " | betAmount: ") + toString(N)) + " | winningAmount: ") + toString(aj)) + " | selectedNumbers: ") + A(ai)) + " | randomNumber: ") + toString(M)) | |
220 | - | let al = ((((((((("| status: reveal | winningAmount: " + toString(aj)) + " | selectedNumbers: ") + A(ai)) + " | randomNumber: ") + toString(M)) + " | betAmount: ") + toString(N)) + " | selectedNumbers: ") + A(ai)) | |
221 | - | if ((aj > 0)) | |
222 | - | then [DeleteEntry(S(d)), DeleteEntry(T(d)), DeleteEntry(U(d)), DeleteEntry(V(d)), ScriptTransfer(d.caller, aj, unit), StringEntry(W(d), ak), StringEntry(X(d), al)] | |
223 | - | else [DeleteEntry(S(d)), DeleteEntry(T(d)), DeleteEntry(U(d)), DeleteEntry(V(d)), IntegerEntry(W(d), aj), StringEntry(W(d), ak), StringEntry(X(d), al)] | |
224 | - | } | |
225 | - | } | |
226 | - | ||
227 | - | ||
228 | - | ||
229 | - | @Callable(d) | |
230 | - | func LuckyWheel_commit () = if (!(c(d, 1))) | |
231 | - | then throw("Wrong payment amount or asset") | |
232 | - | else [IntegerEntry(Y(d), (height + 1)), DeleteEntry(aa(d)), DeleteEntry(Z(d)), StringEntry(af(d), "| status: commit")] | |
233 | - | ||
234 | - | ||
235 | - | ||
236 | - | @Callable(d) | |
237 | - | func LuckyWheel_reveal () = { | |
238 | - | let E = valueOrErrorMessage(getIntegerValue(Y(d)), "Bet not found") | |
239 | - | if ((E > height)) | |
240 | - | then throw((("Wait " + toString((E - height))) + " blocks to reveal this id")) | |
241 | - | else { | |
242 | - | let F = valueOrErrorMessage(blockInfoByHeight(E), "unexcpected error") | |
243 | - | let G = valueOrErrorMessage(F.vrf, "unexcpected error") | |
244 | - | let H = sha256(value(G)) | |
245 | - | let am = valueOrErrorMessage(blockInfoByHeight((E - 1)), "unexcpected error") | |
246 | - | let an = valueOrErrorMessage(F.vrf, "unexcpected error") | |
247 | - | let ao = sha256(value(G)) | |
248 | - | let ap = (toInt(H, 16) + (toInt(H, 10) / toInt(H, 5))) | |
249 | - | let M = (ap % 12) | |
250 | - | let aj = ac(M) | |
251 | - | let al = (((("| status: reveal | winningAmount: " + toString(aj)) + " | selectedNumbers: ") + " | randomNumber: ") + toString(M)) | |
252 | - | if ((aj > 0)) | |
253 | - | then [DeleteEntry(Y(d)), ScriptTransfer(d.caller, aj, unit), IntegerEntry(Z(d), aj), IntegerEntry(aa(d), M), StringEntry(af(d), al)] | |
254 | - | else [DeleteEntry(Y(d)), IntegerEntry(Z(d), aj), IntegerEntry(aa(d), M), StringEntry(af(d), al)] | |
242 | + | let P = J(E) | |
243 | + | let ap = a(S(P, T, ao, an)) | |
244 | + | let aq = ((((((((("| commitHeight: " + toString(E)) + " | betAmount: ") + toString(T)) + " | winningAmount: ") + toString(ap)) + " | selectedNumbers: ") + A(ao)) + " | randomNumber: ") + toString(P)) | |
245 | + | let ar = ((((((((("| status: reveal | winningAmount: " + toString(ap)) + " | selectedNumbers: ") + A(ao)) + " | randomNumber: ") + toString(P)) + " | betAmount: ") + toString(T)) + " | selectedNumbers: ") + A(ao)) | |
246 | + | if ((ap > 0)) | |
247 | + | then [DeleteEntry(Y(d)), DeleteEntry(Z(d)), DeleteEntry(aa(d)), DeleteEntry(ab(d)), ScriptTransfer(d.caller, ap, unit), StringEntry(ac(d), aq), StringEntry(ad(d), ar)] | |
248 | + | else [DeleteEntry(Y(d)), DeleteEntry(Z(d)), DeleteEntry(aa(d)), DeleteEntry(ab(d)), IntegerEntry(ac(d), ap), StringEntry(ac(d), aq), StringEntry(ad(d), ar)] | |
255 | 249 | } | |
256 | 250 | } | |
257 | 251 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b) = (b * 100000000) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func c (d,e) = { | |
8 | 8 | let f = base58'WAVES' | |
9 | 9 | let g = d.payments[0] | |
10 | 10 | if ((g.amount >= a(e))) | |
11 | 11 | then (g.assetId == unit) | |
12 | 12 | else false | |
13 | 13 | } | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func h (i,j) = toString(j) :: i | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func k (i,j) = parseIntValue(j) :: i | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func l (i,j) = (i + j) | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func m (n) = { | |
26 | 26 | let o = n | |
27 | 27 | let p = size(o) | |
28 | 28 | let q = 0 | |
29 | 29 | func r (s,t) = if ((t >= p)) | |
30 | 30 | then s | |
31 | 31 | else l(s, o[t]) | |
32 | 32 | ||
33 | 33 | func u (s,t) = if ((t >= p)) | |
34 | 34 | then s | |
35 | 35 | else throw("List size exceeds 50") | |
36 | 36 | ||
37 | 37 | u(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(q, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50) | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func v (n) = { | |
42 | 42 | let o = n | |
43 | 43 | let p = size(o) | |
44 | 44 | let q = nil | |
45 | 45 | func r (s,t) = if ((t >= p)) | |
46 | 46 | then s | |
47 | 47 | else h(s, o[t]) | |
48 | 48 | ||
49 | 49 | func u (s,t) = if ((t >= p)) | |
50 | 50 | then s | |
51 | 51 | else throw("List size exceeds 50") | |
52 | 52 | ||
53 | 53 | u(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(q, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50) | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func w (n) = { | |
58 | 58 | let o = n | |
59 | 59 | let p = size(o) | |
60 | 60 | let q = nil | |
61 | 61 | func r (s,t) = if ((t >= p)) | |
62 | 62 | then s | |
63 | 63 | else k(s, o[t]) | |
64 | 64 | ||
65 | 65 | func u (s,t) = if ((t >= p)) | |
66 | 66 | then s | |
67 | 67 | else throw("List size exceeds 50") | |
68 | 68 | ||
69 | 69 | u(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(q, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50) | |
70 | 70 | } | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func x (n) = makeString(n, "|") | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func y (z) = split(z, "|") | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func A (n) = makeString(v(n), "|") | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func B (C) = w(split(C, "|")) | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func D (E) = { | |
86 | 86 | let F = valueOrErrorMessage(blockInfoByHeight(E), "unexcpected error") | |
87 | 87 | let G = valueOrErrorMessage(F.vrf, "unexcpected error") | |
88 | 88 | let H = sha256(value(G)) | |
89 | 89 | let I = toInt(H, 16) | |
90 | 90 | (I % 37) | |
91 | 91 | } | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func J (E) = { | |
95 | 95 | let H = sha256((value(value(blockInfoByHeight(E)).vrf) + toBytes(E))) | |
96 | 96 | let K = toInt(H, 24) | |
97 | - | (K % 37) | |
97 | + | let L = sha256((value(value(blockInfoByHeight(E)).vrf) + toBytes((E - 2)))) | |
98 | + | let M = toInt(L, 24) | |
99 | + | let N = sha256((value(value(blockInfoByHeight(E)).vrf) + toBytes((E - 4)))) | |
100 | + | let O = toInt(N, 24) | |
101 | + | let P = (K % 37) | |
102 | + | let Q = (M % 37) | |
103 | + | let R = (O % 37) | |
104 | + | if ((P == 0)) | |
105 | + | then P | |
106 | + | else if (if ((P > 12)) | |
107 | + | then ((E % 2) != 0) | |
108 | + | else false) | |
109 | + | then P | |
110 | + | else if (if ((25 > P)) | |
111 | + | then ((E % 2) != 0) | |
112 | + | else false) | |
113 | + | then Q | |
114 | + | else R | |
98 | 115 | } | |
99 | 116 | ||
100 | 117 | ||
101 | - | func | |
102 | - | let | |
103 | - | let | |
104 | - | if (( | |
105 | - | then if (containsElement( | |
106 | - | then ( | |
118 | + | func S (P,T,U,V) = { | |
119 | + | let W = [32, 19, 21, 25, 34, 27, 36, 30, 23, 5, 16, 1, 14, 9, 18, 7, 12, 3] | |
120 | + | let X = [2, 4, 6, 8, 10, 11, 13, 15, 17, 20, 22, 24, 26, 28, 29, 31, 33, 35] | |
121 | + | if ((V == "red")) | |
122 | + | then if (containsElement(W, P)) | |
123 | + | then (T * 2) | |
107 | 124 | else 0 | |
108 | - | else if (( | |
109 | - | then if (containsElement( | |
110 | - | then ( | |
125 | + | else if ((V == "black")) | |
126 | + | then if (containsElement(X, P)) | |
127 | + | then (T * 2) | |
111 | 128 | else 0 | |
112 | - | else if ((P == "odd")) | |
113 | - | then if (((M % 2) != 0)) | |
114 | - | then (N * 2) | |
129 | + | else if ((V == "odd")) | |
130 | + | then if (if (((P % 2) == 0)) | |
131 | + | then (P != 0) | |
132 | + | else false) | |
133 | + | then (T * 2) | |
115 | 134 | else 0 | |
116 | - | else if ((P == "even")) | |
117 | - | then if (((M % 2) == 0)) | |
118 | - | then (N * 2) | |
135 | + | else if ((V == "even")) | |
136 | + | then if (if (((P % 2) != 0)) | |
137 | + | then (P != 0) | |
138 | + | else false) | |
139 | + | then (T * 2) | |
119 | 140 | else 0 | |
120 | - | else if (if ((size( | |
121 | - | then ( | |
141 | + | else if (if ((size(U) == 1)) | |
142 | + | then (V == "num") | |
122 | 143 | else false) | |
123 | - | then if (( | |
124 | - | then ( | |
144 | + | then if ((U[0] == P)) | |
145 | + | then (T * 36) | |
125 | 146 | else 0 | |
126 | - | else if ((size( | |
127 | - | then if (containsElement( | |
128 | - | then ( | |
147 | + | else if ((size(U) == 2)) | |
148 | + | then if (containsElement(U, P)) | |
149 | + | then (T * 18) | |
129 | 150 | else 0 | |
130 | - | else if ((size( | |
131 | - | then if (containsElement( | |
132 | - | then ( | |
151 | + | else if ((size(U) == 3)) | |
152 | + | then if (containsElement(U, P)) | |
153 | + | then (T * 12) | |
133 | 154 | else 0 | |
134 | - | else if ((size( | |
135 | - | then if (containsElement( | |
136 | - | then ( | |
155 | + | else if ((size(U) == 4)) | |
156 | + | then if (containsElement(U, P)) | |
157 | + | then (T * 9) | |
137 | 158 | else 0 | |
138 | - | else if ((size(O) == 12)) | |
139 | - | then if (containsElement(O, M)) | |
140 | - | then (N * 3) | |
159 | + | else if ((size(U) == 12)) | |
160 | + | then if (if (containsElement(U, P)) | |
161 | + | then (P != 0) | |
162 | + | else false) | |
163 | + | then (T * 3) | |
141 | 164 | else 0 | |
142 | - | else if ((size(O) == 18)) | |
143 | - | then if (containsElement(O, M)) | |
144 | - | then (N * 2) | |
165 | + | else if ((size(U) == 18)) | |
166 | + | then if (if (containsElement(U, P)) | |
167 | + | then (P != 0) | |
168 | + | else false) | |
169 | + | then (T * 2) | |
145 | 170 | else 0 | |
146 | 171 | else 0 | |
147 | 172 | } | |
148 | 173 | ||
149 | 174 | ||
150 | - | func | |
175 | + | func Y (d) = ("bet_Roulette_" + toString(d.caller)) | |
151 | 176 | ||
152 | 177 | ||
153 | - | func | |
178 | + | func Z (d) = ("betAmount_Roulette_" + toString(d.caller)) | |
154 | 179 | ||
155 | 180 | ||
156 | - | func | |
181 | + | func aa (d) = ("selectedNumbers_Roulette_" + toString(d.caller)) | |
157 | 182 | ||
158 | 183 | ||
159 | - | func | |
184 | + | func ab (d) = ("direction_Roulette_" + toString(d.caller)) | |
160 | 185 | ||
161 | 186 | ||
162 | - | func | |
187 | + | func ac (d) = ((("log_Roulette_" + toString(d.caller)) + "_") + toBase58String(d.transactionId)) | |
163 | 188 | ||
164 | 189 | ||
165 | - | func | |
190 | + | func ad (d) = ("status_Roulette_" + toString(d.caller)) | |
166 | 191 | ||
167 | 192 | ||
168 | - | func | |
193 | + | func ae (d) = ("bet_LuckyWheel_" + toString(d.caller)) | |
169 | 194 | ||
170 | 195 | ||
171 | - | func | |
196 | + | func af (d) = ("won_LuckyWheel_" + toString(d.caller)) | |
172 | 197 | ||
173 | 198 | ||
174 | - | func | |
199 | + | func ag (d) = ("randomNumber_LuckyWheel_" + toString(d.caller)) | |
175 | 200 | ||
176 | 201 | ||
177 | - | func | |
202 | + | func ah (d) = ((("log_LuckyWheel_" + toString(d.caller)) + "_") + toBase58String(d.transactionId)) | |
178 | 203 | ||
179 | 204 | ||
180 | - | func | |
181 | - | let | |
182 | - | if ((1 == | |
205 | + | func ai (aj) = { | |
206 | + | let ak = aj | |
207 | + | if ((1 == ak)) | |
183 | 208 | then a(2) | |
184 | - | else if ((3 == | |
209 | + | else if ((3 == ak)) | |
185 | 210 | then a(1) | |
186 | - | else if ((7 == | |
211 | + | else if ((7 == ak)) | |
187 | 212 | then a(6) | |
188 | - | else if ((9 == | |
213 | + | else if ((9 == ak)) | |
189 | 214 | then a(1) | |
190 | 215 | else 0 | |
191 | 216 | } | |
192 | 217 | ||
193 | 218 | ||
194 | - | func | |
219 | + | func al (d) = ("status_Roulette_" + toString(d.caller)) | |
195 | 220 | ||
196 | 221 | ||
197 | 222 | @Callable(d) | |
198 | - | func Roulette_commit ( | |
223 | + | func Roulette_commit (T,U,V) = { | |
199 | 224 | let g = d.payments[0] | |
200 | - | if (!(c(d, | |
225 | + | if (!(c(d, T))) | |
201 | 226 | then throw("Wrong payment amount or asset!") | |
202 | - | else [IntegerEntry( | |
227 | + | else [IntegerEntry(Y(d), (height + 1)), IntegerEntry(Z(d), T), StringEntry(aa(d), A(U)), StringEntry(ab(d), V), StringEntry(ad(d), ((((("| status: commit | revealBlock: " + toString((height + 1))) + " | betAmount: ") + toString(T)) + " | selectedNumbers: ") + A(U)))] | |
203 | 228 | } | |
204 | 229 | ||
205 | 230 | ||
206 | 231 | ||
207 | 232 | @Callable(d) | |
208 | 233 | func Roulette_reveal () = { | |
209 | - | let E = valueOrErrorMessage(getIntegerValue( | |
210 | - | let | |
211 | - | let | |
212 | - | let | |
213 | - | let | |
234 | + | let E = valueOrErrorMessage(getIntegerValue(Y(d)), "Bet not found") | |
235 | + | let T = valueOrErrorMessage(getIntegerValue(Z(d)), "Bet amount not found") | |
236 | + | let am = valueOrErrorMessage(getStringValue(aa(d)), "Selected numbers not found") | |
237 | + | let an = valueOrErrorMessage(getStringValue(ab(d)), "Direction not found") | |
238 | + | let ao = B(am) | |
214 | 239 | if ((E > height)) | |
215 | 240 | then throw((("Wait " + toString((E - height))) + " blocks to reveal this id")) | |
216 | 241 | else { | |
217 | - | let M = J(E) | |
218 | - | let aj = a(L(M, N, ai, ah)) | |
219 | - | let ak = ((((((((("| commitHeight: " + toString(E)) + " | betAmount: ") + toString(N)) + " | winningAmount: ") + toString(aj)) + " | selectedNumbers: ") + A(ai)) + " | randomNumber: ") + toString(M)) | |
220 | - | let al = ((((((((("| status: reveal | winningAmount: " + toString(aj)) + " | selectedNumbers: ") + A(ai)) + " | randomNumber: ") + toString(M)) + " | betAmount: ") + toString(N)) + " | selectedNumbers: ") + A(ai)) | |
221 | - | if ((aj > 0)) | |
222 | - | then [DeleteEntry(S(d)), DeleteEntry(T(d)), DeleteEntry(U(d)), DeleteEntry(V(d)), ScriptTransfer(d.caller, aj, unit), StringEntry(W(d), ak), StringEntry(X(d), al)] | |
223 | - | else [DeleteEntry(S(d)), DeleteEntry(T(d)), DeleteEntry(U(d)), DeleteEntry(V(d)), IntegerEntry(W(d), aj), StringEntry(W(d), ak), StringEntry(X(d), al)] | |
224 | - | } | |
225 | - | } | |
226 | - | ||
227 | - | ||
228 | - | ||
229 | - | @Callable(d) | |
230 | - | func LuckyWheel_commit () = if (!(c(d, 1))) | |
231 | - | then throw("Wrong payment amount or asset") | |
232 | - | else [IntegerEntry(Y(d), (height + 1)), DeleteEntry(aa(d)), DeleteEntry(Z(d)), StringEntry(af(d), "| status: commit")] | |
233 | - | ||
234 | - | ||
235 | - | ||
236 | - | @Callable(d) | |
237 | - | func LuckyWheel_reveal () = { | |
238 | - | let E = valueOrErrorMessage(getIntegerValue(Y(d)), "Bet not found") | |
239 | - | if ((E > height)) | |
240 | - | then throw((("Wait " + toString((E - height))) + " blocks to reveal this id")) | |
241 | - | else { | |
242 | - | let F = valueOrErrorMessage(blockInfoByHeight(E), "unexcpected error") | |
243 | - | let G = valueOrErrorMessage(F.vrf, "unexcpected error") | |
244 | - | let H = sha256(value(G)) | |
245 | - | let am = valueOrErrorMessage(blockInfoByHeight((E - 1)), "unexcpected error") | |
246 | - | let an = valueOrErrorMessage(F.vrf, "unexcpected error") | |
247 | - | let ao = sha256(value(G)) | |
248 | - | let ap = (toInt(H, 16) + (toInt(H, 10) / toInt(H, 5))) | |
249 | - | let M = (ap % 12) | |
250 | - | let aj = ac(M) | |
251 | - | let al = (((("| status: reveal | winningAmount: " + toString(aj)) + " | selectedNumbers: ") + " | randomNumber: ") + toString(M)) | |
252 | - | if ((aj > 0)) | |
253 | - | then [DeleteEntry(Y(d)), ScriptTransfer(d.caller, aj, unit), IntegerEntry(Z(d), aj), IntegerEntry(aa(d), M), StringEntry(af(d), al)] | |
254 | - | else [DeleteEntry(Y(d)), IntegerEntry(Z(d), aj), IntegerEntry(aa(d), M), StringEntry(af(d), al)] | |
242 | + | let P = J(E) | |
243 | + | let ap = a(S(P, T, ao, an)) | |
244 | + | let aq = ((((((((("| commitHeight: " + toString(E)) + " | betAmount: ") + toString(T)) + " | winningAmount: ") + toString(ap)) + " | selectedNumbers: ") + A(ao)) + " | randomNumber: ") + toString(P)) | |
245 | + | let ar = ((((((((("| status: reveal | winningAmount: " + toString(ap)) + " | selectedNumbers: ") + A(ao)) + " | randomNumber: ") + toString(P)) + " | betAmount: ") + toString(T)) + " | selectedNumbers: ") + A(ao)) | |
246 | + | if ((ap > 0)) | |
247 | + | then [DeleteEntry(Y(d)), DeleteEntry(Z(d)), DeleteEntry(aa(d)), DeleteEntry(ab(d)), ScriptTransfer(d.caller, ap, unit), StringEntry(ac(d), aq), StringEntry(ad(d), ar)] | |
248 | + | else [DeleteEntry(Y(d)), DeleteEntry(Z(d)), DeleteEntry(aa(d)), DeleteEntry(ab(d)), IntegerEntry(ac(d), ap), StringEntry(ac(d), aq), StringEntry(ad(d), ar)] | |
255 | 249 | } | |
256 | 250 | } | |
257 | 251 | ||
258 | 252 |
github/deemru/w8io/026f985 64.82 ms ◑