tx · FixSVkRrmDnHcVkiatMYhbvWkTvoEHqCG9UER5Vs1xM2 3MxsZUkxjngrsHn7WNd2xEbwWkUfKdmzP6u: -0.01400000 Waves 2019.10.27 00:09 [737624] smart account 3MxsZUkxjngrsHn7WNd2xEbwWkUfKdmzP6u > SELF 0.00000000 Waves
{ "type": 13, "id": "FixSVkRrmDnHcVkiatMYhbvWkTvoEHqCG9UER5Vs1xM2", "fee": 1400000, "feeAssetId": null, "timestamp": 1572124147927, "version": 1, "sender": "3MxsZUkxjngrsHn7WNd2xEbwWkUfKdmzP6u", "senderPublicKey": "BFgvNhTxuzThVrRXLX7LfTfCHVeCPDsF6JEpadKJPvox", "proofs": [ "2VUmsoYZoVVR9oT5sm9G76UwvjQoJCFyGMu6DXwuN5LqyKdN2CipkSDXUdm4xtFu4Reso9RAi1QxwCY5Q8z7mqhM" ], "script": "base64:AAIDAAAAAAAAABEIARIDCgEIEgMKAQgSAwoBCAAAACIAAAAACVJTQVBVQkxJQwkAAlsAAAABAgAAAY9iYXNlNjQ6TUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUFtT2xSQlRZRU8zSDdZOXJCbW9GUUZuNDM5MlB4MFF3MTNEc2RFaG56TUgyY2o2WTV5bVB1Q09MTU5lNXFyVXpRbDhvUkx6SUJ6RlZNWmx3VVlsMmJvc3JPSXhRYllGN1dWUVd2b1Z4RVQxWUlnRG0zTnp6T0xBNXVIN0NLTzBzbnNobU1GQ0RPWkVldzQxR2pLaDNQZ3grbmJBZ3VQOVpRUGZxU2FmRW1DM0NOLzR5RHNKcktyaVJuaVpKbzlqUy80TExzUkt3QjdIQVpIem9GOUxMN3RTWkgzaHRhTkd0YmRUa3haMVR6U1QzTWIyVlBTenNadlFEb2NYVVZPbUpPdTBvMjlhT1krR2tHL0c0UkNLMEZCV1FIRVV2QzUxVFJEUzVrOGphZDBPMU1vYmpRYzZiMThkK2Z1b1ZGZE5mWndHSCt1RnVkdFB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ndpbkFtdAIAAAAAAgAAAAACAAAAAAQAAAAGcmVmdW5kCQAAZQAAAAIFAAAABnBheUFtdAkAAGkAAAACCQAAaAAAAAIFAAAABnBheUFtdAUAAAALRkVFV0FWRVNCRVQAAAAAAAAAAGQEAAAACWFkclJlZnVuZAkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQkAAZsAAAABBQAAAApwYVB1YktleTU4BAAAAAhyZWZUb2tlbgkBAAAACVR5cGVUb2tlbgAAAAEFAAAACHBheVR5cGVBCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAGZ2FtZUlkBQAAAA5uZXdHYW1lRGF0YVN0cgUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAACWFkclJlZnVuZAUAAAAGcmVmdW5kBQAAAAhyZWZUb2tlbgUAAAADbmlsAAAAABFps70=", "chainId": 84, "height": 737624, "spentComplexity": 0 } View: original | compacted Prev: CSmMhCBT2QSKv9kBb6gAT7evvRvN9QGSr2SkYiMDci11 Next: GMbPSk3Z9idYFohU2phfuwYk5cgP5ku8mZqFrKAER3dx Diff:
Old | New | Differences | |
---|---|---|---|
21 | 21 | ||
22 | 22 | let j = "CANCELED" | |
23 | 23 | ||
24 | - | let k = | |
24 | + | let k = 4 | |
25 | 25 | ||
26 | - | let l = | |
26 | + | let l = 2 | |
27 | 27 | ||
28 | - | let m = | |
28 | + | let m = 0 | |
29 | 29 | ||
30 | - | let n = | |
30 | + | let n = 1 | |
31 | 31 | ||
32 | - | let o = | |
32 | + | let o = 2 | |
33 | 33 | ||
34 | - | let p = | |
34 | + | let p = 3 | |
35 | 35 | ||
36 | - | let q = | |
36 | + | let q = 4 | |
37 | 37 | ||
38 | - | let r = | |
38 | + | let r = 5 | |
39 | 39 | ||
40 | - | let s = | |
40 | + | let s = 6 | |
41 | 41 | ||
42 | - | let t = | |
42 | + | let t = 7 | |
43 | 43 | ||
44 | - | let u = | |
44 | + | let u = 8 | |
45 | 45 | ||
46 | - | let v = 6 | |
47 | - | ||
48 | - | let w = 7 | |
49 | - | ||
50 | - | let x = 8 | |
51 | - | ||
52 | - | func y () = { | |
53 | - | let z = { | |
54 | - | let A = getInteger(this, b) | |
55 | - | if ($isInstanceOf(A, "Int")) | |
46 | + | func v () = { | |
47 | + | let w = { | |
48 | + | let x = getInteger(this, b) | |
49 | + | if ($isInstanceOf(x, "Int")) | |
56 | 50 | then { | |
57 | - | let | |
58 | - | | |
51 | + | let y = x | |
52 | + | y | |
59 | 53 | } | |
60 | 54 | else 0 | |
61 | 55 | } | |
62 | - | ( | |
56 | + | (w + 1) | |
63 | 57 | } | |
64 | 58 | ||
65 | 59 | ||
66 | - | func | |
67 | - | then ( | |
60 | + | func z (A,B) = if (if ((A != "RED")) | |
61 | + | then (A != "BLUE") | |
68 | 62 | else false) | |
69 | 63 | then throw("Invalid play, change your play to RED or BLUE.") | |
70 | - | else if (if ((n > E)) | |
71 | - | then true | |
72 | - | else (E > o)) | |
73 | - | then throw(((("Bet amount is not in range: minBet=" + toString((n / 100000000))) + " maxBet=") + toString((o / 100000000)))) | |
74 | - | else ((((E * 2) / 100000) * (100 - (l + m))) / 100) | |
64 | + | else ((((B * 2) / 100000) * (100 - (k + l))) / 100) | |
75 | 65 | ||
76 | 66 | ||
77 | - | func | |
78 | - | let | |
79 | - | if ($isInstanceOf( | |
67 | + | func C () = { | |
68 | + | let x = getInteger(this, c) | |
69 | + | if ($isInstanceOf(x, "Int")) | |
80 | 70 | then { | |
81 | - | let | |
82 | - | | |
71 | + | let D = x | |
72 | + | D | |
83 | 73 | } | |
84 | 74 | else 0 | |
85 | 75 | } | |
86 | 76 | ||
87 | 77 | ||
88 | - | func | |
89 | - | let | |
90 | - | let | |
91 | - | if (( | |
78 | + | func E (F) = { | |
79 | + | let G = (C() + F) | |
80 | + | let H = wavesBalance(this) | |
81 | + | if ((G > H)) | |
92 | 82 | then throw("Insufficient funds on Waves Rider account. Transaction was rejected for your safety.") | |
93 | - | else | |
83 | + | else G | |
94 | 84 | } | |
95 | 85 | ||
96 | 86 | ||
97 | - | func | |
98 | - | let | |
99 | - | if (( | |
87 | + | func I (J) = { | |
88 | + | let K = size(J) | |
89 | + | if ((K == 0)) | |
100 | 90 | then throw("Parameter size must be greater then 0.") | |
101 | - | else if (( | |
91 | + | else if ((K > 99)) | |
102 | 92 | then throw("Parameter size must be less then 100.") | |
103 | - | else if ((10 > | |
104 | - | then (("0" + toString( | |
105 | - | else (toString( | |
93 | + | else if ((10 > K)) | |
94 | + | then (("0" + toString(K)) + J) | |
95 | + | else (toString(K) + J) | |
106 | 96 | } | |
107 | 97 | ||
108 | 98 | ||
109 | - | func | |
110 | - | let | |
111 | - | if (if (if (( | |
112 | - | then ( | |
99 | + | func L (M,N,O,P,Q,F,R,S,T) = { | |
100 | + | let U = ((((((((((I(M) + "_") + I(N)) + "_") + I(O)) + "_") + I(P)) + "_") + I(toString(Q))) + "_") + I(toString(F))) | |
101 | + | if (if (if ((R == "")) | |
102 | + | then (S == "") | |
113 | 103 | else false) | |
114 | - | then ( | |
104 | + | then (T == "") | |
115 | 105 | else false) | |
116 | - | then | |
117 | - | else if (if (if (( | |
118 | - | then ( | |
106 | + | then U | |
107 | + | else if (if (if ((R != "")) | |
108 | + | then (S != "") | |
119 | 109 | else false) | |
120 | - | then ( | |
110 | + | then (T == "") | |
121 | 111 | else false) | |
122 | - | then ((( | |
123 | - | else (((( | |
112 | + | then (((U + "_") + (I(R) + "_")) + (I(S) + "_")) | |
113 | + | else ((((U + "_") + (I(R) + "_")) + (I(S) + "_")) + I(T)) | |
124 | 114 | } | |
125 | 115 | ||
126 | 116 | ||
127 | - | func | |
128 | - | then drop( | |
129 | - | else | |
117 | + | func V (W) = if ((size(W) > 0)) | |
118 | + | then drop(W, 1) | |
119 | + | else W | |
130 | 120 | ||
131 | 121 | ||
132 | - | func | |
133 | - | let | |
134 | - | if (( | |
122 | + | func X (W) = { | |
123 | + | let K = size(W) | |
124 | + | if ((K > 0)) | |
135 | 125 | then { | |
136 | - | let | |
137 | - | let | |
138 | - | let | |
139 | - | let | |
140 | - | [ | |
126 | + | let Y = parseIntValue(take(W, 2)) | |
127 | + | let Z = take(drop(W, 2), Y) | |
128 | + | let aa = drop(W, (Y + 2)) | |
129 | + | let ab = V(aa) | |
130 | + | [Z, ab] | |
141 | 131 | } | |
142 | 132 | else throw("Empty string was passed into parseNextAttribute func") | |
143 | 133 | } | |
144 | 134 | ||
145 | 135 | ||
146 | - | func | |
147 | - | let | |
148 | - | let | |
149 | - | let | |
150 | - | let | |
151 | - | let | |
152 | - | let | |
153 | - | [ | |
136 | + | func ac (ad) = { | |
137 | + | let M = X(ad) | |
138 | + | let ae = X(M[1]) | |
139 | + | let O = X(ae[1]) | |
140 | + | let af = X(O[1]) | |
141 | + | let ag = X(af[1]) | |
142 | + | let F = X(ag[1]) | |
143 | + | [M[0], ae[0], O[0], af[0], ag[0], F[0]] | |
154 | 144 | } | |
155 | 145 | ||
156 | 146 | ||
157 | - | func | |
158 | - | let | |
159 | - | let | |
160 | - | if ($isInstanceOf( | |
147 | + | func ah (ai) = { | |
148 | + | let aj = { | |
149 | + | let x = getString(this, ai) | |
150 | + | if ($isInstanceOf(x, "String")) | |
161 | 151 | then { | |
162 | - | let | |
163 | - | | |
152 | + | let ak = x | |
153 | + | ak | |
164 | 154 | } | |
165 | - | else throw(("Couldn't find game by " + | |
155 | + | else throw(("Couldn't find game by " + ai)) | |
166 | 156 | } | |
167 | - | | |
157 | + | ac(aj) | |
168 | 158 | } | |
169 | 159 | ||
170 | 160 | ||
171 | - | func | |
161 | + | func al (J) = if ((J.assetId == assetInfo(base58'WAVES'))) | |
172 | 162 | then "WAVES" | |
173 | 163 | else "WBET" | |
174 | 164 | ||
175 | 165 | ||
176 | - | func ap (aq) = if ((aq == "RED")) | |
166 | + | func am (K) = if ((K == "WAVES")) | |
167 | + | then unit | |
168 | + | else d | |
169 | + | ||
170 | + | ||
171 | + | func an (ao) = if ((ao == "RED")) | |
177 | 172 | then "BLUE" | |
178 | 173 | else "RED" | |
179 | 174 | ||
180 | 175 | ||
181 | - | @Callable( | |
182 | - | func playCoin ( | |
183 | - | let | |
184 | - | let | |
185 | - | let | |
186 | - | let | |
187 | - | let | |
188 | - | if (if (( | |
189 | - | then ( | |
176 | + | @Callable(ap) | |
177 | + | func playCoin (aq) = { | |
178 | + | let ai = toBase58String(ap.transactionId) | |
179 | + | let ar = extract(ap.payment) | |
180 | + | let as = isDefined(ap.feeAssetId) | |
181 | + | let at = isDefined(getString(this, ai)) | |
182 | + | let F = z(aq, ar.amount) | |
183 | + | if (if ((ar.assetId != assetInfo(base58'WAVES'))) | |
184 | + | then (ar.assetId != d) | |
190 | 185 | else false) | |
191 | 186 | then throw("Payment should be in Wavesbet or Waves") | |
192 | - | else if ( | |
187 | + | else if (as) | |
193 | 188 | then throw("Transaction's fee must be in Waves. Game aborted.") | |
194 | - | else if ( | |
189 | + | else if (at) | |
195 | 190 | then throw("Passed gameId had been used before. Game aborted.") | |
196 | 191 | else { | |
197 | - | let | |
198 | - | let | |
199 | - | let | |
200 | - | let | |
201 | - | ScriptResult(WriteSet([DataEntry(c, | |
192 | + | let au = v() | |
193 | + | let O = toBase58String(ap.callerPublicKey) | |
194 | + | let P = al(ar) | |
195 | + | let av = L(g, aq, O, P, ar.amount, F, "", "", "") | |
196 | + | ScriptResult(WriteSet([DataEntry(c, E(F)), DataEntry(b, au), DataEntry(ai, av)]), TransferSet([ScriptTransfer(e, ((ar.amount * k) / 100), d), ScriptTransfer(this, 500000, unit)])) | |
202 | 197 | } | |
203 | 198 | } | |
204 | 199 | ||
205 | 200 | ||
206 | 201 | ||
207 | - | @Callable( | |
208 | - | func acceptChallenge ( | |
209 | - | let | |
210 | - | let | |
211 | - | let | |
212 | - | let | |
213 | - | let | |
214 | - | let | |
215 | - | let | |
216 | - | if (if (( | |
217 | - | then ( | |
202 | + | @Callable(ap) | |
203 | + | func acceptChallenge (ai) = { | |
204 | + | let ar = extract(ap.payment) | |
205 | + | let as = isDefined(ap.feeAssetId) | |
206 | + | let aw = al(ar) | |
207 | + | let ax = ah(ai) | |
208 | + | let M = ax[m] | |
209 | + | let ay = ax[p] | |
210 | + | let az = parseIntValue(ax[q]) | |
211 | + | if (if ((ar.assetId != assetInfo(base58'WAVES'))) | |
212 | + | then (ar.assetId != d) | |
218 | 213 | else false) | |
219 | 214 | then throw("Payment should be in Wavesbet or Waves") | |
220 | - | else if ( | |
215 | + | else if (as) | |
221 | 216 | then throw("Transaction's fee must be in Waves. Game aborted.") | |
222 | - | else if (( | |
217 | + | else if ((aw != ay)) | |
223 | 218 | then throw("Payment must be made in the same currency token as the bet, WBET/WBET or WAVES/WAVES.") | |
224 | - | else if (( | |
219 | + | else if ((ar.amount == az)) | |
225 | 220 | then throw("Payout must be equal to the bet amount.") | |
226 | - | else if (( | |
221 | + | else if ((M != g)) | |
227 | 222 | then throw("Invalid game state for passed gameId") | |
228 | 223 | else { | |
229 | - | let | |
230 | - | let | |
231 | - | let | |
232 | - | let | |
233 | - | let | |
234 | - | let | |
235 | - | ScriptResult(WriteSet([DataEntry( | |
224 | + | let aq = ax[n] | |
225 | + | let aA = ax[o] | |
226 | + | let F = parseIntValue(ax[r]) | |
227 | + | let aB = an(aq) | |
228 | + | let aC = toBase58String(ap.callerPublicKey) | |
229 | + | let aD = L(h, aq, aA, ay, az, F, aB, aC, "") | |
230 | + | ScriptResult(WriteSet([DataEntry(ai, aD)]), TransferSet([ScriptTransfer(e, ((ar.amount * k) / 100), d), ScriptTransfer(this, 500000, unit)])) | |
236 | 231 | } | |
232 | + | } | |
233 | + | ||
234 | + | ||
235 | + | ||
236 | + | @Callable(ap) | |
237 | + | func cancelChallenge (ai) = { | |
238 | + | let as = isDefined(ap.feeAssetId) | |
239 | + | let ax = ah(ai) | |
240 | + | let M = ax[m] | |
241 | + | if (as) | |
242 | + | then throw("Transaction's fee must be in Waves. Game aborted.") | |
243 | + | else if ((M != g)) | |
244 | + | then throw("Invalid game state for passed gameId") | |
245 | + | else { | |
246 | + | let aq = ax[n] | |
247 | + | let aA = ax[o] | |
248 | + | let F = parseIntValue(ax[r]) | |
249 | + | let ay = ax[p] | |
250 | + | let az = parseIntValue(ax[q]) | |
251 | + | let aD = L(j, aq, aA, ay, az, F, "", "", "") | |
252 | + | let aE = (az - ((az * k) / 100)) | |
253 | + | let aF = addressFromPublicKey(toBytes(aA)) | |
254 | + | let aG = am(ay) | |
255 | + | ScriptResult(WriteSet([DataEntry(ai, aD)]), TransferSet([ScriptTransfer(aF, aE, aG)])) | |
256 | + | } | |
237 | 257 | } | |
238 | 258 | ||
239 | 259 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = fromBase64String("base64:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmOlRBTYEO3H7Y9rBmoFQFn4392Px0Qw13DsdEhnzMH2cj6Y5ymPuCOLMNe5qrUzQl8oRLzIBzFVMZlwUYl2bosrOIxQbYF7WVQWvoVxET1YIgDm3NzzOLA5uH7CKO0snshmMFCDOZEew41GjKh3Pgx+nbAguP9ZQPfqSafEmC3CN/4yDsJrKriRniZJo9jS/4LLsRKwB7HAZHzoF9LL7tSZH3htaNGtbdTkxZ1TzST3Mb2VPSzsZvQDocXUVOmJOu0o29aOY+GkG/G4RCK0FBWQHEUvC51TRDS5k8jad0O1MobjQc6b18d+fuoVFdNfZwGH+uFudtPG3UJTf2mkzZQIDAQAB") | |
5 | 5 | ||
6 | 6 | let b = "$GAME_NUM" | |
7 | 7 | ||
8 | 8 | let c = "$RESERVED_AMOUNT" | |
9 | 9 | ||
10 | 10 | let d = base58'23vgV9p9pD83A7CFbsDEc4zjanep7UeFo4ZRS6oGorhv' | |
11 | 11 | ||
12 | 12 | let e = Address(base58'3N2tusqAtDctK8iSTXS6F9rimmftmSuwLUX') | |
13 | 13 | ||
14 | 14 | let f = Address(base58'') | |
15 | 15 | ||
16 | 16 | let g = "SUBMITTED" | |
17 | 17 | ||
18 | 18 | let h = "WAITING" | |
19 | 19 | ||
20 | 20 | let i = "FINISHED" | |
21 | 21 | ||
22 | 22 | let j = "CANCELED" | |
23 | 23 | ||
24 | - | let k = | |
24 | + | let k = 4 | |
25 | 25 | ||
26 | - | let l = | |
26 | + | let l = 2 | |
27 | 27 | ||
28 | - | let m = | |
28 | + | let m = 0 | |
29 | 29 | ||
30 | - | let n = | |
30 | + | let n = 1 | |
31 | 31 | ||
32 | - | let o = | |
32 | + | let o = 2 | |
33 | 33 | ||
34 | - | let p = | |
34 | + | let p = 3 | |
35 | 35 | ||
36 | - | let q = | |
36 | + | let q = 4 | |
37 | 37 | ||
38 | - | let r = | |
38 | + | let r = 5 | |
39 | 39 | ||
40 | - | let s = | |
40 | + | let s = 6 | |
41 | 41 | ||
42 | - | let t = | |
42 | + | let t = 7 | |
43 | 43 | ||
44 | - | let u = | |
44 | + | let u = 8 | |
45 | 45 | ||
46 | - | let v = 6 | |
47 | - | ||
48 | - | let w = 7 | |
49 | - | ||
50 | - | let x = 8 | |
51 | - | ||
52 | - | func y () = { | |
53 | - | let z = { | |
54 | - | let A = getInteger(this, b) | |
55 | - | if ($isInstanceOf(A, "Int")) | |
46 | + | func v () = { | |
47 | + | let w = { | |
48 | + | let x = getInteger(this, b) | |
49 | + | if ($isInstanceOf(x, "Int")) | |
56 | 50 | then { | |
57 | - | let | |
58 | - | | |
51 | + | let y = x | |
52 | + | y | |
59 | 53 | } | |
60 | 54 | else 0 | |
61 | 55 | } | |
62 | - | ( | |
56 | + | (w + 1) | |
63 | 57 | } | |
64 | 58 | ||
65 | 59 | ||
66 | - | func | |
67 | - | then ( | |
60 | + | func z (A,B) = if (if ((A != "RED")) | |
61 | + | then (A != "BLUE") | |
68 | 62 | else false) | |
69 | 63 | then throw("Invalid play, change your play to RED or BLUE.") | |
70 | - | else if (if ((n > E)) | |
71 | - | then true | |
72 | - | else (E > o)) | |
73 | - | then throw(((("Bet amount is not in range: minBet=" + toString((n / 100000000))) + " maxBet=") + toString((o / 100000000)))) | |
74 | - | else ((((E * 2) / 100000) * (100 - (l + m))) / 100) | |
64 | + | else ((((B * 2) / 100000) * (100 - (k + l))) / 100) | |
75 | 65 | ||
76 | 66 | ||
77 | - | func | |
78 | - | let | |
79 | - | if ($isInstanceOf( | |
67 | + | func C () = { | |
68 | + | let x = getInteger(this, c) | |
69 | + | if ($isInstanceOf(x, "Int")) | |
80 | 70 | then { | |
81 | - | let | |
82 | - | | |
71 | + | let D = x | |
72 | + | D | |
83 | 73 | } | |
84 | 74 | else 0 | |
85 | 75 | } | |
86 | 76 | ||
87 | 77 | ||
88 | - | func | |
89 | - | let | |
90 | - | let | |
91 | - | if (( | |
78 | + | func E (F) = { | |
79 | + | let G = (C() + F) | |
80 | + | let H = wavesBalance(this) | |
81 | + | if ((G > H)) | |
92 | 82 | then throw("Insufficient funds on Waves Rider account. Transaction was rejected for your safety.") | |
93 | - | else | |
83 | + | else G | |
94 | 84 | } | |
95 | 85 | ||
96 | 86 | ||
97 | - | func | |
98 | - | let | |
99 | - | if (( | |
87 | + | func I (J) = { | |
88 | + | let K = size(J) | |
89 | + | if ((K == 0)) | |
100 | 90 | then throw("Parameter size must be greater then 0.") | |
101 | - | else if (( | |
91 | + | else if ((K > 99)) | |
102 | 92 | then throw("Parameter size must be less then 100.") | |
103 | - | else if ((10 > | |
104 | - | then (("0" + toString( | |
105 | - | else (toString( | |
93 | + | else if ((10 > K)) | |
94 | + | then (("0" + toString(K)) + J) | |
95 | + | else (toString(K) + J) | |
106 | 96 | } | |
107 | 97 | ||
108 | 98 | ||
109 | - | func | |
110 | - | let | |
111 | - | if (if (if (( | |
112 | - | then ( | |
99 | + | func L (M,N,O,P,Q,F,R,S,T) = { | |
100 | + | let U = ((((((((((I(M) + "_") + I(N)) + "_") + I(O)) + "_") + I(P)) + "_") + I(toString(Q))) + "_") + I(toString(F))) | |
101 | + | if (if (if ((R == "")) | |
102 | + | then (S == "") | |
113 | 103 | else false) | |
114 | - | then ( | |
104 | + | then (T == "") | |
115 | 105 | else false) | |
116 | - | then | |
117 | - | else if (if (if (( | |
118 | - | then ( | |
106 | + | then U | |
107 | + | else if (if (if ((R != "")) | |
108 | + | then (S != "") | |
119 | 109 | else false) | |
120 | - | then ( | |
110 | + | then (T == "") | |
121 | 111 | else false) | |
122 | - | then ((( | |
123 | - | else (((( | |
112 | + | then (((U + "_") + (I(R) + "_")) + (I(S) + "_")) | |
113 | + | else ((((U + "_") + (I(R) + "_")) + (I(S) + "_")) + I(T)) | |
124 | 114 | } | |
125 | 115 | ||
126 | 116 | ||
127 | - | func | |
128 | - | then drop( | |
129 | - | else | |
117 | + | func V (W) = if ((size(W) > 0)) | |
118 | + | then drop(W, 1) | |
119 | + | else W | |
130 | 120 | ||
131 | 121 | ||
132 | - | func | |
133 | - | let | |
134 | - | if (( | |
122 | + | func X (W) = { | |
123 | + | let K = size(W) | |
124 | + | if ((K > 0)) | |
135 | 125 | then { | |
136 | - | let | |
137 | - | let | |
138 | - | let | |
139 | - | let | |
140 | - | [ | |
126 | + | let Y = parseIntValue(take(W, 2)) | |
127 | + | let Z = take(drop(W, 2), Y) | |
128 | + | let aa = drop(W, (Y + 2)) | |
129 | + | let ab = V(aa) | |
130 | + | [Z, ab] | |
141 | 131 | } | |
142 | 132 | else throw("Empty string was passed into parseNextAttribute func") | |
143 | 133 | } | |
144 | 134 | ||
145 | 135 | ||
146 | - | func | |
147 | - | let | |
148 | - | let | |
149 | - | let | |
150 | - | let | |
151 | - | let | |
152 | - | let | |
153 | - | [ | |
136 | + | func ac (ad) = { | |
137 | + | let M = X(ad) | |
138 | + | let ae = X(M[1]) | |
139 | + | let O = X(ae[1]) | |
140 | + | let af = X(O[1]) | |
141 | + | let ag = X(af[1]) | |
142 | + | let F = X(ag[1]) | |
143 | + | [M[0], ae[0], O[0], af[0], ag[0], F[0]] | |
154 | 144 | } | |
155 | 145 | ||
156 | 146 | ||
157 | - | func | |
158 | - | let | |
159 | - | let | |
160 | - | if ($isInstanceOf( | |
147 | + | func ah (ai) = { | |
148 | + | let aj = { | |
149 | + | let x = getString(this, ai) | |
150 | + | if ($isInstanceOf(x, "String")) | |
161 | 151 | then { | |
162 | - | let | |
163 | - | | |
152 | + | let ak = x | |
153 | + | ak | |
164 | 154 | } | |
165 | - | else throw(("Couldn't find game by " + | |
155 | + | else throw(("Couldn't find game by " + ai)) | |
166 | 156 | } | |
167 | - | | |
157 | + | ac(aj) | |
168 | 158 | } | |
169 | 159 | ||
170 | 160 | ||
171 | - | func | |
161 | + | func al (J) = if ((J.assetId == assetInfo(base58'WAVES'))) | |
172 | 162 | then "WAVES" | |
173 | 163 | else "WBET" | |
174 | 164 | ||
175 | 165 | ||
176 | - | func ap (aq) = if ((aq == "RED")) | |
166 | + | func am (K) = if ((K == "WAVES")) | |
167 | + | then unit | |
168 | + | else d | |
169 | + | ||
170 | + | ||
171 | + | func an (ao) = if ((ao == "RED")) | |
177 | 172 | then "BLUE" | |
178 | 173 | else "RED" | |
179 | 174 | ||
180 | 175 | ||
181 | - | @Callable( | |
182 | - | func playCoin ( | |
183 | - | let | |
184 | - | let | |
185 | - | let | |
186 | - | let | |
187 | - | let | |
188 | - | if (if (( | |
189 | - | then ( | |
176 | + | @Callable(ap) | |
177 | + | func playCoin (aq) = { | |
178 | + | let ai = toBase58String(ap.transactionId) | |
179 | + | let ar = extract(ap.payment) | |
180 | + | let as = isDefined(ap.feeAssetId) | |
181 | + | let at = isDefined(getString(this, ai)) | |
182 | + | let F = z(aq, ar.amount) | |
183 | + | if (if ((ar.assetId != assetInfo(base58'WAVES'))) | |
184 | + | then (ar.assetId != d) | |
190 | 185 | else false) | |
191 | 186 | then throw("Payment should be in Wavesbet or Waves") | |
192 | - | else if ( | |
187 | + | else if (as) | |
193 | 188 | then throw("Transaction's fee must be in Waves. Game aborted.") | |
194 | - | else if ( | |
189 | + | else if (at) | |
195 | 190 | then throw("Passed gameId had been used before. Game aborted.") | |
196 | 191 | else { | |
197 | - | let | |
198 | - | let | |
199 | - | let | |
200 | - | let | |
201 | - | ScriptResult(WriteSet([DataEntry(c, | |
192 | + | let au = v() | |
193 | + | let O = toBase58String(ap.callerPublicKey) | |
194 | + | let P = al(ar) | |
195 | + | let av = L(g, aq, O, P, ar.amount, F, "", "", "") | |
196 | + | ScriptResult(WriteSet([DataEntry(c, E(F)), DataEntry(b, au), DataEntry(ai, av)]), TransferSet([ScriptTransfer(e, ((ar.amount * k) / 100), d), ScriptTransfer(this, 500000, unit)])) | |
202 | 197 | } | |
203 | 198 | } | |
204 | 199 | ||
205 | 200 | ||
206 | 201 | ||
207 | - | @Callable( | |
208 | - | func acceptChallenge ( | |
209 | - | let | |
210 | - | let | |
211 | - | let | |
212 | - | let | |
213 | - | let | |
214 | - | let | |
215 | - | let | |
216 | - | if (if (( | |
217 | - | then ( | |
202 | + | @Callable(ap) | |
203 | + | func acceptChallenge (ai) = { | |
204 | + | let ar = extract(ap.payment) | |
205 | + | let as = isDefined(ap.feeAssetId) | |
206 | + | let aw = al(ar) | |
207 | + | let ax = ah(ai) | |
208 | + | let M = ax[m] | |
209 | + | let ay = ax[p] | |
210 | + | let az = parseIntValue(ax[q]) | |
211 | + | if (if ((ar.assetId != assetInfo(base58'WAVES'))) | |
212 | + | then (ar.assetId != d) | |
218 | 213 | else false) | |
219 | 214 | then throw("Payment should be in Wavesbet or Waves") | |
220 | - | else if ( | |
215 | + | else if (as) | |
221 | 216 | then throw("Transaction's fee must be in Waves. Game aborted.") | |
222 | - | else if (( | |
217 | + | else if ((aw != ay)) | |
223 | 218 | then throw("Payment must be made in the same currency token as the bet, WBET/WBET or WAVES/WAVES.") | |
224 | - | else if (( | |
219 | + | else if ((ar.amount == az)) | |
225 | 220 | then throw("Payout must be equal to the bet amount.") | |
226 | - | else if (( | |
221 | + | else if ((M != g)) | |
227 | 222 | then throw("Invalid game state for passed gameId") | |
228 | 223 | else { | |
229 | - | let | |
230 | - | let | |
231 | - | let | |
232 | - | let | |
233 | - | let | |
234 | - | let | |
235 | - | ScriptResult(WriteSet([DataEntry( | |
224 | + | let aq = ax[n] | |
225 | + | let aA = ax[o] | |
226 | + | let F = parseIntValue(ax[r]) | |
227 | + | let aB = an(aq) | |
228 | + | let aC = toBase58String(ap.callerPublicKey) | |
229 | + | let aD = L(h, aq, aA, ay, az, F, aB, aC, "") | |
230 | + | ScriptResult(WriteSet([DataEntry(ai, aD)]), TransferSet([ScriptTransfer(e, ((ar.amount * k) / 100), d), ScriptTransfer(this, 500000, unit)])) | |
236 | 231 | } | |
232 | + | } | |
233 | + | ||
234 | + | ||
235 | + | ||
236 | + | @Callable(ap) | |
237 | + | func cancelChallenge (ai) = { | |
238 | + | let as = isDefined(ap.feeAssetId) | |
239 | + | let ax = ah(ai) | |
240 | + | let M = ax[m] | |
241 | + | if (as) | |
242 | + | then throw("Transaction's fee must be in Waves. Game aborted.") | |
243 | + | else if ((M != g)) | |
244 | + | then throw("Invalid game state for passed gameId") | |
245 | + | else { | |
246 | + | let aq = ax[n] | |
247 | + | let aA = ax[o] | |
248 | + | let F = parseIntValue(ax[r]) | |
249 | + | let ay = ax[p] | |
250 | + | let az = parseIntValue(ax[q]) | |
251 | + | let aD = L(j, aq, aA, ay, az, F, "", "", "") | |
252 | + | let aE = (az - ((az * k) / 100)) | |
253 | + | let aF = addressFromPublicKey(toBytes(aA)) | |
254 | + | let aG = am(ay) | |
255 | + | ScriptResult(WriteSet([DataEntry(ai, aD)]), TransferSet([ScriptTransfer(aF, aE, aG)])) | |
256 | + | } | |
237 | 257 | } | |
238 | 258 | ||
239 | 259 |
github/deemru/w8io/169f3d6 124.60 ms ◑