tx · 6w5gnQyfma8Yz2Q4qwPtG1PmcUnDCQbycYReJCyzSdYF 3NBFHpzVTqcHQB6Zxec1f6N6ZGBWQ4VsBFD: -0.01500000 Waves 2019.10.03 17:52 [703675] smart account 3NBFHpzVTqcHQB6Zxec1f6N6ZGBWQ4VsBFD > SELF 0.00000000 Waves
{ "type": 13, "id": "6w5gnQyfma8Yz2Q4qwPtG1PmcUnDCQbycYReJCyzSdYF", "fee": 1500000, "feeAssetId": null, "timestamp": 1570114363137, "version": 1, "sender": "3NBFHpzVTqcHQB6Zxec1f6N6ZGBWQ4VsBFD", "senderPublicKey": "8W9JLTJTfxrJrBNXxngzueBF4vJqeb6p9jFob7wb6QWQ", "proofs": [ "3kMtxoEZhmq9ekDzWwZH7mbRGMNffZN3xmd1mL9z9TtGJHsGv4UU6MaBwVxYYdteLth2bys5By6PQxSRrAN6FyFa" ], "script": "base64:AAIDAAAAAAAAAAwIARIAEgYKBAgCAgIAAAAjAAAAAA1yc2FQdWJsaWNLZXkxCQACWwAAAAECAAAAh2Jhc2U2NDpNRnd3RFFZSktvWklodmNOQVFFQkJRQURTd0F3U0FKQkFPa2l1ei9CVjRFam94R2hUbU5DYnQyVGdrYlNQSC93NjliM0YxckttRDYxSmlQWHZ2RjhMMnBJOXhPWWNXNEZtb0VaVkhsUlF0QWxhSnlrbDMrcnNyRUNBd0VBQVE9PQAAAAANcnNhUHVibGljS2V5MgkAAlsAAAABAgAAAIdiYXNlNjQ6TUZ3d0RRWUpLb1pJaHZjTkFRRUJCUUFEU3dBd1NBSkJBSm5YemJNL1Yyc0RWMVVMYlBTT2xIa2xkT1RXUnJIaTVmeElrQm11ZXZyQ2xNUFZIN3JxY2N3aXJETmNNZElkd1hISTlBZGhqOUZXandHSXdmVS9LNk1DQXdFQUFRPT0AAAAADXJzYVB1YmxpY0tleTMJAAJbAAAAAQIAAACHYmFzZTY0Ok1Gd3dEUVlKS29aSWh2Y05BUUVCQlFBRFN3QXdTQUpCQU9SRGV2eTByNG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AA9zZW5kZXJQdWJsaWNLZXkHCFRVYA==", "chainId": 84, "height": 703675, "spentComplexity": 0 } View: original | compacted Prev: G9VyeGTSJB3annR4NbFn3J4YvxigUSsprChZtP4Phr8h Next: F8138U8E9hDf27kAe4xjZXqXftVsNcJyQ4yZHwM7Go8G Diff:
Old | New | Differences | |
---|---|---|---|
29 | 29 | ||
30 | 30 | let n = base58'EmcmfM27TPaemhuREZGD8WLvsuLCdqx8WovMrDQKbXS1' | |
31 | 31 | ||
32 | - | let o = | |
32 | + | let o = 1000 | |
33 | 33 | ||
34 | - | let p = (o | |
34 | + | let p = (100000000 / o) | |
35 | 35 | ||
36 | - | let q = | |
36 | + | let q = (p * 10) | |
37 | 37 | ||
38 | - | let r = ( | |
38 | + | let r = (10000 / o) | |
39 | 39 | ||
40 | - | let s = | |
40 | + | let s = (r * 10) | |
41 | 41 | ||
42 | - | let t = ( | |
42 | + | let t = (1000000 / o) | |
43 | 43 | ||
44 | - | let u = | |
44 | + | let u = (t * 10) | |
45 | 45 | ||
46 | - | let v = ( | |
46 | + | let v = (2000000 / o) | |
47 | 47 | ||
48 | - | let w = | |
48 | + | let w = (v * 10) | |
49 | 49 | ||
50 | - | let x = ( | |
50 | + | let x = (500000000 / o) | |
51 | 51 | ||
52 | - | let y = | |
52 | + | let y = (x * 10) | |
53 | 53 | ||
54 | - | let z = ( | |
54 | + | let z = (500000000 / o) | |
55 | 55 | ||
56 | - | func A (B,C) = if ((B == "WAVES")) | |
57 | - | then if (if ((C >= o)) | |
58 | - | then (p >= C) | |
56 | + | let A = (z * 10) | |
57 | + | ||
58 | + | func B (C,D) = if ((C == "WAVES")) | |
59 | + | then if (if ((D >= p)) | |
60 | + | then (q >= D) | |
59 | 61 | else false) | |
60 | 62 | then true | |
61 | 63 | else throw("Bet amount is not in range") | |
62 | - | else if (( | |
63 | - | then if (if (( | |
64 | - | then ( | |
64 | + | else if ((C == "BTC")) | |
65 | + | then if (if ((D >= r)) | |
66 | + | then (s >= D) | |
65 | 67 | else false) | |
66 | 68 | then true | |
67 | 69 | else throw("Bet amount is not in range") | |
68 | - | else if (( | |
69 | - | then if (if (( | |
70 | - | then ( | |
70 | + | else if ((C == "ETH")) | |
71 | + | then if (if ((D >= t)) | |
72 | + | then (u >= D) | |
71 | 73 | else false) | |
72 | 74 | then true | |
73 | 75 | else throw("Bet amount is not in range") | |
74 | - | else if (( | |
75 | - | then if (if (( | |
76 | - | then ( | |
76 | + | else if ((C == "LTC")) | |
77 | + | then if (if ((D >= v)) | |
78 | + | then (w >= D) | |
77 | 79 | else false) | |
78 | 80 | then true | |
79 | 81 | else throw("Bet amount is not in range") | |
80 | - | else if (( | |
81 | - | then if (if (( | |
82 | - | then ( | |
82 | + | else if ((C == "WCT")) | |
83 | + | then if (if ((D >= x)) | |
84 | + | then (y >= D) | |
83 | 85 | else false) | |
84 | 86 | then true | |
85 | 87 | else throw("Bet amount is not in range") | |
86 | - | else if (if (( | |
87 | - | then ( | |
88 | + | else if (if ((D >= z)) | |
89 | + | then (A >= D) | |
88 | 90 | else false) | |
89 | 91 | then true | |
90 | 92 | else throw("Bet amount is not in range") | |
91 | 93 | ||
92 | 94 | ||
93 | - | func | |
94 | - | let | |
95 | - | let | |
96 | - | let | |
97 | - | if ($isInstanceOf( | |
95 | + | func E (D,C) = { | |
96 | + | let F = { | |
97 | + | let G = getInteger(this, ("Reserved_" + C)) | |
98 | + | let H = G | |
99 | + | if ($isInstanceOf(H, "Int")) | |
98 | 100 | then { | |
99 | - | let | |
100 | - | | |
101 | + | let I = H | |
102 | + | I | |
101 | 103 | } | |
102 | 104 | else 0 | |
103 | 105 | } | |
104 | - | let | |
105 | - | if ((wavesBalance(this) >= | |
106 | + | let J = (F + D) | |
107 | + | if ((wavesBalance(this) >= J)) | |
106 | 108 | then { | |
107 | - | let | |
108 | - | | |
109 | + | let E = J | |
110 | + | E | |
109 | 111 | } | |
110 | 112 | else throw("Bet was rejected. Insufficient funds on game account.") | |
111 | 113 | } | |
112 | 114 | ||
113 | 115 | ||
114 | - | func | |
115 | - | let | |
116 | - | let | |
117 | - | let | |
118 | - | if ($isInstanceOf( | |
116 | + | func K (L) = { | |
117 | + | let M = getString(this, L) | |
118 | + | let I = { | |
119 | + | let H = M | |
120 | + | if ($isInstanceOf(H, "String")) | |
119 | 121 | then { | |
120 | - | let | |
121 | - | | |
122 | + | let I = H | |
123 | + | I | |
122 | 124 | } | |
123 | 125 | else throw("GameId was not found") | |
124 | 126 | } | |
125 | - | split( | |
127 | + | split(I, "_") | |
126 | 128 | } | |
127 | 129 | ||
128 | 130 | ||
129 | - | func | |
131 | + | func N (O) = if ((2 > O)) | |
130 | 132 | then "7" | |
131 | - | else if ((4 > | |
133 | + | else if ((4 > O)) | |
132 | 134 | then "6" | |
133 | - | else if ((6 > | |
135 | + | else if ((6 > O)) | |
134 | 136 | then "5" | |
135 | - | else if ((8 > | |
137 | + | else if ((8 > O)) | |
136 | 138 | then "4" | |
137 | - | else if ((10 > | |
139 | + | else if ((10 > O)) | |
138 | 140 | then "3" | |
139 | - | else if ((12 > | |
141 | + | else if ((12 > O)) | |
140 | 142 | then "2" | |
141 | 143 | else "1" | |
142 | 144 | ||
143 | 145 | ||
144 | - | func | |
145 | - | let | |
146 | - | if ( | |
146 | + | func P (L,Q,R) = { | |
147 | + | let S = rsaVerify(SHA256, toBytes(L), Q, R) | |
148 | + | if (S) | |
147 | 149 | then { | |
148 | - | let | |
149 | - | if (if (( | |
150 | - | then (20 >= | |
150 | + | let O = ((toInt(sha256(Q)) % 19) + 1) | |
151 | + | if (if ((O > 0)) | |
152 | + | then (20 >= O) | |
151 | 153 | else false) | |
152 | - | then | |
154 | + | then O | |
153 | 155 | else throw("Rsa integer is not in range") | |
154 | 156 | } | |
155 | 157 | else throw("Rsa Signature is invalid") | |
156 | 158 | } | |
157 | 159 | ||
158 | 160 | ||
159 | - | func | |
160 | - | let | |
161 | - | let | |
162 | - | let | |
163 | - | if ($isInstanceOf( | |
161 | + | func T (U,V) = { | |
162 | + | let G = getInteger(this, ("Reserved_" + V)) | |
163 | + | let W = { | |
164 | + | let H = G | |
165 | + | if ($isInstanceOf(H, "Int")) | |
164 | 166 | then { | |
165 | - | let | |
166 | - | | |
167 | + | let I = H | |
168 | + | I | |
167 | 169 | } | |
168 | 170 | else 0 | |
169 | 171 | } | |
170 | - | let | |
171 | - | if (( | |
172 | - | then | |
172 | + | let T = (W - U) | |
173 | + | if ((T > 0)) | |
174 | + | then T | |
173 | 175 | else throw("Reserved balance couldn't be less than 0") | |
174 | 176 | } | |
175 | 177 | ||
176 | 178 | ||
177 | - | func | |
179 | + | func X (Y,Z) = if ((Y == "777")) | |
178 | 180 | then 5370 | |
179 | - | else if (( | |
181 | + | else if ((Y == "666")) | |
180 | 182 | then 1300 | |
181 | - | else if (( | |
183 | + | else if ((Y == "555")) | |
182 | 184 | then 450 | |
183 | - | else if (( | |
185 | + | else if ((Y == "444")) | |
184 | 186 | then 200 | |
185 | - | else if (( | |
187 | + | else if ((Y == "333")) | |
186 | 188 | then 150 | |
187 | - | else if (( | |
189 | + | else if ((Y == "222")) | |
188 | 190 | then 110 | |
189 | - | else if (( | |
191 | + | else if ((Y == "111")) | |
190 | 192 | then 40 | |
191 | - | else if (( | |
193 | + | else if ((Z == "77")) | |
192 | 194 | then 270 | |
193 | - | else if (( | |
195 | + | else if ((Z == "66")) | |
194 | 196 | then 130 | |
195 | - | else if (( | |
197 | + | else if ((Z == "55")) | |
196 | 198 | then 65 | |
197 | - | else if (( | |
199 | + | else if ((Z == "44")) | |
198 | 200 | then 30 | |
199 | - | else if (( | |
201 | + | else if ((Z == "33")) | |
200 | 202 | then 20 | |
201 | - | else if (( | |
203 | + | else if ((Z == "22")) | |
202 | 204 | then 15 | |
203 | - | else if (( | |
205 | + | else if ((Z == "11")) | |
204 | 206 | then 10 | |
205 | 207 | else 0 | |
206 | 208 | ||
207 | 209 | ||
208 | - | func | |
210 | + | func aa (ab) = if ((ab == "WAVES")) | |
209 | 211 | then i | |
210 | - | else if (( | |
212 | + | else if ((ab == "BTC")) | |
211 | 213 | then j | |
212 | - | else if (( | |
214 | + | else if ((ab == "ETH")) | |
213 | 215 | then k | |
214 | - | else if (( | |
216 | + | else if ((ab == "LTC")) | |
215 | 217 | then l | |
216 | - | else if (( | |
218 | + | else if ((ab == "VST")) | |
217 | 219 | then m | |
218 | - | else if (( | |
220 | + | else if ((ab == "WCT")) | |
219 | 221 | then n | |
220 | 222 | else throw("Asset name is incorrect") | |
221 | 223 | ||
222 | 224 | ||
223 | - | @Callable( | |
225 | + | @Callable(ac) | |
224 | 226 | func bet () = { | |
225 | - | let | |
226 | - | let | |
227 | - | let | |
228 | - | let | |
229 | - | let | |
230 | - | let | |
227 | + | let ad = extract(ac.payment) | |
228 | + | let D = ad.amount | |
229 | + | let L = toBase58String(ac.transactionId) | |
230 | + | let ae = height | |
231 | + | let af = toBase58String(ac.callerPublicKey) | |
232 | + | let C = if (!(isDefined(ad.assetId))) | |
231 | 233 | then "WAVES" | |
232 | - | else if (( | |
234 | + | else if ((ad.assetId == j)) | |
233 | 235 | then "BTC" | |
234 | - | else if (( | |
236 | + | else if ((ad.assetId == k)) | |
235 | 237 | then "ETH" | |
236 | - | else if (( | |
238 | + | else if ((ad.assetId == l)) | |
237 | 239 | then "LTC" | |
238 | - | else if (( | |
240 | + | else if ((ad.assetId == n)) | |
239 | 241 | then "WCT" | |
240 | - | else if (( | |
242 | + | else if ((ad.assetId == m)) | |
241 | 243 | then "VST" | |
242 | 244 | else throw("AssetId is incorrect") | |
243 | - | let | |
244 | - | let | |
245 | - | if ( | |
245 | + | let ag = E(D, C) | |
246 | + | let ah = B(C, D) | |
247 | + | if (ah) | |
246 | 248 | then { | |
247 | - | let | |
248 | - | WriteSet([DataEntry( | |
249 | + | let ai = ((((((((e + "_") + af) + "_") + toString(D)) + "_") + C) + "_") + toString(ae)) | |
250 | + | WriteSet([DataEntry(L, ai), DataEntry(("Reserved_" + C), ag)]) | |
249 | 251 | } | |
250 | 252 | else throw("assetId is incorrect") | |
251 | 253 | } | |
252 | 254 | ||
253 | 255 | ||
254 | 256 | ||
255 | - | @Callable( | |
256 | - | func withdraw ( | |
257 | - | let | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
261 | - | let | |
262 | - | let | |
263 | - | let | |
264 | - | let | |
265 | - | let | |
266 | - | let | |
267 | - | let | |
268 | - | let | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | let | |
274 | - | [ | |
257 | + | @Callable(ac) | |
258 | + | func withdraw (L,aj,ak,al) = { | |
259 | + | let am = K(L) | |
260 | + | let an = am[0] | |
261 | + | let ao = addressFromPublicKey(fromBase58String(am[1])) | |
262 | + | let U = parseIntValue(am[2]) | |
263 | + | let ab = am[3] | |
264 | + | let ae = parseIntValue(am[4]) | |
265 | + | let ap = aa(ab) | |
266 | + | let aq = (d > (height - ae)) | |
267 | + | let ar = (an == e) | |
268 | + | let ag = T(U, ab) | |
269 | + | let as = { | |
270 | + | let at = P(L, aj, a) | |
271 | + | let au = P(L, ak, b) | |
272 | + | let av = P(L, al, c) | |
273 | + | let aw = N(at) | |
274 | + | let ax = N(au) | |
275 | + | let ay = N(av) | |
276 | + | [aw, ax, ay] | |
275 | 277 | } | |
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
280 | - | (( | |
278 | + | let az = { | |
279 | + | let Y = ((as[0] + as[1]) + as[2]) | |
280 | + | let Z = (as[0] + as[1]) | |
281 | + | let aA = X(Y, Z) | |
282 | + | ((U * aA) / 10) | |
281 | 283 | } | |
282 | - | let | |
283 | - | let | |
284 | - | if ( | |
285 | - | then if ( | |
286 | - | then if (( | |
287 | - | then WriteSet([DataEntry( | |
288 | - | else ScriptResult(WriteSet([DataEntry( | |
289 | - | else ScriptResult(WriteSet([DataEntry( | |
284 | + | let aB = ((((((am[1] + "_") + am[2]) + "_") + am[3]) + "_") + am[4]) | |
285 | + | let aC = ((as[0] + as[1]) + as[2]) | |
286 | + | if (ar) | |
287 | + | then if (aq) | |
288 | + | then if ((az == 0)) | |
289 | + | then WriteSet([DataEntry(L, (((h + aB) + toString(az)) + aC)), DataEntry(("Reserved_" + ab), ag)]) | |
290 | + | else ScriptResult(WriteSet([DataEntry(L, (((f + aB) + toString(az)) + aC)), DataEntry(("Reserved_" + ab), ag)]), TransferSet([ScriptTransfer(ao, az, ap)])) | |
291 | + | else ScriptResult(WriteSet([DataEntry(L, (g + aB)), DataEntry(("Reserved_" + ab), ag)]), TransferSet([ScriptTransfer(ao, U, ap)])) | |
290 | 292 | else throw("Game state is incorrect") | |
291 | 293 | } | |
292 | 294 | ||
293 | 295 | ||
294 | - | @Verifier( | |
295 | - | func | |
296 | - | let | |
297 | - | if ($isInstanceOf( | |
296 | + | @Verifier(aD) | |
297 | + | func aE () = { | |
298 | + | let H = aD | |
299 | + | if ($isInstanceOf(H, "TransferTransaction")) | |
298 | 300 | then { | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | if ($isInstanceOf( | |
301 | + | let aF = H | |
302 | + | let G = getInteger(this, "Reserved") | |
303 | + | let aG = { | |
304 | + | let aH = G | |
305 | + | if ($isInstanceOf(aH, "Int")) | |
304 | 306 | then { | |
305 | - | let | |
306 | - | | |
307 | + | let I = aH | |
308 | + | I | |
307 | 309 | } | |
308 | 310 | else 0 | |
309 | 311 | } | |
310 | - | let | |
311 | - | let | |
312 | - | let | |
313 | - | if ( | |
314 | - | then | |
312 | + | let aI = (wavesBalance(this) - aG) | |
313 | + | let aJ = (aI >= aF.amount) | |
314 | + | let aK = sigVerify(aF.bodyBytes, aF.proofs[0], aF.senderPublicKey) | |
315 | + | if (aJ) | |
316 | + | then aK | |
315 | 317 | else false | |
316 | 318 | } | |
317 | - | else if ($isInstanceOf( | |
319 | + | else if ($isInstanceOf(H, "SetScriptTransaction")) | |
318 | 320 | then { | |
319 | - | let | |
320 | - | sigVerify( | |
321 | + | let aL = H | |
322 | + | sigVerify(aL.bodyBytes, aL.proofs[0], aL.senderPublicKey) | |
321 | 323 | } | |
322 | - | else if ($isInstanceOf( | |
324 | + | else if ($isInstanceOf(H, "InvokeScriptTransaction")) | |
323 | 325 | then { | |
324 | - | let | |
325 | - | sigVerify( | |
326 | + | let aM = H | |
327 | + | sigVerify(aM.bodyBytes, aM.proofs[0], aM.senderPublicKey) | |
326 | 328 | } | |
327 | 329 | else false | |
328 | 330 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = fromBase64String("base64:MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAOkiuz/BV4EjoxGhTmNCbt2TgkbSPH/w69b3F1rKmD61JiPXvvF8L2pI9xOYcW4FmoEZVHlRQtAlaJykl3+rsrECAwEAAQ==") | |
5 | 5 | ||
6 | 6 | let b = fromBase64String("base64:MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJnXzbM/V2sDV1ULbPSOlHkldOTWRrHi5fxIkBmuevrClMPVH7rqccwirDNcMdIdwXHI9Adhj9FWjwGIwfU/K6MCAwEAAQ==") | |
7 | 7 | ||
8 | 8 | let c = fromBase64String("base64:MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAORDevy0r4kzLqOySloB63Huv2e4zeHKHjCsy5vtFKmWZbXJa8gZYt4+EklFIo1K9oqu5BAPVfJ3FOzs2U1A+g0CAwEAAQ==") | |
9 | 9 | ||
10 | 10 | let d = (1440 * 2) | |
11 | 11 | ||
12 | 12 | let e = "Accepted" | |
13 | 13 | ||
14 | 14 | let f = "Win" | |
15 | 15 | ||
16 | 16 | let g = "WinByTimeout" | |
17 | 17 | ||
18 | 18 | let h = "Lose" | |
19 | 19 | ||
20 | 20 | let i = unit | |
21 | 21 | ||
22 | 22 | let j = base58'DWgwcZTMhSvnyYCoWLRUXXSH1RSkzThXLJhww9gwkqdn' | |
23 | 23 | ||
24 | 24 | let k = base58'BrmjyAWT5jjr3Wpsiyivyvg5vDuzoX2s93WgiexXetB3' | |
25 | 25 | ||
26 | 26 | let l = base58'BNdAstuFogzSyN2rY3beJbnBYwYcu7RzTHFjW88g8roK' | |
27 | 27 | ||
28 | 28 | let m = base58'AMFteLfPzPhTsFc3NfvHG7fSRUnsp3tJXPH88G1PCisT' | |
29 | 29 | ||
30 | 30 | let n = base58'EmcmfM27TPaemhuREZGD8WLvsuLCdqx8WovMrDQKbXS1' | |
31 | 31 | ||
32 | - | let o = | |
32 | + | let o = 1000 | |
33 | 33 | ||
34 | - | let p = (o | |
34 | + | let p = (100000000 / o) | |
35 | 35 | ||
36 | - | let q = | |
36 | + | let q = (p * 10) | |
37 | 37 | ||
38 | - | let r = ( | |
38 | + | let r = (10000 / o) | |
39 | 39 | ||
40 | - | let s = | |
40 | + | let s = (r * 10) | |
41 | 41 | ||
42 | - | let t = ( | |
42 | + | let t = (1000000 / o) | |
43 | 43 | ||
44 | - | let u = | |
44 | + | let u = (t * 10) | |
45 | 45 | ||
46 | - | let v = ( | |
46 | + | let v = (2000000 / o) | |
47 | 47 | ||
48 | - | let w = | |
48 | + | let w = (v * 10) | |
49 | 49 | ||
50 | - | let x = ( | |
50 | + | let x = (500000000 / o) | |
51 | 51 | ||
52 | - | let y = | |
52 | + | let y = (x * 10) | |
53 | 53 | ||
54 | - | let z = ( | |
54 | + | let z = (500000000 / o) | |
55 | 55 | ||
56 | - | func A (B,C) = if ((B == "WAVES")) | |
57 | - | then if (if ((C >= o)) | |
58 | - | then (p >= C) | |
56 | + | let A = (z * 10) | |
57 | + | ||
58 | + | func B (C,D) = if ((C == "WAVES")) | |
59 | + | then if (if ((D >= p)) | |
60 | + | then (q >= D) | |
59 | 61 | else false) | |
60 | 62 | then true | |
61 | 63 | else throw("Bet amount is not in range") | |
62 | - | else if (( | |
63 | - | then if (if (( | |
64 | - | then ( | |
64 | + | else if ((C == "BTC")) | |
65 | + | then if (if ((D >= r)) | |
66 | + | then (s >= D) | |
65 | 67 | else false) | |
66 | 68 | then true | |
67 | 69 | else throw("Bet amount is not in range") | |
68 | - | else if (( | |
69 | - | then if (if (( | |
70 | - | then ( | |
70 | + | else if ((C == "ETH")) | |
71 | + | then if (if ((D >= t)) | |
72 | + | then (u >= D) | |
71 | 73 | else false) | |
72 | 74 | then true | |
73 | 75 | else throw("Bet amount is not in range") | |
74 | - | else if (( | |
75 | - | then if (if (( | |
76 | - | then ( | |
76 | + | else if ((C == "LTC")) | |
77 | + | then if (if ((D >= v)) | |
78 | + | then (w >= D) | |
77 | 79 | else false) | |
78 | 80 | then true | |
79 | 81 | else throw("Bet amount is not in range") | |
80 | - | else if (( | |
81 | - | then if (if (( | |
82 | - | then ( | |
82 | + | else if ((C == "WCT")) | |
83 | + | then if (if ((D >= x)) | |
84 | + | then (y >= D) | |
83 | 85 | else false) | |
84 | 86 | then true | |
85 | 87 | else throw("Bet amount is not in range") | |
86 | - | else if (if (( | |
87 | - | then ( | |
88 | + | else if (if ((D >= z)) | |
89 | + | then (A >= D) | |
88 | 90 | else false) | |
89 | 91 | then true | |
90 | 92 | else throw("Bet amount is not in range") | |
91 | 93 | ||
92 | 94 | ||
93 | - | func | |
94 | - | let | |
95 | - | let | |
96 | - | let | |
97 | - | if ($isInstanceOf( | |
95 | + | func E (D,C) = { | |
96 | + | let F = { | |
97 | + | let G = getInteger(this, ("Reserved_" + C)) | |
98 | + | let H = G | |
99 | + | if ($isInstanceOf(H, "Int")) | |
98 | 100 | then { | |
99 | - | let | |
100 | - | | |
101 | + | let I = H | |
102 | + | I | |
101 | 103 | } | |
102 | 104 | else 0 | |
103 | 105 | } | |
104 | - | let | |
105 | - | if ((wavesBalance(this) >= | |
106 | + | let J = (F + D) | |
107 | + | if ((wavesBalance(this) >= J)) | |
106 | 108 | then { | |
107 | - | let | |
108 | - | | |
109 | + | let E = J | |
110 | + | E | |
109 | 111 | } | |
110 | 112 | else throw("Bet was rejected. Insufficient funds on game account.") | |
111 | 113 | } | |
112 | 114 | ||
113 | 115 | ||
114 | - | func | |
115 | - | let | |
116 | - | let | |
117 | - | let | |
118 | - | if ($isInstanceOf( | |
116 | + | func K (L) = { | |
117 | + | let M = getString(this, L) | |
118 | + | let I = { | |
119 | + | let H = M | |
120 | + | if ($isInstanceOf(H, "String")) | |
119 | 121 | then { | |
120 | - | let | |
121 | - | | |
122 | + | let I = H | |
123 | + | I | |
122 | 124 | } | |
123 | 125 | else throw("GameId was not found") | |
124 | 126 | } | |
125 | - | split( | |
127 | + | split(I, "_") | |
126 | 128 | } | |
127 | 129 | ||
128 | 130 | ||
129 | - | func | |
131 | + | func N (O) = if ((2 > O)) | |
130 | 132 | then "7" | |
131 | - | else if ((4 > | |
133 | + | else if ((4 > O)) | |
132 | 134 | then "6" | |
133 | - | else if ((6 > | |
135 | + | else if ((6 > O)) | |
134 | 136 | then "5" | |
135 | - | else if ((8 > | |
137 | + | else if ((8 > O)) | |
136 | 138 | then "4" | |
137 | - | else if ((10 > | |
139 | + | else if ((10 > O)) | |
138 | 140 | then "3" | |
139 | - | else if ((12 > | |
141 | + | else if ((12 > O)) | |
140 | 142 | then "2" | |
141 | 143 | else "1" | |
142 | 144 | ||
143 | 145 | ||
144 | - | func | |
145 | - | let | |
146 | - | if ( | |
146 | + | func P (L,Q,R) = { | |
147 | + | let S = rsaVerify(SHA256, toBytes(L), Q, R) | |
148 | + | if (S) | |
147 | 149 | then { | |
148 | - | let | |
149 | - | if (if (( | |
150 | - | then (20 >= | |
150 | + | let O = ((toInt(sha256(Q)) % 19) + 1) | |
151 | + | if (if ((O > 0)) | |
152 | + | then (20 >= O) | |
151 | 153 | else false) | |
152 | - | then | |
154 | + | then O | |
153 | 155 | else throw("Rsa integer is not in range") | |
154 | 156 | } | |
155 | 157 | else throw("Rsa Signature is invalid") | |
156 | 158 | } | |
157 | 159 | ||
158 | 160 | ||
159 | - | func | |
160 | - | let | |
161 | - | let | |
162 | - | let | |
163 | - | if ($isInstanceOf( | |
161 | + | func T (U,V) = { | |
162 | + | let G = getInteger(this, ("Reserved_" + V)) | |
163 | + | let W = { | |
164 | + | let H = G | |
165 | + | if ($isInstanceOf(H, "Int")) | |
164 | 166 | then { | |
165 | - | let | |
166 | - | | |
167 | + | let I = H | |
168 | + | I | |
167 | 169 | } | |
168 | 170 | else 0 | |
169 | 171 | } | |
170 | - | let | |
171 | - | if (( | |
172 | - | then | |
172 | + | let T = (W - U) | |
173 | + | if ((T > 0)) | |
174 | + | then T | |
173 | 175 | else throw("Reserved balance couldn't be less than 0") | |
174 | 176 | } | |
175 | 177 | ||
176 | 178 | ||
177 | - | func | |
179 | + | func X (Y,Z) = if ((Y == "777")) | |
178 | 180 | then 5370 | |
179 | - | else if (( | |
181 | + | else if ((Y == "666")) | |
180 | 182 | then 1300 | |
181 | - | else if (( | |
183 | + | else if ((Y == "555")) | |
182 | 184 | then 450 | |
183 | - | else if (( | |
185 | + | else if ((Y == "444")) | |
184 | 186 | then 200 | |
185 | - | else if (( | |
187 | + | else if ((Y == "333")) | |
186 | 188 | then 150 | |
187 | - | else if (( | |
189 | + | else if ((Y == "222")) | |
188 | 190 | then 110 | |
189 | - | else if (( | |
191 | + | else if ((Y == "111")) | |
190 | 192 | then 40 | |
191 | - | else if (( | |
193 | + | else if ((Z == "77")) | |
192 | 194 | then 270 | |
193 | - | else if (( | |
195 | + | else if ((Z == "66")) | |
194 | 196 | then 130 | |
195 | - | else if (( | |
197 | + | else if ((Z == "55")) | |
196 | 198 | then 65 | |
197 | - | else if (( | |
199 | + | else if ((Z == "44")) | |
198 | 200 | then 30 | |
199 | - | else if (( | |
201 | + | else if ((Z == "33")) | |
200 | 202 | then 20 | |
201 | - | else if (( | |
203 | + | else if ((Z == "22")) | |
202 | 204 | then 15 | |
203 | - | else if (( | |
205 | + | else if ((Z == "11")) | |
204 | 206 | then 10 | |
205 | 207 | else 0 | |
206 | 208 | ||
207 | 209 | ||
208 | - | func | |
210 | + | func aa (ab) = if ((ab == "WAVES")) | |
209 | 211 | then i | |
210 | - | else if (( | |
212 | + | else if ((ab == "BTC")) | |
211 | 213 | then j | |
212 | - | else if (( | |
214 | + | else if ((ab == "ETH")) | |
213 | 215 | then k | |
214 | - | else if (( | |
216 | + | else if ((ab == "LTC")) | |
215 | 217 | then l | |
216 | - | else if (( | |
218 | + | else if ((ab == "VST")) | |
217 | 219 | then m | |
218 | - | else if (( | |
220 | + | else if ((ab == "WCT")) | |
219 | 221 | then n | |
220 | 222 | else throw("Asset name is incorrect") | |
221 | 223 | ||
222 | 224 | ||
223 | - | @Callable( | |
225 | + | @Callable(ac) | |
224 | 226 | func bet () = { | |
225 | - | let | |
226 | - | let | |
227 | - | let | |
228 | - | let | |
229 | - | let | |
230 | - | let | |
227 | + | let ad = extract(ac.payment) | |
228 | + | let D = ad.amount | |
229 | + | let L = toBase58String(ac.transactionId) | |
230 | + | let ae = height | |
231 | + | let af = toBase58String(ac.callerPublicKey) | |
232 | + | let C = if (!(isDefined(ad.assetId))) | |
231 | 233 | then "WAVES" | |
232 | - | else if (( | |
234 | + | else if ((ad.assetId == j)) | |
233 | 235 | then "BTC" | |
234 | - | else if (( | |
236 | + | else if ((ad.assetId == k)) | |
235 | 237 | then "ETH" | |
236 | - | else if (( | |
238 | + | else if ((ad.assetId == l)) | |
237 | 239 | then "LTC" | |
238 | - | else if (( | |
240 | + | else if ((ad.assetId == n)) | |
239 | 241 | then "WCT" | |
240 | - | else if (( | |
242 | + | else if ((ad.assetId == m)) | |
241 | 243 | then "VST" | |
242 | 244 | else throw("AssetId is incorrect") | |
243 | - | let | |
244 | - | let | |
245 | - | if ( | |
245 | + | let ag = E(D, C) | |
246 | + | let ah = B(C, D) | |
247 | + | if (ah) | |
246 | 248 | then { | |
247 | - | let | |
248 | - | WriteSet([DataEntry( | |
249 | + | let ai = ((((((((e + "_") + af) + "_") + toString(D)) + "_") + C) + "_") + toString(ae)) | |
250 | + | WriteSet([DataEntry(L, ai), DataEntry(("Reserved_" + C), ag)]) | |
249 | 251 | } | |
250 | 252 | else throw("assetId is incorrect") | |
251 | 253 | } | |
252 | 254 | ||
253 | 255 | ||
254 | 256 | ||
255 | - | @Callable( | |
256 | - | func withdraw ( | |
257 | - | let | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
261 | - | let | |
262 | - | let | |
263 | - | let | |
264 | - | let | |
265 | - | let | |
266 | - | let | |
267 | - | let | |
268 | - | let | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | let | |
274 | - | [ | |
257 | + | @Callable(ac) | |
258 | + | func withdraw (L,aj,ak,al) = { | |
259 | + | let am = K(L) | |
260 | + | let an = am[0] | |
261 | + | let ao = addressFromPublicKey(fromBase58String(am[1])) | |
262 | + | let U = parseIntValue(am[2]) | |
263 | + | let ab = am[3] | |
264 | + | let ae = parseIntValue(am[4]) | |
265 | + | let ap = aa(ab) | |
266 | + | let aq = (d > (height - ae)) | |
267 | + | let ar = (an == e) | |
268 | + | let ag = T(U, ab) | |
269 | + | let as = { | |
270 | + | let at = P(L, aj, a) | |
271 | + | let au = P(L, ak, b) | |
272 | + | let av = P(L, al, c) | |
273 | + | let aw = N(at) | |
274 | + | let ax = N(au) | |
275 | + | let ay = N(av) | |
276 | + | [aw, ax, ay] | |
275 | 277 | } | |
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
280 | - | (( | |
278 | + | let az = { | |
279 | + | let Y = ((as[0] + as[1]) + as[2]) | |
280 | + | let Z = (as[0] + as[1]) | |
281 | + | let aA = X(Y, Z) | |
282 | + | ((U * aA) / 10) | |
281 | 283 | } | |
282 | - | let | |
283 | - | let | |
284 | - | if ( | |
285 | - | then if ( | |
286 | - | then if (( | |
287 | - | then WriteSet([DataEntry( | |
288 | - | else ScriptResult(WriteSet([DataEntry( | |
289 | - | else ScriptResult(WriteSet([DataEntry( | |
284 | + | let aB = ((((((am[1] + "_") + am[2]) + "_") + am[3]) + "_") + am[4]) | |
285 | + | let aC = ((as[0] + as[1]) + as[2]) | |
286 | + | if (ar) | |
287 | + | then if (aq) | |
288 | + | then if ((az == 0)) | |
289 | + | then WriteSet([DataEntry(L, (((h + aB) + toString(az)) + aC)), DataEntry(("Reserved_" + ab), ag)]) | |
290 | + | else ScriptResult(WriteSet([DataEntry(L, (((f + aB) + toString(az)) + aC)), DataEntry(("Reserved_" + ab), ag)]), TransferSet([ScriptTransfer(ao, az, ap)])) | |
291 | + | else ScriptResult(WriteSet([DataEntry(L, (g + aB)), DataEntry(("Reserved_" + ab), ag)]), TransferSet([ScriptTransfer(ao, U, ap)])) | |
290 | 292 | else throw("Game state is incorrect") | |
291 | 293 | } | |
292 | 294 | ||
293 | 295 | ||
294 | - | @Verifier( | |
295 | - | func | |
296 | - | let | |
297 | - | if ($isInstanceOf( | |
296 | + | @Verifier(aD) | |
297 | + | func aE () = { | |
298 | + | let H = aD | |
299 | + | if ($isInstanceOf(H, "TransferTransaction")) | |
298 | 300 | then { | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | if ($isInstanceOf( | |
301 | + | let aF = H | |
302 | + | let G = getInteger(this, "Reserved") | |
303 | + | let aG = { | |
304 | + | let aH = G | |
305 | + | if ($isInstanceOf(aH, "Int")) | |
304 | 306 | then { | |
305 | - | let | |
306 | - | | |
307 | + | let I = aH | |
308 | + | I | |
307 | 309 | } | |
308 | 310 | else 0 | |
309 | 311 | } | |
310 | - | let | |
311 | - | let | |
312 | - | let | |
313 | - | if ( | |
314 | - | then | |
312 | + | let aI = (wavesBalance(this) - aG) | |
313 | + | let aJ = (aI >= aF.amount) | |
314 | + | let aK = sigVerify(aF.bodyBytes, aF.proofs[0], aF.senderPublicKey) | |
315 | + | if (aJ) | |
316 | + | then aK | |
315 | 317 | else false | |
316 | 318 | } | |
317 | - | else if ($isInstanceOf( | |
319 | + | else if ($isInstanceOf(H, "SetScriptTransaction")) | |
318 | 320 | then { | |
319 | - | let | |
320 | - | sigVerify( | |
321 | + | let aL = H | |
322 | + | sigVerify(aL.bodyBytes, aL.proofs[0], aL.senderPublicKey) | |
321 | 323 | } | |
322 | - | else if ($isInstanceOf( | |
324 | + | else if ($isInstanceOf(H, "InvokeScriptTransaction")) | |
323 | 325 | then { | |
324 | - | let | |
325 | - | sigVerify( | |
326 | + | let aM = H | |
327 | + | sigVerify(aM.bodyBytes, aM.proofs[0], aM.senderPublicKey) | |
326 | 328 | } | |
327 | 329 | else false | |
328 | 330 | } | |
329 | 331 |
github/deemru/w8io/169f3d6 107.82 ms ◑