tx · 4K7GJdRxbZg7YxTnQesn16LVbDYmTZjXr29rK3rQXiB8 3NBFHpzVTqcHQB6Zxec1f6N6ZGBWQ4VsBFD: -0.01500000 Waves 2019.10.06 15:06 [707894] smart account 3NBFHpzVTqcHQB6Zxec1f6N6ZGBWQ4VsBFD > SELF 0.00000000 Waves
{ "type": 13, "id": "4K7GJdRxbZg7YxTnQesn16LVbDYmTZjXr29rK3rQXiB8", "fee": 1500000, "feeAssetId": null, "timestamp": 1570363618447, "version": 1, "sender": "3NBFHpzVTqcHQB6Zxec1f6N6ZGBWQ4VsBFD", "senderPublicKey": "8W9JLTJTfxrJrBNXxngzueBF4vJqeb6p9jFob7wb6QWQ", "proofs": [ "4jik3KBJyWwRHrGMci59hn4J7F7aqPyr1b8uaUtVXVrEvoeS47mh4CjbtorSi3paVfMjDd7xuSN4Hqt66yejYDN2" ], "script": "base64:AAIDAAAAAAAAAAwIARIAEgYKBAgICAgAAAAoAAAAAA1yc2FQdWJsaWNLZXkxCQACWwAAAAECAAAAgE1Gd3dEUVlKS29aSWh2Y05BUUVCQlFBRFN3QXdTQUpCQU9raXV6L0JWNEVqb3hHaFRtTkNidDJUZ2tiU1BIL3c2OWIzRjFyS21ENjFKaVBYdnZGOEwycEk5eE9ZY1c0Rm1vRVpWSGxSUXRBbGFKeWtsMytyc3JFQ0F3RUFBUT09AAAAAA1yc2FQdWJsaWNLZXkyCQACWwAAAAECAAAAgE1Gd3dEUVlKS29aSWh2Y05BUUVCQlFBRFN3QXdTQUpCQUpuWHpiTS9WMnNEVjFVTGJQU09sSGtsZE9UV1JySGk1ZnhJa0JtdWV2ckNsTVBWSDdycWNjd2lyRE5jTWRJZHdYSEk5QWRoajlGV2p3R0l3ZlUvSzZNQ0F3RUFBUT09AAAAAA1yc2FQdWJsaWNLZXkzCQACWwAAAAECAAAAgE1Gd3dEUVlKS29aSWh2Y05BUUVCQlFBRFN3QXdTQUpCQU9SRGV2eTByNGt6THFPeVNsb0I2M0h1djJlNHplSEtIakNzeTV2dEZLbVdaYlhKYThnWll0NCtFa2xGSW8xSzlvcXU1QkFQVmZKM0ZPenMyVTFBK2cwQ0F3RUFBUT09AAAAAAVkcnVtMQkABEwAAAACAgAAAAEyCQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMgkABEwAAAACAgAAAAE1CQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMwkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATMJAARMAAAAAgIAAAABNAkABEwAAAACAgAAAAEzCQAETAAAAAICAAAAATQJAARMAAAAAgIAAAABMgkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATUJAARMAAAAAgIAAAABMgkABEwAAAACAgAAAAE3CQAETAAAAAICAAAAATQJAARMAAAAAgIAAAABNgkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATMFAAAAA25pbAAAAAAFZHJ1bTIJAARMAAAAAgIAAAABNwkABEwAAAACAgAAAAE2CQAETAAAAAICAAAAATMJAARMAAAAAgIAAAABMQkABEwAAAACAgAAAAE0CQAETAAAAAICAAAAATIJAARMAAAAAgIAAAABMQkABEwAAAACAgAAAAEyCQAETAAAAAICAAAAATUJAARMAAAAAgIAAAABMwkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATQJAARMAAAAAgIAAAABMwkABEwAAAACAgAAAAE2CQAETAAAAAICAAAAATUJAARMAAAAAgIAAAABMgkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMgkABEwAAAACAgAAAAE0BQAAAANuaWwAAAAABWRydW0zCQAETAAAAAICAAAAATQJAARMAAAAAgIAAAABMwkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATYJAARMAAAAAgIAAAABNQkABEwAAAACAgAAAAE3CQAETAAAAAICAAAAATQJAARMAAAAAgIAAAABMwkABEwAAAACAgAAAAE2CQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMgkABEwAAAACAgAAAAE0CQAETAAAAAICAAAAATMJAARMAAAAAgIAAAABMQkABEwAAA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RjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAARzc3R4BQAAAAckbWF0Y2gwCQAB9AAAAAMIBQAAAARzc3R4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAAEc3N0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAARzc3R4AAAAD3NlbmRlclB1YmxpY0tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAXSW52b2tlU2NyaXB0VHJhbnNhY3Rpb24EAAAABGlzdHgFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAABGlzdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAARpc3R4AAAABnByb29mcwAAAAAAAAAAAAgFAAAABGlzdHgAAAAPc2VuZGVyUHVibGljS2V5B1t6HK8=", "chainId": 84, "height": 707894, "spentComplexity": 0 } View: original | compacted Prev: Es6tbAPdcPhkpapmgUckotW2xsbgewzC8DdP575dBGfi Next: ABgD7TaaoTB3n7q8QC6dXkhKgW4BG6RLYuTQuj56kzRn Diff:
Old | New | Differences | |
---|---|---|---|
100 | 100 | else throw("Bet amount is not in range") | |
101 | 101 | ||
102 | 102 | ||
103 | - | func I (J,K) = { | |
104 | - | let | |
105 | - | let | |
106 | - | let | |
107 | - | if ($isInstanceOf( | |
103 | + | func I (J,K,L) = { | |
104 | + | let M = { | |
105 | + | let N = getInteger(this, (K + "_Reserved")) | |
106 | + | let O = N | |
107 | + | if ($isInstanceOf(O, "Int")) | |
108 | 108 | then { | |
109 | - | let | |
110 | - | | |
109 | + | let P = O | |
110 | + | P | |
111 | 111 | } | |
112 | 112 | else 0 | |
113 | 113 | } | |
114 | - | let | |
115 | - | if (( | |
114 | + | let Q = (M + J) | |
115 | + | if ((assetBalance(this, L) >= Q)) | |
116 | 116 | then { | |
117 | - | let I = | |
117 | + | let I = Q | |
118 | 118 | I | |
119 | 119 | } | |
120 | 120 | else throw("Bet was rejected. Insufficient funds on game account.") | |
121 | 121 | } | |
122 | 122 | ||
123 | 123 | ||
124 | - | func | |
125 | - | let | |
126 | - | let | |
127 | - | let | |
128 | - | if ($isInstanceOf( | |
124 | + | func R (S) = { | |
125 | + | let T = getString(this, (S + "_GameId")) | |
126 | + | let P = { | |
127 | + | let O = T | |
128 | + | if ($isInstanceOf(O, "String")) | |
129 | 129 | then { | |
130 | - | let | |
131 | - | | |
130 | + | let P = O | |
131 | + | P | |
132 | 132 | } | |
133 | 133 | else throw("GameId was not found") | |
134 | 134 | } | |
135 | - | split( | |
135 | + | split(P, "_") | |
136 | 136 | } | |
137 | 137 | ||
138 | 138 | ||
139 | - | func | |
140 | - | let | |
141 | - | if ( | |
139 | + | func U (S,V,W) = { | |
140 | + | let X = rsaVerify(SHA256, toBytes(S), fromBase64String(V), W) | |
141 | + | if (X) | |
142 | 142 | then { | |
143 | - | let | |
144 | - | if (if (( | |
145 | - | then (19 >= | |
143 | + | let Y = (toInt(sha256(fromBase64String(V))) % 19) | |
144 | + | if (if ((Y >= 0)) | |
145 | + | then (19 >= Y) | |
146 | 146 | else false) | |
147 | - | then | |
147 | + | then Y | |
148 | 148 | else throw("Integer is not in range") | |
149 | 149 | } | |
150 | 150 | else throw("Rsa Signature is invalid") | |
151 | 151 | } | |
152 | 152 | ||
153 | 153 | ||
154 | - | func | |
155 | - | let | |
156 | - | let | |
157 | - | let | |
158 | - | if ($isInstanceOf( | |
154 | + | func Z (aa,ab) = { | |
155 | + | let N = getInteger(this, (ab + "_Reserved")) | |
156 | + | let ac = { | |
157 | + | let O = N | |
158 | + | if ($isInstanceOf(O, "Int")) | |
159 | 159 | then { | |
160 | - | let | |
161 | - | | |
160 | + | let P = O | |
161 | + | P | |
162 | 162 | } | |
163 | 163 | else 0 | |
164 | 164 | } | |
165 | - | let | |
166 | - | if (( | |
167 | - | then | |
165 | + | let Z = (ac - aa) | |
166 | + | if ((Z >= 0)) | |
167 | + | then Z | |
168 | 168 | else throw("Reserved balance couldn't be less than 0") | |
169 | 169 | } | |
170 | 170 | ||
171 | 171 | ||
172 | - | func | |
173 | - | then ("0" + toString( | |
174 | - | else toString( | |
172 | + | func ad (ae) = if ((10 > ae)) | |
173 | + | then ("0" + toString(ae)) | |
174 | + | else toString(ae) | |
175 | 175 | ||
176 | 176 | ||
177 | - | func | |
177 | + | func af (ag,ah) = if ((ag == "777")) | |
178 | 178 | then 5370 | |
179 | - | else if (( | |
179 | + | else if ((ag == "666")) | |
180 | 180 | then 1300 | |
181 | - | else if (( | |
181 | + | else if ((ag == "555")) | |
182 | 182 | then 450 | |
183 | - | else if (( | |
183 | + | else if ((ag == "444")) | |
184 | 184 | then 200 | |
185 | - | else if (( | |
185 | + | else if ((ag == "333")) | |
186 | 186 | then 150 | |
187 | - | else if (( | |
187 | + | else if ((ag == "222")) | |
188 | 188 | then 110 | |
189 | - | else if (( | |
189 | + | else if ((ag == "111")) | |
190 | 190 | then 40 | |
191 | - | else if (( | |
191 | + | else if ((ah == "77")) | |
192 | 192 | then 270 | |
193 | - | else if (( | |
193 | + | else if ((ah == "66")) | |
194 | 194 | then 130 | |
195 | - | else if (( | |
195 | + | else if ((ah == "55")) | |
196 | 196 | then 65 | |
197 | - | else if (( | |
197 | + | else if ((ah == "44")) | |
198 | 198 | then 30 | |
199 | - | else if (( | |
199 | + | else if ((ah == "33")) | |
200 | 200 | then 20 | |
201 | - | else if (( | |
201 | + | else if ((ah == "22")) | |
202 | 202 | then 15 | |
203 | - | else if (( | |
203 | + | else if ((ah == "11")) | |
204 | 204 | then 10 | |
205 | 205 | else 0 | |
206 | 206 | ||
207 | 207 | ||
208 | - | func | |
208 | + | func ai (aj) = if ((aj == "WAVES")) | |
209 | 209 | then m | |
210 | - | else if (( | |
210 | + | else if ((aj == "BTC")) | |
211 | 211 | then n | |
212 | - | else if (( | |
212 | + | else if ((aj == "ETH")) | |
213 | 213 | then o | |
214 | - | else if (( | |
214 | + | else if ((aj == "LTC")) | |
215 | 215 | then p | |
216 | - | else if (( | |
216 | + | else if ((aj == "VST")) | |
217 | 217 | then q | |
218 | - | else if (( | |
218 | + | else if ((aj == "WCT")) | |
219 | 219 | then r | |
220 | 220 | else throw("Asset name is incorrect") | |
221 | 221 | ||
222 | 222 | ||
223 | - | @Callable(aj) | |
223 | + | func ak (ab) = if (!(isDefined(ab))) | |
224 | + | then "WAVES" | |
225 | + | else if ((ab == n)) | |
226 | + | then "BTC" | |
227 | + | else if ((ab == o)) | |
228 | + | then "ETH" | |
229 | + | else if ((ab == p)) | |
230 | + | then "LTC" | |
231 | + | else if ((ab == r)) | |
232 | + | then "WCT" | |
233 | + | else if ((ab == q)) | |
234 | + | then "VST" | |
235 | + | else throw("AssetId is incorrect") | |
236 | + | ||
237 | + | ||
238 | + | @Callable(al) | |
224 | 239 | func makeBet () = { | |
225 | - | let ak = extract(aj.payment) | |
226 | - | let H = (ak.amount - h) | |
227 | - | let R = toBase58String(aj.transactionId) | |
228 | - | let al = height | |
229 | - | let am = toBase58String(aj.callerPublicKey) | |
230 | - | let K = if (!(isDefined(ak.assetId))) | |
231 | - | then "WAVES" | |
232 | - | else if ((ak.assetId == n)) | |
233 | - | then "BTC" | |
234 | - | else if ((ak.assetId == o)) | |
235 | - | then "ETH" | |
236 | - | else if ((ak.assetId == p)) | |
237 | - | then "LTC" | |
238 | - | else if ((ak.assetId == r)) | |
239 | - | then "WCT" | |
240 | - | else if ((ak.assetId == q)) | |
241 | - | then "VST" | |
242 | - | else throw("AssetId is incorrect") | |
243 | - | let an = I(H, K) | |
244 | - | let ao = F(K, H) | |
245 | - | if (ao) | |
240 | + | let am = extract(al.payment) | |
241 | + | let H = (am.amount - h) | |
242 | + | let ab = am.assetId | |
243 | + | let S = toBase58String(al.transactionId) | |
244 | + | let an = height | |
245 | + | let ao = toBase58String(al.callerPublicKey) | |
246 | + | let K = ak(ab) | |
247 | + | let ap = I(H, K, am.assetId) | |
248 | + | let aq = F(K, H) | |
249 | + | if (aq) | |
246 | 250 | then { | |
247 | - | let | |
248 | - | WriteSet([DataEntry(( | |
251 | + | let ar = ((((((((i + "_") + ao) + "_") + toString(H)) + "_") + K) + "_") + toString(an)) | |
252 | + | WriteSet([DataEntry((S + "_GameId"), ar), DataEntry((K + "_Reserved"), ap)]) | |
249 | 253 | } | |
250 | 254 | else throw("assetId is incorrect") | |
251 | 255 | } | |
252 | 256 | ||
253 | 257 | ||
254 | 258 | ||
255 | - | @Callable( | |
256 | - | func playGame ( | |
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 | - | (( | |
259 | + | @Callable(al) | |
260 | + | func playGame (S,as,at,au) = { | |
261 | + | let av = R(S) | |
262 | + | let aw = av[0] | |
263 | + | let ax = addressFromPublicKey(fromBase58String(av[1])) | |
264 | + | let aa = parseIntValue(av[2]) | |
265 | + | let aj = av[3] | |
266 | + | let an = parseIntValue(av[4]) | |
267 | + | let L = ai(aj) | |
268 | + | let ap = Z(aa, aj) | |
269 | + | let ay = U(S, as, a) | |
270 | + | let az = U(S, at, b) | |
271 | + | let aA = U(S, au, c) | |
272 | + | let ag = ((d[ay] + e[az]) + f[aA]) | |
273 | + | let ah = (d[ay] + e[az]) | |
274 | + | let aB = { | |
275 | + | let aC = ad(ay) | |
276 | + | let aD = ad(az) | |
277 | + | let aE = ad(aA) | |
278 | + | ((aC + aD) + aE) | |
275 | 279 | } | |
276 | - | let | |
277 | - | let | |
278 | - | (( | |
280 | + | let aF = { | |
281 | + | let aG = af(ag, ah) | |
282 | + | ((aa * aG) / 10) | |
279 | 283 | } | |
280 | - | let | |
281 | - | let | |
282 | - | if (( | |
283 | - | then ( | |
284 | - | else | |
284 | + | let aH = { | |
285 | + | let aI = assetBalance(this, L) | |
286 | + | if ((aF > aI)) | |
287 | + | then (aa * 2) | |
288 | + | else aF | |
285 | 289 | } | |
286 | - | let | |
287 | - | let | |
288 | - | if ( | |
289 | - | then if ( | |
290 | - | then if (( | |
291 | - | then WriteSet([DataEntry(( | |
292 | - | else ScriptResult(WriteSet([DataEntry(( | |
293 | - | else ScriptResult(WriteSet([DataEntry(( | |
290 | + | let aJ = (g > (height - an)) | |
291 | + | let aK = (aw == i) | |
292 | + | if (aK) | |
293 | + | then if (aJ) | |
294 | + | then if ((aF == 0)) | |
295 | + | then WriteSet([DataEntry((S + "_GameId"), ((((((((((((((l + "_") + av[1]) + "_") + av[2]) + "_") + av[3]) + "_") + av[4]) + "_") + toString(aF)) + "_") + ag) + "_") + aB)), DataEntry((aj + "_Reserved"), ap)]) | |
296 | + | else ScriptResult(WriteSet([DataEntry((S + "_GameId"), ((((((((((((((j + "_") + av[1]) + "_") + av[2]) + "_") + av[3]) + "_") + av[4]) + "_") + toString(aF)) + "_") + ag) + "_") + aB)), DataEntry((aj + "_Reserved"), ap)]), TransferSet([ScriptTransfer(ax, aH, L)])) | |
297 | + | else ScriptResult(WriteSet([DataEntry((S + "_GameId"), ((((((((((((((k + "_") + av[1]) + "_") + av[2]) + "_") + av[3]) + "_") + av[4]) + "_") + toString((aa * 2))) + "_") + "000") + "_") + "000000")), DataEntry((aj + "_Reserved"), ap)]), TransferSet([ScriptTransfer(ax, aa, L)])) | |
294 | 298 | else throw("Game state is incorrect") | |
295 | 299 | } | |
296 | 300 | ||
297 | 301 | ||
298 | - | @Verifier( | |
299 | - | func | |
300 | - | let | |
301 | - | if ($isInstanceOf( | |
302 | + | @Verifier(aL) | |
303 | + | func aM () = { | |
304 | + | let O = aL | |
305 | + | if ($isInstanceOf(O, "TransferTransaction")) | |
302 | 306 | then { | |
303 | - | let | |
304 | - | let | |
307 | + | let aN = O | |
308 | + | let aj = if (!(isDefined(aN.assetId))) | |
305 | 309 | then "WAVES" | |
306 | - | else if (( | |
310 | + | else if ((aN.assetId == n)) | |
307 | 311 | then "BTC" | |
308 | - | else if (( | |
312 | + | else if ((aN.assetId == o)) | |
309 | 313 | then "ETH" | |
310 | - | else if (( | |
314 | + | else if ((aN.assetId == p)) | |
311 | 315 | then "LTC" | |
312 | - | else if (( | |
316 | + | else if ((aN.assetId == r)) | |
313 | 317 | then "WCT" | |
314 | - | else if (( | |
318 | + | else if ((aN.assetId == q)) | |
315 | 319 | then "VST" | |
316 | 320 | else throw("AssetId is incorrect") | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
320 | - | if ($isInstanceOf( | |
321 | + | let N = getInteger(this, (aj + "_Reserved")) | |
322 | + | let aO = { | |
323 | + | let aP = N | |
324 | + | if ($isInstanceOf(aP, "Int")) | |
321 | 325 | then { | |
322 | - | let | |
323 | - | | |
326 | + | let P = aP | |
327 | + | P | |
324 | 328 | } | |
325 | 329 | else 0 | |
326 | 330 | } | |
327 | - | let | |
328 | - | let | |
329 | - | let | |
330 | - | if ( | |
331 | - | then | |
331 | + | let aQ = (wavesBalance(this) - aO) | |
332 | + | let aR = (aQ >= aN.amount) | |
333 | + | let aS = sigVerify(aN.bodyBytes, aN.proofs[0], aN.senderPublicKey) | |
334 | + | if (aR) | |
335 | + | then aS | |
332 | 336 | else false | |
333 | 337 | } | |
334 | - | else if ($isInstanceOf( | |
338 | + | else if ($isInstanceOf(O, "SetScriptTransaction")) | |
335 | 339 | then { | |
336 | - | let | |
337 | - | sigVerify( | |
340 | + | let aT = O | |
341 | + | sigVerify(aT.bodyBytes, aT.proofs[0], aT.senderPublicKey) | |
338 | 342 | } | |
339 | - | else if ($isInstanceOf( | |
343 | + | else if ($isInstanceOf(O, "InvokeScriptTransaction")) | |
340 | 344 | then { | |
341 | - | let | |
342 | - | sigVerify( | |
345 | + | let aU = O | |
346 | + | sigVerify(aU.bodyBytes, aU.proofs[0], aU.senderPublicKey) | |
343 | 347 | } | |
344 | 348 | else false | |
345 | 349 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = fromBase64String("MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAOkiuz/BV4EjoxGhTmNCbt2TgkbSPH/w69b3F1rKmD61JiPXvvF8L2pI9xOYcW4FmoEZVHlRQtAlaJykl3+rsrECAwEAAQ==") | |
5 | 5 | ||
6 | 6 | let b = fromBase64String("MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJnXzbM/V2sDV1ULbPSOlHkldOTWRrHi5fxIkBmuevrClMPVH7rqccwirDNcMdIdwXHI9Adhj9FWjwGIwfU/K6MCAwEAAQ==") | |
7 | 7 | ||
8 | 8 | let c = fromBase64String("MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAORDevy0r4kzLqOySloB63Huv2e4zeHKHjCsy5vtFKmWZbXJa8gZYt4+EklFIo1K9oqu5BAPVfJ3FOzs2U1A+g0CAwEAAQ==") | |
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 | - | func I (J,K) = { | |
104 | - | let | |
105 | - | let | |
106 | - | let | |
107 | - | if ($isInstanceOf( | |
103 | + | func I (J,K,L) = { | |
104 | + | let M = { | |
105 | + | let N = getInteger(this, (K + "_Reserved")) | |
106 | + | let O = N | |
107 | + | if ($isInstanceOf(O, "Int")) | |
108 | 108 | then { | |
109 | - | let | |
110 | - | | |
109 | + | let P = O | |
110 | + | P | |
111 | 111 | } | |
112 | 112 | else 0 | |
113 | 113 | } | |
114 | - | let | |
115 | - | if (( | |
114 | + | let Q = (M + J) | |
115 | + | if ((assetBalance(this, L) >= Q)) | |
116 | 116 | then { | |
117 | - | let I = | |
117 | + | let I = Q | |
118 | 118 | I | |
119 | 119 | } | |
120 | 120 | else throw("Bet was rejected. Insufficient funds on game account.") | |
121 | 121 | } | |
122 | 122 | ||
123 | 123 | ||
124 | - | func | |
125 | - | let | |
126 | - | let | |
127 | - | let | |
128 | - | if ($isInstanceOf( | |
124 | + | func R (S) = { | |
125 | + | let T = getString(this, (S + "_GameId")) | |
126 | + | let P = { | |
127 | + | let O = T | |
128 | + | if ($isInstanceOf(O, "String")) | |
129 | 129 | then { | |
130 | - | let | |
131 | - | | |
130 | + | let P = O | |
131 | + | P | |
132 | 132 | } | |
133 | 133 | else throw("GameId was not found") | |
134 | 134 | } | |
135 | - | split( | |
135 | + | split(P, "_") | |
136 | 136 | } | |
137 | 137 | ||
138 | 138 | ||
139 | - | func | |
140 | - | let | |
141 | - | if ( | |
139 | + | func U (S,V,W) = { | |
140 | + | let X = rsaVerify(SHA256, toBytes(S), fromBase64String(V), W) | |
141 | + | if (X) | |
142 | 142 | then { | |
143 | - | let | |
144 | - | if (if (( | |
145 | - | then (19 >= | |
143 | + | let Y = (toInt(sha256(fromBase64String(V))) % 19) | |
144 | + | if (if ((Y >= 0)) | |
145 | + | then (19 >= Y) | |
146 | 146 | else false) | |
147 | - | then | |
147 | + | then Y | |
148 | 148 | else throw("Integer is not in range") | |
149 | 149 | } | |
150 | 150 | else throw("Rsa Signature is invalid") | |
151 | 151 | } | |
152 | 152 | ||
153 | 153 | ||
154 | - | func | |
155 | - | let | |
156 | - | let | |
157 | - | let | |
158 | - | if ($isInstanceOf( | |
154 | + | func Z (aa,ab) = { | |
155 | + | let N = getInteger(this, (ab + "_Reserved")) | |
156 | + | let ac = { | |
157 | + | let O = N | |
158 | + | if ($isInstanceOf(O, "Int")) | |
159 | 159 | then { | |
160 | - | let | |
161 | - | | |
160 | + | let P = O | |
161 | + | P | |
162 | 162 | } | |
163 | 163 | else 0 | |
164 | 164 | } | |
165 | - | let | |
166 | - | if (( | |
167 | - | then | |
165 | + | let Z = (ac - aa) | |
166 | + | if ((Z >= 0)) | |
167 | + | then Z | |
168 | 168 | else throw("Reserved balance couldn't be less than 0") | |
169 | 169 | } | |
170 | 170 | ||
171 | 171 | ||
172 | - | func | |
173 | - | then ("0" + toString( | |
174 | - | else toString( | |
172 | + | func ad (ae) = if ((10 > ae)) | |
173 | + | then ("0" + toString(ae)) | |
174 | + | else toString(ae) | |
175 | 175 | ||
176 | 176 | ||
177 | - | func | |
177 | + | func af (ag,ah) = if ((ag == "777")) | |
178 | 178 | then 5370 | |
179 | - | else if (( | |
179 | + | else if ((ag == "666")) | |
180 | 180 | then 1300 | |
181 | - | else if (( | |
181 | + | else if ((ag == "555")) | |
182 | 182 | then 450 | |
183 | - | else if (( | |
183 | + | else if ((ag == "444")) | |
184 | 184 | then 200 | |
185 | - | else if (( | |
185 | + | else if ((ag == "333")) | |
186 | 186 | then 150 | |
187 | - | else if (( | |
187 | + | else if ((ag == "222")) | |
188 | 188 | then 110 | |
189 | - | else if (( | |
189 | + | else if ((ag == "111")) | |
190 | 190 | then 40 | |
191 | - | else if (( | |
191 | + | else if ((ah == "77")) | |
192 | 192 | then 270 | |
193 | - | else if (( | |
193 | + | else if ((ah == "66")) | |
194 | 194 | then 130 | |
195 | - | else if (( | |
195 | + | else if ((ah == "55")) | |
196 | 196 | then 65 | |
197 | - | else if (( | |
197 | + | else if ((ah == "44")) | |
198 | 198 | then 30 | |
199 | - | else if (( | |
199 | + | else if ((ah == "33")) | |
200 | 200 | then 20 | |
201 | - | else if (( | |
201 | + | else if ((ah == "22")) | |
202 | 202 | then 15 | |
203 | - | else if (( | |
203 | + | else if ((ah == "11")) | |
204 | 204 | then 10 | |
205 | 205 | else 0 | |
206 | 206 | ||
207 | 207 | ||
208 | - | func | |
208 | + | func ai (aj) = if ((aj == "WAVES")) | |
209 | 209 | then m | |
210 | - | else if (( | |
210 | + | else if ((aj == "BTC")) | |
211 | 211 | then n | |
212 | - | else if (( | |
212 | + | else if ((aj == "ETH")) | |
213 | 213 | then o | |
214 | - | else if (( | |
214 | + | else if ((aj == "LTC")) | |
215 | 215 | then p | |
216 | - | else if (( | |
216 | + | else if ((aj == "VST")) | |
217 | 217 | then q | |
218 | - | else if (( | |
218 | + | else if ((aj == "WCT")) | |
219 | 219 | then r | |
220 | 220 | else throw("Asset name is incorrect") | |
221 | 221 | ||
222 | 222 | ||
223 | - | @Callable(aj) | |
223 | + | func ak (ab) = if (!(isDefined(ab))) | |
224 | + | then "WAVES" | |
225 | + | else if ((ab == n)) | |
226 | + | then "BTC" | |
227 | + | else if ((ab == o)) | |
228 | + | then "ETH" | |
229 | + | else if ((ab == p)) | |
230 | + | then "LTC" | |
231 | + | else if ((ab == r)) | |
232 | + | then "WCT" | |
233 | + | else if ((ab == q)) | |
234 | + | then "VST" | |
235 | + | else throw("AssetId is incorrect") | |
236 | + | ||
237 | + | ||
238 | + | @Callable(al) | |
224 | 239 | func makeBet () = { | |
225 | - | let ak = extract(aj.payment) | |
226 | - | let H = (ak.amount - h) | |
227 | - | let R = toBase58String(aj.transactionId) | |
228 | - | let al = height | |
229 | - | let am = toBase58String(aj.callerPublicKey) | |
230 | - | let K = if (!(isDefined(ak.assetId))) | |
231 | - | then "WAVES" | |
232 | - | else if ((ak.assetId == n)) | |
233 | - | then "BTC" | |
234 | - | else if ((ak.assetId == o)) | |
235 | - | then "ETH" | |
236 | - | else if ((ak.assetId == p)) | |
237 | - | then "LTC" | |
238 | - | else if ((ak.assetId == r)) | |
239 | - | then "WCT" | |
240 | - | else if ((ak.assetId == q)) | |
241 | - | then "VST" | |
242 | - | else throw("AssetId is incorrect") | |
243 | - | let an = I(H, K) | |
244 | - | let ao = F(K, H) | |
245 | - | if (ao) | |
240 | + | let am = extract(al.payment) | |
241 | + | let H = (am.amount - h) | |
242 | + | let ab = am.assetId | |
243 | + | let S = toBase58String(al.transactionId) | |
244 | + | let an = height | |
245 | + | let ao = toBase58String(al.callerPublicKey) | |
246 | + | let K = ak(ab) | |
247 | + | let ap = I(H, K, am.assetId) | |
248 | + | let aq = F(K, H) | |
249 | + | if (aq) | |
246 | 250 | then { | |
247 | - | let | |
248 | - | WriteSet([DataEntry(( | |
251 | + | let ar = ((((((((i + "_") + ao) + "_") + toString(H)) + "_") + K) + "_") + toString(an)) | |
252 | + | WriteSet([DataEntry((S + "_GameId"), ar), DataEntry((K + "_Reserved"), ap)]) | |
249 | 253 | } | |
250 | 254 | else throw("assetId is incorrect") | |
251 | 255 | } | |
252 | 256 | ||
253 | 257 | ||
254 | 258 | ||
255 | - | @Callable( | |
256 | - | func playGame ( | |
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 | - | (( | |
259 | + | @Callable(al) | |
260 | + | func playGame (S,as,at,au) = { | |
261 | + | let av = R(S) | |
262 | + | let aw = av[0] | |
263 | + | let ax = addressFromPublicKey(fromBase58String(av[1])) | |
264 | + | let aa = parseIntValue(av[2]) | |
265 | + | let aj = av[3] | |
266 | + | let an = parseIntValue(av[4]) | |
267 | + | let L = ai(aj) | |
268 | + | let ap = Z(aa, aj) | |
269 | + | let ay = U(S, as, a) | |
270 | + | let az = U(S, at, b) | |
271 | + | let aA = U(S, au, c) | |
272 | + | let ag = ((d[ay] + e[az]) + f[aA]) | |
273 | + | let ah = (d[ay] + e[az]) | |
274 | + | let aB = { | |
275 | + | let aC = ad(ay) | |
276 | + | let aD = ad(az) | |
277 | + | let aE = ad(aA) | |
278 | + | ((aC + aD) + aE) | |
275 | 279 | } | |
276 | - | let | |
277 | - | let | |
278 | - | (( | |
280 | + | let aF = { | |
281 | + | let aG = af(ag, ah) | |
282 | + | ((aa * aG) / 10) | |
279 | 283 | } | |
280 | - | let | |
281 | - | let | |
282 | - | if (( | |
283 | - | then ( | |
284 | - | else | |
284 | + | let aH = { | |
285 | + | let aI = assetBalance(this, L) | |
286 | + | if ((aF > aI)) | |
287 | + | then (aa * 2) | |
288 | + | else aF | |
285 | 289 | } | |
286 | - | let | |
287 | - | let | |
288 | - | if ( | |
289 | - | then if ( | |
290 | - | then if (( | |
291 | - | then WriteSet([DataEntry(( | |
292 | - | else ScriptResult(WriteSet([DataEntry(( | |
293 | - | else ScriptResult(WriteSet([DataEntry(( | |
290 | + | let aJ = (g > (height - an)) | |
291 | + | let aK = (aw == i) | |
292 | + | if (aK) | |
293 | + | then if (aJ) | |
294 | + | then if ((aF == 0)) | |
295 | + | then WriteSet([DataEntry((S + "_GameId"), ((((((((((((((l + "_") + av[1]) + "_") + av[2]) + "_") + av[3]) + "_") + av[4]) + "_") + toString(aF)) + "_") + ag) + "_") + aB)), DataEntry((aj + "_Reserved"), ap)]) | |
296 | + | else ScriptResult(WriteSet([DataEntry((S + "_GameId"), ((((((((((((((j + "_") + av[1]) + "_") + av[2]) + "_") + av[3]) + "_") + av[4]) + "_") + toString(aF)) + "_") + ag) + "_") + aB)), DataEntry((aj + "_Reserved"), ap)]), TransferSet([ScriptTransfer(ax, aH, L)])) | |
297 | + | else ScriptResult(WriteSet([DataEntry((S + "_GameId"), ((((((((((((((k + "_") + av[1]) + "_") + av[2]) + "_") + av[3]) + "_") + av[4]) + "_") + toString((aa * 2))) + "_") + "000") + "_") + "000000")), DataEntry((aj + "_Reserved"), ap)]), TransferSet([ScriptTransfer(ax, aa, L)])) | |
294 | 298 | else throw("Game state is incorrect") | |
295 | 299 | } | |
296 | 300 | ||
297 | 301 | ||
298 | - | @Verifier( | |
299 | - | func | |
300 | - | let | |
301 | - | if ($isInstanceOf( | |
302 | + | @Verifier(aL) | |
303 | + | func aM () = { | |
304 | + | let O = aL | |
305 | + | if ($isInstanceOf(O, "TransferTransaction")) | |
302 | 306 | then { | |
303 | - | let | |
304 | - | let | |
307 | + | let aN = O | |
308 | + | let aj = if (!(isDefined(aN.assetId))) | |
305 | 309 | then "WAVES" | |
306 | - | else if (( | |
310 | + | else if ((aN.assetId == n)) | |
307 | 311 | then "BTC" | |
308 | - | else if (( | |
312 | + | else if ((aN.assetId == o)) | |
309 | 313 | then "ETH" | |
310 | - | else if (( | |
314 | + | else if ((aN.assetId == p)) | |
311 | 315 | then "LTC" | |
312 | - | else if (( | |
316 | + | else if ((aN.assetId == r)) | |
313 | 317 | then "WCT" | |
314 | - | else if (( | |
318 | + | else if ((aN.assetId == q)) | |
315 | 319 | then "VST" | |
316 | 320 | else throw("AssetId is incorrect") | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
320 | - | if ($isInstanceOf( | |
321 | + | let N = getInteger(this, (aj + "_Reserved")) | |
322 | + | let aO = { | |
323 | + | let aP = N | |
324 | + | if ($isInstanceOf(aP, "Int")) | |
321 | 325 | then { | |
322 | - | let | |
323 | - | | |
326 | + | let P = aP | |
327 | + | P | |
324 | 328 | } | |
325 | 329 | else 0 | |
326 | 330 | } | |
327 | - | let | |
328 | - | let | |
329 | - | let | |
330 | - | if ( | |
331 | - | then | |
331 | + | let aQ = (wavesBalance(this) - aO) | |
332 | + | let aR = (aQ >= aN.amount) | |
333 | + | let aS = sigVerify(aN.bodyBytes, aN.proofs[0], aN.senderPublicKey) | |
334 | + | if (aR) | |
335 | + | then aS | |
332 | 336 | else false | |
333 | 337 | } | |
334 | - | else if ($isInstanceOf( | |
338 | + | else if ($isInstanceOf(O, "SetScriptTransaction")) | |
335 | 339 | then { | |
336 | - | let | |
337 | - | sigVerify( | |
340 | + | let aT = O | |
341 | + | sigVerify(aT.bodyBytes, aT.proofs[0], aT.senderPublicKey) | |
338 | 342 | } | |
339 | - | else if ($isInstanceOf( | |
343 | + | else if ($isInstanceOf(O, "InvokeScriptTransaction")) | |
340 | 344 | then { | |
341 | - | let | |
342 | - | sigVerify( | |
345 | + | let aU = O | |
346 | + | sigVerify(aU.bodyBytes, aU.proofs[0], aU.senderPublicKey) | |
343 | 347 | } | |
344 | 348 | else false | |
345 | 349 | } | |
346 | 350 |
github/deemru/w8io/169f3d6 117.51 ms ◑