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