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