tx · DhHhEDJmkz4ugkoeDiZUWTfxZ4gse7fAmeQEZBvZkJtv 3MrfLFw1uz3BDr45RQLvrRnAwT2nHpB4KiX: -0.01000000 Waves 2023.06.08 19:19 [2613926] smart account 3MrfLFw1uz3BDr45RQLvrRnAwT2nHpB4KiX > SELF 0.00000000 Waves
{ "type": 13, "id": "DhHhEDJmkz4ugkoeDiZUWTfxZ4gse7fAmeQEZBvZkJtv", "fee": 1000000, "feeAssetId": null, "timestamp": 1686241208809, "version": 2, "chainId": 84, "sender": "3MrfLFw1uz3BDr45RQLvrRnAwT2nHpB4KiX", "senderPublicKey": "5iiNX4Sz3qZzcerumQLc1y7u9TH2X46jDV4f9Xivtmtv", "proofs": [ "567eS3n2U9u7dp9jF1wtwLxWhwqTnAUmnKiznvbbeXLNyQGCYcUmTxEvSuhhnih5rSeebrtzF8yo3zKdToY2hf17" ], "script": "base64:BgIUCAISAwoBARIFCgMBEQgSABIAEgAaAQpudW1Ub1dhdmVzAQNudW0JAGgCBQNudW0AgMLXLwELaXNQYXltZW50T2sCAWkDc3VtBBFhY2NlcHRhYmxlQXNzZXRJZAEEE6vZMwQBcAkAkQMCCAUBaQhwYXltZW50cwAAAwkAZwIIBQFwBmFtb3VudAkBCm51bVRvV2F2ZXMBBQNzdW0JAAACCAUBcAdhc3NldElkBQR1bml0BwELbWFwSW50VG9TdHICBWFjY3VtBG5leHQJAMwIAgkApAMBBQRuZXh0BQVhY2N1bQELbWFwU3RyVG9JbnQCBWFjY3VtBG5leHQJAMwIAgkBDXBhcnNlSW50VmFsdWUBBQRuZXh0BQVhY2N1bQELbWFwSW50VG9TdW0CBWFjY3VtBG5leHQJAGQCBQVhY2N1bQUEbmV4dAEMbGlzdEludFRvU3VtAQNhcnIKAAIkbAUDYXJyCgACJHMJAJADAQUCJGwKAAUkYWNjMAAACgEFJGYwXzECAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAQttYXBJbnRUb1N1bQIFAiRhCQCRAwIFAiRsBQIkaQo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FbnRyeQIJARVMV19nZXRSYW5kb21OdW1iZXJLZXkBBQFpBQxyYW5kb21OdW1iZXIJAMwIAgkBC1N0cmluZ0VudHJ5AgkBDExXX2dldExvZ0tleQEFAWkFBmxvZ1N0cgUDbmlsAFFr1Gk=", "height": 2613926, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6Q3C6LL79GMcCAYYkkwx8J7mhv6uAj8r7RgTLZZ3VHab Next: A1Dq6b5gZcGWwQ46pZsvWGwz1zynZiFuS6SJhsSLD4NE Diff:
Old | New | Differences | |
---|---|---|---|
176 | 176 | func V (d) = ("status_Roulette_" + toString(d.caller)) | |
177 | 177 | ||
178 | 178 | ||
179 | + | func W (i,j) = { | |
180 | + | let X = valueOrErrorMessage(blockInfoByHeight(j), "unexcpected error") | |
181 | + | let Y = valueOrErrorMessage(X.vrf, "unexcpected error") | |
182 | + | let Z = sha256(value(Y)) | |
183 | + | let L = (toInt(Z, 16) % 37) | |
184 | + | toString(L) :: i | |
185 | + | } | |
186 | + | ||
187 | + | ||
188 | + | func aa (n) = { | |
189 | + | let o = n | |
190 | + | let p = size(o) | |
191 | + | let q = nil | |
192 | + | func r (s,t) = if ((t >= p)) | |
193 | + | then s | |
194 | + | else W(s, o[t]) | |
195 | + | ||
196 | + | func u (s,t) = if ((t >= p)) | |
197 | + | then s | |
198 | + | else throw("List size exceeds 50") | |
199 | + | ||
200 | + | 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) | |
201 | + | } | |
202 | + | ||
203 | + | ||
204 | + | @Callable(d) | |
205 | + | func test (ab) = aa([ab, (ab - 1)]) | |
206 | + | ||
207 | + | ||
208 | + | ||
179 | 209 | @Callable(d) | |
180 | 210 | func Roulette_commit (M,N,O) = { | |
181 | 211 | let g = d.payments[0] | |
188 | 218 | ||
189 | 219 | @Callable(d) | |
190 | 220 | func Roulette_reveal () = { | |
191 | - | let | |
221 | + | let ab = valueOrErrorMessage(getIntegerValue(Q(d)), "Bet not found") | |
192 | 222 | let M = valueOrErrorMessage(getIntegerValue(R(d)), "Bet amount not found") | |
193 | - | let | |
194 | - | let | |
195 | - | let | |
196 | - | if (( | |
197 | - | then throw((("Wait " + toString(( | |
223 | + | let ac = valueOrErrorMessage(getStringValue(S(d)), "Selected numbers not found") | |
224 | + | let ad = valueOrErrorMessage(getStringValue(T(d)), "Direction not found") | |
225 | + | let ae = B(ac) | |
226 | + | if ((ab > height)) | |
227 | + | then throw((("Wait " + toString((ab - height))) + " blocks to reveal this id")) | |
198 | 228 | else { | |
199 | - | let | |
200 | - | let | |
201 | - | let | |
202 | - | let L = (toInt( | |
203 | - | let | |
204 | - | let | |
205 | - | let | |
206 | - | if (( | |
207 | - | then [DeleteEntry(Q(d)), DeleteEntry(R(d)), DeleteEntry(S(d)), DeleteEntry(T(d)), ScriptTransfer(d.caller, | |
208 | - | else [DeleteEntry(Q(d)), DeleteEntry(R(d)), DeleteEntry(S(d)), DeleteEntry(T(d)), IntegerEntry(U(d), | |
229 | + | let X = valueOrErrorMessage(blockInfoByHeight(ab), "unexcpected error") | |
230 | + | let Y = valueOrErrorMessage(X.vrf, "unexcpected error") | |
231 | + | let Z = sha256(value(Y)) | |
232 | + | let L = (toInt(Z, 16) % 37) | |
233 | + | let af = a(K(L, M, ae, ad)) | |
234 | + | let ag = ((((((((("| commitHeight: " + toString(ab)) + " | betAmount: ") + toString(M)) + " | winningAmount: ") + toString(af)) + " | selectedNumbers: ") + A(ae)) + " | randomNumber: ") + toString(L)) | |
235 | + | let ah = ((((((((("| status: reveal | winningAmount: " + toString(af)) + " | selectedNumbers: ") + A(ae)) + " | randomNumber: ") + toString(L)) + " | betAmount: ") + toString(M)) + " | selectedNumbers: ") + A(ae)) | |
236 | + | if ((af > 0)) | |
237 | + | then [DeleteEntry(Q(d)), DeleteEntry(R(d)), DeleteEntry(S(d)), DeleteEntry(T(d)), ScriptTransfer(d.caller, af, unit), StringEntry(U(d), ag), StringEntry(V(d), ah)] | |
238 | + | else [DeleteEntry(Q(d)), DeleteEntry(R(d)), DeleteEntry(S(d)), DeleteEntry(T(d)), IntegerEntry(U(d), af), StringEntry(U(d), ag), StringEntry(V(d), ah)] | |
209 | 239 | } | |
210 | 240 | } | |
211 | 241 | ||
220 | 250 | ||
221 | 251 | @Callable(d) | |
222 | 252 | func LuckyWheel_reveal () = { | |
223 | - | let | |
224 | - | if (( | |
225 | - | then throw((("Wait " + toString(( | |
253 | + | let ab = valueOrErrorMessage(getIntegerValue(D(d)), "Bet not found") | |
254 | + | if ((ab > height)) | |
255 | + | then throw((("Wait " + toString((ab - height))) + " blocks to reveal this id")) | |
226 | 256 | else { | |
227 | - | let | |
228 | - | let | |
229 | - | let | |
230 | - | let L = (toInt( | |
231 | - | let | |
232 | - | let | |
233 | - | if (( | |
234 | - | then [DeleteEntry(D(d)), ScriptTransfer(d.caller, | |
235 | - | else [DeleteEntry(D(d)), IntegerEntry(E(d), | |
257 | + | let X = valueOrErrorMessage(blockInfoByHeight(ab), "unexcpected error") | |
258 | + | let Y = valueOrErrorMessage(X.vrf, "unexcpected error") | |
259 | + | let Z = sha256(value(Y)) | |
260 | + | let L = (toInt(Z, 16) % 12) | |
261 | + | let af = H(L) | |
262 | + | let ag = ((((((("| caller: " + toString(d.caller)) + " | winningAmount: ") + toString(af)) + " | randomNumber: ") + toString(L)) + " | commitHeight: ") + toString(ab)) | |
263 | + | if ((af > 0)) | |
264 | + | then [DeleteEntry(D(d)), ScriptTransfer(d.caller, af, unit), IntegerEntry(E(d), af), IntegerEntry(F(d), L), StringEntry(G(d), ag)] | |
265 | + | else [DeleteEntry(D(d)), IntegerEntry(E(d), af), IntegerEntry(F(d), L), StringEntry(G(d), ag)] | |
236 | 266 | } | |
237 | - | } | |
238 | - | ||
239 | - | ||
240 | - | ||
241 | - | @Callable(d) | |
242 | - | func test (W) = { | |
243 | - | let aa = valueOrErrorMessage(blockInfoByHeight(W), "unexcpected error") | |
244 | - | let ab = valueOrErrorMessage(aa.vrf, "unexcpected error") | |
245 | - | let ac = sha256(value(ab)) | |
246 | - | let L = (toInt(ac, 16) % 37) | |
247 | - | throw(toString(L)) | |
248 | 267 | } | |
249 | 268 | ||
250 | 269 |
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 (d) = ("bet_LuckyWheel_" + toString(d.caller)) | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func E (d) = ("won_LuckyWheel_" + toString(d.caller)) | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func F (d) = ("randomNumber_LuckyWheel_" + toString(d.caller)) | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func G (d) = ((("log_LuckyWheel_" + toString(d.caller)) + "_") + toBase58String(d.transactionId)) | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func H (I) = { | |
98 | 98 | let J = I | |
99 | 99 | if ((1 == J)) | |
100 | 100 | then a(2) | |
101 | 101 | else if ((3 == J)) | |
102 | 102 | then a(1) | |
103 | 103 | else if ((7 == J)) | |
104 | 104 | then a(6) | |
105 | 105 | else if ((9 == J)) | |
106 | 106 | then a(1) | |
107 | 107 | else 0 | |
108 | 108 | } | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func K (L,M,N,O) = { | |
112 | 112 | let P = [32, 19, 21, 25, 34, 27, 36, 30, 23, 5, 16, 1, 14, 9, 18, 7, 12, 3] | |
113 | 113 | if (if ((size(N) == 1)) | |
114 | 114 | then (O == "num") | |
115 | 115 | else false) | |
116 | 116 | then if ((N[0] == L)) | |
117 | 117 | then (M * 36) | |
118 | 118 | else 0 | |
119 | 119 | else if ((size(N) == 2)) | |
120 | 120 | then if (containsElement(N, L)) | |
121 | 121 | then (M * 18) | |
122 | 122 | else 0 | |
123 | 123 | else if ((size(N) == 3)) | |
124 | 124 | then if (containsElement(N, L)) | |
125 | 125 | then (M * 12) | |
126 | 126 | else 0 | |
127 | 127 | else if ((size(N) == 4)) | |
128 | 128 | then if (containsElement(N, L)) | |
129 | 129 | then (M * 9) | |
130 | 130 | else 0 | |
131 | 131 | else if ((size(N) == 12)) | |
132 | 132 | then if (containsElement(N, L)) | |
133 | 133 | then (M * 3) | |
134 | 134 | else 0 | |
135 | 135 | else if ((O == "red")) | |
136 | 136 | then if (containsElement(P, L)) | |
137 | 137 | then (M * 2) | |
138 | 138 | else 0 | |
139 | 139 | else if ((O == "black")) | |
140 | 140 | then if (if (!(containsElement(P, L))) | |
141 | 141 | then (L != 0) | |
142 | 142 | else false) | |
143 | 143 | then (M * 2) | |
144 | 144 | else 0 | |
145 | 145 | else if ((O == "odd")) | |
146 | 146 | then if (((L % 2) != 0)) | |
147 | 147 | then (M * 2) | |
148 | 148 | else 0 | |
149 | 149 | else if ((O == "even")) | |
150 | 150 | then if (((L % 2) == 0)) | |
151 | 151 | then (M * 2) | |
152 | 152 | else 0 | |
153 | 153 | else if ((size(N) == 18)) | |
154 | 154 | then if (containsElement(N, L)) | |
155 | 155 | then (M * 2) | |
156 | 156 | else 0 | |
157 | 157 | else 0 | |
158 | 158 | } | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func Q (d) = ("bet_Roulette_" + toString(d.caller)) | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | func R (d) = ("betAmount_Roulette_" + toString(d.caller)) | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | func S (d) = ("selectedNumbers_Roulette_" + toString(d.caller)) | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | func T (d) = ("direction_Roulette_" + toString(d.caller)) | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | func U (d) = ((("log_Roulette_" + toString(d.caller)) + "_") + toBase58String(d.transactionId)) | |
174 | 174 | ||
175 | 175 | ||
176 | 176 | func V (d) = ("status_Roulette_" + toString(d.caller)) | |
177 | 177 | ||
178 | 178 | ||
179 | + | func W (i,j) = { | |
180 | + | let X = valueOrErrorMessage(blockInfoByHeight(j), "unexcpected error") | |
181 | + | let Y = valueOrErrorMessage(X.vrf, "unexcpected error") | |
182 | + | let Z = sha256(value(Y)) | |
183 | + | let L = (toInt(Z, 16) % 37) | |
184 | + | toString(L) :: i | |
185 | + | } | |
186 | + | ||
187 | + | ||
188 | + | func aa (n) = { | |
189 | + | let o = n | |
190 | + | let p = size(o) | |
191 | + | let q = nil | |
192 | + | func r (s,t) = if ((t >= p)) | |
193 | + | then s | |
194 | + | else W(s, o[t]) | |
195 | + | ||
196 | + | func u (s,t) = if ((t >= p)) | |
197 | + | then s | |
198 | + | else throw("List size exceeds 50") | |
199 | + | ||
200 | + | 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) | |
201 | + | } | |
202 | + | ||
203 | + | ||
204 | + | @Callable(d) | |
205 | + | func test (ab) = aa([ab, (ab - 1)]) | |
206 | + | ||
207 | + | ||
208 | + | ||
179 | 209 | @Callable(d) | |
180 | 210 | func Roulette_commit (M,N,O) = { | |
181 | 211 | let g = d.payments[0] | |
182 | 212 | if (!(c(d, M))) | |
183 | 213 | then throw("Wrong payment amount or asset!") | |
184 | 214 | else [IntegerEntry(Q(d), (height + 1)), IntegerEntry(R(d), M), StringEntry(S(d), A(N)), StringEntry(T(d), O), StringEntry(V(d), ((((("| status: commit | revealBlock: " + toString((height + 1))) + " | betAmount: ") + toString(M)) + " | selectedNumbers: ") + A(N)))] | |
185 | 215 | } | |
186 | 216 | ||
187 | 217 | ||
188 | 218 | ||
189 | 219 | @Callable(d) | |
190 | 220 | func Roulette_reveal () = { | |
191 | - | let | |
221 | + | let ab = valueOrErrorMessage(getIntegerValue(Q(d)), "Bet not found") | |
192 | 222 | let M = valueOrErrorMessage(getIntegerValue(R(d)), "Bet amount not found") | |
193 | - | let | |
194 | - | let | |
195 | - | let | |
196 | - | if (( | |
197 | - | then throw((("Wait " + toString(( | |
223 | + | let ac = valueOrErrorMessage(getStringValue(S(d)), "Selected numbers not found") | |
224 | + | let ad = valueOrErrorMessage(getStringValue(T(d)), "Direction not found") | |
225 | + | let ae = B(ac) | |
226 | + | if ((ab > height)) | |
227 | + | then throw((("Wait " + toString((ab - height))) + " blocks to reveal this id")) | |
198 | 228 | else { | |
199 | - | let | |
200 | - | let | |
201 | - | let | |
202 | - | let L = (toInt( | |
203 | - | let | |
204 | - | let | |
205 | - | let | |
206 | - | if (( | |
207 | - | then [DeleteEntry(Q(d)), DeleteEntry(R(d)), DeleteEntry(S(d)), DeleteEntry(T(d)), ScriptTransfer(d.caller, | |
208 | - | else [DeleteEntry(Q(d)), DeleteEntry(R(d)), DeleteEntry(S(d)), DeleteEntry(T(d)), IntegerEntry(U(d), | |
229 | + | let X = valueOrErrorMessage(blockInfoByHeight(ab), "unexcpected error") | |
230 | + | let Y = valueOrErrorMessage(X.vrf, "unexcpected error") | |
231 | + | let Z = sha256(value(Y)) | |
232 | + | let L = (toInt(Z, 16) % 37) | |
233 | + | let af = a(K(L, M, ae, ad)) | |
234 | + | let ag = ((((((((("| commitHeight: " + toString(ab)) + " | betAmount: ") + toString(M)) + " | winningAmount: ") + toString(af)) + " | selectedNumbers: ") + A(ae)) + " | randomNumber: ") + toString(L)) | |
235 | + | let ah = ((((((((("| status: reveal | winningAmount: " + toString(af)) + " | selectedNumbers: ") + A(ae)) + " | randomNumber: ") + toString(L)) + " | betAmount: ") + toString(M)) + " | selectedNumbers: ") + A(ae)) | |
236 | + | if ((af > 0)) | |
237 | + | then [DeleteEntry(Q(d)), DeleteEntry(R(d)), DeleteEntry(S(d)), DeleteEntry(T(d)), ScriptTransfer(d.caller, af, unit), StringEntry(U(d), ag), StringEntry(V(d), ah)] | |
238 | + | else [DeleteEntry(Q(d)), DeleteEntry(R(d)), DeleteEntry(S(d)), DeleteEntry(T(d)), IntegerEntry(U(d), af), StringEntry(U(d), ag), StringEntry(V(d), ah)] | |
209 | 239 | } | |
210 | 240 | } | |
211 | 241 | ||
212 | 242 | ||
213 | 243 | ||
214 | 244 | @Callable(d) | |
215 | 245 | func LuckyWheel_commit () = if (!(c(d, 1))) | |
216 | 246 | then throw("Wrong payment amount or asset") | |
217 | 247 | else [IntegerEntry(D(d), (height + 1)), DeleteEntry(F(d)), DeleteEntry(E(d))] | |
218 | 248 | ||
219 | 249 | ||
220 | 250 | ||
221 | 251 | @Callable(d) | |
222 | 252 | func LuckyWheel_reveal () = { | |
223 | - | let | |
224 | - | if (( | |
225 | - | then throw((("Wait " + toString(( | |
253 | + | let ab = valueOrErrorMessage(getIntegerValue(D(d)), "Bet not found") | |
254 | + | if ((ab > height)) | |
255 | + | then throw((("Wait " + toString((ab - height))) + " blocks to reveal this id")) | |
226 | 256 | else { | |
227 | - | let | |
228 | - | let | |
229 | - | let | |
230 | - | let L = (toInt( | |
231 | - | let | |
232 | - | let | |
233 | - | if (( | |
234 | - | then [DeleteEntry(D(d)), ScriptTransfer(d.caller, | |
235 | - | else [DeleteEntry(D(d)), IntegerEntry(E(d), | |
257 | + | let X = valueOrErrorMessage(blockInfoByHeight(ab), "unexcpected error") | |
258 | + | let Y = valueOrErrorMessage(X.vrf, "unexcpected error") | |
259 | + | let Z = sha256(value(Y)) | |
260 | + | let L = (toInt(Z, 16) % 12) | |
261 | + | let af = H(L) | |
262 | + | let ag = ((((((("| caller: " + toString(d.caller)) + " | winningAmount: ") + toString(af)) + " | randomNumber: ") + toString(L)) + " | commitHeight: ") + toString(ab)) | |
263 | + | if ((af > 0)) | |
264 | + | then [DeleteEntry(D(d)), ScriptTransfer(d.caller, af, unit), IntegerEntry(E(d), af), IntegerEntry(F(d), L), StringEntry(G(d), ag)] | |
265 | + | else [DeleteEntry(D(d)), IntegerEntry(E(d), af), IntegerEntry(F(d), L), StringEntry(G(d), ag)] | |
236 | 266 | } | |
237 | - | } | |
238 | - | ||
239 | - | ||
240 | - | ||
241 | - | @Callable(d) | |
242 | - | func test (W) = { | |
243 | - | let aa = valueOrErrorMessage(blockInfoByHeight(W), "unexcpected error") | |
244 | - | let ab = valueOrErrorMessage(aa.vrf, "unexcpected error") | |
245 | - | let ac = sha256(value(ab)) | |
246 | - | let L = (toInt(ac, 16) % 37) | |
247 | - | throw(toString(L)) | |
248 | 267 | } | |
249 | 268 | ||
250 | 269 |
github/deemru/w8io/03bedc9 88.02 ms ◑![]()