tx · J3EsxAka68oesU88t3HgvVWd534Yookg5ccQQqkvyrEW 3MsGBnTzBhrNe6w1KpLYPkzdDdxWudm4U89: -0.01400000 Waves 2019.08.26 02:07 [647323] smart account 3MsGBnTzBhrNe6w1KpLYPkzdDdxWudm4U89 > SELF 0.00000000 Waves
{ "type": 13, "id": "J3EsxAka68oesU88t3HgvVWd534Yookg5ccQQqkvyrEW", "fee": 1400000, "feeAssetId": null, "timestamp": 1566774433357, "version": 1, "sender": "3MsGBnTzBhrNe6w1KpLYPkzdDdxWudm4U89", "senderPublicKey": "FgbqvGasMMrXxbhwrsgEiCgJLjXPjgn8kHxsZiVmLrkb", "proofs": [ "4Qti5ZFWvNn1N3TCLpJnBLZsQteUA13HLhQDsEx3TMqAFkxu7ujcKiWxs376hkYhBTeygt8AfRsLYNUR3CAWD73f" ], "script": "base64:AAIDAAAAAAAAAAAAAAAsAAAAAA9TZXJ2ZXJQdWJsaWNLZXkJAAJZAAAAAQIAAAAsNFZBQXNWdXVTSkFCNVhhbW1BWGU2Rzk4dFlLSll2R2hleXZwS0c4TkpXbjEAAAAABlNFUlZFUgkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABAgAAACMzTkFQb1VCd0w3amFQVzNuZ1ZGM2RUNWI2OHE0ZWFIQWlpQwAAAAATUkFORE9SQUNMRVRJTUVGUkFNRQAAAAAAAAAQ4AAAAAAHV0FWRUxFVAkAAGgAAAACCQAAaAAAAAIAAAAAAAAAAGQAAAAAAAAAA+gAAAAAAAAAA+gAAAAACkNPTU1JU1NJT04JAABpAAAAAgkAAGgAAAACAAAAAAAAAAAJBQAAAAdXQVZFTEVUAAAAAAAAAAPoAAAAAARCRVQxCQAAaAAAAAIAAAAAAAAAAAEFAAAAB1dBVkVMRVQAAAAABEJFVDIJAABoAAAAAgAAAAAAAAAAAgUAAAAHV0FWRUxFVAAAAAAEQkVUNAkAAGgAAAACAAAAAAAAAAAEBQAAAAdXQVZFTEVUAAAAAARCRVQ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AAAAAIFAAAABmdhbWVJZAUAAAAHcnNhU2lnbgQAAAAHcmFuZFN0cgkBAAAACVJhbmRUb1N0cgAAAAEFAAAAB3JhbmRJbnQDCQEAAAALSXNQbGF5ZXJXaW4AAAACBQAAAAxwbGF5ZXJDaG9pY2UFAAAAB3JhbmRTdHIEAAAADm5ld0dhbWVEYXRhU3RyCQEAAAARRm9ybWF0R2FtZURhdGFTdHIAAAAGBQAAAAhTVEFURVdPTgUAAAAMcGxheWVyQ2hvaWNlBQAAAA5wbGF5ZXJQdWJLZXk1OAUAAAANc3RhcnRlZEhlaWdodAUAAAAGd2luQW10BQAAAAdyYW5kU3RyCQEAAAAMV2luU2NyaXB0U2V0AAAABgUAAAAGZ2FtZUlkBQAAAA1wbGF5ZXJBZGRyZXNzBQAAAAZ3aW5BbXQFAAAADm5ld0dhbWVEYXRhU3RyBQAAAAx3aW5CeVRpbWVvdXQFAAAAEWRlY3JlYXNlZFJlc2VydmVzBAAAAA5uZXdHYW1lRGF0YVN0cgkBAAAAEUZvcm1hdEdhbWVEYXRhU3RyAAAABgUAAAAJU1RBVEVMT1NUBQAAAAxwbGF5ZXJDaG9pY2UFAAAADnBsYXllclB1YktleTU4BQAAAA1zdGFydGVkSGVpZ2h0BQAAAAZ3aW5BbXQFAAAAB3JhbmRTdHIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAABmdhbWVJZAUAAAAObmV3R2FtZURhdGFTdHIJAARMAAAAAgUAAAARZGVjcmVhc2VkUmVzZXJ2ZXMFAAAAA25pbAAAAAC9oCbU", "chainId": 84, "height": 647323, "spentComplexity": 0 } View: original | compacted Prev: J87CbG4zSsQmZDVF8euQ7XXAmy1ptV9NzS3tqWGBhj39 Next: Febr97UD82kpbnz85B7bz2QzmmK6CBZxHbrNHQ46Nixe Diff:
Old | New | Differences | |
---|---|---|---|
59 | 59 | ||
60 | 60 | ||
61 | 61 | func D (E,F) = { | |
62 | - | let G = sigVerify(E, F, a) | |
62 | + | let G = sigVerify(toBytes(E), F, a) | |
63 | 63 | if (G) | |
64 | 64 | then { | |
65 | 65 | let H = (toInt(sha256(F)) % 6) | |
316 | 316 | ||
317 | 317 | ||
318 | 318 | @Callable(aV) | |
319 | - | func withdraw (E,bf) = { | |
320 | - | let F = fromBase64String(bf) | |
321 | - | let bg = toUtf8String(E) | |
322 | - | let bh = W(bg) | |
323 | - | let S = bh[q] | |
324 | - | let C = bh[r] | |
325 | - | let U = parseIntValue(bh[t]) | |
326 | - | let V = parseIntValue(bh[u]) | |
327 | - | let T = bh[s] | |
319 | + | func withdraw (E,F) = { | |
320 | + | let bf = W(E) | |
321 | + | let S = bf[q] | |
322 | + | let C = bf[r] | |
323 | + | let U = parseIntValue(bf[t]) | |
324 | + | let V = parseIntValue(bf[u]) | |
325 | + | let T = bf[s] | |
328 | 326 | let aN = addressFromPublicKey(fromBase58String(T)) | |
329 | 327 | let aP = ((height - U) > c) | |
330 | - | let aQ = ai( | |
328 | + | let aQ = ai(E, V) | |
331 | 329 | if ((S != y)) | |
332 | 330 | then throw("Invalid game state for passed gameId") | |
333 | 331 | else if (aP) | |
334 | 332 | then { | |
335 | 333 | let aJ = aH(C) | |
336 | 334 | let aO = al(z, C, T, U, V, aJ) | |
337 | - | aM( | |
335 | + | aM(E, aN, V, aO, aP, aQ) | |
338 | 336 | } | |
339 | 337 | else { | |
340 | 338 | let aK = D(E, F) | |
342 | 340 | if (aI(C, aJ)) | |
343 | 341 | then { | |
344 | 342 | let aO = al(z, C, T, U, V, aJ) | |
345 | - | aM( | |
343 | + | aM(E, aN, V, aO, aP, aQ) | |
346 | 344 | } | |
347 | 345 | else { | |
348 | 346 | let aO = al(A, C, T, U, V, aJ) | |
349 | - | WriteSet([DataEntry( | |
347 | + | WriteSet([DataEntry(E, aO), aQ]) | |
350 | 348 | } | |
351 | 349 | } | |
352 | 350 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = fromBase58String("4VAAsVuuSJAB5XammAXe6G98tYKJYvGheyvpKG8NJWn1") | |
5 | 5 | ||
6 | 6 | let b = addressFromStringValue("3NAPoUBwL7jaPW3ngVF3dT5b68q4eaHAiiC") | |
7 | 7 | ||
8 | 8 | let c = 4320 | |
9 | 9 | ||
10 | 10 | let d = ((100 * 1000) * 1000) | |
11 | 11 | ||
12 | 12 | let e = ((9 * d) / 1000) | |
13 | 13 | ||
14 | 14 | let f = (1 * d) | |
15 | 15 | ||
16 | 16 | let g = (2 * d) | |
17 | 17 | ||
18 | 18 | let h = (4 * d) | |
19 | 19 | ||
20 | 20 | let i = (8 * d) | |
21 | 21 | ||
22 | 22 | let j = (14 * d) | |
23 | 23 | ||
24 | 24 | let k = 10000 | |
25 | 25 | ||
26 | 26 | let l = 39655 | |
27 | 27 | ||
28 | 28 | let m = 24600 | |
29 | 29 | ||
30 | 30 | let n = 19000 | |
31 | 31 | ||
32 | 32 | let o = 14200 | |
33 | 33 | ||
34 | 34 | let p = 11400 | |
35 | 35 | ||
36 | 36 | let q = 0 | |
37 | 37 | ||
38 | 38 | let r = 1 | |
39 | 39 | ||
40 | 40 | let s = 2 | |
41 | 41 | ||
42 | 42 | let t = 3 | |
43 | 43 | ||
44 | 44 | let u = 4 | |
45 | 45 | ||
46 | 46 | let v = 5 | |
47 | 47 | ||
48 | 48 | let w = "$GAME_NUM" | |
49 | 49 | ||
50 | 50 | let x = "$RESERVED_AMOUNT" | |
51 | 51 | ||
52 | 52 | let y = "SUBMITTED" | |
53 | 53 | ||
54 | 54 | let z = "WON" | |
55 | 55 | ||
56 | 56 | let A = "LOST" | |
57 | 57 | ||
58 | 58 | func B (C) = j | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func D (E,F) = { | |
62 | - | let G = sigVerify(E, F, a) | |
62 | + | let G = sigVerify(toBytes(E), F, a) | |
63 | 63 | if (G) | |
64 | 64 | then { | |
65 | 65 | let H = (toInt(sha256(F)) % 6) | |
66 | 66 | if ((0 > H)) | |
67 | 67 | then ((-1 * H) + 1) | |
68 | 68 | else (H + 1) | |
69 | 69 | } | |
70 | 70 | else throw("Invalid RSA signature") | |
71 | 71 | } | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func I (J) = if ((size(J) > 0)) | |
75 | 75 | then drop(J, 1) | |
76 | 76 | else J | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func K (J) = { | |
80 | 80 | let L = size(J) | |
81 | 81 | if ((L > 0)) | |
82 | 82 | then { | |
83 | 83 | let M = parseIntValue(take(J, 2)) | |
84 | 84 | let N = take(drop(J, 2), M) | |
85 | 85 | let O = drop(J, (M + 2)) | |
86 | 86 | let P = I(O) | |
87 | 87 | [N, P] | |
88 | 88 | } | |
89 | 89 | else throw("Empty string was passed into parseNextAttribute func") | |
90 | 90 | } | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func Q (R) = { | |
94 | 94 | let S = K(R) | |
95 | 95 | let C = K(S[1]) | |
96 | 96 | let T = K(C[1]) | |
97 | 97 | let U = K(T[1]) | |
98 | 98 | let V = K(U[1]) | |
99 | 99 | [S[0], C[0], T[0], U[0], V[0]] | |
100 | 100 | } | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func W (E) = { | |
104 | 104 | let X = { | |
105 | 105 | let Y = getString(this, E) | |
106 | 106 | if ($isInstanceOf(Y, "String")) | |
107 | 107 | then { | |
108 | 108 | let Z = Y | |
109 | 109 | Z | |
110 | 110 | } | |
111 | 111 | else throw(("Couldn't find game by " + E)) | |
112 | 112 | } | |
113 | 113 | Q(X) | |
114 | 114 | } | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func aa () = { | |
118 | 118 | let Y = getInteger(this, x) | |
119 | 119 | if ($isInstanceOf(Y, "Int")) | |
120 | 120 | then { | |
121 | 121 | let ab = Y | |
122 | 122 | ab | |
123 | 123 | } | |
124 | 124 | else 0 | |
125 | 125 | } | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func ac (V) = { | |
129 | 129 | let ad = (aa() + V) | |
130 | 130 | let ae = wavesBalance(this) | |
131 | 131 | if ((ad > ae)) | |
132 | 132 | then throw("Insufficient funds on Russian Roulette account. Transaction was rejected for your safety.") | |
133 | 133 | else ad | |
134 | 134 | } | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func af () = { | |
138 | 138 | let ag = { | |
139 | 139 | let Y = getInteger(this, w) | |
140 | 140 | if ($isInstanceOf(Y, "Int")) | |
141 | 141 | then { | |
142 | 142 | let ah = Y | |
143 | 143 | ah | |
144 | 144 | } | |
145 | 145 | else 0 | |
146 | 146 | } | |
147 | 147 | (ag + 1) | |
148 | 148 | } | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func ai (E,V) = { | |
152 | 152 | let ad = (aa() - V) | |
153 | 153 | if ((0 > ad)) | |
154 | 154 | then throw("Invalid Russian Roulette account state - reserved amount is less than 0") | |
155 | 155 | else DataEntry(x, ad) | |
156 | 156 | } | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func aj (ak) = { | |
160 | 160 | let L = size(ak) | |
161 | 161 | if ((L == 0)) | |
162 | 162 | then throw("Parameter size must be greater then 0") | |
163 | 163 | else if ((L > 99)) | |
164 | 164 | then throw("Parameter size must be less then 100") | |
165 | 165 | else if ((10 > L)) | |
166 | 166 | then (("0" + toString(L)) + ak) | |
167 | 167 | else (toString(L) + ak) | |
168 | 168 | } | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func al (S,C,T,U,V,am) = { | |
172 | 172 | let an = ((((((((aj(S) + "_") + aj(C)) + "_") + aj(T)) + "_") + aj(toString(U))) + "_") + aj(toString(V))) | |
173 | 173 | if ((am == "")) | |
174 | 174 | then an | |
175 | 175 | else ((an + "_") + aj(am)) | |
176 | 176 | } | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | func ao (ap) = if ((ap == 1)) | |
180 | 180 | then "1" | |
181 | 181 | else if ((ap == 2)) | |
182 | 182 | then "2" | |
183 | 183 | else if ((ap == 3)) | |
184 | 184 | then "3" | |
185 | 185 | else if ((ap == 4)) | |
186 | 186 | then "4" | |
187 | 187 | else if ((ap == 5)) | |
188 | 188 | then "5" | |
189 | 189 | else if ((ap == 6)) | |
190 | 190 | then "6" | |
191 | 191 | else throw(("Unsupported r parameter passed: expected=[1,...,6] actual=" + toString(ap))) | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | func aq (ar,C) = { | |
195 | 195 | let as = if (if (if (if (if ((ar == (f + e))) | |
196 | 196 | then true | |
197 | 197 | else (ar == (g + e))) | |
198 | 198 | then true | |
199 | 199 | else (ar == (h + e))) | |
200 | 200 | then true | |
201 | 201 | else (ar == (i + e))) | |
202 | 202 | then true | |
203 | 203 | else (ar == (j + e))) | |
204 | 204 | then true | |
205 | 205 | else false | |
206 | 206 | if (as) | |
207 | 207 | then { | |
208 | 208 | let at = size(C) | |
209 | 209 | let au = (ar - e) | |
210 | 210 | let av = parseIntValue(take(C, 1)) | |
211 | 211 | let aw = drop(C, 1) | |
212 | 212 | let ax = parseIntValue(take(aw, 1)) | |
213 | 213 | let ay = drop(aw, 1) | |
214 | 214 | let az = parseIntValue(take(ay, 1)) | |
215 | 215 | let aA = drop(ay, 1) | |
216 | 216 | let aB = parseIntValue(take(aA, 1)) | |
217 | 217 | let aC = drop(aA, 1) | |
218 | 218 | let aD = parseIntValue(take(aC, 1)) | |
219 | 219 | let aE = drop(aC, 1) | |
220 | 220 | let aF = parseIntValue(take(aE, 1)) | |
221 | 221 | let aG = (((((av + ax) + az) + aB) + aD) + aF) | |
222 | 222 | if ((aG == 5)) | |
223 | 223 | then ((au * l) / k) | |
224 | 224 | else if ((aG == 4)) | |
225 | 225 | then ((au * m) / k) | |
226 | 226 | else if ((aG == 3)) | |
227 | 227 | then ((au * n) / k) | |
228 | 228 | else if ((aG == 2)) | |
229 | 229 | then ((au * o) / k) | |
230 | 230 | else if ((aG == 1)) | |
231 | 231 | then ((au * p) / k) | |
232 | 232 | else throw(("Invalid player's choice, active bullets = " + toString(aG))) | |
233 | 233 | } | |
234 | 234 | else throw("Bet amount is not in range") | |
235 | 235 | } | |
236 | 236 | ||
237 | 237 | ||
238 | 238 | func aH (C) = { | |
239 | 239 | let av = parseIntValue(take(C, 1)) | |
240 | 240 | let aw = drop(C, 1) | |
241 | 241 | let ax = parseIntValue(take(aw, 1)) | |
242 | 242 | let ay = drop(C, 1) | |
243 | 243 | let az = parseIntValue(take(ay, 1)) | |
244 | 244 | let aA = drop(C, 1) | |
245 | 245 | let aB = parseIntValue(take(aA, 1)) | |
246 | 246 | let aC = drop(C, 1) | |
247 | 247 | let aD = parseIntValue(take(aC, 1)) | |
248 | 248 | let aE = drop(C, 1) | |
249 | 249 | let aF = parseIntValue(take(aE, 1)) | |
250 | 250 | if ((av == 0)) | |
251 | 251 | then "1" | |
252 | 252 | else if ((ax == 0)) | |
253 | 253 | then "2" | |
254 | 254 | else if ((az == 0)) | |
255 | 255 | then "3" | |
256 | 256 | else if ((aB == 0)) | |
257 | 257 | then "4" | |
258 | 258 | else if ((aD == 0)) | |
259 | 259 | then "5" | |
260 | 260 | else if ((aF == 0)) | |
261 | 261 | then "6" | |
262 | 262 | else throw("Bet amount is not in range") | |
263 | 263 | } | |
264 | 264 | ||
265 | 265 | ||
266 | 266 | func aI (C,aJ) = { | |
267 | 267 | let aK = parseIntValue(aJ) | |
268 | 268 | let aL = split(C, "") | |
269 | 269 | if ((aL[(aK - 1)] == "0")) | |
270 | 270 | then true | |
271 | 271 | else false | |
272 | 272 | } | |
273 | 273 | ||
274 | 274 | ||
275 | 275 | func aM (E,aN,V,aO,aP,aQ) = { | |
276 | 276 | let aR = [aQ] | |
277 | 277 | let aS = [ScriptTransfer(aN, V, unit)] | |
278 | 278 | if (aP) | |
279 | 279 | then { | |
280 | 280 | let aT = ((aO + "_") + aj("TIMEOUT")) | |
281 | 281 | let aU = DataEntry(E, aT) | |
282 | 282 | ScriptResult(WriteSet(aU :: aR), TransferSet(aS)) | |
283 | 283 | } | |
284 | 284 | else { | |
285 | 285 | let aU = DataEntry(E, aO) | |
286 | 286 | ScriptResult(WriteSet(aU :: aR), TransferSet(aS)) | |
287 | 287 | } | |
288 | 288 | } | |
289 | 289 | ||
290 | 290 | ||
291 | 291 | @Callable(aV) | |
292 | 292 | func bet (C) = { | |
293 | 293 | let aW = af() | |
294 | 294 | let E = toBase58String(aV.transactionId) | |
295 | 295 | let aX = extract(aV.payment) | |
296 | 296 | let aY = isDefined(aX.assetId) | |
297 | 297 | let aZ = isDefined(aX.assetId) | |
298 | 298 | let V = aq(aX.amount, C) | |
299 | 299 | let ba = isDefined(getString(this, E)) | |
300 | 300 | if (aY) | |
301 | 301 | then throw("Bet amount must be in Waves") | |
302 | 302 | else if (aZ) | |
303 | 303 | then throw("Transaction's fee must be in Waves") | |
304 | 304 | else if (ba) | |
305 | 305 | then throw("Passed txId had been used before. Game aborted.") | |
306 | 306 | else { | |
307 | 307 | let T = toBase58String(aV.callerPublicKey) | |
308 | 308 | let bb = al(y, C, T, height, V, "") | |
309 | 309 | let bc = ((((((((y + "_") + C) + "_") + T) + "_") + toString(height)) + "_") + toString(V)) | |
310 | 310 | let bd = [ScriptTransfer(b, e, unit)] | |
311 | 311 | let be = [DataEntry(x, ac(V)), DataEntry(w, aW), DataEntry(E, bb)] | |
312 | 312 | ScriptResult(WriteSet(be), TransferSet(bd)) | |
313 | 313 | } | |
314 | 314 | } | |
315 | 315 | ||
316 | 316 | ||
317 | 317 | ||
318 | 318 | @Callable(aV) | |
319 | - | func withdraw (E,bf) = { | |
320 | - | let F = fromBase64String(bf) | |
321 | - | let bg = toUtf8String(E) | |
322 | - | let bh = W(bg) | |
323 | - | let S = bh[q] | |
324 | - | let C = bh[r] | |
325 | - | let U = parseIntValue(bh[t]) | |
326 | - | let V = parseIntValue(bh[u]) | |
327 | - | let T = bh[s] | |
319 | + | func withdraw (E,F) = { | |
320 | + | let bf = W(E) | |
321 | + | let S = bf[q] | |
322 | + | let C = bf[r] | |
323 | + | let U = parseIntValue(bf[t]) | |
324 | + | let V = parseIntValue(bf[u]) | |
325 | + | let T = bf[s] | |
328 | 326 | let aN = addressFromPublicKey(fromBase58String(T)) | |
329 | 327 | let aP = ((height - U) > c) | |
330 | - | let aQ = ai( | |
328 | + | let aQ = ai(E, V) | |
331 | 329 | if ((S != y)) | |
332 | 330 | then throw("Invalid game state for passed gameId") | |
333 | 331 | else if (aP) | |
334 | 332 | then { | |
335 | 333 | let aJ = aH(C) | |
336 | 334 | let aO = al(z, C, T, U, V, aJ) | |
337 | - | aM( | |
335 | + | aM(E, aN, V, aO, aP, aQ) | |
338 | 336 | } | |
339 | 337 | else { | |
340 | 338 | let aK = D(E, F) | |
341 | 339 | let aJ = ao(aK) | |
342 | 340 | if (aI(C, aJ)) | |
343 | 341 | then { | |
344 | 342 | let aO = al(z, C, T, U, V, aJ) | |
345 | - | aM( | |
343 | + | aM(E, aN, V, aO, aP, aQ) | |
346 | 344 | } | |
347 | 345 | else { | |
348 | 346 | let aO = al(A, C, T, U, V, aJ) | |
349 | - | WriteSet([DataEntry( | |
347 | + | WriteSet([DataEntry(E, aO), aQ]) | |
350 | 348 | } | |
351 | 349 | } | |
352 | 350 | } | |
353 | 351 | ||
354 | 352 |
github/deemru/w8io/169f3d6 155.03 ms ◑