tx · FTM676SsWURMh2DGwLBgsGcUQZ9iReZdyqhHzSh5hYtR

3N3nfqFcxXfd3T18V9icDdh58MJ9wQ2k2xx:  -0.01100000 Waves

2023.08.29 12:14 [2731794] smart account 3N3nfqFcxXfd3T18V9icDdh58MJ9wQ2k2xx > SELF 0.00000000 Waves

{ "type": 13, "id": "FTM676SsWURMh2DGwLBgsGcUQZ9iReZdyqhHzSh5hYtR", "fee": 1100000, "feeAssetId": null, "timestamp": 1693300546463, "version": 2, "chainId": 84, "sender": "3N3nfqFcxXfd3T18V9icDdh58MJ9wQ2k2xx", "senderPublicKey": "UGqkWsCpv7xRVXkQRXyLd6pWPDtYGXmPip7FxSd1pAu", "proofs": [ "W5xugA943qLnBWAnqek1F1fCr4da3xeEG13WWZRNGvoNthD7F1TLUJs4xSGjra3Zyzqn9Bj4aRdq16yGbvF327z" ], "script": "base64:BgIZCAISBgoEAQEBARIAEgASBAoCCAESAwoBATQAD0RFRkFVTFRMT0NBVElPTgIPQWZyaWNhX0ZfQWZyaWNhARRrZXlTdGFrZWREdWNrQnlPd25lcgEJb3duZXJBZGRyCQCsAgICEnN0YWtlZER1Y2tCeU93bmVyXwUJb3duZXJBZGRyAQ9rZXlEdWNrTG9jYXRpb24BC2R1Y2tBc3NldElkCQCsAgICDWR1Y2tMb2NhdGlvbl8FC2R1Y2tBc3NldElkAA1sYXN0VG91cklkS2V5Ag4lc19fbGFzdFRvdXJJZAEVa2V5VG91clN0YXRpY0RhdGFCeUlkAQN0SWQJAKwCAgIWJXMlZF9fdG91clN0YXRpY0RhdGFfXwkApAMBBQN0SWQBFmtleVRvdXJEeW5hbWljRGF0YUJ5SWQBA3RJZAkArAICAhclcyVkX190b3VyRHluYW1pY0RhdGFfXwkApAMBBQN0SWQBF2tleUFsbFJlZ2lzdHJhbnRzQnlUb3VyAQN0SWQJAKwCAgIWJXMlZF9fYWxsUmVnaXN0cmFudHNfXwkApAMBBQN0SWQACWlkeFN0YXRpYwAAAAppZHhEeW5hbWlj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a2V5VG91ckR5bmFtaWNEYXRhQnlJZAEFBmxhc3RJZAUSdXBkYXRlZER5bmFtaWNEYXRhBQNuaWwAAAFpARBmaW5pc2hUb3VybmFtZW50AQN0SWQEBmNhbGxlcgkApQgBCAUBaQZjYWxsZXIDCQEBIQEJAQ9jb250YWluc0VsZW1lbnQCBQphZG1pbnNMaXN0BQZjYWxsZXIJAAIBAhFQZXJtaXNzaW9uIGRlbmllZAQFdERhdGEJAQtnZXRUb3VyRGF0YQIFBHRoaXMFA3RJZAQHZHluYW1pYwkAkQMCBQV0RGF0YQUKaWR4RHluYW1pYwQGc3RhdHVzCQCRAwIFB2R5bmFtaWMFDnREeW5hbWljU3RhdHVzAwkAAAIFBnN0YXR1cwIIQVJDSElWRUQJAAIBCQCsAgIJAKwCAgILVG91cm5hbWVudCAJAKQDAQUDdElkAhQgaXMgYWxyZWFkeSBBUkNISVZFRAQSdXBkYXRlZER5bmFtaWNEYXRhCQELZHluYW1pY0RhdGEFAghBUkNISVZFRAkAkQMCBQdkeW5hbWljBQ90RHluYW1pY1dpbkR1Y2sJAQ1wYXJzZUludFZhbHVlAQkAkQMCBQdkeW5hbWljBRF0RHluYW1pY1dpblJlc3VsdAkBDXBhcnNlSW50VmFsdWUBCQCRAwIFB2R5bmFtaWMFFXREeW5hbWljVG90YWxSZWdDb3VudAkBDXBhcnNlSW50VmFsdWUBCQCRAwIFB2R5bmFtaWMFFXREeW5hbWljVG90YWxBdHRlbXB0cwkAlAoCCQDMCAIJAQtTdHJpbmdFbnRyeQIJARZrZXlUb3VyRHluYW1pY0RhdGFCeUlkAQUDdElkBRJ1cGRhdGVkRHluYW1pY0RhdGEFA25pbAAAAMX+AcQ=", "height": 2731794, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BTSgSJHAQ8HUMCNWHxd7XmWrSkvDCVfY46pyiYeuK1ju Next: A5CSo1mLr5WauaKk3Zqexpcnc11dpjzFhsAYFJHbjqQd Diff:
OldNewDifferences
3333
3434 let q = 2
3535
36-let r = 5
36+let r = 3
3737
38-let s = 6
38+let s = 5
3939
40-let t = 1
40+let t = 6
4141
42-let u = 2
42+let u = 1
4343
44-let v = 3
44+let v = 2
4545
46-let w = 4
46+let w = 3
4747
48-let x = 5
48+let x = 4
4949
50-let y = 0
50+let y = 5
5151
52-let z = 1
52+let z = 0
5353
54-let A = 2
54+let A = 1
5555
56-func B (e) = ("%s%s__lastRegisteredTourByDuck__" + e)
56+let B = 2
57+
58+func C (e) = ("%s%s__lastRegisteredTourByDuck__" + e)
5759
5860
59-func C (h,e) = makeString(["%s%d%s__isRegisteredByTourAndDuck", toString(h), e], "__")
61+func D (h,e) = makeString(["%s%d%s__isRegisteredByTourAndDuck", toString(h), e], "__")
6062
6163
62-func D (h,e) = makeString(["%s%d%s__lastAttemptByTourAndDuck", toString(h), e], "__")
64+func E (h,e) = makeString(["%s%d%s__lastAttemptByTourAndDuck", toString(h), e], "__")
6365
6466
65-func E (h,e) = makeString(["%s%d%s__bestResultByTourAndDuck", toString(h), e], "__")
67+func F (h,e) = makeString(["%s%d%s__bestResultByTourAndDuck", toString(h), e], "__")
6668
6769
68-let F = take(drop(this.bytes, 1), 1)
70+let G = take(drop(this.bytes, 1), 1)
6971
70-let G = {
71- let H = F
72- if ((base58'2W' == H))
72+let H = {
73+ let I = G
74+ if ((base58'2W' == I))
7375 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
74- else if ((base58'2T' == H))
76+ else if ((base58'2T' == I))
7577 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
7678 else throw("Unknown chain")
7779 }
7880
79-let I = "__"
81+let J = "__"
8082
81-func J (K,L) = valueOrErrorMessage(getString(K, L), makeString(["mandatory ", toString(K), ".", L, " is not defined"], ""))
83+func K (L,M) = valueOrErrorMessage(getString(L, M), makeString(["mandatory ", toString(L), ".", M, " is not defined"], ""))
8284
8385
84-let M = 1
86+let N = 1
8587
86-let N = 4
88+let O = 4
8789
88-func O () = "%s__restConfig"
90+func P () = "%s__restConfig"
8991
9092
91-func P () = "%s__restAddr"
93+func Q () = "%s__restAddr"
9294
9395
94-func Q (R) = split_4C(J(R, O()), I)
96+func R (S) = split_4C(K(S, P()), J)
9597
9698
97-func S (T,U) = valueOrErrorMessage(addressFromString(T[U]), ("Rest cfg doesn't contain address at index " + toString(U)))
99+func T (U,V) = valueOrErrorMessage(addressFromString(U[V]), ("Rest cfg doesn't contain address at index " + toString(V)))
98100
99101
100-let V = addressFromStringValue(valueOrElse(getString(this, P()), G))
102+let W = addressFromStringValue(valueOrElse(getString(this, Q()), H))
101103
102-let T = Q(V)
104+let U = R(W)
103105
104-let W = S(T, M)
106+let X = T(U, N)
105107
106-let X = S(T, N)
108+let Y = T(U, O)
107109
108-let Y = "wlg_assetId"
110+let Z = "wlg_assetId"
109111
110-let Z = valueOrErrorMessage(getBinary(X, Y), "Not initialized yet")
112+let aa = valueOrErrorMessage(getBinary(Y, Z), "Not initialized yet")
111113
112-func aa (ab) = {
113- let H = ab
114- if ($isInstanceOf(H, "String"))
114+func ab (ac) = {
115+ let I = ac
116+ if ($isInstanceOf(I, "String"))
115117 then {
116- let ac = H
117- ac
118+ let ad = I
119+ ad
118120 }
119121 else throw("fail to cast into String")
120122 }
121123
122124
123-func ad (ab) = {
124- let H = ab
125- if ($isInstanceOf(H, "Int"))
125+func ae (ac) = {
126+ let I = ac
127+ if ($isInstanceOf(I, "Int"))
126128 then {
127- let ae = H
128- ae
129+ let af = I
130+ af
129131 }
130132 else throw("fail to cast into Int")
131133 }
132134
133135
134-func af (ag,ah) = {
135- let ai = pow(10, 0, ah, 0, 0, DOWN)
136- let aj = toString((ag % ai))
137- let ak = drop(toString(ai), (1 + size(aj)))
138- (((toString((ag / ai)) + ".") + ak) + aj)
136+func ag (ah,ai) = {
137+ let aj = pow(10, 0, ai, 0, 0, DOWN)
138+ let ak = toString((ah % aj))
139+ let al = drop(toString(aj), (1 + size(ak)))
140+ (((toString((ah / aj)) + ".") + al) + ak)
139141 }
140142
141143
142-let al = 432000000
144+let am = 432000000
143145
144-let am = 3600000
146+let an = 3600000
145147
146-let an = [toString(this), {
147- let H = F
148- if ((base58'2W' == H))
148+let ao = [toString(this), {
149+ let I = G
150+ if ((base58'2W' == I))
149151 then "3PEe2RELUHCFCBsmSCNcBJ8N3URLVQende7"
150- else if ((base58'2T' == H))
152+ else if ((base58'2T' == I))
151153 then "3MtBgJTaLxPB3C7UJD1UE8qjkHthfKvFQYY"
152154 else throw("Unknown chain")
153155 }]
154156
155-func ao (ap,aq,ar,as,at,au) = makeString(["%s%d%d%d%d%d", ap, toString(aq), toString(ar), toString(as), toString(at), toString(au)], I)
157+func ap (aq,ar,as,at,au,av) = makeString(["%s%d%d%d%d%d", aq, toString(ar), toString(as), toString(at), toString(au), toString(av)], J)
156158
157159
158-func av (aw,ax,ay,az,aA) = makeString(["%s%s%d%d%d", aw, ax, toString(ay), toString(az), toString(aA)], I)
160+func aw (ax,ay,az,aA,aB) = makeString(["%s%s%d%d%d", ax, ay, toString(az), toString(aA), toString(aB)], J)
159161
160162
161-func aB () = ad(invoke(W, "saveLastTx", nil, nil))
163+func aC () = ae(invoke(X, "saveLastTx", nil, nil))
162164
163165
164-func aC (aD) = valueOrErrorMessage(getString(W, b(toString(aD))), "You don't have a duck staked")
166+func aD (aE) = valueOrErrorMessage(getString(X, b(toString(aE))), "You don't have a duck staked")
165167
166168
167-@Callable(aE)
168-func createTournament (at,au,aq,ar) = {
169- let aD = toString(aE.caller)
170- if (!(containsElement(an, aD)))
169+@Callable(aF)
170+func createTournament (au,av,ar,as) = {
171+ let aE = toString(aF.caller)
172+ if (!(containsElement(ao, aE)))
171173 then throw("Permission denied")
172174 else {
173- let aF = getInteger(f)
174- let h = if (isDefined(aF))
175+ let aG = getInteger(f)
176+ let h = if (isDefined(aG))
175177 then {
176- let aG = value(aF)
177- let p = valueOrErrorMessage(getString(i(aG)), (("Error reading tournament " + toString(aG)) + " data"))
178- let aw = split(p, I)[t]
179- if ((aw != "ARCHIVED"))
180- then throw(("Current tournement is not completed, status=" + aw))
181- else (aG + 1)
178+ let aH = value(aG)
179+ let p = valueOrErrorMessage(getString(i(aH)), (("Error reading tournament " + toString(aH)) + " data"))
180+ let ax = split(p, J)[u]
181+ if ((ax != "ARCHIVED"))
182+ then throw(("Current tournement is not completed, status=" + ax))
183+ else (aH + 1)
182184 }
183185 else 1
184- let aH = lastBlock.timestamp
185- if ((aH > at))
186- then throw(((("startTime=" + toString(at)) + " < creationTime=") + toString(aH)))
187- else if ((at > au))
188- then throw(((("endTime=" + toString(au)) + " < startTime=") + toString(at)))
189- else if (((au - at) > al))
190- then throw(((("Tournament period exceeds max: " + toString((au - at))) + " > ") + toString(al)))
191- else if (if ((0 >= aq))
186+ let aI = lastBlock.timestamp
187+ if ((aI > au))
188+ then throw(((("startTime=" + toString(au)) + " < creationTime=") + toString(aI)))
189+ else if ((au > av))
190+ then throw(((("endTime=" + toString(av)) + " < startTime=") + toString(au)))
191+ else if (((av - au) > am))
192+ then throw(((("Tournament period exceeds max: " + toString((av - au))) + " > ") + toString(am)))
193+ else if (if ((0 >= ar))
192194 then true
193- else (0 >= ar))
194- then throw(((("Cost should be positive, but passed " + toString(aq)) + " and ") + toString(ar)))
195- else $Tuple2([IntegerEntry(f, h), StringEntry(g(h), ao(toBase58String(aE.transactionId), aq, ar, aH, at, au)), StringEntry(i(h), av("CREATED", " ", 0, 0, 0))], h)
195+ else (0 >= as))
196+ then throw(((("Cost should be positive, but passed " + toString(ar)) + " and ") + toString(as)))
197+ else $Tuple2([IntegerEntry(f, h), StringEntry(g(h), ap(toBase58String(aF.transactionId), ar, as, aI, au, av)), StringEntry(i(h), aw("CREATED", " ", 0, 0, 0))], h)
196198 }
197199 }
198200
199201
200202
201-@Callable(aE)
203+@Callable(aF)
202204 func register () = {
203- let aI = aB()
204- if ((size(aE.payments) != 1))
205+ let aJ = aC()
206+ if ((size(aF.payments) != 1))
205207 then throw("exactly 1 payment must be attached")
206208 else {
207- let aJ = aE.payments[0]
208- let aK = aJ.amount
209- let aL = valueOrErrorMessage(aJ.assetId, "WLGOLD payments only!")
210- if ((aL != Z))
209+ let aK = aF.payments[0]
210+ let aL = aK.amount
211+ let aM = valueOrErrorMessage(aK.assetId, "WLGOLD payments only!")
212+ if ((aM != aa))
211213 then throw("WLGOLD payments only!")
212214 else {
213- let aF = valueOrErrorMessage(getInteger(f), "No active tournaments")
214- let aH = lastBlock.timestamp
215- let aM = m(this, aF)
216- let o = aM[k]
217- let p = aM[l]
218- let aw = p[t]
219- if (!(if (if (if ((aw == "CREATED"))
220- then (aH > parseIntValue(o[r]))
215+ let aG = valueOrErrorMessage(getInteger(f), "No active tournaments")
216+ let aI = lastBlock.timestamp
217+ let aN = m(this, aG)
218+ let o = aN[k]
219+ let p = aN[l]
220+ let ax = p[u]
221+ if (!(if (if (if ((ax == "CREATED"))
222+ then (aI > parseIntValue(o[s]))
221223 else false)
222- then ((parseIntValue(o[s]) - am) > aH)
224+ then ((parseIntValue(o[t]) - an) > aI)
223225 else false)
224226 then true
225- else if ((aw == "INPROGRESS"))
226- then ((parseIntValue(o[s]) - am) > aH)
227+ else if ((ax == "INPROGRESS"))
228+ then ((parseIntValue(o[t]) - an) > aI)
227229 else false))
228230 then throw("Cannot register now")
229231 else {
230- let aN = parseIntValue(o[q])
231- if ((aK != aN))
232- then throw((("Need payment of " + af(aN, 8)) + " WLGOLD"))
232+ let aO = parseIntValue(o[q])
233+ if ((aL != aO))
234+ then throw((("Need payment of " + ag(aO, 8)) + " WLGOLD"))
233235 else {
234- let e = aC(aE.originCaller)
235- let aO = valueOrElse(getString(j(aF)), "")
236- let aP = if ((aO == ""))
236+ let e = aD(aF.originCaller)
237+ let aP = valueOrElse(getString(j(aG)), "")
238+ let aQ = if ((aP == ""))
237239 then nil
238- else split_51C(aO, "_")
239- if (if (valueOrElse(getBoolean(C(aF, e)), false))
240+ else split_51C(aP, "_")
241+ if (if (valueOrElse(getBoolean(D(aG, e)), false))
240242 then true
241- else containsElement(aP, e))
242- then throw(((("Your duck " + e) + " is already registered at tournament ") + toString(aF)))
243+ else containsElement(aQ, e))
244+ then throw(((("Your duck " + e) + " is already registered at tournament ") + toString(aG)))
243245 else {
244- let aQ = av("INPROGRESS", p[u], parseIntValue(p[v]), (parseIntValue(p[w]) + 1), parseIntValue(p[x]))
245- $Tuple2([IntegerEntry(B(e), aF), BooleanEntry(C(aF, e), true), StringEntry(j(aF), makeString_11C((aP :+ e), "_")), StringEntry(i(aF), aQ)], aI)
246+ let aR = aw("INPROGRESS", p[v], parseIntValue(p[w]), (parseIntValue(p[x]) + 1), parseIntValue(p[y]))
247+ $Tuple2([IntegerEntry(C(e), aG), BooleanEntry(D(aG, e), true), StringEntry(j(aG), makeString_11C((aQ :+ e), "_")), StringEntry(i(aG), aR)], aJ)
246248 }
247249 }
248250 }
252254
253255
254256
255-@Callable(aE)
257+@Callable(aF)
256258 func newAttempt () = {
257- let aI = aB()
258- let e = aC(aE.originCaller)
259- let aF = valueOrErrorMessage(getInteger(f), "No active tournaments")
260- let aH = lastBlock.timestamp
261- let aM = m(this, aF)
262- let o = aM[k]
263- let p = aM[l]
264- let aw = p[t]
265- if (!(if ((aw == "INPROGRESS"))
266- then ((parseIntValue(o[s]) - am) > aH)
259+ let aJ = aC()
260+ let e = aD(aF.originCaller)
261+ let aG = valueOrErrorMessage(getInteger(f), "No active tournaments")
262+ let aI = lastBlock.timestamp
263+ let aN = m(this, aG)
264+ let o = aN[k]
265+ let p = aN[l]
266+ let ax = p[u]
267+ if (!(if ((ax == "INPROGRESS"))
268+ then ((parseIntValue(o[t]) - an) > aI)
267269 else false))
268270 then throw("Attempt is not possible")
269- else if (!(valueOrElse(getBoolean(C(aF, e)), false)))
270- then throw(((("Your duck " + e) + " is not registered at tournament ") + toString(aF)))
271+ else if (!(valueOrElse(getBoolean(D(aG, e)), false)))
272+ then throw(((("Your duck " + e) + " is not registered at tournament ") + toString(aG)))
271273 else {
272- let aR = D(aF, e)
273- let aS = getInteger(aR)
274- let aT = if (!(isDefined(aS)))
274+ let aS = E(aG, e)
275+ let aT = getInteger(aS)
276+ let aU = if (!(isDefined(aT)))
275277 then $Tuple2(0, 0)
276- else if ((size(aE.payments) != 1))
278+ else if ((size(aF.payments) != 1))
277279 then throw("exactly 1 payment must be attached")
278280 else {
279- let aJ = aE.payments[0]
280- let aK = aJ.amount
281- let aL = valueOrErrorMessage(aJ.assetId, "WLGOLD payments only!")
282- if ((aL != Z))
281+ let aK = aF.payments[0]
282+ let aL = aK.amount
283+ let aM = valueOrErrorMessage(aK.assetId, "WLGOLD payments only!")
284+ if ((aM != aa))
283285 then throw("WLGOLD payments only!")
284286 else {
285- let aU = parseIntValue(o[q])
286- if ((aK != aU))
287- then throw((("Need payment of " + af(aU, 8)) + " WLGOLD"))
288- else $Tuple2((value(aS) + 1), 1)
287+ let aV = parseIntValue(o[r])
288+ if ((aL != aV))
289+ then throw((("Need payment of " + ag(aV, 8)) + " WLGOLD"))
290+ else $Tuple2((value(aT) + 1), 1)
289291 }
290292 }
291- let aV = aT._1
292- let aW = aT._2
293- let aQ = av("INPROGRESS", p[u], parseIntValue(p[v]), parseIntValue(p[w]), (parseIntValue(p[x]) + aW))
294- let aX = split(valueOrElse(getString(W, d(e)), a), "_")
295- let aY = E(aF, e)
296- let aZ = if (if ((aX[z] == "T"))
297- then (parseIntValue(aX[y]) == aF)
293+ let aW = aU._1
294+ let aX = aU._2
295+ let aR = aw("INPROGRESS", p[v], parseIntValue(p[w]), parseIntValue(p[x]), (parseIntValue(p[y]) + aX))
296+ let aY = split(valueOrElse(getString(X, d(e)), a), "_")
297+ let aZ = F(aG, e)
298+ let ba = if (if ((aY[A] == "T"))
299+ then (parseIntValue(aY[z]) == aG)
298300 else false)
299301 then {
300- let ba = valueOrElse(getInteger(aY), 0)
301- let bb = parseIntValue(aX[A])
302- max([ba, bb])
302+ let bb = valueOrElse(getInteger(aZ), 0)
303+ let bc = parseIntValue(aY[B])
304+ max([bb, bc])
303305 }
304306 else 0
305- let bc = aa(invoke(W, "initDuckTourAttempt", [e], nil))
306- $Tuple2([IntegerEntry(aY, aZ), IntegerEntry(aR, aV), StringEntry(i(aF), aQ)], [aI, aV, bc])
307+ let bd = ab(invoke(X, "initDuckTourAttempt", [e], nil))
308+ $Tuple2([IntegerEntry(aZ, ba), IntegerEntry(aS, aW), StringEntry(i(aG), aR)], [aJ, aW, bd])
307309 }
308310 }
309311
310312
311313
312-@Callable(aE)
313-func updateDynamicData (e,bd) = if ((aE.caller != W))
314+@Callable(aF)
315+func updateDynamicData (e,be) = if ((aF.caller != X))
314316 then throw("Access denied")
315317 else {
316- let aF = valueOrErrorMessage(getInteger(f), "No active tournaments")
317- let aM = m(this, aF)
318- let o = aM[k]
319- let p = aM[l]
320- if (if (if ((parseIntValue(p[v]) >= bd))
318+ let aG = valueOrErrorMessage(getInteger(f), "No active tournaments")
319+ let aN = m(this, aG)
320+ let o = aN[k]
321+ let p = aN[l]
322+ if (if (if ((parseIntValue(p[w]) >= be))
321323 then true
322- else (p[t] != "INPROGRESS"))
324+ else (p[u] != "INPROGRESS"))
323325 then true
324- else (lastBlock.timestamp > parseIntValue(o[s])))
326+ else (lastBlock.timestamp > parseIntValue(o[t])))
325327 then $Tuple2(nil, 0)
326328 else {
327- let aQ = av("INPROGRESS", e, bd, parseIntValue(p[w]), parseIntValue(p[x]))
328- $Tuple2([StringEntry(i(aF), aQ)], 0)
329+ let aR = aw("INPROGRESS", e, be, parseIntValue(p[x]), parseIntValue(p[y]))
330+ $Tuple2([StringEntry(i(aG), aR)], 0)
329331 }
330332 }
331333
332334
333335
334-@Callable(aE)
336+@Callable(aF)
335337 func finishTournament (h) = {
336- let aD = toString(aE.caller)
337- if (!(containsElement(an, aD)))
338+ let aE = toString(aF.caller)
339+ if (!(containsElement(ao, aE)))
338340 then throw("Permission denied")
339341 else {
340- let aM = m(this, h)
341- let p = aM[l]
342- let aw = p[t]
343- if ((aw == "ARCHIVED"))
342+ let aN = m(this, h)
343+ let p = aN[l]
344+ let ax = p[u]
345+ if ((ax == "ARCHIVED"))
344346 then throw((("Tournament " + toString(h)) + " is already ARCHIVED"))
345347 else {
346- let aQ = av("ARCHIVED", p[u], parseIntValue(p[v]), parseIntValue(p[w]), parseIntValue(p[x]))
347- $Tuple2([StringEntry(i(h), aQ)], 0)
348+ let aR = aw("ARCHIVED", p[v], parseIntValue(p[w]), parseIntValue(p[x]), parseIntValue(p[y]))
349+ $Tuple2([StringEntry(i(h), aR)], 0)
348350 }
349351 }
350352 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "Africa_F_Africa"
55
66 func b (c) = ("stakedDuckByOwner_" + c)
77
88
99 func d (e) = ("duckLocation_" + e)
1010
1111
1212 let f = "%s__lastTourId"
1313
1414 func g (h) = ("%s%d__tourStaticData__" + toString(h))
1515
1616
1717 func i (h) = ("%s%d__tourDynamicData__" + toString(h))
1818
1919
2020 func j (h) = ("%s%d__allRegistrants__" + toString(h))
2121
2222
2323 let k = 0
2424
2525 let l = 1
2626
2727 func m (n,h) = {
2828 let o = split(valueOrErrorMessage(getString(n, g(h)), (("Error reading tournament " + toString(h)) + " data")), "__")
2929 let p = split(valueOrErrorMessage(getString(n, i(h)), (("Error reading tournament " + toString(h)) + " data")), "__")
3030 [o, p]
3131 }
3232
3333
3434 let q = 2
3535
36-let r = 5
36+let r = 3
3737
38-let s = 6
38+let s = 5
3939
40-let t = 1
40+let t = 6
4141
42-let u = 2
42+let u = 1
4343
44-let v = 3
44+let v = 2
4545
46-let w = 4
46+let w = 3
4747
48-let x = 5
48+let x = 4
4949
50-let y = 0
50+let y = 5
5151
52-let z = 1
52+let z = 0
5353
54-let A = 2
54+let A = 1
5555
56-func B (e) = ("%s%s__lastRegisteredTourByDuck__" + e)
56+let B = 2
57+
58+func C (e) = ("%s%s__lastRegisteredTourByDuck__" + e)
5759
5860
59-func C (h,e) = makeString(["%s%d%s__isRegisteredByTourAndDuck", toString(h), e], "__")
61+func D (h,e) = makeString(["%s%d%s__isRegisteredByTourAndDuck", toString(h), e], "__")
6062
6163
62-func D (h,e) = makeString(["%s%d%s__lastAttemptByTourAndDuck", toString(h), e], "__")
64+func E (h,e) = makeString(["%s%d%s__lastAttemptByTourAndDuck", toString(h), e], "__")
6365
6466
65-func E (h,e) = makeString(["%s%d%s__bestResultByTourAndDuck", toString(h), e], "__")
67+func F (h,e) = makeString(["%s%d%s__bestResultByTourAndDuck", toString(h), e], "__")
6668
6769
68-let F = take(drop(this.bytes, 1), 1)
70+let G = take(drop(this.bytes, 1), 1)
6971
70-let G = {
71- let H = F
72- if ((base58'2W' == H))
72+let H = {
73+ let I = G
74+ if ((base58'2W' == I))
7375 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
74- else if ((base58'2T' == H))
76+ else if ((base58'2T' == I))
7577 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
7678 else throw("Unknown chain")
7779 }
7880
79-let I = "__"
81+let J = "__"
8082
81-func J (K,L) = valueOrErrorMessage(getString(K, L), makeString(["mandatory ", toString(K), ".", L, " is not defined"], ""))
83+func K (L,M) = valueOrErrorMessage(getString(L, M), makeString(["mandatory ", toString(L), ".", M, " is not defined"], ""))
8284
8385
84-let M = 1
86+let N = 1
8587
86-let N = 4
88+let O = 4
8789
88-func O () = "%s__restConfig"
90+func P () = "%s__restConfig"
8991
9092
91-func P () = "%s__restAddr"
93+func Q () = "%s__restAddr"
9294
9395
94-func Q (R) = split_4C(J(R, O()), I)
96+func R (S) = split_4C(K(S, P()), J)
9597
9698
97-func S (T,U) = valueOrErrorMessage(addressFromString(T[U]), ("Rest cfg doesn't contain address at index " + toString(U)))
99+func T (U,V) = valueOrErrorMessage(addressFromString(U[V]), ("Rest cfg doesn't contain address at index " + toString(V)))
98100
99101
100-let V = addressFromStringValue(valueOrElse(getString(this, P()), G))
102+let W = addressFromStringValue(valueOrElse(getString(this, Q()), H))
101103
102-let T = Q(V)
104+let U = R(W)
103105
104-let W = S(T, M)
106+let X = T(U, N)
105107
106-let X = S(T, N)
108+let Y = T(U, O)
107109
108-let Y = "wlg_assetId"
110+let Z = "wlg_assetId"
109111
110-let Z = valueOrErrorMessage(getBinary(X, Y), "Not initialized yet")
112+let aa = valueOrErrorMessage(getBinary(Y, Z), "Not initialized yet")
111113
112-func aa (ab) = {
113- let H = ab
114- if ($isInstanceOf(H, "String"))
114+func ab (ac) = {
115+ let I = ac
116+ if ($isInstanceOf(I, "String"))
115117 then {
116- let ac = H
117- ac
118+ let ad = I
119+ ad
118120 }
119121 else throw("fail to cast into String")
120122 }
121123
122124
123-func ad (ab) = {
124- let H = ab
125- if ($isInstanceOf(H, "Int"))
125+func ae (ac) = {
126+ let I = ac
127+ if ($isInstanceOf(I, "Int"))
126128 then {
127- let ae = H
128- ae
129+ let af = I
130+ af
129131 }
130132 else throw("fail to cast into Int")
131133 }
132134
133135
134-func af (ag,ah) = {
135- let ai = pow(10, 0, ah, 0, 0, DOWN)
136- let aj = toString((ag % ai))
137- let ak = drop(toString(ai), (1 + size(aj)))
138- (((toString((ag / ai)) + ".") + ak) + aj)
136+func ag (ah,ai) = {
137+ let aj = pow(10, 0, ai, 0, 0, DOWN)
138+ let ak = toString((ah % aj))
139+ let al = drop(toString(aj), (1 + size(ak)))
140+ (((toString((ah / aj)) + ".") + al) + ak)
139141 }
140142
141143
142-let al = 432000000
144+let am = 432000000
143145
144-let am = 3600000
146+let an = 3600000
145147
146-let an = [toString(this), {
147- let H = F
148- if ((base58'2W' == H))
148+let ao = [toString(this), {
149+ let I = G
150+ if ((base58'2W' == I))
149151 then "3PEe2RELUHCFCBsmSCNcBJ8N3URLVQende7"
150- else if ((base58'2T' == H))
152+ else if ((base58'2T' == I))
151153 then "3MtBgJTaLxPB3C7UJD1UE8qjkHthfKvFQYY"
152154 else throw("Unknown chain")
153155 }]
154156
155-func ao (ap,aq,ar,as,at,au) = makeString(["%s%d%d%d%d%d", ap, toString(aq), toString(ar), toString(as), toString(at), toString(au)], I)
157+func ap (aq,ar,as,at,au,av) = makeString(["%s%d%d%d%d%d", aq, toString(ar), toString(as), toString(at), toString(au), toString(av)], J)
156158
157159
158-func av (aw,ax,ay,az,aA) = makeString(["%s%s%d%d%d", aw, ax, toString(ay), toString(az), toString(aA)], I)
160+func aw (ax,ay,az,aA,aB) = makeString(["%s%s%d%d%d", ax, ay, toString(az), toString(aA), toString(aB)], J)
159161
160162
161-func aB () = ad(invoke(W, "saveLastTx", nil, nil))
163+func aC () = ae(invoke(X, "saveLastTx", nil, nil))
162164
163165
164-func aC (aD) = valueOrErrorMessage(getString(W, b(toString(aD))), "You don't have a duck staked")
166+func aD (aE) = valueOrErrorMessage(getString(X, b(toString(aE))), "You don't have a duck staked")
165167
166168
167-@Callable(aE)
168-func createTournament (at,au,aq,ar) = {
169- let aD = toString(aE.caller)
170- if (!(containsElement(an, aD)))
169+@Callable(aF)
170+func createTournament (au,av,ar,as) = {
171+ let aE = toString(aF.caller)
172+ if (!(containsElement(ao, aE)))
171173 then throw("Permission denied")
172174 else {
173- let aF = getInteger(f)
174- let h = if (isDefined(aF))
175+ let aG = getInteger(f)
176+ let h = if (isDefined(aG))
175177 then {
176- let aG = value(aF)
177- let p = valueOrErrorMessage(getString(i(aG)), (("Error reading tournament " + toString(aG)) + " data"))
178- let aw = split(p, I)[t]
179- if ((aw != "ARCHIVED"))
180- then throw(("Current tournement is not completed, status=" + aw))
181- else (aG + 1)
178+ let aH = value(aG)
179+ let p = valueOrErrorMessage(getString(i(aH)), (("Error reading tournament " + toString(aH)) + " data"))
180+ let ax = split(p, J)[u]
181+ if ((ax != "ARCHIVED"))
182+ then throw(("Current tournement is not completed, status=" + ax))
183+ else (aH + 1)
182184 }
183185 else 1
184- let aH = lastBlock.timestamp
185- if ((aH > at))
186- then throw(((("startTime=" + toString(at)) + " < creationTime=") + toString(aH)))
187- else if ((at > au))
188- then throw(((("endTime=" + toString(au)) + " < startTime=") + toString(at)))
189- else if (((au - at) > al))
190- then throw(((("Tournament period exceeds max: " + toString((au - at))) + " > ") + toString(al)))
191- else if (if ((0 >= aq))
186+ let aI = lastBlock.timestamp
187+ if ((aI > au))
188+ then throw(((("startTime=" + toString(au)) + " < creationTime=") + toString(aI)))
189+ else if ((au > av))
190+ then throw(((("endTime=" + toString(av)) + " < startTime=") + toString(au)))
191+ else if (((av - au) > am))
192+ then throw(((("Tournament period exceeds max: " + toString((av - au))) + " > ") + toString(am)))
193+ else if (if ((0 >= ar))
192194 then true
193- else (0 >= ar))
194- then throw(((("Cost should be positive, but passed " + toString(aq)) + " and ") + toString(ar)))
195- else $Tuple2([IntegerEntry(f, h), StringEntry(g(h), ao(toBase58String(aE.transactionId), aq, ar, aH, at, au)), StringEntry(i(h), av("CREATED", " ", 0, 0, 0))], h)
195+ else (0 >= as))
196+ then throw(((("Cost should be positive, but passed " + toString(ar)) + " and ") + toString(as)))
197+ else $Tuple2([IntegerEntry(f, h), StringEntry(g(h), ap(toBase58String(aF.transactionId), ar, as, aI, au, av)), StringEntry(i(h), aw("CREATED", " ", 0, 0, 0))], h)
196198 }
197199 }
198200
199201
200202
201-@Callable(aE)
203+@Callable(aF)
202204 func register () = {
203- let aI = aB()
204- if ((size(aE.payments) != 1))
205+ let aJ = aC()
206+ if ((size(aF.payments) != 1))
205207 then throw("exactly 1 payment must be attached")
206208 else {
207- let aJ = aE.payments[0]
208- let aK = aJ.amount
209- let aL = valueOrErrorMessage(aJ.assetId, "WLGOLD payments only!")
210- if ((aL != Z))
209+ let aK = aF.payments[0]
210+ let aL = aK.amount
211+ let aM = valueOrErrorMessage(aK.assetId, "WLGOLD payments only!")
212+ if ((aM != aa))
211213 then throw("WLGOLD payments only!")
212214 else {
213- let aF = valueOrErrorMessage(getInteger(f), "No active tournaments")
214- let aH = lastBlock.timestamp
215- let aM = m(this, aF)
216- let o = aM[k]
217- let p = aM[l]
218- let aw = p[t]
219- if (!(if (if (if ((aw == "CREATED"))
220- then (aH > parseIntValue(o[r]))
215+ let aG = valueOrErrorMessage(getInteger(f), "No active tournaments")
216+ let aI = lastBlock.timestamp
217+ let aN = m(this, aG)
218+ let o = aN[k]
219+ let p = aN[l]
220+ let ax = p[u]
221+ if (!(if (if (if ((ax == "CREATED"))
222+ then (aI > parseIntValue(o[s]))
221223 else false)
222- then ((parseIntValue(o[s]) - am) > aH)
224+ then ((parseIntValue(o[t]) - an) > aI)
223225 else false)
224226 then true
225- else if ((aw == "INPROGRESS"))
226- then ((parseIntValue(o[s]) - am) > aH)
227+ else if ((ax == "INPROGRESS"))
228+ then ((parseIntValue(o[t]) - an) > aI)
227229 else false))
228230 then throw("Cannot register now")
229231 else {
230- let aN = parseIntValue(o[q])
231- if ((aK != aN))
232- then throw((("Need payment of " + af(aN, 8)) + " WLGOLD"))
232+ let aO = parseIntValue(o[q])
233+ if ((aL != aO))
234+ then throw((("Need payment of " + ag(aO, 8)) + " WLGOLD"))
233235 else {
234- let e = aC(aE.originCaller)
235- let aO = valueOrElse(getString(j(aF)), "")
236- let aP = if ((aO == ""))
236+ let e = aD(aF.originCaller)
237+ let aP = valueOrElse(getString(j(aG)), "")
238+ let aQ = if ((aP == ""))
237239 then nil
238- else split_51C(aO, "_")
239- if (if (valueOrElse(getBoolean(C(aF, e)), false))
240+ else split_51C(aP, "_")
241+ if (if (valueOrElse(getBoolean(D(aG, e)), false))
240242 then true
241- else containsElement(aP, e))
242- then throw(((("Your duck " + e) + " is already registered at tournament ") + toString(aF)))
243+ else containsElement(aQ, e))
244+ then throw(((("Your duck " + e) + " is already registered at tournament ") + toString(aG)))
243245 else {
244- let aQ = av("INPROGRESS", p[u], parseIntValue(p[v]), (parseIntValue(p[w]) + 1), parseIntValue(p[x]))
245- $Tuple2([IntegerEntry(B(e), aF), BooleanEntry(C(aF, e), true), StringEntry(j(aF), makeString_11C((aP :+ e), "_")), StringEntry(i(aF), aQ)], aI)
246+ let aR = aw("INPROGRESS", p[v], parseIntValue(p[w]), (parseIntValue(p[x]) + 1), parseIntValue(p[y]))
247+ $Tuple2([IntegerEntry(C(e), aG), BooleanEntry(D(aG, e), true), StringEntry(j(aG), makeString_11C((aQ :+ e), "_")), StringEntry(i(aG), aR)], aJ)
246248 }
247249 }
248250 }
249251 }
250252 }
251253 }
252254
253255
254256
255-@Callable(aE)
257+@Callable(aF)
256258 func newAttempt () = {
257- let aI = aB()
258- let e = aC(aE.originCaller)
259- let aF = valueOrErrorMessage(getInteger(f), "No active tournaments")
260- let aH = lastBlock.timestamp
261- let aM = m(this, aF)
262- let o = aM[k]
263- let p = aM[l]
264- let aw = p[t]
265- if (!(if ((aw == "INPROGRESS"))
266- then ((parseIntValue(o[s]) - am) > aH)
259+ let aJ = aC()
260+ let e = aD(aF.originCaller)
261+ let aG = valueOrErrorMessage(getInteger(f), "No active tournaments")
262+ let aI = lastBlock.timestamp
263+ let aN = m(this, aG)
264+ let o = aN[k]
265+ let p = aN[l]
266+ let ax = p[u]
267+ if (!(if ((ax == "INPROGRESS"))
268+ then ((parseIntValue(o[t]) - an) > aI)
267269 else false))
268270 then throw("Attempt is not possible")
269- else if (!(valueOrElse(getBoolean(C(aF, e)), false)))
270- then throw(((("Your duck " + e) + " is not registered at tournament ") + toString(aF)))
271+ else if (!(valueOrElse(getBoolean(D(aG, e)), false)))
272+ then throw(((("Your duck " + e) + " is not registered at tournament ") + toString(aG)))
271273 else {
272- let aR = D(aF, e)
273- let aS = getInteger(aR)
274- let aT = if (!(isDefined(aS)))
274+ let aS = E(aG, e)
275+ let aT = getInteger(aS)
276+ let aU = if (!(isDefined(aT)))
275277 then $Tuple2(0, 0)
276- else if ((size(aE.payments) != 1))
278+ else if ((size(aF.payments) != 1))
277279 then throw("exactly 1 payment must be attached")
278280 else {
279- let aJ = aE.payments[0]
280- let aK = aJ.amount
281- let aL = valueOrErrorMessage(aJ.assetId, "WLGOLD payments only!")
282- if ((aL != Z))
281+ let aK = aF.payments[0]
282+ let aL = aK.amount
283+ let aM = valueOrErrorMessage(aK.assetId, "WLGOLD payments only!")
284+ if ((aM != aa))
283285 then throw("WLGOLD payments only!")
284286 else {
285- let aU = parseIntValue(o[q])
286- if ((aK != aU))
287- then throw((("Need payment of " + af(aU, 8)) + " WLGOLD"))
288- else $Tuple2((value(aS) + 1), 1)
287+ let aV = parseIntValue(o[r])
288+ if ((aL != aV))
289+ then throw((("Need payment of " + ag(aV, 8)) + " WLGOLD"))
290+ else $Tuple2((value(aT) + 1), 1)
289291 }
290292 }
291- let aV = aT._1
292- let aW = aT._2
293- let aQ = av("INPROGRESS", p[u], parseIntValue(p[v]), parseIntValue(p[w]), (parseIntValue(p[x]) + aW))
294- let aX = split(valueOrElse(getString(W, d(e)), a), "_")
295- let aY = E(aF, e)
296- let aZ = if (if ((aX[z] == "T"))
297- then (parseIntValue(aX[y]) == aF)
293+ let aW = aU._1
294+ let aX = aU._2
295+ let aR = aw("INPROGRESS", p[v], parseIntValue(p[w]), parseIntValue(p[x]), (parseIntValue(p[y]) + aX))
296+ let aY = split(valueOrElse(getString(X, d(e)), a), "_")
297+ let aZ = F(aG, e)
298+ let ba = if (if ((aY[A] == "T"))
299+ then (parseIntValue(aY[z]) == aG)
298300 else false)
299301 then {
300- let ba = valueOrElse(getInteger(aY), 0)
301- let bb = parseIntValue(aX[A])
302- max([ba, bb])
302+ let bb = valueOrElse(getInteger(aZ), 0)
303+ let bc = parseIntValue(aY[B])
304+ max([bb, bc])
303305 }
304306 else 0
305- let bc = aa(invoke(W, "initDuckTourAttempt", [e], nil))
306- $Tuple2([IntegerEntry(aY, aZ), IntegerEntry(aR, aV), StringEntry(i(aF), aQ)], [aI, aV, bc])
307+ let bd = ab(invoke(X, "initDuckTourAttempt", [e], nil))
308+ $Tuple2([IntegerEntry(aZ, ba), IntegerEntry(aS, aW), StringEntry(i(aG), aR)], [aJ, aW, bd])
307309 }
308310 }
309311
310312
311313
312-@Callable(aE)
313-func updateDynamicData (e,bd) = if ((aE.caller != W))
314+@Callable(aF)
315+func updateDynamicData (e,be) = if ((aF.caller != X))
314316 then throw("Access denied")
315317 else {
316- let aF = valueOrErrorMessage(getInteger(f), "No active tournaments")
317- let aM = m(this, aF)
318- let o = aM[k]
319- let p = aM[l]
320- if (if (if ((parseIntValue(p[v]) >= bd))
318+ let aG = valueOrErrorMessage(getInteger(f), "No active tournaments")
319+ let aN = m(this, aG)
320+ let o = aN[k]
321+ let p = aN[l]
322+ if (if (if ((parseIntValue(p[w]) >= be))
321323 then true
322- else (p[t] != "INPROGRESS"))
324+ else (p[u] != "INPROGRESS"))
323325 then true
324- else (lastBlock.timestamp > parseIntValue(o[s])))
326+ else (lastBlock.timestamp > parseIntValue(o[t])))
325327 then $Tuple2(nil, 0)
326328 else {
327- let aQ = av("INPROGRESS", e, bd, parseIntValue(p[w]), parseIntValue(p[x]))
328- $Tuple2([StringEntry(i(aF), aQ)], 0)
329+ let aR = aw("INPROGRESS", e, be, parseIntValue(p[x]), parseIntValue(p[y]))
330+ $Tuple2([StringEntry(i(aG), aR)], 0)
329331 }
330332 }
331333
332334
333335
334-@Callable(aE)
336+@Callable(aF)
335337 func finishTournament (h) = {
336- let aD = toString(aE.caller)
337- if (!(containsElement(an, aD)))
338+ let aE = toString(aF.caller)
339+ if (!(containsElement(ao, aE)))
338340 then throw("Permission denied")
339341 else {
340- let aM = m(this, h)
341- let p = aM[l]
342- let aw = p[t]
343- if ((aw == "ARCHIVED"))
342+ let aN = m(this, h)
343+ let p = aN[l]
344+ let ax = p[u]
345+ if ((ax == "ARCHIVED"))
344346 then throw((("Tournament " + toString(h)) + " is already ARCHIVED"))
345347 else {
346- let aQ = av("ARCHIVED", p[u], parseIntValue(p[v]), parseIntValue(p[w]), parseIntValue(p[x]))
347- $Tuple2([StringEntry(i(h), aQ)], 0)
348+ let aR = aw("ARCHIVED", p[v], parseIntValue(p[w]), parseIntValue(p[x]), parseIntValue(p[y]))
349+ $Tuple2([StringEntry(i(h), aR)], 0)
348350 }
349351 }
350352 }
351353
352354

github/deemru/w8io/169f3d6 
129.84 ms