tx · BCacf5hMi9hLL11KHiSLFv2k2eMnq8Ujuszg7H8Az7AX

3N3nfqFcxXfd3T18V9icDdh58MJ9wQ2k2xx:  -0.01600000 Waves

2023.09.07 19:14 [2745197] smart account 3N3nfqFcxXfd3T18V9icDdh58MJ9wQ2k2xx > SELF 0.00000000 Waves

{ "type": 13, "id": "BCacf5hMi9hLL11KHiSLFv2k2eMnq8Ujuszg7H8Az7AX", "fee": 1600000, "feeAssetId": null, "timestamp": 1694103318006, "version": 2, "chainId": 84, "sender": "3N3nfqFcxXfd3T18V9icDdh58MJ9wQ2k2xx", "senderPublicKey": "UGqkWsCpv7xRVXkQRXyLd6pWPDtYGXmPip7FxSd1pAu", "proofs": [ "Q3Zs5tjHn1YnzXN28da3RwbF9F8oPa9MypS6CXpstYtkJ3xRcd6tp1fJ82tV5XHwFzZTHooWeQrFXDc8iL3QFjo" ], "script": "base64:BgIkCAISBwoFAQEBAQESABIAEgQKAggBEgMKAQESAwoBARIDCgEBOQAPREVGQVVMVExPQ0FUSU9OAg9BZnJpY2FfRl9BZnJpY2EAD2xvY0lkeENvbnRpbmVudAAAAApsb2NJZHhUeXBlAAEBFGtleVN0YWtlZER1Y2tCeU93bmVyAQlvd25lckFkZHIJAKwCAgISc3Rha2VkRHVja0J5T3duZXJfBQlvd25lckFkZHIBD2tleUR1Y2tMb2NhdGlvbgELZHVja0Fzc2V0SWQJAKwCAgINZHVja0xvY2F0aW9uXwULZHVja0Fzc2V0SWQADWxhc3RUb3VySWRLZXkCDiVzX19sYXN0VG91cklkARVrZXlUb3VyU3RhdGljRGF0YUJ5SWQBA3RJZAkArAICAhYlcyVkX190b3VyU3RhdGljRGF0YV9fCQCkAwEFA3RJZAEWa2V5VG91ckR5bmFtaWNEYXRhQnlJZAEDdElkCQCsAgICFyVzJWRfX3RvdXJEeW5hbWljRGF0YV9fCQCkAwEFA3RJZAETa2V5U2NvcmVCb2FyZEJ5VG91cgEDdElkCQCsAgICEiVzJWRfX3Njb3JlQm9hcm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ucGFpZEFtb3VudAkAZQIFC3VucGFpZEZ1bmRzBQp5b3VyQW1vdW50BBJ1cGRhdGVkRHluYW1pY0RhdGEJAQtkeW5hbWljRGF0YQUCCEFSQ0hJVkVECQCRAwIFB2R5bmFtaWMFD3REeW5hbWljTGVhZGVycwUJd2luUmVzdWx0BQ1yZWdpc3RyYXRpb25zBQxwYWlkQXR0ZW1wdHMEDWFyY2hpdmVBY3Rpb24DCQBnAgAABQ9uZXdVbnBhaWRBbW91bnQJAMwIAgkBC1N0cmluZ0VudHJ5AgkBFmtleVRvdXJEeW5hbWljRGF0YUJ5SWQBBQN0SWQFEnVwZGF0ZWREeW5hbWljRGF0YQUDbmlsBQNuaWwJAJQKAgkAzggCCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgUKeW91ckFtb3VudAUKd2xnQXNzZXRJZAkAzAgCCQEMQm9vbGVhbkVudHJ5AgUKYXdhcmRlZEtleQYJAMwIAgkBDEludGVnZXJFbnRyeQIFCXVucGFpZEtleQUPbmV3VW5wYWlkQW1vdW50BQNuaWwFDWFyY2hpdmVBY3Rpb24AAACeW1wF", "height": 2745197, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8ZEdvgUApGJyayBBLykckYVwvowotejjpMVn5GnxwmwK Next: 96Bmj119hwHbRa5eShmBtahyEDE4gF8wAHN4T1eJP8WE Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let DEFAULTLOCATION = "Africa_F_Africa"
55
66 let locIdxContinent = 0
77
88 let locIdxType = 1
99
1010 func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr)
1111
1212
1313 func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId)
1414
1515
1616 let lastTourIdKey = "%s__lastTourId"
1717
1818 func keyTourStaticDataById (tId) = ("%s%d__tourStaticData__" + toString(tId))
1919
2020
2121 func keyTourDynamicDataById (tId) = ("%s%d__tourDynamicData__" + toString(tId))
2222
2323
2424 func keyScoreBoardByTour (tId) = ("%s%d__scoreBoard__" + toString(tId))
2525
2626
2727 func keySumScoresByTour (tId) = ("%s%d__sumScores__" + toString(tId))
2828
2929
3030 func keyUnpaidRewardsByTour (tId) = ("%s%d__unpaidRewards__" + toString(tId))
3131
3232
3333 func keyLastRegisteredTourByDuck (duckAssetId) = ("%s%s__lastRegisteredTourByDuck__" + duckAssetId)
3434
3535
3636 func keyIsRegisteredByTourAndDuck (tId,duckAssetId) = makeString(["%s%d%s__isRegisteredByTourAndDuck", toString(tId), duckAssetId], "__")
3737
3838
3939 func keyIsAwardedByTourAndDuck (tId,duckAssetId) = makeString(["%s%d%s__isAwardedByTourAndDuck", toString(tId), duckAssetId], "__")
4040
4141
4242 func keyLastAttemptByTourAndDuck (tId,duckAssetId) = makeString(["%s%d%s__lastAttemptByTourAndDuck", toString(tId), duckAssetId], "__")
4343
4444
4545 func keyBestResultByTourAndDuck (tId,duckAssetId) = makeString(["%s%d%s__bestResultByTourAndDuck", toString(tId), duckAssetId], "__")
4646
4747
4848 let idxStatic = 0
4949
5050 let idxDynamic = 1
5151
5252 let tStaticRegisterCost = 2
5353
5454 let tStaticAttemptCost = 3
5555
5656 let tStaticStart = 5
5757
5858 let tStaticEnd = 6
5959
6060 let tStaticNumGrands = 7
6161
6262 let tDynamicStatus = 1
6363
6464 let tDynamicLeaders = 2
6565
6666 let tDynamicWinResult = 3
6767
6868 let tDynamicTotalRegCount = 4
6969
7070 let tDynamicTotalAttempts = 5
7171
7272 func getTourData (tourContract,tId) = {
7373 let static = split(valueOrErrorMessage(getString(tourContract, keyTourStaticDataById(tId)), (("Error reading tournament " + toString(tId)) + " data")), "__")
7474 let dynamic = split_4C(valueOrErrorMessage(getString(tourContract, keyTourDynamicDataById(tId)), (("Error reading tournament " + toString(tId)) + " data")), "__")
7575 [static, dynamic]
7676 }
7777
7878
7979 func isInTournament (tourContract,location) = {
8080 let lastId = valueOrElse(getInteger(tourContract, lastTourIdKey), 0)
8181 let loc = split(location, "_")
8282 let now = lastBlock.timestamp
8383 let tData = getTourData(tourContract, lastId)
8484 let static = tData[idxStatic]
8585 let dynamic = tData[idxDynamic]
8686 if (if (if ((loc[locIdxType] == "T"))
8787 then (parseIntValue(loc[locIdxContinent]) == lastId)
8888 else false)
8989 then (dynamic[tDynamicStatus] == "INPROGRESS")
9090 else false)
9191 then (parseIntValue(static[tStaticEnd]) > now)
9292 else false
9393 }
9494
9595
9696 let chain = take(drop(this.bytes, 1), 1)
9797
9898 let defaultRestAddressStr = match chain {
9999 case _ =>
100100 if ((base58'2W' == $match0))
101101 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
102102 else if ((base58'2T' == $match0))
103103 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
104104 else throw("Unknown chain")
105105 }
106106
107107 let SEP = "__"
108108
109109 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
110110
111111
112112 let IdxCfgStakingDapp = 1
113113
114114 let IdxCfgWlgDapp = 4
115115
116116 func keyRestCfg () = "%s__restConfig"
117117
118118
119119 func keyRestAddress () = "%s__restAddr"
120120
121121
122122 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
123123
124124
125125 func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
126126
127127
128128 let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr))
129129
130130 let restCfg = readRestCfgOrFail(restContract)
131131
132132 let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp)
133133
134134 let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp)
135135
136136 let wlgAssetIdKey = "wlg_assetId"
137137
138138 let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "Not initialized yet")
139139
140140 func asString (v) = match v {
141141 case s: String =>
142142 s
143143 case _ =>
144144 throw("fail to cast into String")
145145 }
146146
147147
148148 func asInt (v) = match v {
149149 case n: Int =>
150150 n
151151 case _ =>
152152 throw("fail to cast into Int")
153153 }
154154
155155
156156 func fixedPoint (val,decimals) = {
157157 let tenPow = pow(10, 0, decimals, 0, 0, DOWN)
158158 let lowPart = toString((val % tenPow))
159159 let zeroes = drop(toString(tenPow), (1 + size(lowPart)))
160160 (((toString((val / tenPow)) + ".") + zeroes) + lowPart)
161161 }
162162
163163
164164 func padL (val,len) = {
165165 let valS = toString(val)
166166 let zeroes = drop(toString(pow(10, 0, (len - size(valS)), 0, 0, DOWN)), 1)
167167 (zeroes + valS)
168168 }
169169
170170
171171 let MAXTOURNAMENTLENGTH = 432000000
172172
173173 let HOUR = 3600000
174174
175175 let adminsList = [toString(this), match chain {
176176 case _ =>
177177 if ((base58'2W' == $match0))
178178 then "3PEe2RELUHCFCBsmSCNcBJ8N3URLVQende7"
179179 else if ((base58'2T' == $match0))
180180 then "3MtBgJTaLxPB3C7UJD1UE8qjkHthfKvFQYY"
181181 else throw("Unknown chain")
182182 }]
183183
184184 func staticData (txId,registerCost,attemptCost,creationTime,startTime,endTime,numGrands) = makeString(["%s%d%d%d%d%d%d", txId, toString(registerCost), toString(attemptCost), toString(creationTime), toString(startTime), toString(endTime), toString(numGrands)], SEP)
185185
186186
187187 func dynamicData (status,leaders,winResult,totalRegs,totalAttempts) = makeString_2C(["%s%s%d%d%d", status, leaders, toString(winResult), toString(totalRegs), toString(totalAttempts)], SEP)
188188
189189
190190 func prolog () = asInt(invoke(stakingContract, "saveLastTx", nil, nil))
191191
192192
193193 func duckByCaller (caller) = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(caller))), "You don't have a duck staked")
194194
195195
196196 @Callable(i)
197197 func createTournament (startTime,endTime,registerCost,attemptCost,numGrands) = {
198198 let caller = toString(i.caller)
199199 if (!(containsElement(adminsList, caller)))
200200 then throw("Permission denied")
201201 else {
202202 let lastId = getInteger(lastTourIdKey)
203203 let tId = if (isDefined(lastId))
204204 then {
205205 let lastTourId = value(lastId)
206206 let dynamic = valueOrErrorMessage(getString(keyTourDynamicDataById(lastTourId)), (("Error reading tournament " + toString(lastTourId)) + " data"))
207207 let status = split(dynamic, SEP)[tDynamicStatus]
208208 if ((status != "ARCHIVED"))
209209 then throw(("Current tournement is not completed, status=" + status))
210210 else (lastTourId + 1)
211211 }
212212 else 1
213213 let now = lastBlock.timestamp
214214 if ((now > startTime))
215215 then throw(((("startTime=" + toString(startTime)) + " < creationTime=") + toString(now)))
216216 else if ((startTime > endTime))
217217 then throw(((("endTime=" + toString(endTime)) + " < startTime=") + toString(startTime)))
218218 else if (((endTime - startTime) > MAXTOURNAMENTLENGTH))
219219 then throw(((("Tournament period exceeds max: " + toString((endTime - startTime))) + " > ") + toString(MAXTOURNAMENTLENGTH)))
220220 else if (if ((0 >= registerCost))
221221 then true
222222 else (0 >= attemptCost))
223223 then throw(((("Cost should be positive, but passed " + toString(registerCost)) + " and ") + toString(attemptCost)))
224224 else if ((0 > numGrands))
225225 then throw("Number of Grand Prizes should be non-negative")
226226 else $Tuple2([IntegerEntry(lastTourIdKey, tId), StringEntry(keyTourStaticDataById(tId), staticData(toBase58String(i.transactionId), registerCost, attemptCost, now, startTime, endTime, numGrands)), StringEntry(keyTourDynamicDataById(tId), dynamicData("CREATED", " ", 0, 0, 0))], tId)
227227 }
228228 }
229229
230230
231231
232232 @Callable(i)
233233 func register () = {
234234 let prologResult = prolog()
235235 if ((size(i.payments) != 1))
236236 then throw("exactly 1 payment must be attached")
237237 else {
238238 let pmt = i.payments[0]
239239 let wlgAmt = pmt.amount
240240 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WLGOLD payments only!")
241241 if ((pmtAssetId != wlgAssetId))
242242 then throw("WLGOLD payments only!")
243243 else {
244244 let lastId = valueOrErrorMessage(getInteger(lastTourIdKey), "No active tournaments")
245245 let now = lastBlock.timestamp
246246 let tData = getTourData(this, lastId)
247247 let static = tData[idxStatic]
248248 let dynamic = tData[idxDynamic]
249249 let status = dynamic[tDynamicStatus]
250250 if (!(if (if (if ((status == "CREATED"))
251251 then (now > parseIntValue(static[tStaticStart]))
252252 else false)
253253 then ((parseIntValue(static[tStaticEnd]) - HOUR) > now)
254254 else false)
255255 then true
256256 else if ((status == "INPROGRESS"))
257257 then ((parseIntValue(static[tStaticEnd]) - HOUR) > now)
258258 else false))
259259 then throw("Cannot register now")
260260 else {
261261 let regCost = parseIntValue(static[tStaticRegisterCost])
262262 if ((wlgAmt != regCost))
263263 then throw((("Need payment of " + fixedPoint(regCost, 8)) + " WLGOLD"))
264264 else {
265265 let duckAssetId = duckByCaller(i.originCaller)
266266 let oldScoreBoard = valueOrElse(getString(keyScoreBoardByTour(lastId)), "")
267267 if (if (valueOrElse(getBoolean(keyIsRegisteredByTourAndDuck(lastId, duckAssetId)), false))
268268 then true
269269 else contains(oldScoreBoard, duckAssetId))
270270 then throw(((("Your duck " + duckAssetId) + " is already registered at tournament ") + toString(lastId)))
271271 else {
272272 let updatedDynamicData = dynamicData("INPROGRESS", dynamic[tDynamicLeaders], parseIntValue(dynamic[tDynamicWinResult]), (parseIntValue(dynamic[tDynamicTotalRegCount]) + 1), parseIntValue(dynamic[tDynamicTotalAttempts]))
273273 $Tuple2([IntegerEntry(keyLastRegisteredTourByDuck(duckAssetId), lastId), BooleanEntry(keyIsRegisteredByTourAndDuck(lastId, duckAssetId), true), StringEntry(keyScoreBoardByTour(lastId), if ((oldScoreBoard == ""))
274274 then (duckAssetId + ":000")
275275 else (((oldScoreBoard + "_") + duckAssetId) + ":000")), StringEntry(keyTourDynamicDataById(lastId), updatedDynamicData)], prologResult)
276276 }
277277 }
278278 }
279279 }
280280 }
281281 }
282282
283283
284284
285285 @Callable(i)
286286 func newAttempt () = {
287287 let prologResult = prolog()
288288 let duckAssetId = duckByCaller(i.originCaller)
289289 let lastId = valueOrErrorMessage(getInteger(lastTourIdKey), "No active tournaments")
290290 let now = lastBlock.timestamp
291291 let tData = getTourData(this, lastId)
292292 let static = tData[idxStatic]
293293 let dynamic = tData[idxDynamic]
294294 let status = dynamic[tDynamicStatus]
295295 if (!(if ((status == "INPROGRESS"))
296296 then ((parseIntValue(static[tStaticEnd]) - HOUR) > now)
297297 else false))
298298 then throw("Attempt is not possible")
299299 else if (!(valueOrElse(getBoolean(keyIsRegisteredByTourAndDuck(lastId, duckAssetId)), false)))
300300 then throw(((("Your duck " + duckAssetId) + " is not registered at tournament ") + toString(lastId)))
301301 else {
302302 let attemptsIteratorKey = keyLastAttemptByTourAndDuck(lastId, duckAssetId)
303303 let lastAttempt = getInteger(attemptsIteratorKey)
304304 let $t061046736 = if (!(isDefined(lastAttempt)))
305305 then $Tuple2(0, 0)
306306 else if ((size(i.payments) != 1))
307307 then throw("exactly 1 payment must be attached")
308308 else {
309309 let pmt = i.payments[0]
310310 let wlgAmt = pmt.amount
311311 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WLGOLD payments only!")
312312 if ((pmtAssetId != wlgAssetId))
313313 then throw("WLGOLD payments only!")
314314 else {
315315 let attCost = parseIntValue(static[tStaticAttemptCost])
316316 if ((wlgAmt != attCost))
317317 then throw((("Need payment of " + fixedPoint(attCost, 8)) + " WLGOLD"))
318318 else $Tuple2((value(lastAttempt) + 1), 1)
319319 }
320320 }
321321 let payedAttempts = $t061046736._1
322322 let increment = $t061046736._2
323323 let updatedDynamicData = dynamicData("INPROGRESS", dynamic[tDynamicLeaders], parseIntValue(dynamic[tDynamicWinResult]), parseIntValue(dynamic[tDynamicTotalRegCount]), (parseIntValue(dynamic[tDynamicTotalAttempts]) + increment))
324324 let tourLoc = asString(invoke(stakingContract, "initDuckTourAttempt", [duckAssetId], nil))
325325 $Tuple2([IntegerEntry(attemptsIteratorKey, payedAttempts), StringEntry(keyTourDynamicDataById(lastId), updatedDynamicData)], [prologResult, payedAttempts, tourLoc])
326326 }
327327 }
328328
329329
330330
331331 @Callable(i)
332332 func saveDuckResult (duckAssetId,duckNewBest) = if ((i.caller != stakingContract))
333333 then throw("Access denied")
334334 else {
335335 let lastId = valueOrErrorMessage(getInteger(lastTourIdKey), "No active tournaments")
336336 let tData = getTourData(this, lastId)
337337 let static = tData[idxStatic]
338338 let dynamic = tData[idxDynamic]
339339 let curLocation = valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION)
340340 let bestResultKey = keyBestResultByTourAndDuck(lastId, duckAssetId)
341341 let sumScoresKey = keySumScoresByTour(lastId)
342342 let oldSumScores = valueOrElse(getInteger(sumScoresKey), 0)
343343 if (isInTournament(this, curLocation))
344344 then {
345345 let duckOldBest = valueOrElse(getInteger(bestResultKey), 0)
346346 let scoreKey = keyScoreBoardByTour(lastId)
347347 let oldScoreBoard = valueOrElse(getString(scoreKey), "")
348348 let $t082299390 = if ((duckNewBest > duckOldBest))
349349 then if (!(contains(oldScoreBoard, duckAssetId)))
350350 then throw(("scoreBoard does not contain " + duckAssetId))
351351 else {
352352 let oldBest = parseIntValue(dynamic[tDynamicWinResult])
353353 let leaders = dynamic[tDynamicLeaders]
354354 let oldLeadersList = if (if ((leaders == ""))
355355 then true
356356 else (leaders == " "))
357357 then nil
358358 else split_4C(leaders, ",")
359359 let newLeadersList = if ((duckNewBest > oldBest))
360360 then [duckAssetId]
361361 else if (if ((oldBest > duckNewBest))
362362 then true
363363 else containsElement(oldLeadersList, duckAssetId))
364364 then oldLeadersList
365365 else (oldLeadersList :+ duckAssetId)
366366 let updatedDynamicData = dynamicData("INPROGRESS", makeString_2C(newLeadersList, ","), max([duckNewBest, oldBest]), parseIntValue(dynamic[tDynamicTotalRegCount]), parseIntValue(dynamic[tDynamicTotalAttempts]))
367367 let parts = split_51C(oldScoreBoard, duckAssetId)
368368 $Tuple3(((((parts[0] + duckAssetId) + ":") + padL(duckNewBest, 3)) + drop(parts[1], 4)), ((oldSumScores + duckNewBest) - duckOldBest), [StringEntry(keyTourDynamicDataById(lastId), updatedDynamicData)])
369369 }
370370 else $Tuple3(oldScoreBoard, oldSumScores, nil)
371371 let newScoreBoard = $t082299390._1
372372 let newSumScores = $t082299390._2
373373 let globalActions = $t082299390._3
374374 $Tuple2(([IntegerEntry(bestResultKey, max([duckOldBest, duckNewBest])), IntegerEntry(sumScoresKey, newSumScores), StringEntry(scoreKey, newScoreBoard)] ++ globalActions), 0)
375375 }
376376 else $Tuple2(nil, 0)
377377 }
378378
379379
380380
381381 @Callable(i)
382382 func processTournament (tId) = {
383383 let caller = toString(i.caller)
384384 if (!(containsElement(adminsList, caller)))
385385 then throw("Permission denied")
386386 else {
387387 let now = lastBlock.timestamp
388388 let tData = getTourData(this, tId)
389389 let static = tData[idxStatic]
390390 let dynamic = tData[idxDynamic]
391391 let status = dynamic[tDynamicStatus]
392392 let registrations = parseIntValue(dynamic[tDynamicTotalRegCount])
393393 let paidAttempts = parseIntValue(dynamic[tDynamicTotalAttempts])
394394 let regCost = parseIntValue(static[tStaticRegisterCost])
395395 let attCost = parseIntValue(static[tStaticAttemptCost])
396396 if ((status == "ARCHIVED"))
397397 then throw((("Tournament " + toString(tId)) + " is already ARCHIVED"))
398398 else if (if ((status == "INPROGRESS"))
399399 then (parseIntValue(static[tStaticEnd]) > now)
400400 else false)
401401 then throw((("Tournament " + toString(tId)) + " is not over yet"))
402402 else {
403403 let updatedDynamicData = dynamicData("PROCESSING", dynamic[tDynamicLeaders], parseIntValue(dynamic[tDynamicWinResult]), registrations, paidAttempts)
404404 $Tuple2([StringEntry(keyTourDynamicDataById(tId), updatedDynamicData), IntegerEntry(keyUnpaidRewardsByTour(tId), (((registrations * regCost) + (paidAttempts * attCost)) / 2))], 0)
405405 }
406406 }
407407 }
408408
409409
410410
411411 @Callable(i)
412412 func finishTournament (tId) = {
413413 let caller = toString(i.caller)
414414 if (!(containsElement(adminsList, caller)))
415415 then throw("Permission denied")
416416 else {
417417 let tData = getTourData(this, tId)
418418 let dynamic = tData[idxDynamic]
419419 let status = dynamic[tDynamicStatus]
420420 if ((status == "ARCHIVED"))
421421 then throw((("Tournament " + toString(tId)) + " is already ARCHIVED"))
422422 else {
423423 let updatedDynamicData = dynamicData("ARCHIVED", dynamic[tDynamicLeaders], parseIntValue(dynamic[tDynamicWinResult]), parseIntValue(dynamic[tDynamicTotalRegCount]), parseIntValue(dynamic[tDynamicTotalAttempts]))
424424 $Tuple2([StringEntry(keyTourDynamicDataById(tId), updatedDynamicData)], 0)
425425 }
426426 }
427427 }
428428
429429
430430
431431 @Callable(i)
432432 func claimPrize (tId) = {
433433 let prologResult = prolog()
434434 if ((size(i.payments) != 0))
435435 then throw("No payments required")
436436 else {
437437 let tData = getTourData(this, tId)
438438 let static = tData[idxStatic]
439439 let dynamic = tData[idxDynamic]
440440 let status = dynamic[tDynamicStatus]
441441 if ((status != "PROCESSING"))
442442 then throw((("Tournament " + toString(tId)) + " is not PROCESSING"))
443443 else {
444444 let registrations = parseIntValue(dynamic[tDynamicTotalRegCount])
445445 let paidAttempts = parseIntValue(dynamic[tDynamicTotalAttempts])
446446 let regCost = parseIntValue(static[tStaticRegisterCost])
447447 let attCost = parseIntValue(static[tStaticAttemptCost])
448448 let awardFunds = (((registrations * regCost) + (paidAttempts * attCost)) / 2)
449449 let unpaidKey = keyUnpaidRewardsByTour(tId)
450450 let unpaidFunds = valueOrElse(getInteger(unpaidKey), 0)
451451 let duckAssetId = duckByCaller(i.originCaller)
452452 let scoreBoard = valueOrElse(getString(keyScoreBoardByTour(tId)), "")
453453 if (!(valueOrElse(getBoolean(keyIsRegisteredByTourAndDuck(tId, duckAssetId)), false)))
454454 then throw(((("Your duck " + duckAssetId) + " is not registered at tournament ") + toString(tId)))
455455 else {
456456 let bestResultKey = keyBestResultByTourAndDuck(tId, duckAssetId)
457457 let duckBest = valueOrElse(getInteger(bestResultKey), 0)
458458 if ((duckBest == 0))
459459 then throw("Your duck got zero score")
460460 else {
461461 let awardedKey = keyIsAwardedByTourAndDuck(tId, duckAssetId)
462462 if (valueOrElse(getBoolean(awardedKey), false))
463463 then throw(((("Your duck " + duckAssetId) + " is already awarded at tournament ") + toString(tId)))
464464 else {
465465 let sumScoresKey = keySumScoresByTour(tId)
466466 let sumScores = valueOrElse(getInteger(sumScoresKey), 0)
467467 let leaders = dynamic[tDynamicLeaders]
468468 let leadersList = if (if ((leaders == ""))
469469 then true
470470 else (leaders == " "))
471471 then nil
472472 else split_4C(leaders, ",")
473473 let numLeaders = size(leadersList)
474474 if ((numLeaders == 0))
475475 then throw(("No leaders at tournament " + toString(tId)))
476476 else {
477477 let numGrands = parseIntValue(static[tStaticNumGrands])
478478 let winResult = parseIntValue(dynamic[tDynamicWinResult])
479479 let sumLeaderScores = if ((numLeaders > numGrands))
480480 then 0
481481 else if (containsElement(leadersList, duckAssetId))
482482 then throw("As one of winners, you will be awarded by admins")
483483 else (numLeaders * winResult)
484484 let yourAmount = min([fraction(duckBest, awardFunds, (sumScores - sumLeaderScores)), unpaidFunds])
485485 let newUnpaidAmount = (unpaidFunds - yourAmount)
486486 let updatedDynamicData = dynamicData("ARCHIVED", dynamic[tDynamicLeaders], winResult, registrations, paidAttempts)
487487 let archiveAction = if ((0 >= newUnpaidAmount))
488488 then [StringEntry(keyTourDynamicDataById(tId), updatedDynamicData)]
489489 else nil
490490 $Tuple2(([ScriptTransfer(i.caller, yourAmount, wlgAssetId), BooleanEntry(awardedKey, true), IntegerEntry(unpaidKey, newUnpaidAmount)] ++ archiveAction), 0)
491491 }
492492 }
493493 }
494494 }
495495 }
496496 }
497497 }
498498
499499

github/deemru/w8io/169f3d6 
76.14 ms