tx · 6aRBuV1Ucg3aPwvTtC3gB2tR521TtmcmDNk9c6JYTa3m

3N3nfqFcxXfd3T18V9icDdh58MJ9wQ2k2xx:  -0.01600000 Waves

2023.09.30 19:41 [2778417] smart account 3N3nfqFcxXfd3T18V9icDdh58MJ9wQ2k2xx > SELF 0.00000000 Waves

{ "type": 13, "id": "6aRBuV1Ucg3aPwvTtC3gB2tR521TtmcmDNk9c6JYTa3m", "fee": 1600000, "feeAssetId": null, "timestamp": 1696092126480, "version": 2, "chainId": 84, "sender": "3N3nfqFcxXfd3T18V9icDdh58MJ9wQ2k2xx", "senderPublicKey": "UGqkWsCpv7xRVXkQRXyLd6pWPDtYGXmPip7FxSd1pAu", "proofs": [ "3weUMgxiTPYxkiM1Zzc8NQz5kuVZHETgGnvD26mZVBFPXi41yWSVSpoPdMpunkwrSBd8Ng5G8KpX55DTihQjb11q" ], "script": "base64:BgIlCAISCAoGAQEBAQEBEgASABIECgIIARIDCgEBEgMKAQESAwoBCDsAD0RFRkFVTFRMT0NBVElPTgIPQWZyaWNhX0ZfQWZyaWNhAA9sb2NJZHhDb250aW5lbnQAAAAKbG9jSWR4VHlwZQABARRrZXlTdGFrZWREdWNrQnlPd25lcgEJb3duZXJBZGRyCQCsAgICEnN0YWtlZER1Y2tCeU93bmVyXwUJb3duZXJBZGRyAQ9rZXlEdWNrTG9jYXRpb24BC2R1Y2tBc3NldElkCQCsAgICDWR1Y2tMb2NhdGlvbl8FC2R1Y2tBc3NldElkAA1sYXN0VG91cklkS2V5Ag4lc19fbGFzdFRvdXJJZAEVa2V5VG91clN0YXRpY0RhdGFCeUlkAQN0SWQJAKwCAgIWJXMlZF9fdG91clN0YXRpY0RhdGFfXwkApAMBBQN0SWQBFmtleVRvdXJEeW5hbWljRGF0YUJ5SWQBA3RJZAkArAICAhclcyVkX190b3VyRHluYW1pY0RhdGFfXwkApAMBBQN0SWQBE2tleVNjb3JlQm9hcmRCeVRvdXIBA3RJZAkArAICAhIlcyVkX19zY29yZUJ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dW50CQBlAgULdW5wYWlkRnVuZHMFCnlvdXJBbW91bnQEEnVwZGF0ZWREeW5hbWljRGF0YQkBC2R5bmFtaWNEYXRhBQIIQVJDSElWRUQJAJEDAgUHZHluYW1pYwUPdER5bmFtaWNMZWFkZXJzBQl3aW5SZXN1bHQFDXJlZ2lzdHJhdGlvbnMFDHBhaWRBdHRlbXB0cwQNYXJjaGl2ZUFjdGlvbgMJAGcCAAAFD25ld1VucGFpZEFtb3VudAkAzAgCCQELU3RyaW5nRW50cnkCCQEWa2V5VG91ckR5bmFtaWNEYXRhQnlJZAEFA3RJZAUSdXBkYXRlZER5bmFtaWNEYXRhBQNuaWwFA25pbAkAlAoCCQDOCAIJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwgFAWkGY2FsbGVyBQp5b3VyQW1vdW50BQp3bGdBc3NldElkCQDMCAIJAQxCb29sZWFuRW50cnkCBQphd2FyZGVkS2V5BgkAzAgCCQEMSW50ZWdlckVudHJ5AgUJdW5wYWlkS2V5BQ9uZXdVbnBhaWRBbW91bnQFA25pbAUNYXJjaGl2ZUFjdGlvbgAAAWkBCWF3YXJkTGFuZAENd2lubmVyQWRkcmVzcwQGY2FsbGVyCQClCAEIBQFpBmNhbGxlcgMJAQEhAQkBD2NvbnRhaW5zRWxlbWVudAIFCmFkbWluc0xpc3QFBmNhbGxlcgkAAgECEVBlcm1pc3Npb24gZGVuaWVkBAtsYW5kQXNzZXRJZAkBCGFzU3RyaW5nAQkA/AcEBQ9zdGFraW5nQ29udHJhY3QCCmF3YXJkU0xhbmQJAMwIAgUNd2lubmVyQWRkcmVzcwUDbmlsBQNuaWwJAJQKAgUDbmlsBQtsYW5kQXNzZXRJZADHVoF/", "height": 2778417, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3Akgkya7mbtZzHNhGEdPQxGeA2JsFs6HiMuTV4pBMN2a Next: DcQS7LBtgKnKTHEksqQAPPvHFt3qcLfDEnZ7cHUytwu7 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 func keyBestTxByTourAndDuck (tId,duckAssetId) = makeString(["%s%d%s__bestTxByTourAndDuck", toString(tId), duckAssetId], "__")
4949
5050
5151 let idxStatic = 0
5252
5353 let idxDynamic = 1
5454
5555 let tStaticRegisterCost = 2
5656
5757 let tStaticAttemptCost = 3
5858
5959 let tStaticStart = 5
6060
6161 let tStaticEnd = 6
6262
6363 let tStaticNumGrands = 7
6464
6565 let tStaticPrizeFund = 8
6666
6767 let tDynamicStatus = 1
6868
6969 let tDynamicLeaders = 2
7070
7171 let tDynamicWinResult = 3
7272
7373 let tDynamicTotalRegCount = 4
7474
7575 let tDynamicTotalAttempts = 5
7676
7777 func getTourData (tourContract,tId) = {
7878 let static = split(valueOrErrorMessage(getString(tourContract, keyTourStaticDataById(tId)), (("Error reading tournament " + toString(tId)) + " data")), "__")
7979 let dynamic = split_4C(valueOrErrorMessage(getString(tourContract, keyTourDynamicDataById(tId)), (("Error reading tournament " + toString(tId)) + " data")), "__")
8080 [static, dynamic]
8181 }
8282
8383
8484 func isInTournament (tourContract,location) = {
8585 let lastId = valueOrElse(getInteger(tourContract, lastTourIdKey), 0)
8686 let loc = split(location, "_")
8787 let now = lastBlock.timestamp
8888 let tData = getTourData(tourContract, lastId)
8989 let static = tData[idxStatic]
9090 let dynamic = tData[idxDynamic]
9191 if (if (if ((loc[locIdxType] == "T"))
9292 then (parseIntValue(loc[locIdxContinent]) == lastId)
9393 else false)
9494 then (dynamic[tDynamicStatus] == "INPROGRESS")
9595 else false)
9696 then (parseIntValue(static[tStaticEnd]) > now)
9797 else false
9898 }
9999
100100
101101 let chain = take(drop(this.bytes, 1), 1)
102102
103103 let defaultRestAddressStr = match chain {
104104 case _ =>
105105 if ((base58'2W' == $match0))
106106 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
107107 else if ((base58'2T' == $match0))
108108 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
109109 else throw("Unknown chain")
110110 }
111111
112112 let SEP = "__"
113113
114114 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
115115
116116
117117 let IdxCfgStakingDapp = 1
118118
119119 let IdxCfgWlgDapp = 4
120120
121121 func keyRestCfg () = "%s__restConfig"
122122
123123
124124 func keyRestAddress () = "%s__restAddr"
125125
126126
127127 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
128128
129129
130130 func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
131131
132132
133133 let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr))
134134
135135 let restCfg = readRestCfgOrFail(restContract)
136136
137137 let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp)
138138
139139 let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp)
140140
141141 let wlgAssetIdKey = "wlg_assetId"
142142
143143 let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "WLGOLD is not issued yet")
144144
145145 func asString (v) = match v {
146146 case s: String =>
147147 s
148148 case _ =>
149149 throw("fail to cast into String")
150150 }
151151
152152
153153 func asInt (v) = match v {
154154 case n: Int =>
155155 n
156156 case _ =>
157157 throw("fail to cast into Int")
158158 }
159159
160160
161161 func fixedPoint (val,decimals) = {
162162 let tenPow = pow(10, 0, decimals, 0, 0, DOWN)
163163 let lowPart = toString((val % tenPow))
164164 let zeroes = drop(toString(tenPow), (1 + size(lowPart)))
165165 (((toString((val / tenPow)) + ".") + zeroes) + lowPart)
166166 }
167167
168168
169169 func padL (val,len) = {
170170 let valS = toString(val)
171171 let zeroes = drop(toString(pow(10, 0, (len - size(valS)), 0, 0, DOWN)), 1)
172172 (zeroes + valS)
173173 }
174174
175175
176176 let MAXTOURNAMENTLENGTH = 432000000
177177
178178 let HOUR = 3600000
179179
180180 let adminsList = [toString(this), match chain {
181181 case _ =>
182182 if ((base58'2W' == $match0))
183183 then "3PEe2RELUHCFCBsmSCNcBJ8N3URLVQende7"
184184 else if ((base58'2T' == $match0))
185185 then "3MtBgJTaLxPB3C7UJD1UE8qjkHthfKvFQYY"
186186 else throw("Unknown chain")
187187 }]
188188
189189 func staticData (txId,registerCost,attemptCost,creationTime,startTime,endTime,numGrands,prizeFund) = makeString(["%s%d%d%d%d%d%d%d", txId, toString(registerCost), toString(attemptCost), toString(creationTime), toString(startTime), toString(endTime), toString(numGrands), toString(prizeFund)], SEP)
190190
191191
192192 func dynamicData (status,leaders,winResult,totalRegs,totalAttempts) = makeString_2C(["%s%s%d%d%d", status, leaders, toString(winResult), toString(totalRegs), toString(totalAttempts)], SEP)
193193
194194
195195 func prolog () = asInt(invoke(stakingContract, "saveLastTx", nil, nil))
196196
197197
198198 func duckByCaller (caller) = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(caller))), "You don't have a duck staked")
199199
200200
201201 @Callable(i)
202202 func createTournament (startTime,endTime,registerCost,attemptCost,numGrands,prizeFund) = {
203203 let caller = toString(i.caller)
204204 if (!(containsElement(adminsList, caller)))
205205 then throw("Permission denied")
206206 else {
207207 let lastId = getInteger(lastTourIdKey)
208208 let tId = if (isDefined(lastId))
209209 then {
210210 let lastTourId = value(lastId)
211211 let dynamic = valueOrErrorMessage(getString(keyTourDynamicDataById(lastTourId)), (("Error reading tournament " + toString(lastTourId)) + " data"))
212212 let status = split(dynamic, SEP)[tDynamicStatus]
213213 if (if ((status != "ARCHIVED"))
214214 then (status != "PROCESSING")
215215 else false)
216216 then throw(("Current tournement is not completed, status=" + status))
217217 else (lastTourId + 1)
218218 }
219219 else 1
220220 let now = lastBlock.timestamp
221221 if ((now > startTime))
222222 then throw(((("startTime=" + toString(startTime)) + " < creationTime=") + toString(now)))
223223 else if ((startTime > endTime))
224224 then throw(((("endTime=" + toString(endTime)) + " < startTime=") + toString(startTime)))
225225 else if (((endTime - startTime) > MAXTOURNAMENTLENGTH))
226226 then throw(((("Tournament period exceeds max: " + toString((endTime - startTime))) + " > ") + toString(MAXTOURNAMENTLENGTH)))
227227 else if (if ((0 > registerCost))
228228 then true
229229 else (0 > attemptCost))
230230 then throw(((("Cost should be positive, but passed " + toString(registerCost)) + " and ") + toString(attemptCost)))
231231 else if ((0 > numGrands))
232232 then throw("Number of Grand Prizes should be non-negative")
233233 else if ((0 > prizeFund))
234234 then throw("Prize Fund should be non-negative")
235235 else $Tuple2([IntegerEntry(lastTourIdKey, tId), StringEntry(keyTourStaticDataById(tId), staticData(toBase58String(i.transactionId), registerCost, attemptCost, now, startTime, endTime, numGrands, prizeFund)), StringEntry(keyTourDynamicDataById(tId), dynamicData("CREATED", " ", 0, 0, 0))], tId)
236236 }
237237 }
238238
239239
240240
241241 @Callable(i)
242242 func register () = {
243243 let prologResult = prolog()
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 let wlgAmt = if ((regCost > 0))
263263 then if ((size(i.payments) != 1))
264264 then throw("exactly 1 payment must be attached")
265265 else {
266266 let pmt = i.payments[0]
267267 if (if (!(isDefined(pmt.assetId)))
268268 then true
269269 else (value(pmt.assetId) != wlgAssetId))
270270 then throw("WLGOLD payments only!")
271271 else pmt.amount
272272 }
273273 else if ((size(i.payments) != 0))
274274 then throw("No payments required")
275275 else 0
276276 if ((wlgAmt != regCost))
277277 then throw((("Need payment of " + fixedPoint(regCost, 8)) + " WLGOLD"))
278278 else {
279279 let duckAssetId = duckByCaller(i.originCaller)
280280 let scoreKey = keyScoreBoardByTour(lastId)
281281 let oldScoreBoard = valueOrElse(getString(scoreKey), "")
282282 if (if (valueOrElse(getBoolean(keyIsRegisteredByTourAndDuck(lastId, duckAssetId)), false))
283283 then true
284284 else contains(oldScoreBoard, duckAssetId))
285285 then throw(((("Your duck " + duckAssetId) + " is already registered at tournament ") + toString(lastId)))
286286 else {
287287 let updatedDynamicData = dynamicData("INPROGRESS", dynamic[tDynamicLeaders], parseIntValue(dynamic[tDynamicWinResult]), (parseIntValue(dynamic[tDynamicTotalRegCount]) + 1), parseIntValue(dynamic[tDynamicTotalAttempts]))
288288 $Tuple2([IntegerEntry(keyLastRegisteredTourByDuck(duckAssetId), lastId), BooleanEntry(keyIsRegisteredByTourAndDuck(lastId, duckAssetId), true), StringEntry(scoreKey, if ((oldScoreBoard == ""))
289289 then (duckAssetId + ":000")
290290 else (((oldScoreBoard + "_") + duckAssetId) + ":000")), StringEntry(keyTourDynamicDataById(lastId), updatedDynamicData)], prologResult)
291291 }
292292 }
293293 }
294294 }
295295
296296
297297
298298 @Callable(i)
299299 func newAttempt () = {
300300 let prologResult = prolog()
301301 let duckAssetId = duckByCaller(i.originCaller)
302302 let lastId = valueOrErrorMessage(getInteger(lastTourIdKey), "No active tournaments")
303303 let now = lastBlock.timestamp
304304 let tData = getTourData(this, lastId)
305305 let static = tData[idxStatic]
306306 let dynamic = tData[idxDynamic]
307307 let status = dynamic[tDynamicStatus]
308308 if (!(if ((status == "INPROGRESS"))
309309 then ((parseIntValue(static[tStaticEnd]) - HOUR) > now)
310310 else false))
311311 then throw("Attempt is not possible")
312312 else if (!(valueOrElse(getBoolean(keyIsRegisteredByTourAndDuck(lastId, duckAssetId)), false)))
313313 then throw(((("Your duck " + duckAssetId) + " is not registered at tournament ") + toString(lastId)))
314314 else {
315315 let attemptsIteratorKey = keyLastAttemptByTourAndDuck(lastId, duckAssetId)
316316 let lastAttempt = getInteger(attemptsIteratorKey)
317317 let $t063756966 = if (!(isDefined(lastAttempt)))
318318 then $Tuple2(0, 0)
319319 else if ((size(i.payments) != 1))
320320 then throw("exactly 1 payment must be attached")
321321 else {
322322 let pmt = i.payments[0]
323323 let wlgAmt = pmt.amount
324324 if (if (!(isDefined(pmt.assetId)))
325325 then true
326326 else (value(pmt.assetId) != wlgAssetId))
327327 then throw("WLGOLD payments only!")
328328 else {
329329 let attCost = parseIntValue(static[tStaticAttemptCost])
330330 if ((wlgAmt != attCost))
331331 then throw((("Need payment of " + fixedPoint(attCost, 8)) + " WLGOLD"))
332332 else $Tuple2((value(lastAttempt) + 1), 1)
333333 }
334334 }
335335 let payedAttempts = $t063756966._1
336336 let increment = $t063756966._2
337337 let updatedDynamicData = dynamicData("INPROGRESS", dynamic[tDynamicLeaders], parseIntValue(dynamic[tDynamicWinResult]), parseIntValue(dynamic[tDynamicTotalRegCount]), (parseIntValue(dynamic[tDynamicTotalAttempts]) + increment))
338338 let tourLoc = asString(invoke(stakingContract, "initDuckTourAttempt", [duckAssetId], nil))
339339 $Tuple2([IntegerEntry(attemptsIteratorKey, payedAttempts), StringEntry(keyTourDynamicDataById(lastId), updatedDynamicData)], [prologResult, payedAttempts, tourLoc])
340340 }
341341 }
342342
343343
344344
345345 @Callable(i)
346346 func saveDuckResult (duckAssetId,duckNewBest) = if ((i.caller != stakingContract))
347347 then throw("Access denied")
348348 else {
349349 let lastId = valueOrErrorMessage(getInteger(lastTourIdKey), "No active tournaments")
350350 let tData = getTourData(this, lastId)
351351 let static = tData[idxStatic]
352352 let dynamic = tData[idxDynamic]
353353 let curLocation = valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION)
354354 let bestResultKey = keyBestResultByTourAndDuck(lastId, duckAssetId)
355355 let sumScoresKey = keySumScoresByTour(lastId)
356356 let oldSumScores = valueOrElse(getInteger(sumScoresKey), 0)
357357 if (isInTournament(this, curLocation))
358358 then {
359359 let duckOldBest = valueOrElse(getInteger(bestResultKey), 0)
360360 let scoreKey = keyScoreBoardByTour(lastId)
361361 let oldScoreBoard = valueOrElse(getString(scoreKey), "")
362362 let $t084599620 = if ((duckNewBest > duckOldBest))
363363 then if (!(contains(oldScoreBoard, duckAssetId)))
364364 then throw(("scoreBoard does not contain " + duckAssetId))
365365 else {
366366 let oldBest = parseIntValue(dynamic[tDynamicWinResult])
367367 let leaders = dynamic[tDynamicLeaders]
368368 let oldLeadersList = if (if ((leaders == ""))
369369 then true
370370 else (leaders == " "))
371371 then nil
372372 else split_4C(leaders, ",")
373373 let newLeadersList = if ((duckNewBest > oldBest))
374374 then [duckAssetId]
375375 else if (if ((oldBest > duckNewBest))
376376 then true
377377 else containsElement(oldLeadersList, duckAssetId))
378378 then oldLeadersList
379379 else (oldLeadersList :+ duckAssetId)
380380 let updatedDynamicData = dynamicData("INPROGRESS", makeString_2C(newLeadersList, ","), max([duckNewBest, oldBest]), parseIntValue(dynamic[tDynamicTotalRegCount]), parseIntValue(dynamic[tDynamicTotalAttempts]))
381381 let parts = split_51C(oldScoreBoard, duckAssetId)
382382 $Tuple3(((((parts[0] + duckAssetId) + ":") + padL(duckNewBest, 3)) + drop(parts[1], 4)), ((oldSumScores + duckNewBest) - duckOldBest), [StringEntry(keyTourDynamicDataById(lastId), updatedDynamicData)])
383383 }
384384 else $Tuple3(oldScoreBoard, oldSumScores, nil)
385385 let newScoreBoard = $t084599620._1
386386 let newSumScores = $t084599620._2
387387 let globalActions = $t084599620._3
388388 $Tuple2(([IntegerEntry(bestResultKey, max([duckOldBest, duckNewBest])), IntegerEntry(sumScoresKey, newSumScores), StringEntry(keyBestTxByTourAndDuck(lastId, duckAssetId), toBase58String(i.transactionId)), StringEntry(scoreKey, newScoreBoard)] ++ globalActions), 0)
389389 }
390390 else $Tuple2(nil, 0)
391391 }
392392
393393
394394
395395 @Callable(i)
396396 func processTournament (tId) = {
397397 let caller = toString(i.caller)
398398 if (!(containsElement(adminsList, caller)))
399399 then throw("Permission denied")
400400 else {
401401 let now = lastBlock.timestamp
402402 let tData = getTourData(this, tId)
403403 let static = tData[idxStatic]
404404 let dynamic = tData[idxDynamic]
405405 let status = dynamic[tDynamicStatus]
406406 let registrations = parseIntValue(dynamic[tDynamicTotalRegCount])
407407 let paidAttempts = parseIntValue(dynamic[tDynamicTotalAttempts])
408408 let regCost = parseIntValue(static[tStaticRegisterCost])
409409 let attCost = parseIntValue(static[tStaticAttemptCost])
410410 if ((status == "ARCHIVED"))
411411 then throw((("Tournament " + toString(tId)) + " is already ARCHIVED"))
412412 else if (if ((status == "INPROGRESS"))
413413 then (parseIntValue(static[tStaticEnd]) > now)
414414 else false)
415415 then throw((("Tournament " + toString(tId)) + " is not over yet"))
416416 else {
417417 let updatedDynamicData = dynamicData("PROCESSING", dynamic[tDynamicLeaders], parseIntValue(dynamic[tDynamicWinResult]), registrations, paidAttempts)
418418 let prizeFund = if ((size(static) > tStaticPrizeFund))
419419 then parseIntValue(static[tStaticPrizeFund])
420420 else 0
421421 let unpaid = ((((registrations * regCost) + (paidAttempts * attCost)) / 2) + prizeFund)
422422 $Tuple2([StringEntry(keyTourDynamicDataById(tId), updatedDynamicData), IntegerEntry(keyUnpaidRewardsByTour(tId), unpaid)], 0)
423423 }
424424 }
425425 }
426426
427427
428428
429429 @Callable(i)
430430 func claimPrize (tId) = {
431431 let prologResult = prolog()
432432 if ((size(i.payments) != 0))
433433 then throw("No payments required")
434434 else {
435435 let tData = getTourData(this, tId)
436436 let static = tData[idxStatic]
437437 let dynamic = tData[idxDynamic]
438438 let status = dynamic[tDynamicStatus]
439439 if ((status != "PROCESSING"))
440440 then throw((("Tournament " + toString(tId)) + " is not PROCESSING"))
441441 else {
442442 let registrations = parseIntValue(dynamic[tDynamicTotalRegCount])
443443 let paidAttempts = parseIntValue(dynamic[tDynamicTotalAttempts])
444444 let regCost = parseIntValue(static[tStaticRegisterCost])
445445 let attCost = parseIntValue(static[tStaticAttemptCost])
446446 let prizeFund = if ((size(static) > tStaticPrizeFund))
447447 then parseIntValue(static[tStaticPrizeFund])
448448 else 0
449449 let awardFunds = ((((registrations * regCost) + (paidAttempts * attCost)) / 2) + prizeFund)
450450 let unpaidKey = keyUnpaidRewardsByTour(tId)
451451 let unpaidFunds = valueOrElse(getInteger(unpaidKey), 0)
452452 let duckAssetId = duckByCaller(i.originCaller)
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
500500
501501 @Callable(i)
502502 func awardLand (winnerAddress) = {
503503 let caller = toString(i.caller)
504504 if (!(containsElement(adminsList, caller)))
505505 then throw("Permission denied")
506506 else {
507507 let landAssetId = asString(invoke(stakingContract, "awardSLand", [winnerAddress], nil))
508508 $Tuple2(nil, landAssetId)
509509 }
510510 }
511511
512512

github/deemru/w8io/169f3d6 
67.29 ms