tx · E12a71AZd9yp46ZWNsXucXHCdH5QDLe2HXkb7v3KriQu

3N3nfqFcxXfd3T18V9icDdh58MJ9wQ2k2xx:  -0.01700000 Waves

2023.10.16 18:27 [2801350] smart account 3N3nfqFcxXfd3T18V9icDdh58MJ9wQ2k2xx > SELF 0.00000000 Waves

{ "type": 13, "id": "E12a71AZd9yp46ZWNsXucXHCdH5QDLe2HXkb7v3KriQu", "fee": 1700000, "feeAssetId": null, "timestamp": 1697470127131, "version": 2, "chainId": 84, "sender": "3N3nfqFcxXfd3T18V9icDdh58MJ9wQ2k2xx", "senderPublicKey": "UGqkWsCpv7xRVXkQRXyLd6pWPDtYGXmPip7FxSd1pAu", "proofs": [ "2vqbZWCWcvtVzrBVG4Fpc3HHCwD99jGNf2d3c733xpBMqyeM9bc6rxpcJYhoMv5nAhGxTijaQx1xf5eER4Zf4hyZ" ], "script": "base64:BgIhCAISCQoHAQEBAQEBCBIAEgASBAoCCAESAwoBARIDCgEBPAAPREVGQVVMVExPQ0FUSU9OAg9BZnJpY2FfRl9BZnJpY2EAD2xvY0lkeENvbnRpbmVudAAAAApsb2NJZHhUeXBlAAEBFGtleVN0YWtlZER1Y2tCeU93bmVyAQlvd25lckFkZHIJAKwCAgISc3Rha2VkRHVja0J5T3duZXJfBQlvd25lckFkZHIBD2tleUR1Y2tMb2NhdGlvbgELZHVja0Fzc2V0SWQJAKwCAgINZHVja0xvY2F0aW9uXwULZHVja0Fzc2V0SWQADWxhc3RUb3VySWRLZXkCDiVzX19sYXN0VG91cklkARVrZXlUb3VyU3RhdGljRGF0YUJ5SWQBA3RJZAkArAICAhYlcyVkX190b3VyU3RhdGljRGF0YV9fCQCkAwEFA3RJZAEWa2V5VG91ckR5bmFtaWNEYXRhQnlJZAEDdElkCQCsAgICFyVzJWRfX3RvdXJEeW5hbWljRGF0YV9fCQCkAwEFA3RJZAETa2V5U2NvcmVCb2FyZEJ5VG91cgEDdElkCQCsAgICEiVzJWRfX3Njb3JlQm9hcmRfXwk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SQ0hJVkVECQCRAwIFB2R5bmFtaWMFD3REeW5hbWljTGVhZGVycwUJd2luUmVzdWx0BQ1yZWdpc3RyYXRpb25zBQxwYWlkQXR0ZW1wdHMEDWFyY2hpdmVBY3Rpb24DCQBnAgAABQ9uZXdVbnBhaWRBbW91bnQJAMwIAgkBC1N0cmluZ0VudHJ5AgkBFmtleVRvdXJEeW5hbWljRGF0YUJ5SWQBBQN0SWQFEnVwZGF0ZWREeW5hbWljRGF0YQUDbmlsBQNuaWwEB2Fzc2V0SWQDCQBmAgkAkAMBBQZzdGF0aWMFDHRTdGF0aWNBc3NldAkA2QQBCQCRAwIFBnN0YXRpYwUMdFN0YXRpY0Fzc2V0BQp3bGdBc3NldElkCQCUCgIJAM4IAgkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIFCnlvdXJBbW91bnQFB2Fzc2V0SWQJAMwIAgkBDEJvb2xlYW5FbnRyeQIFCmF3YXJkZWRLZXkGCQDMCAIJAQxJbnRlZ2VyRW50cnkCBQl1bnBhaWRLZXkFD25ld1VucGFpZEFtb3VudAUDbmlsBQ1hcmNoaXZlQWN0aW9uAAAJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4Ax+HYKg==", "height": 2801350, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DcQS7LBtgKnKTHEksqQAPPvHFt3qcLfDEnZ7cHUytwu7 Next: 5ZMcvaNL5CTTEzdEarikuydYgdsFkmZKu4f26dpUrW34 Diff:
OldNewDifferences
6363 let tStaticNumGrands = 7
6464
6565 let tStaticPrizeFund = 8
66+
67+let tStaticAsset = 9
6668
6769 let tDynamicStatus = 1
6870
186188 else throw("Unknown chain")
187189 }]
188190
189-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)
191+func staticData (txId,registerCost,attemptCost,creationTime,startTime,endTime,numGrands,prizeFund,prizeAsset) = makeString(["%s%d%d%d%d%d%d%d%s", txId, toString(registerCost), toString(attemptCost), toString(creationTime), toString(startTime), toString(endTime), toString(numGrands), toString(prizeFund), prizeAsset], SEP)
190192
191193
192194 func dynamicData (status,leaders,winResult,totalRegs,totalAttempts) = makeString_2C(["%s%s%d%d%d", status, leaders, toString(winResult), toString(totalRegs), toString(totalAttempts)], SEP)
199201
200202
201203 @Callable(i)
202-func createTournament (startTime,endTime,registerCost,attemptCost,numGrands,prizeFund) = {
204+func createTournament (startTime,endTime,registerCost,attemptCost,numGrands,prizeFund,prizeAsset) = {
203205 let caller = toString(i.caller)
204206 if (!(containsElement(adminsList, caller)))
205207 then throw("Permission denied")
232234 then throw("Number of Grand Prizes should be non-negative")
233235 else if ((0 > prizeFund))
234236 then throw("Prize Fund should be non-negative")
235- 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)
237+ else $Tuple2([IntegerEntry(lastTourIdKey, tId), StringEntry(keyTourStaticDataById(tId), staticData(toBase58String(i.transactionId), registerCost, attemptCost, now, startTime, endTime, numGrands, prizeFund, prizeAsset)), StringEntry(keyTourDynamicDataById(tId), dynamicData("CREATED", " ", 0, 0, 0))], tId)
236238 }
237239 }
238240
261263 then throw("Cannot register now")
262264 else {
263265 let regCost = parseIntValue(static[tStaticRegisterCost])
264- let wlgAmt = if ((regCost > 0))
266+ let assetId = if ((size(static) > tStaticAsset))
267+ then fromBase58String(static[tStaticAsset])
268+ else wlgAssetId
269+ let nfo = valueOrErrorMessage(assetInfo(assetId), "No assetInfo available")
270+ let assetName = nfo.name
271+ let assetDecimals = nfo.decimals
272+ let regAmt = if ((regCost > 0))
265273 then if ((size(i.payments) != 1))
266274 then throw("exactly 1 payment must be attached")
267275 else {
268276 let pmt = i.payments[0]
269277 if (if (!(isDefined(pmt.assetId)))
270278 then true
271- else (value(pmt.assetId) != wlgAssetId))
272- then throw("WLGOLD payments only!")
279+ else (value(pmt.assetId) != assetId))
280+ then throw((assetName + " payments only!"))
273281 else pmt.amount
274282 }
275283 else if ((size(i.payments) != 0))
276284 then throw("No payments required")
277285 else 0
278- if ((wlgAmt != regCost))
279- then throw((("Need payment of " + fixedPoint(regCost, 8)) + " WLGOLD"))
286+ if ((regAmt != regCost))
287+ then throw(((("Need payment of " + fixedPoint(regCost, assetDecimals)) + " ") + assetName))
280288 else {
281289 let duckAssetId = duckByCaller(i.originCaller)
282290 let scoreKey = keyScoreBoardByTour(lastId)
320328 else {
321329 let attemptsIteratorKey = keyLastAttemptByTourAndDuck(lastId, duckAssetId)
322330 let lastAttempt = getInteger(attemptsIteratorKey)
323- let $t063906981 = if (!(isDefined(lastAttempt)))
331+ let $t067497614 = if (!(isDefined(lastAttempt)))
324332 then $Tuple2(0, 0)
325333 else if ((size(i.payments) != 1))
326334 then throw("exactly 1 payment must be attached")
327335 else {
328336 let pmt = i.payments[0]
329- let wlgAmt = pmt.amount
337+ let assetId = if ((size(static) > tStaticAsset))
338+ then fromBase58String(static[tStaticAsset])
339+ else wlgAssetId
340+ let nfo = valueOrErrorMessage(assetInfo(assetId), "No assetInfo available")
341+ let assetName = nfo.name
342+ let assetDecimals = nfo.decimals
343+ let amt = pmt.amount
330344 if (if (!(isDefined(pmt.assetId)))
331345 then true
332- else (value(pmt.assetId) != wlgAssetId))
333- then throw("WLGOLD payments only!")
346+ else (value(pmt.assetId) != assetId))
347+ then throw((assetName + " payments only!"))
334348 else {
335349 let attCost = parseIntValue(static[tStaticAttemptCost])
336- if ((wlgAmt != attCost))
337- then throw((("Need payment of " + fixedPoint(attCost, 8)) + " WLGOLD"))
350+ if ((amt != attCost))
351+ then throw(((("Need payment of " + fixedPoint(attCost, assetDecimals)) + " ") + assetName))
338352 else $Tuple2((value(lastAttempt) + 1), 1)
339353 }
340354 }
341- let payedAttempts = $t063906981._1
342- let increment = $t063906981._2
355+ let payedAttempts = $t067497614._1
356+ let increment = $t067497614._2
343357 let updatedDynamicData = dynamicData("INPROGRESS", dynamic[tDynamicLeaders], parseIntValue(dynamic[tDynamicWinResult]), parseIntValue(dynamic[tDynamicTotalRegCount]), (parseIntValue(dynamic[tDynamicTotalAttempts]) + increment))
344358 let tourLoc = asString(invoke(stakingContract, "initDuckTourAttempt", [duckAssetId], nil))
345359 $Tuple2([IntegerEntry(attemptsIteratorKey, payedAttempts), StringEntry(keyTourDynamicDataById(lastId), updatedDynamicData)], [prologResult, payedAttempts, tourLoc])
367381 let duckOldBest = valueOrElse(getInteger(bestResultKey), 0)
368382 let scoreKey = keyScoreBoardByTour(lastId)
369383 let oldScoreBoard = valueOrElse(getString(scoreKey), "")
370- let $t084749635 = if ((duckNewBest > duckOldBest))
384+ let $t0910710268 = if ((duckNewBest > duckOldBest))
371385 then if (!(contains(oldScoreBoard, duckAssetId)))
372386 then throw(("scoreBoard does not contain " + duckAssetId))
373387 else {
390404 $Tuple3(((((parts[0] + duckAssetId) + ":") + padL(duckNewBest, 3)) + drop(parts[1], 4)), ((oldSumScores + duckNewBest) - duckOldBest), [StringEntry(keyTourDynamicDataById(lastId), updatedDynamicData)])
391405 }
392406 else $Tuple3(oldScoreBoard, oldSumScores, nil)
393- let newScoreBoard = $t084749635._1
394- let newSumScores = $t084749635._2
395- let globalActions = $t084749635._3
407+ let newScoreBoard = $t0910710268._1
408+ let newSumScores = $t0910710268._2
409+ let globalActions = $t0910710268._3
396410 $Tuple2(([IntegerEntry(bestResultKey, max([duckOldBest, duckNewBest])), IntegerEntry(sumScoresKey, newSumScores), StringEntry(keyBestTxByTourAndDuck(lastId, duckAssetId), toBase58String(i.transactionId)), StringEntry(scoreKey, newScoreBoard)] ++ globalActions), 0)
397411 }
398412 else $Tuple2(nil, 0)
496510 let archiveAction = if ((0 >= newUnpaidAmount))
497511 then [StringEntry(keyTourDynamicDataById(tId), updatedDynamicData)]
498512 else nil
499- $Tuple2(([ScriptTransfer(i.caller, yourAmount, wlgAssetId), BooleanEntry(awardedKey, true), IntegerEntry(unpaidKey, newUnpaidAmount)] ++ archiveAction), 0)
513+ let assetId = if ((size(static) > tStaticAsset))
514+ then fromBase58String(static[tStaticAsset])
515+ else wlgAssetId
516+ $Tuple2(([ScriptTransfer(i.caller, yourAmount, assetId), BooleanEntry(awardedKey, true), IntegerEntry(unpaidKey, newUnpaidAmount)] ++ archiveAction), 0)
500517 }
501518 }
502519 }
507524 }
508525
509526
510-
511-@Callable(i)
512-func awardLand (winnerAddress) = {
513- let caller = toString(i.caller)
514- if (!(containsElement(adminsList, caller)))
515- then throw("Permission denied")
516- else {
517- let landAssetId = asString(invoke(stakingContract, "awardSLand", [winnerAddress], nil))
518- $Tuple2(nil, landAssetId)
519- }
520- }
521-
522-
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
66+
67+let tStaticAsset = 9
6668
6769 let tDynamicStatus = 1
6870
6971 let tDynamicLeaders = 2
7072
7173 let tDynamicWinResult = 3
7274
7375 let tDynamicTotalRegCount = 4
7476
7577 let tDynamicTotalAttempts = 5
7678
7779 func getTourData (tourContract,tId) = {
7880 let static = split(valueOrErrorMessage(getString(tourContract, keyTourStaticDataById(tId)), (("Error reading tournament " + toString(tId)) + " data")), "__")
7981 let dynamic = split_4C(valueOrErrorMessage(getString(tourContract, keyTourDynamicDataById(tId)), (("Error reading tournament " + toString(tId)) + " data")), "__")
8082 [static, dynamic]
8183 }
8284
8385
8486 func isInTournament (tourContract,location) = {
8587 let lastId = valueOrElse(getInteger(tourContract, lastTourIdKey), 0)
8688 let loc = split(location, "_")
8789 let now = lastBlock.timestamp
8890 let tData = getTourData(tourContract, lastId)
8991 let static = tData[idxStatic]
9092 let dynamic = tData[idxDynamic]
9193 if (if (if ((loc[locIdxType] == "T"))
9294 then (parseIntValue(loc[locIdxContinent]) == lastId)
9395 else false)
9496 then (dynamic[tDynamicStatus] == "INPROGRESS")
9597 else false)
9698 then (parseIntValue(static[tStaticEnd]) > now)
9799 else false
98100 }
99101
100102
101103 let chain = take(drop(this.bytes, 1), 1)
102104
103105 let defaultRestAddressStr = match chain {
104106 case _ =>
105107 if ((base58'2W' == $match0))
106108 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
107109 else if ((base58'2T' == $match0))
108110 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
109111 else throw("Unknown chain")
110112 }
111113
112114 let SEP = "__"
113115
114116 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
115117
116118
117119 let IdxCfgStakingDapp = 1
118120
119121 let IdxCfgWlgDapp = 4
120122
121123 func keyRestCfg () = "%s__restConfig"
122124
123125
124126 func keyRestAddress () = "%s__restAddr"
125127
126128
127129 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
128130
129131
130132 func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
131133
132134
133135 let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr))
134136
135137 let restCfg = readRestCfgOrFail(restContract)
136138
137139 let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp)
138140
139141 let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp)
140142
141143 let wlgAssetIdKey = "wlg_assetId"
142144
143145 let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "WLGOLD is not issued yet")
144146
145147 func asString (v) = match v {
146148 case s: String =>
147149 s
148150 case _ =>
149151 throw("fail to cast into String")
150152 }
151153
152154
153155 func asInt (v) = match v {
154156 case n: Int =>
155157 n
156158 case _ =>
157159 throw("fail to cast into Int")
158160 }
159161
160162
161163 func fixedPoint (val,decimals) = {
162164 let tenPow = pow(10, 0, decimals, 0, 0, DOWN)
163165 let lowPart = toString((val % tenPow))
164166 let zeroes = drop(toString(tenPow), (1 + size(lowPart)))
165167 (((toString((val / tenPow)) + ".") + zeroes) + lowPart)
166168 }
167169
168170
169171 func padL (val,len) = {
170172 let valS = toString(val)
171173 let zeroes = drop(toString(pow(10, 0, (len - size(valS)), 0, 0, DOWN)), 1)
172174 (zeroes + valS)
173175 }
174176
175177
176178 let MAXTOURNAMENTLENGTH = 604800000
177179
178180 let HOUR = 3600000
179181
180182 let adminsList = [toString(this), match chain {
181183 case _ =>
182184 if ((base58'2W' == $match0))
183185 then "3PEe2RELUHCFCBsmSCNcBJ8N3URLVQende7"
184186 else if ((base58'2T' == $match0))
185187 then "3MtBgJTaLxPB3C7UJD1UE8qjkHthfKvFQYY"
186188 else throw("Unknown chain")
187189 }]
188190
189-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)
191+func staticData (txId,registerCost,attemptCost,creationTime,startTime,endTime,numGrands,prizeFund,prizeAsset) = makeString(["%s%d%d%d%d%d%d%d%s", txId, toString(registerCost), toString(attemptCost), toString(creationTime), toString(startTime), toString(endTime), toString(numGrands), toString(prizeFund), prizeAsset], SEP)
190192
191193
192194 func dynamicData (status,leaders,winResult,totalRegs,totalAttempts) = makeString_2C(["%s%s%d%d%d", status, leaders, toString(winResult), toString(totalRegs), toString(totalAttempts)], SEP)
193195
194196
195197 func prolog () = asInt(reentrantInvoke(stakingContract, "saveLastTx", nil, nil))
196198
197199
198200 func duckByCaller (caller) = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(caller))), "You don't have a duck staked")
199201
200202
201203 @Callable(i)
202-func createTournament (startTime,endTime,registerCost,attemptCost,numGrands,prizeFund) = {
204+func createTournament (startTime,endTime,registerCost,attemptCost,numGrands,prizeFund,prizeAsset) = {
203205 let caller = toString(i.caller)
204206 if (!(containsElement(adminsList, caller)))
205207 then throw("Permission denied")
206208 else {
207209 let lastId = getInteger(lastTourIdKey)
208210 let tId = if (isDefined(lastId))
209211 then {
210212 let lastTourId = value(lastId)
211213 let dynamic = valueOrErrorMessage(getString(keyTourDynamicDataById(lastTourId)), (("Error reading tournament " + toString(lastTourId)) + " data"))
212214 let status = split(dynamic, SEP)[tDynamicStatus]
213215 if (if ((status != "ARCHIVED"))
214216 then (status != "PROCESSING")
215217 else false)
216218 then throw(("Current tournement is not completed, status=" + status))
217219 else (lastTourId + 1)
218220 }
219221 else 1
220222 let now = lastBlock.timestamp
221223 if ((now > startTime))
222224 then throw(((("startTime=" + toString(startTime)) + " < creationTime=") + toString(now)))
223225 else if ((startTime > endTime))
224226 then throw(((("endTime=" + toString(endTime)) + " < startTime=") + toString(startTime)))
225227 else if (((endTime - startTime) > MAXTOURNAMENTLENGTH))
226228 then throw(((("Tournament period exceeds max: " + toString((endTime - startTime))) + " > ") + toString(MAXTOURNAMENTLENGTH)))
227229 else if (if ((0 > registerCost))
228230 then true
229231 else (0 > attemptCost))
230232 then throw(((("Cost should be positive, but passed " + toString(registerCost)) + " and ") + toString(attemptCost)))
231233 else if ((0 > numGrands))
232234 then throw("Number of Grand Prizes should be non-negative")
233235 else if ((0 > prizeFund))
234236 then throw("Prize Fund should be non-negative")
235- 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)
237+ else $Tuple2([IntegerEntry(lastTourIdKey, tId), StringEntry(keyTourStaticDataById(tId), staticData(toBase58String(i.transactionId), registerCost, attemptCost, now, startTime, endTime, numGrands, prizeFund, prizeAsset)), StringEntry(keyTourDynamicDataById(tId), dynamicData("CREATED", " ", 0, 0, 0))], tId)
236238 }
237239 }
238240
239241
240242
241243 @Callable(i)
242244 func register () = {
243245 let prologResult = prolog()
244246 if ((prologResult == prologResult))
245247 then {
246248 let lastId = valueOrErrorMessage(getInteger(lastTourIdKey), "No active tournaments")
247249 let now = lastBlock.timestamp
248250 let tData = getTourData(this, lastId)
249251 let static = tData[idxStatic]
250252 let dynamic = tData[idxDynamic]
251253 let status = dynamic[tDynamicStatus]
252254 if (!(if (if (if ((status == "CREATED"))
253255 then (now > parseIntValue(static[tStaticStart]))
254256 else false)
255257 then ((parseIntValue(static[tStaticEnd]) - HOUR) > now)
256258 else false)
257259 then true
258260 else if ((status == "INPROGRESS"))
259261 then ((parseIntValue(static[tStaticEnd]) - HOUR) > now)
260262 else false))
261263 then throw("Cannot register now")
262264 else {
263265 let regCost = parseIntValue(static[tStaticRegisterCost])
264- let wlgAmt = if ((regCost > 0))
266+ let assetId = if ((size(static) > tStaticAsset))
267+ then fromBase58String(static[tStaticAsset])
268+ else wlgAssetId
269+ let nfo = valueOrErrorMessage(assetInfo(assetId), "No assetInfo available")
270+ let assetName = nfo.name
271+ let assetDecimals = nfo.decimals
272+ let regAmt = if ((regCost > 0))
265273 then if ((size(i.payments) != 1))
266274 then throw("exactly 1 payment must be attached")
267275 else {
268276 let pmt = i.payments[0]
269277 if (if (!(isDefined(pmt.assetId)))
270278 then true
271- else (value(pmt.assetId) != wlgAssetId))
272- then throw("WLGOLD payments only!")
279+ else (value(pmt.assetId) != assetId))
280+ then throw((assetName + " payments only!"))
273281 else pmt.amount
274282 }
275283 else if ((size(i.payments) != 0))
276284 then throw("No payments required")
277285 else 0
278- if ((wlgAmt != regCost))
279- then throw((("Need payment of " + fixedPoint(regCost, 8)) + " WLGOLD"))
286+ if ((regAmt != regCost))
287+ then throw(((("Need payment of " + fixedPoint(regCost, assetDecimals)) + " ") + assetName))
280288 else {
281289 let duckAssetId = duckByCaller(i.originCaller)
282290 let scoreKey = keyScoreBoardByTour(lastId)
283291 let oldScoreBoard = valueOrElse(getString(scoreKey), "")
284292 if (if (valueOrElse(getBoolean(keyIsRegisteredByTourAndDuck(lastId, duckAssetId)), false))
285293 then true
286294 else contains(oldScoreBoard, duckAssetId))
287295 then throw(((("Your duck " + duckAssetId) + " is already registered at tournament ") + toString(lastId)))
288296 else {
289297 let updatedDynamicData = dynamicData("INPROGRESS", dynamic[tDynamicLeaders], parseIntValue(dynamic[tDynamicWinResult]), (parseIntValue(dynamic[tDynamicTotalRegCount]) + 1), parseIntValue(dynamic[tDynamicTotalAttempts]))
290298 $Tuple2([IntegerEntry(keyLastRegisteredTourByDuck(duckAssetId), lastId), BooleanEntry(keyIsRegisteredByTourAndDuck(lastId, duckAssetId), true), StringEntry(scoreKey, if ((oldScoreBoard == ""))
291299 then (duckAssetId + ":000")
292300 else (((oldScoreBoard + "_") + duckAssetId) + ":000")), StringEntry(keyTourDynamicDataById(lastId), updatedDynamicData)], prologResult)
293301 }
294302 }
295303 }
296304 }
297305 else throw("Strict value is not equal to itself.")
298306 }
299307
300308
301309
302310 @Callable(i)
303311 func newAttempt () = {
304312 let prologResult = prolog()
305313 if ((prologResult == prologResult))
306314 then {
307315 let duckAssetId = duckByCaller(i.originCaller)
308316 let lastId = valueOrErrorMessage(getInteger(lastTourIdKey), "No active tournaments")
309317 let now = lastBlock.timestamp
310318 let tData = getTourData(this, lastId)
311319 let static = tData[idxStatic]
312320 let dynamic = tData[idxDynamic]
313321 let status = dynamic[tDynamicStatus]
314322 if (!(if ((status == "INPROGRESS"))
315323 then ((parseIntValue(static[tStaticEnd]) - HOUR) > now)
316324 else false))
317325 then throw("Attempt is not possible")
318326 else if (!(valueOrElse(getBoolean(keyIsRegisteredByTourAndDuck(lastId, duckAssetId)), false)))
319327 then throw(((("Your duck " + duckAssetId) + " is not registered at tournament ") + toString(lastId)))
320328 else {
321329 let attemptsIteratorKey = keyLastAttemptByTourAndDuck(lastId, duckAssetId)
322330 let lastAttempt = getInteger(attemptsIteratorKey)
323- let $t063906981 = if (!(isDefined(lastAttempt)))
331+ let $t067497614 = if (!(isDefined(lastAttempt)))
324332 then $Tuple2(0, 0)
325333 else if ((size(i.payments) != 1))
326334 then throw("exactly 1 payment must be attached")
327335 else {
328336 let pmt = i.payments[0]
329- let wlgAmt = pmt.amount
337+ let assetId = if ((size(static) > tStaticAsset))
338+ then fromBase58String(static[tStaticAsset])
339+ else wlgAssetId
340+ let nfo = valueOrErrorMessage(assetInfo(assetId), "No assetInfo available")
341+ let assetName = nfo.name
342+ let assetDecimals = nfo.decimals
343+ let amt = pmt.amount
330344 if (if (!(isDefined(pmt.assetId)))
331345 then true
332- else (value(pmt.assetId) != wlgAssetId))
333- then throw("WLGOLD payments only!")
346+ else (value(pmt.assetId) != assetId))
347+ then throw((assetName + " payments only!"))
334348 else {
335349 let attCost = parseIntValue(static[tStaticAttemptCost])
336- if ((wlgAmt != attCost))
337- then throw((("Need payment of " + fixedPoint(attCost, 8)) + " WLGOLD"))
350+ if ((amt != attCost))
351+ then throw(((("Need payment of " + fixedPoint(attCost, assetDecimals)) + " ") + assetName))
338352 else $Tuple2((value(lastAttempt) + 1), 1)
339353 }
340354 }
341- let payedAttempts = $t063906981._1
342- let increment = $t063906981._2
355+ let payedAttempts = $t067497614._1
356+ let increment = $t067497614._2
343357 let updatedDynamicData = dynamicData("INPROGRESS", dynamic[tDynamicLeaders], parseIntValue(dynamic[tDynamicWinResult]), parseIntValue(dynamic[tDynamicTotalRegCount]), (parseIntValue(dynamic[tDynamicTotalAttempts]) + increment))
344358 let tourLoc = asString(invoke(stakingContract, "initDuckTourAttempt", [duckAssetId], nil))
345359 $Tuple2([IntegerEntry(attemptsIteratorKey, payedAttempts), StringEntry(keyTourDynamicDataById(lastId), updatedDynamicData)], [prologResult, payedAttempts, tourLoc])
346360 }
347361 }
348362 else throw("Strict value is not equal to itself.")
349363 }
350364
351365
352366
353367 @Callable(i)
354368 func saveDuckResult (duckAssetId,duckNewBest) = if ((i.caller != stakingContract))
355369 then throw("Access denied")
356370 else {
357371 let lastId = valueOrErrorMessage(getInteger(lastTourIdKey), "No active tournaments")
358372 let tData = getTourData(this, lastId)
359373 let static = tData[idxStatic]
360374 let dynamic = tData[idxDynamic]
361375 let curLocation = valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION)
362376 let bestResultKey = keyBestResultByTourAndDuck(lastId, duckAssetId)
363377 let sumScoresKey = keySumScoresByTour(lastId)
364378 let oldSumScores = valueOrElse(getInteger(sumScoresKey), 0)
365379 if (isInTournament(this, curLocation))
366380 then {
367381 let duckOldBest = valueOrElse(getInteger(bestResultKey), 0)
368382 let scoreKey = keyScoreBoardByTour(lastId)
369383 let oldScoreBoard = valueOrElse(getString(scoreKey), "")
370- let $t084749635 = if ((duckNewBest > duckOldBest))
384+ let $t0910710268 = if ((duckNewBest > duckOldBest))
371385 then if (!(contains(oldScoreBoard, duckAssetId)))
372386 then throw(("scoreBoard does not contain " + duckAssetId))
373387 else {
374388 let oldBest = parseIntValue(dynamic[tDynamicWinResult])
375389 let leaders = dynamic[tDynamicLeaders]
376390 let oldLeadersList = if (if ((leaders == ""))
377391 then true
378392 else (leaders == " "))
379393 then nil
380394 else split_4C(leaders, ",")
381395 let newLeadersList = if ((duckNewBest > oldBest))
382396 then [duckAssetId]
383397 else if (if ((oldBest > duckNewBest))
384398 then true
385399 else containsElement(oldLeadersList, duckAssetId))
386400 then oldLeadersList
387401 else (oldLeadersList :+ duckAssetId)
388402 let updatedDynamicData = dynamicData("INPROGRESS", makeString_2C(newLeadersList, ","), max([duckNewBest, oldBest]), parseIntValue(dynamic[tDynamicTotalRegCount]), parseIntValue(dynamic[tDynamicTotalAttempts]))
389403 let parts = split_51C(oldScoreBoard, duckAssetId)
390404 $Tuple3(((((parts[0] + duckAssetId) + ":") + padL(duckNewBest, 3)) + drop(parts[1], 4)), ((oldSumScores + duckNewBest) - duckOldBest), [StringEntry(keyTourDynamicDataById(lastId), updatedDynamicData)])
391405 }
392406 else $Tuple3(oldScoreBoard, oldSumScores, nil)
393- let newScoreBoard = $t084749635._1
394- let newSumScores = $t084749635._2
395- let globalActions = $t084749635._3
407+ let newScoreBoard = $t0910710268._1
408+ let newSumScores = $t0910710268._2
409+ let globalActions = $t0910710268._3
396410 $Tuple2(([IntegerEntry(bestResultKey, max([duckOldBest, duckNewBest])), IntegerEntry(sumScoresKey, newSumScores), StringEntry(keyBestTxByTourAndDuck(lastId, duckAssetId), toBase58String(i.transactionId)), StringEntry(scoreKey, newScoreBoard)] ++ globalActions), 0)
397411 }
398412 else $Tuple2(nil, 0)
399413 }
400414
401415
402416
403417 @Callable(i)
404418 func processTournament (tId) = {
405419 let caller = toString(i.caller)
406420 if (!(containsElement(adminsList, caller)))
407421 then throw("Permission denied")
408422 else {
409423 let now = lastBlock.timestamp
410424 let tData = getTourData(this, tId)
411425 let static = tData[idxStatic]
412426 let dynamic = tData[idxDynamic]
413427 let status = dynamic[tDynamicStatus]
414428 let registrations = parseIntValue(dynamic[tDynamicTotalRegCount])
415429 let paidAttempts = parseIntValue(dynamic[tDynamicTotalAttempts])
416430 let regCost = parseIntValue(static[tStaticRegisterCost])
417431 let attCost = parseIntValue(static[tStaticAttemptCost])
418432 if ((status == "ARCHIVED"))
419433 then throw((("Tournament " + toString(tId)) + " is already ARCHIVED"))
420434 else if (if ((status == "INPROGRESS"))
421435 then (parseIntValue(static[tStaticEnd]) > now)
422436 else false)
423437 then throw((("Tournament " + toString(tId)) + " is not over yet"))
424438 else {
425439 let updatedDynamicData = dynamicData("PROCESSING", dynamic[tDynamicLeaders], parseIntValue(dynamic[tDynamicWinResult]), registrations, paidAttempts)
426440 let prizeFund = if ((size(static) > tStaticPrizeFund))
427441 then parseIntValue(static[tStaticPrizeFund])
428442 else 0
429443 let unpaid = ((((registrations * regCost) + (paidAttempts * attCost)) / 2) + prizeFund)
430444 $Tuple2([StringEntry(keyTourDynamicDataById(tId), updatedDynamicData), IntegerEntry(keyUnpaidRewardsByTour(tId), unpaid)], 0)
431445 }
432446 }
433447 }
434448
435449
436450
437451 @Callable(i)
438452 func claimPrize (tId) = {
439453 let prologResult = prolog()
440454 if ((prologResult == prologResult))
441455 then if ((size(i.payments) != 0))
442456 then throw("No payments required")
443457 else {
444458 let tData = getTourData(this, tId)
445459 let static = tData[idxStatic]
446460 let dynamic = tData[idxDynamic]
447461 let status = dynamic[tDynamicStatus]
448462 if ((status != "PROCESSING"))
449463 then throw((("Tournament " + toString(tId)) + " is not PROCESSING"))
450464 else {
451465 let registrations = parseIntValue(dynamic[tDynamicTotalRegCount])
452466 let paidAttempts = parseIntValue(dynamic[tDynamicTotalAttempts])
453467 let regCost = parseIntValue(static[tStaticRegisterCost])
454468 let attCost = parseIntValue(static[tStaticAttemptCost])
455469 let prizeFund = if ((size(static) > tStaticPrizeFund))
456470 then parseIntValue(static[tStaticPrizeFund])
457471 else 0
458472 let awardFunds = ((((registrations * regCost) + (paidAttempts * attCost)) / 2) + prizeFund)
459473 let unpaidKey = keyUnpaidRewardsByTour(tId)
460474 let unpaidFunds = valueOrElse(getInteger(unpaidKey), 0)
461475 let duckAssetId = duckByCaller(i.originCaller)
462476 if (!(valueOrElse(getBoolean(keyIsRegisteredByTourAndDuck(tId, duckAssetId)), false)))
463477 then throw(((("Your duck " + duckAssetId) + " is not registered at tournament ") + toString(tId)))
464478 else {
465479 let bestResultKey = keyBestResultByTourAndDuck(tId, duckAssetId)
466480 let duckBest = valueOrElse(getInteger(bestResultKey), 0)
467481 if ((duckBest == 0))
468482 then throw("Your duck got zero score")
469483 else {
470484 let awardedKey = keyIsAwardedByTourAndDuck(tId, duckAssetId)
471485 if (valueOrElse(getBoolean(awardedKey), false))
472486 then throw(((("Your duck " + duckAssetId) + " is already awarded at tournament ") + toString(tId)))
473487 else {
474488 let sumScoresKey = keySumScoresByTour(tId)
475489 let sumScores = valueOrElse(getInteger(sumScoresKey), 0)
476490 let leaders = dynamic[tDynamicLeaders]
477491 let leadersList = if (if ((leaders == ""))
478492 then true
479493 else (leaders == " "))
480494 then nil
481495 else split_4C(leaders, ",")
482496 let numLeaders = size(leadersList)
483497 if ((numLeaders == 0))
484498 then throw(("No leaders at tournament " + toString(tId)))
485499 else {
486500 let numGrands = parseIntValue(static[tStaticNumGrands])
487501 let winResult = parseIntValue(dynamic[tDynamicWinResult])
488502 let sumLeaderScores = if ((numLeaders > numGrands))
489503 then 0
490504 else if (containsElement(leadersList, duckAssetId))
491505 then throw("As one of winners, you will be awarded by admins")
492506 else (numLeaders * winResult)
493507 let yourAmount = min([fraction(duckBest, awardFunds, (sumScores - sumLeaderScores)), unpaidFunds])
494508 let newUnpaidAmount = (unpaidFunds - yourAmount)
495509 let updatedDynamicData = dynamicData("ARCHIVED", dynamic[tDynamicLeaders], winResult, registrations, paidAttempts)
496510 let archiveAction = if ((0 >= newUnpaidAmount))
497511 then [StringEntry(keyTourDynamicDataById(tId), updatedDynamicData)]
498512 else nil
499- $Tuple2(([ScriptTransfer(i.caller, yourAmount, wlgAssetId), BooleanEntry(awardedKey, true), IntegerEntry(unpaidKey, newUnpaidAmount)] ++ archiveAction), 0)
513+ let assetId = if ((size(static) > tStaticAsset))
514+ then fromBase58String(static[tStaticAsset])
515+ else wlgAssetId
516+ $Tuple2(([ScriptTransfer(i.caller, yourAmount, assetId), BooleanEntry(awardedKey, true), IntegerEntry(unpaidKey, newUnpaidAmount)] ++ archiveAction), 0)
500517 }
501518 }
502519 }
503520 }
504521 }
505522 }
506523 else throw("Strict value is not equal to itself.")
507524 }
508525
509526
510-
511-@Callable(i)
512-func awardLand (winnerAddress) = {
513- let caller = toString(i.caller)
514- if (!(containsElement(adminsList, caller)))
515- then throw("Permission denied")
516- else {
517- let landAssetId = asString(invoke(stakingContract, "awardSLand", [winnerAddress], nil))
518- $Tuple2(nil, landAssetId)
519- }
520- }
521-
522-

github/deemru/w8io/169f3d6 
75.62 ms