tx · CjGYuxNegqHx5kD4AtQw6ozJvu96Caft6gKbmKSRhgPu

3N3nfqFcxXfd3T18V9icDdh58MJ9wQ2k2xx:  -0.01600000 Waves

2023.09.16 10:55 [2757686] smart account 3N3nfqFcxXfd3T18V9icDdh58MJ9wQ2k2xx > SELF 0.00000000 Waves

{ "type": 13, "id": "CjGYuxNegqHx5kD4AtQw6ozJvu96Caft6gKbmKSRhgPu", "fee": 1600000, "feeAssetId": null, "timestamp": 1694850968300, "version": 2, "chainId": 84, "sender": "3N3nfqFcxXfd3T18V9icDdh58MJ9wQ2k2xx", "senderPublicKey": "UGqkWsCpv7xRVXkQRXyLd6pWPDtYGXmPip7FxSd1pAu", "proofs": [ "3MCJ2DgQoAak6xTgJ3aA64wyH7QBzzY3hvbQyAtmpnXYWN6yeMEuCbUu1SbFRFrFR6BDXuqhPMeWzaEWbw3W9ZSK" ], "script": "base64:BgIkCAISBwoFAQEBAQESABIAEgQKAggBEgMKAQESAwoBARIDCgEIOgAPREVGQVVMVExPQ0FUSU9OAg9BZnJpY2FfRl9BZnJpY2EAD2xvY0lkeENvbnRpbmVudAAAAApsb2NJZHhUeXBlAAEBFGtleVN0YWtlZER1Y2tCeU93bmVyAQlvd25lckFkZHIJAKwCAgISc3Rha2VkRHVja0J5T3duZXJfBQlvd25lckFkZHIBD2tleUR1Y2tMb2NhdGlvbgELZHVja0Fzc2V0SWQJAKwCAgINZHVja0xvY2F0aW9uXwULZHVja0Fzc2V0SWQADWxhc3RUb3VySWRLZXkCDiVzX19sYXN0VG91cklkARVrZXlUb3VyU3RhdGljRGF0YUJ5SWQBA3RJZAkArAICAhYlcyVkX190b3VyU3RhdGljRGF0YV9fCQCkAwEFA3RJZAEWa2V5VG91ckR5bmFtaWNEYXRhQnlJZAEDdElkCQCsAgICFyVzJWRfX3RvdXJEeW5hbWljRGF0YV9fCQCkAwEFA3RJZAETa2V5U2NvcmVCb2FyZEJ5VG91cgEDdElkCQCsAgICEiVzJWRfX3Njb3JlQm9h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NuaWwFDWFyY2hpdmVBY3Rpb24AAAFpAQlhd2FyZExhbmQBDXdpbm5lckFkZHJlc3MEBmNhbGxlcgkApQgBCAUBaQZjYWxsZXIDCQEBIQEJAQ9jb250YWluc0VsZW1lbnQCBQphZG1pbnNMaXN0BQZjYWxsZXIJAAIBAhFQZXJtaXNzaW9uIGRlbmllZAQLbGFuZEFzc2V0SWQJAQhhc1N0cmluZwEJAPwHBAUPc3Rha2luZ0NvbnRyYWN0Agphd2FyZFNMYW5kCQDMCAIFDXdpbm5lckFkZHJlc3MFA25pbAUDbmlsCQCUCgIFA25pbAULbGFuZEFzc2V0SWQANeQZew==", "height": 2757686, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EZ4kBb9K3CutSR6FmBJFZp21GaMA279xL5CNfgBgHKYe Next: 4ZwmMa5CDwL357ASszq6YJLEQd2SgM63Ufv4X94bgjpC Diff:
OldNewDifferences
413413
414414
415415 @Callable(i)
416-func finishTournament (tId) = {
417- let caller = toString(i.caller)
418- if (!(containsElement(adminsList, caller)))
419- then throw("Permission denied")
420- else {
421- let tData = getTourData(this, tId)
422- let dynamic = tData[idxDynamic]
423- let status = dynamic[tDynamicStatus]
424- if ((status == "ARCHIVED"))
425- then throw((("Tournament " + toString(tId)) + " is already ARCHIVED"))
426- else {
427- let updatedDynamicData = dynamicData("ARCHIVED", dynamic[tDynamicLeaders], parseIntValue(dynamic[tDynamicWinResult]), parseIntValue(dynamic[tDynamicTotalRegCount]), parseIntValue(dynamic[tDynamicTotalAttempts]))
428- $Tuple2([StringEntry(keyTourDynamicDataById(tId), updatedDynamicData)], 0)
429- }
430- }
431- }
432-
433-
434-
435-@Callable(i)
436416 func claimPrize (tId) = {
437417 let prologResult = prolog()
438418 if ((size(i.payments) != 0))
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 tDynamicStatus = 1
6666
6767 let tDynamicLeaders = 2
6868
6969 let tDynamicWinResult = 3
7070
7171 let tDynamicTotalRegCount = 4
7272
7373 let tDynamicTotalAttempts = 5
7474
7575 func getTourData (tourContract,tId) = {
7676 let static = split(valueOrErrorMessage(getString(tourContract, keyTourStaticDataById(tId)), (("Error reading tournament " + toString(tId)) + " data")), "__")
7777 let dynamic = split_4C(valueOrErrorMessage(getString(tourContract, keyTourDynamicDataById(tId)), (("Error reading tournament " + toString(tId)) + " data")), "__")
7878 [static, dynamic]
7979 }
8080
8181
8282 func isInTournament (tourContract,location) = {
8383 let lastId = valueOrElse(getInteger(tourContract, lastTourIdKey), 0)
8484 let loc = split(location, "_")
8585 let now = lastBlock.timestamp
8686 let tData = getTourData(tourContract, lastId)
8787 let static = tData[idxStatic]
8888 let dynamic = tData[idxDynamic]
8989 if (if (if ((loc[locIdxType] == "T"))
9090 then (parseIntValue(loc[locIdxContinent]) == lastId)
9191 else false)
9292 then (dynamic[tDynamicStatus] == "INPROGRESS")
9393 else false)
9494 then (parseIntValue(static[tStaticEnd]) > now)
9595 else false
9696 }
9797
9898
9999 let chain = take(drop(this.bytes, 1), 1)
100100
101101 let defaultRestAddressStr = match chain {
102102 case _ =>
103103 if ((base58'2W' == $match0))
104104 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
105105 else if ((base58'2T' == $match0))
106106 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
107107 else throw("Unknown chain")
108108 }
109109
110110 let SEP = "__"
111111
112112 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
113113
114114
115115 let IdxCfgStakingDapp = 1
116116
117117 let IdxCfgWlgDapp = 4
118118
119119 func keyRestCfg () = "%s__restConfig"
120120
121121
122122 func keyRestAddress () = "%s__restAddr"
123123
124124
125125 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
126126
127127
128128 func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
129129
130130
131131 let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr))
132132
133133 let restCfg = readRestCfgOrFail(restContract)
134134
135135 let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp)
136136
137137 let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp)
138138
139139 let wlgAssetIdKey = "wlg_assetId"
140140
141141 let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "Not initialized yet")
142142
143143 func asString (v) = match v {
144144 case s: String =>
145145 s
146146 case _ =>
147147 throw("fail to cast into String")
148148 }
149149
150150
151151 func asInt (v) = match v {
152152 case n: Int =>
153153 n
154154 case _ =>
155155 throw("fail to cast into Int")
156156 }
157157
158158
159159 func fixedPoint (val,decimals) = {
160160 let tenPow = pow(10, 0, decimals, 0, 0, DOWN)
161161 let lowPart = toString((val % tenPow))
162162 let zeroes = drop(toString(tenPow), (1 + size(lowPart)))
163163 (((toString((val / tenPow)) + ".") + zeroes) + lowPart)
164164 }
165165
166166
167167 func padL (val,len) = {
168168 let valS = toString(val)
169169 let zeroes = drop(toString(pow(10, 0, (len - size(valS)), 0, 0, DOWN)), 1)
170170 (zeroes + valS)
171171 }
172172
173173
174174 let MAXTOURNAMENTLENGTH = 432000000
175175
176176 let HOUR = 3600000
177177
178178 let adminsList = [toString(this), match chain {
179179 case _ =>
180180 if ((base58'2W' == $match0))
181181 then "3PEe2RELUHCFCBsmSCNcBJ8N3URLVQende7"
182182 else if ((base58'2T' == $match0))
183183 then "3MtBgJTaLxPB3C7UJD1UE8qjkHthfKvFQYY"
184184 else throw("Unknown chain")
185185 }]
186186
187187 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)
188188
189189
190190 func dynamicData (status,leaders,winResult,totalRegs,totalAttempts) = makeString_2C(["%s%s%d%d%d", status, leaders, toString(winResult), toString(totalRegs), toString(totalAttempts)], SEP)
191191
192192
193193 func prolog () = asInt(invoke(stakingContract, "saveLastTx", nil, nil))
194194
195195
196196 func duckByCaller (caller) = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(caller))), "You don't have a duck staked")
197197
198198
199199 @Callable(i)
200200 func createTournament (startTime,endTime,registerCost,attemptCost,numGrands) = {
201201 let caller = toString(i.caller)
202202 if (!(containsElement(adminsList, caller)))
203203 then throw("Permission denied")
204204 else {
205205 let lastId = getInteger(lastTourIdKey)
206206 let tId = if (isDefined(lastId))
207207 then {
208208 let lastTourId = value(lastId)
209209 let dynamic = valueOrErrorMessage(getString(keyTourDynamicDataById(lastTourId)), (("Error reading tournament " + toString(lastTourId)) + " data"))
210210 let status = split(dynamic, SEP)[tDynamicStatus]
211211 if ((status != "ARCHIVED"))
212212 then throw(("Current tournement is not completed, status=" + status))
213213 else (lastTourId + 1)
214214 }
215215 else 1
216216 let now = lastBlock.timestamp
217217 if ((now > startTime))
218218 then throw(((("startTime=" + toString(startTime)) + " < creationTime=") + toString(now)))
219219 else if ((startTime > endTime))
220220 then throw(((("endTime=" + toString(endTime)) + " < startTime=") + toString(startTime)))
221221 else if (((endTime - startTime) > MAXTOURNAMENTLENGTH))
222222 then throw(((("Tournament period exceeds max: " + toString((endTime - startTime))) + " > ") + toString(MAXTOURNAMENTLENGTH)))
223223 else if (if ((0 >= registerCost))
224224 then true
225225 else (0 >= attemptCost))
226226 then throw(((("Cost should be positive, but passed " + toString(registerCost)) + " and ") + toString(attemptCost)))
227227 else if ((0 > numGrands))
228228 then throw("Number of Grand Prizes should be non-negative")
229229 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)
230230 }
231231 }
232232
233233
234234
235235 @Callable(i)
236236 func register () = {
237237 let prologResult = prolog()
238238 if ((size(i.payments) != 1))
239239 then throw("exactly 1 payment must be attached")
240240 else {
241241 let pmt = i.payments[0]
242242 let wlgAmt = pmt.amount
243243 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WLGOLD payments only!")
244244 if ((pmtAssetId != wlgAssetId))
245245 then throw("WLGOLD payments only!")
246246 else {
247247 let lastId = valueOrErrorMessage(getInteger(lastTourIdKey), "No active tournaments")
248248 let now = lastBlock.timestamp
249249 let tData = getTourData(this, lastId)
250250 let static = tData[idxStatic]
251251 let dynamic = tData[idxDynamic]
252252 let status = dynamic[tDynamicStatus]
253253 if (!(if (if (if ((status == "CREATED"))
254254 then (now > parseIntValue(static[tStaticStart]))
255255 else false)
256256 then ((parseIntValue(static[tStaticEnd]) - HOUR) > now)
257257 else false)
258258 then true
259259 else if ((status == "INPROGRESS"))
260260 then ((parseIntValue(static[tStaticEnd]) - HOUR) > now)
261261 else false))
262262 then throw("Cannot register now")
263263 else {
264264 let regCost = parseIntValue(static[tStaticRegisterCost])
265265 if ((wlgAmt != regCost))
266266 then throw((("Need payment of " + fixedPoint(regCost, 8)) + " WLGOLD"))
267267 else {
268268 let duckAssetId = duckByCaller(i.originCaller)
269269 let scoreKey = keyScoreBoardByTour(lastId)
270270 let oldScoreBoard = valueOrElse(getString(scoreKey), "")
271271 if (if (valueOrElse(getBoolean(keyIsRegisteredByTourAndDuck(lastId, duckAssetId)), false))
272272 then true
273273 else contains(oldScoreBoard, duckAssetId))
274274 then throw(((("Your duck " + duckAssetId) + " is already registered at tournament ") + toString(lastId)))
275275 else {
276276 let updatedDynamicData = dynamicData("INPROGRESS", dynamic[tDynamicLeaders], parseIntValue(dynamic[tDynamicWinResult]), (parseIntValue(dynamic[tDynamicTotalRegCount]) + 1), parseIntValue(dynamic[tDynamicTotalAttempts]))
277277 $Tuple2([IntegerEntry(keyLastRegisteredTourByDuck(duckAssetId), lastId), BooleanEntry(keyIsRegisteredByTourAndDuck(lastId, duckAssetId), true), StringEntry(scoreKey, if ((oldScoreBoard == ""))
278278 then (duckAssetId + ":000")
279279 else (((oldScoreBoard + "_") + duckAssetId) + ":000")), StringEntry(keyTourDynamicDataById(lastId), updatedDynamicData)], prologResult)
280280 }
281281 }
282282 }
283283 }
284284 }
285285 }
286286
287287
288288
289289 @Callable(i)
290290 func newAttempt () = {
291291 let prologResult = prolog()
292292 let duckAssetId = duckByCaller(i.originCaller)
293293 let lastId = valueOrErrorMessage(getInteger(lastTourIdKey), "No active tournaments")
294294 let now = lastBlock.timestamp
295295 let tData = getTourData(this, lastId)
296296 let static = tData[idxStatic]
297297 let dynamic = tData[idxDynamic]
298298 let status = dynamic[tDynamicStatus]
299299 if (!(if ((status == "INPROGRESS"))
300300 then ((parseIntValue(static[tStaticEnd]) - HOUR) > now)
301301 else false))
302302 then throw("Attempt is not possible")
303303 else if (!(valueOrElse(getBoolean(keyIsRegisteredByTourAndDuck(lastId, duckAssetId)), false)))
304304 then throw(((("Your duck " + duckAssetId) + " is not registered at tournament ") + toString(lastId)))
305305 else {
306306 let attemptsIteratorKey = keyLastAttemptByTourAndDuck(lastId, duckAssetId)
307307 let lastAttempt = getInteger(attemptsIteratorKey)
308308 let $t061116743 = if (!(isDefined(lastAttempt)))
309309 then $Tuple2(0, 0)
310310 else if ((size(i.payments) != 1))
311311 then throw("exactly 1 payment must be attached")
312312 else {
313313 let pmt = i.payments[0]
314314 let wlgAmt = pmt.amount
315315 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WLGOLD payments only!")
316316 if ((pmtAssetId != wlgAssetId))
317317 then throw("WLGOLD payments only!")
318318 else {
319319 let attCost = parseIntValue(static[tStaticAttemptCost])
320320 if ((wlgAmt != attCost))
321321 then throw((("Need payment of " + fixedPoint(attCost, 8)) + " WLGOLD"))
322322 else $Tuple2((value(lastAttempt) + 1), 1)
323323 }
324324 }
325325 let payedAttempts = $t061116743._1
326326 let increment = $t061116743._2
327327 let updatedDynamicData = dynamicData("INPROGRESS", dynamic[tDynamicLeaders], parseIntValue(dynamic[tDynamicWinResult]), parseIntValue(dynamic[tDynamicTotalRegCount]), (parseIntValue(dynamic[tDynamicTotalAttempts]) + increment))
328328 let tourLoc = asString(invoke(stakingContract, "initDuckTourAttempt", [duckAssetId], nil))
329329 $Tuple2([IntegerEntry(attemptsIteratorKey, payedAttempts), StringEntry(keyTourDynamicDataById(lastId), updatedDynamicData)], [prologResult, payedAttempts, tourLoc])
330330 }
331331 }
332332
333333
334334
335335 @Callable(i)
336336 func saveDuckResult (duckAssetId,duckNewBest) = if ((i.caller != stakingContract))
337337 then throw("Access denied")
338338 else {
339339 let lastId = valueOrErrorMessage(getInteger(lastTourIdKey), "No active tournaments")
340340 let tData = getTourData(this, lastId)
341341 let static = tData[idxStatic]
342342 let dynamic = tData[idxDynamic]
343343 let curLocation = valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION)
344344 let bestResultKey = keyBestResultByTourAndDuck(lastId, duckAssetId)
345345 let sumScoresKey = keySumScoresByTour(lastId)
346346 let oldSumScores = valueOrElse(getInteger(sumScoresKey), 0)
347347 if (isInTournament(this, curLocation))
348348 then {
349349 let duckOldBest = valueOrElse(getInteger(bestResultKey), 0)
350350 let scoreKey = keyScoreBoardByTour(lastId)
351351 let oldScoreBoard = valueOrElse(getString(scoreKey), "")
352352 let $t082369397 = if ((duckNewBest > duckOldBest))
353353 then if (!(contains(oldScoreBoard, duckAssetId)))
354354 then throw(("scoreBoard does not contain " + duckAssetId))
355355 else {
356356 let oldBest = parseIntValue(dynamic[tDynamicWinResult])
357357 let leaders = dynamic[tDynamicLeaders]
358358 let oldLeadersList = if (if ((leaders == ""))
359359 then true
360360 else (leaders == " "))
361361 then nil
362362 else split_4C(leaders, ",")
363363 let newLeadersList = if ((duckNewBest > oldBest))
364364 then [duckAssetId]
365365 else if (if ((oldBest > duckNewBest))
366366 then true
367367 else containsElement(oldLeadersList, duckAssetId))
368368 then oldLeadersList
369369 else (oldLeadersList :+ duckAssetId)
370370 let updatedDynamicData = dynamicData("INPROGRESS", makeString_2C(newLeadersList, ","), max([duckNewBest, oldBest]), parseIntValue(dynamic[tDynamicTotalRegCount]), parseIntValue(dynamic[tDynamicTotalAttempts]))
371371 let parts = split_51C(oldScoreBoard, duckAssetId)
372372 $Tuple3(((((parts[0] + duckAssetId) + ":") + padL(duckNewBest, 3)) + drop(parts[1], 4)), ((oldSumScores + duckNewBest) - duckOldBest), [StringEntry(keyTourDynamicDataById(lastId), updatedDynamicData)])
373373 }
374374 else $Tuple3(oldScoreBoard, oldSumScores, nil)
375375 let newScoreBoard = $t082369397._1
376376 let newSumScores = $t082369397._2
377377 let globalActions = $t082369397._3
378378 $Tuple2(([IntegerEntry(bestResultKey, max([duckOldBest, duckNewBest])), IntegerEntry(sumScoresKey, newSumScores), StringEntry(keyBestTxByTourAndDuck(lastId, duckAssetId), toBase58String(i.transactionId)), StringEntry(scoreKey, newScoreBoard)] ++ globalActions), 0)
379379 }
380380 else $Tuple2(nil, 0)
381381 }
382382
383383
384384
385385 @Callable(i)
386386 func processTournament (tId) = {
387387 let caller = toString(i.caller)
388388 if (!(containsElement(adminsList, caller)))
389389 then throw("Permission denied")
390390 else {
391391 let now = lastBlock.timestamp
392392 let tData = getTourData(this, tId)
393393 let static = tData[idxStatic]
394394 let dynamic = tData[idxDynamic]
395395 let status = dynamic[tDynamicStatus]
396396 let registrations = parseIntValue(dynamic[tDynamicTotalRegCount])
397397 let paidAttempts = parseIntValue(dynamic[tDynamicTotalAttempts])
398398 let regCost = parseIntValue(static[tStaticRegisterCost])
399399 let attCost = parseIntValue(static[tStaticAttemptCost])
400400 if ((status == "ARCHIVED"))
401401 then throw((("Tournament " + toString(tId)) + " is already ARCHIVED"))
402402 else if (if ((status == "INPROGRESS"))
403403 then (parseIntValue(static[tStaticEnd]) > now)
404404 else false)
405405 then throw((("Tournament " + toString(tId)) + " is not over yet"))
406406 else {
407407 let updatedDynamicData = dynamicData("PROCESSING", dynamic[tDynamicLeaders], parseIntValue(dynamic[tDynamicWinResult]), registrations, paidAttempts)
408408 $Tuple2([StringEntry(keyTourDynamicDataById(tId), updatedDynamicData), IntegerEntry(keyUnpaidRewardsByTour(tId), (((registrations * regCost) + (paidAttempts * attCost)) / 2))], 0)
409409 }
410410 }
411411 }
412412
413413
414414
415415 @Callable(i)
416-func finishTournament (tId) = {
417- let caller = toString(i.caller)
418- if (!(containsElement(adminsList, caller)))
419- then throw("Permission denied")
420- else {
421- let tData = getTourData(this, tId)
422- let dynamic = tData[idxDynamic]
423- let status = dynamic[tDynamicStatus]
424- if ((status == "ARCHIVED"))
425- then throw((("Tournament " + toString(tId)) + " is already ARCHIVED"))
426- else {
427- let updatedDynamicData = dynamicData("ARCHIVED", dynamic[tDynamicLeaders], parseIntValue(dynamic[tDynamicWinResult]), parseIntValue(dynamic[tDynamicTotalRegCount]), parseIntValue(dynamic[tDynamicTotalAttempts]))
428- $Tuple2([StringEntry(keyTourDynamicDataById(tId), updatedDynamicData)], 0)
429- }
430- }
431- }
432-
433-
434-
435-@Callable(i)
436416 func claimPrize (tId) = {
437417 let prologResult = prolog()
438418 if ((size(i.payments) != 0))
439419 then throw("No payments required")
440420 else {
441421 let tData = getTourData(this, tId)
442422 let static = tData[idxStatic]
443423 let dynamic = tData[idxDynamic]
444424 let status = dynamic[tDynamicStatus]
445425 if ((status != "PROCESSING"))
446426 then throw((("Tournament " + toString(tId)) + " is not PROCESSING"))
447427 else {
448428 let registrations = parseIntValue(dynamic[tDynamicTotalRegCount])
449429 let paidAttempts = parseIntValue(dynamic[tDynamicTotalAttempts])
450430 let regCost = parseIntValue(static[tStaticRegisterCost])
451431 let attCost = parseIntValue(static[tStaticAttemptCost])
452432 let awardFunds = (((registrations * regCost) + (paidAttempts * attCost)) / 2)
453433 let unpaidKey = keyUnpaidRewardsByTour(tId)
454434 let unpaidFunds = valueOrElse(getInteger(unpaidKey), 0)
455435 let duckAssetId = duckByCaller(i.originCaller)
456436 if (!(valueOrElse(getBoolean(keyIsRegisteredByTourAndDuck(tId, duckAssetId)), false)))
457437 then throw(((("Your duck " + duckAssetId) + " is not registered at tournament ") + toString(tId)))
458438 else {
459439 let bestResultKey = keyBestResultByTourAndDuck(tId, duckAssetId)
460440 let duckBest = valueOrElse(getInteger(bestResultKey), 0)
461441 if ((duckBest == 0))
462442 then throw("Your duck got zero score")
463443 else {
464444 let awardedKey = keyIsAwardedByTourAndDuck(tId, duckAssetId)
465445 if (valueOrElse(getBoolean(awardedKey), false))
466446 then throw(((("Your duck " + duckAssetId) + " is already awarded at tournament ") + toString(tId)))
467447 else {
468448 let sumScoresKey = keySumScoresByTour(tId)
469449 let sumScores = valueOrElse(getInteger(sumScoresKey), 0)
470450 let leaders = dynamic[tDynamicLeaders]
471451 let leadersList = if (if ((leaders == ""))
472452 then true
473453 else (leaders == " "))
474454 then nil
475455 else split_4C(leaders, ",")
476456 let numLeaders = size(leadersList)
477457 if ((numLeaders == 0))
478458 then throw(("No leaders at tournament " + toString(tId)))
479459 else {
480460 let numGrands = parseIntValue(static[tStaticNumGrands])
481461 let winResult = parseIntValue(dynamic[tDynamicWinResult])
482462 let sumLeaderScores = if ((numLeaders > numGrands))
483463 then 0
484464 else if (containsElement(leadersList, duckAssetId))
485465 then throw("As one of winners, you will be awarded by admins")
486466 else (numLeaders * winResult)
487467 let yourAmount = min([fraction(duckBest, awardFunds, (sumScores - sumLeaderScores)), unpaidFunds])
488468 let newUnpaidAmount = (unpaidFunds - yourAmount)
489469 let updatedDynamicData = dynamicData("ARCHIVED", dynamic[tDynamicLeaders], winResult, registrations, paidAttempts)
490470 let archiveAction = if ((0 >= newUnpaidAmount))
491471 then [StringEntry(keyTourDynamicDataById(tId), updatedDynamicData)]
492472 else nil
493473 $Tuple2(([ScriptTransfer(i.caller, yourAmount, wlgAssetId), BooleanEntry(awardedKey, true), IntegerEntry(unpaidKey, newUnpaidAmount)] ++ archiveAction), 0)
494474 }
495475 }
496476 }
497477 }
498478 }
499479 }
500480 }
501481
502482
503483
504484 @Callable(i)
505485 func awardLand (winnerAddress) = {
506486 let caller = toString(i.caller)
507487 if (!(containsElement(adminsList, caller)))
508488 then throw("Permission denied")
509489 else {
510490 let landAssetId = asString(invoke(stakingContract, "awardSLand", [winnerAddress], nil))
511491 $Tuple2(nil, landAssetId)
512492 }
513493 }
514494
515495

github/deemru/w8io/169f3d6 
66.87 ms