tx · BFtHo5qJAoL9W1g44otAcvNheoCQPH6bBKRkTAatuGcc

3N4boZRUJ2LxY5jLyp6hmxGktqnawQidu6H:  -0.01000000 Waves

2023.01.10 16:32 [2398904] smart account 3N4boZRUJ2LxY5jLyp6hmxGktqnawQidu6H > SELF 0.00000000 Waves

{ "type": 13, "id": "BFtHo5qJAoL9W1g44otAcvNheoCQPH6bBKRkTAatuGcc", "fee": 1000000, "feeAssetId": null, "timestamp": 1673357533656, "version": 2, "chainId": 84, "sender": "3N4boZRUJ2LxY5jLyp6hmxGktqnawQidu6H", "senderPublicKey": "BDeCphaaC4MZvfmbJqQZ78EvuEBZTJ1VEW7fbxue8BUu", "proofs": [ "4hwKxXFvrWVTPe6GQkLCHoeNeMwFRiDcZk2jVPs6kLgKTmGtZq6YniAaeU735jEgTLHwqcDcCGkkcxka7UViKfcX" ], "script": "base64:BgKjBwgCEgkKBwgIAQgICAESBAoCAQESACIJc2VwYXJhdG9yIgdrR29hbFAxIgdrR29hbFAyIgtrRGVmbGVjdGlvbiIIa1ZlcnRleDEiCGtWZXJ0ZXgyIghrVmVydGV4MyIHa01heEJldCIJcmFuZG9taXplIgVieXRlcyIFcmFuZ2UiBGhhc2giBWluZGV4IghnZXRQb2ludCIBeCIBeSIRZ2V0R29hbExpbmVQb2ludHMiAnAxIgJwMiINZ2V0RGVmbGVjdGlvbiIJZ2V0TWF4QmV0IhBnZXRQb2x5Z29uUG9pbnRzIgJwMyIHZ2V0TGluZSIBYSIBYiIBYyIMZ2V0T3J0aG9MaW5lIgRuVmVjIgZnZXRWZWMiBXN0YXJ0IgNlbmQiCm11bFZlY3RvcnMiAnZBIgJ2QiINZ2V0TGluZUxlbmd0aCILY2FsY0Nyb3NzZXMiBWFjY3VtIgluZXh0VmFsdWUiBXZwMXAyIgV2cDFwMyIFdnAxcDQiBXZwM3A0IgV2cDNwMSIFdnAzcDIiAnYxIgJ2MiICdjMiAnY0Ighpc0luc2lkZSIIc2VnbWVudDEiCHNlZ21lbn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1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgCJWtfd", "height": 2398904, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DYFuVVcPjdoGKxuJm7q9scAnevLJVBChBQhqdgF9NwAT Next: BAVuciyzztPd55K4U4E4d8JoaVpQ2h7MxVJuz6xnoNRY Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "_"
55
66 let b = "goalP1"
77
88 let c = "goalP2"
99
1010 let d = "deflection"
1111
1212 let e = "vertex1"
1313
1414 let f = "vertex2"
1515
1616 let g = "vertex3"
1717
1818 let h = "maxBet"
1919
2020 func i (j,k) = {
2121 let l = sha256(j)
2222 let m = toInt(l)
2323 (m % k)
2424 }
2525
2626
2727 func n (j) = {
2828 let o = i(take(j, (size(j) / 2)), 100)
2929 let p = i(takeRight(j, (size(j) / 2)), 100)
3030 $Tuple2(o, p)
3131 }
3232
3333
3434 func q () = {
3535 let r = split(getStringValue(this, b), a)
3636 let s = split(getStringValue(this, c), a)
3737 $Tuple2($Tuple2(parseIntValue(r[0]), parseIntValue(r[1])), $Tuple2(parseIntValue(s[0]), parseIntValue(s[1])))
3838 }
3939
4040
4141 func t () = getIntegerValue(this, d)
4242
4343
4444 func u () = getIntegerValue(this, h)
4545
4646
4747 func v () = {
4848 let r = split(getStringValue(this, e), a)
4949 let s = split(getStringValue(this, f), a)
5050 let w = split(getStringValue(this, g), a)
5151 $Tuple3($Tuple2(parseIntValue(r[0]), parseIntValue(r[1])), $Tuple2(parseIntValue(s[0]), parseIntValue(s[1])), $Tuple2(parseIntValue(w[0]), parseIntValue(w[1])))
5252 }
5353
5454
5555 func x (r,s) = {
5656 let y = (s._2 - r._2)
5757 let z = (r._1 - s._1)
5858 let A = ((r._2 * (s._1 + r._1)) - (r._1 * (r._2 + s._2)))
5959 $Tuple3(y, z, A)
6060 }
6161
6262
6363 func B (r,C) = {
6464 let y = C._2
6565 let z = -(C._1)
6666 let A = ((C._1 * r._2) - (C._2 * r._1))
6767 $Tuple3(y, z, A)
6868 }
6969
7070
7171 func D (E,F) = {
7272 let o = (F._1 - E._1)
7373 let p = (F._2 - E._2)
7474 $Tuple2(o, p)
7575 }
7676
7777
7878 func G (H,I) = ((H._1 * I._2) - (H._2 * I._1))
7979
8080
8181 func J (r,s) = {
8282 let y = pow((s._1 - r._1), 0, 2, 0, 0, DOWN)
8383 let z = pow((s._2 - r._2), 0, 2, 0, 0, DOWN)
8484 sqrt((y + z), 0, 0, DOWN)
8585 }
8686
8787
8888 func K (L,M) = {
8989 let N = D(M[0]._1, M[0]._2)
9090 let O = D(M[0]._1, M[1]._1)
9191 let P = D(M[0]._1, M[1]._2)
9292 let Q = D(M[1]._1, M[1]._2)
9393 let R = D(M[1]._1, M[0]._1)
9494 let S = D(M[1]._1, M[0]._2)
9595 let T = G(Q, R)
9696 let U = G(Q, S)
9797 let V = G(N, O)
9898 let W = G(N, P)
9999 if (if ((0 > (T * U)))
100100 then (0 > (V * W))
101101 else false)
102102 then (L + 1)
103103 else L
104104 }
105105
106106
107107 func X (r,Y,Z,aa) = {
108108 let ab = $Tuple2(r, $Tuple2(r._1, 0))
109109 let ac = [[ab, Y], [ab, Z], [ab, aa]]
110110 let ad = {
111111 let ae = ac
112112 let af = size(ae)
113113 let ag = 0
114114 func ah (ai,aj) = if ((aj >= af))
115115 then ai
116116 else K(ai, ae[aj])
117117
118118 func ak (ai,aj) = if ((aj >= af))
119119 then ai
120120 else throw("List size exceeds 3")
121121
122122 ak(ah(ah(ah(ag, 0), 1), 2), 3)
123123 }
124124 ((ad % 2) == 1)
125125 }
126126
127127
128128 func al (r,am) = ((((r._1 * am._1) + (r._2 * am._2)) + am._3) == 0)
129129
130130
131131 func an (r,am) = {
132132 let ao = am
133133 let ap = ao._1
134134 let aq = ao._2
135135 let ar = ao._3
136136 let as = B(r, $Tuple2(ap, aq))
137137 let at = as._1
138138 let au = as._2
139139 let av = as._3
140140 let aw = G($Tuple2(ap, aq), $Tuple2(at, au))
141141 let ax = G($Tuple2(-(ar), aq), $Tuple2(-(av), au))
142142 let ay = G($Tuple2(ap, -(ar)), $Tuple2(at, -(av)))
143143 let az = fraction(1, ax, aw)
144144 let aA = fraction(1, ay, aw)
145145 let aB = J(r, $Tuple2(az, aA))
146146 (t() >= aB)
147147 }
148148
149149
150150 func aC (r,aD,aE,aF) = {
151151 let Y = $Tuple2(aD, aE)
152152 let Z = $Tuple2(aE, aF)
153153 let aa = $Tuple2(aF, aD)
154154 if (if (if ((r == aD))
155155 then true
156156 else (r == aE))
157157 then true
158158 else (r == aF))
159159 then true
160160 else X(r, Y, Z, aa)
161161 }
162162
163163
164164 func aG (aH,aI,aJ) = if (if (aH)
165165 then aI
166166 else false)
167167 then 10
168168 else if (if (aJ)
169169 then aI
170170 else false)
171171 then 8
172172 else if (aH)
173173 then 6
174174 else if (aI)
175175 then 4
176176 else if (aJ)
177177 then 2
178178 else 1
179179
180180
181181 func aK (aL,aM) = if (if ((aL == unit))
182182 then (u() >= aM)
183183 else false)
184184 then unit
185185 else throw("Incorrect payment")
186186
187187
188188 @Callable(aN)
189189 func setLotteryParams (aO,aP,aQ,aD,aE,aF,aR) = [StringEntry(b, aO), StringEntry(c, aP), IntegerEntry(d, aQ), StringEntry(e, aD), StringEntry(f, aE), StringEntry(g, aF), IntegerEntry(h, aR)]
190190
191191
192192
193193 @Callable(aN)
194194 func tryToWin (aS,aT) = {
195195 let aU = $Tuple2(aN.payments[0].assetId, value(aN.payments[0].amount))
196196 let aL = aU._1
197197 let aM = aU._2
198198 valueOrElse(aK(aL, aM), {
199199 let r = $Tuple2(aS, aT)
200200 let aV = q()
201201 let s = aV._1
202202 let w = aV._2
203203 let aW = v()
204204 let aX = aW._1
205205 let aY = aW._2
206206 let aZ = aW._3
207207 let ba = x(s, w)
208208 let ap = ba._1
209209 let aq = ba._2
210210 let ar = ba._3
211211 let aH = al(r, $Tuple3(ap, aq, ar))
212212 let aI = aC(r, aX, aY, aZ)
213213 let aJ = an(r, $Tuple3(ap, aq, ar))
214214 if (if (if (aH)
215215 then true
216216 else aJ)
217217 then true
218218 else aI)
219219 then {
220220 let bb = aG(aH, aI, aJ)
221221 let bc = (aM * bb)
222222 [IntegerEntry("multiplier", bb), ScriptTransfer(aN.originCaller, bc, unit)]
223223 }
224224 else nil
225225 })
226226 }
227227
228228
229229
230230 @Callable(aN)
231231 func startGame () = {
232232 let r = n(aN.transactionId)
233233 let bd = invoke(this, "tryToWin", [r._1, r._2], [aN.payments[0]])
234234 if ((bd == bd))
235235 then nil
236236 else throw("Strict value is not equal to itself.")
237237 }
238238
239239

github/deemru/w8io/169f3d6 
62.27 ms