tx · EZ4kBb9K3CutSR6FmBJFZp21GaMA279xL5CNfgBgHKYe 3N3nfqFcxXfd3T18V9icDdh58MJ9wQ2k2xx: -0.01700000 Waves 2023.09.16 02:28 [2757172] smart account 3N3nfqFcxXfd3T18V9icDdh58MJ9wQ2k2xx > SELF 0.00000000 Waves
{ "type": 13, "id": "EZ4kBb9K3CutSR6FmBJFZp21GaMA279xL5CNfgBgHKYe", "fee": 1700000, "feeAssetId": null, "timestamp": 1694820559944, "version": 2, "chainId": 84, "sender": "3N3nfqFcxXfd3T18V9icDdh58MJ9wQ2k2xx", "senderPublicKey": "UGqkWsCpv7xRVXkQRXyLd6pWPDtYGXmPip7FxSd1pAu", "proofs": [ "31ZywjsrybcNnEMvfcq3y26T65CdgNbuGsVSeKcjkVkLyzTiCfGvqua1xbfxDkSFh2rXTCekqJqNtXfZn2iPKBqh" ], "script": "base64:BgIpCAISBwoFAQEBAQESABIAEgQKAggBEgMKAQESAwoBARIDCgEBEgMKAQg6AA9ERUZBVUxUTE9DQVRJT04CD0FmcmljYV9GX0FmcmljYQAPbG9jSWR4Q29udGluZW50AAAACmxvY0lkeFR5cGUAAQEUa2V5U3Rha2VkRHVja0J5T3duZXIBCW93bmVyQWRkcgkArAICAhJzdGFrZWREdWNrQnlPd25lcl8FCW93bmVyQWRkcgEPa2V5RHVja0xvY2F0aW9uAQtkdWNrQXNzZXRJZAkArAICAg1kdWNrTG9jYXRpb25fBQtkdWNrQXNzZXRJZAANbGFzdFRvdXJJZEtleQIOJXNfX2xhc3RUb3VySWQBFWtleVRvdXJTdGF0aWNEYXRhQnlJZAEDdElkCQCsAgICFiVzJWRfX3RvdXJTdGF0aWNEYXRhX18JAKQDAQUDdElkARZrZXlUb3VyRHluYW1pY0RhdGFCeUlkAQN0SWQJAKwCAgIXJXMlZF9fdG91ckR5bmFtaWNEYXRhX18JAKQDAQUDdElkARNrZXlTY29yZUJvYXJkQnlUb3VyAQN0SWQJAKwCAgISJXMlZF9fc2NvcmVCb2Fy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jdAIKYXdhcmRTTGFuZAkAzAgCBQ13aW5uZXJBZGRyZXNzBQNuaWwFA25pbAkAlAoCBQNuaWwFC2xhbmRBc3NldElkADQes5o=", "height": 2757172, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2Lt9XTqmK62tLhMwRwXrXxvMvCPGqqyLGMBZX1v1aSnj Next: CjGYuxNegqHx5kD4AtQw6ozJvu96Caft6gKbmKSRhgPu Diff:
Old | New | Differences | |
---|---|---|---|
500 | 500 | } | |
501 | 501 | ||
502 | 502 | ||
503 | + | ||
504 | + | @Callable(i) | |
505 | + | func awardLand (winnerAddress) = { | |
506 | + | let caller = toString(i.caller) | |
507 | + | if (!(containsElement(adminsList, caller))) | |
508 | + | then throw("Permission denied") | |
509 | + | else { | |
510 | + | let landAssetId = asString(invoke(stakingContract, "awardSLand", [winnerAddress], nil)) | |
511 | + | $Tuple2(nil, landAssetId) | |
512 | + | } | |
513 | + | } | |
514 | + | ||
515 | + |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let DEFAULTLOCATION = "Africa_F_Africa" | |
5 | 5 | ||
6 | 6 | let locIdxContinent = 0 | |
7 | 7 | ||
8 | 8 | let locIdxType = 1 | |
9 | 9 | ||
10 | 10 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId) | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | let lastTourIdKey = "%s__lastTourId" | |
17 | 17 | ||
18 | 18 | func keyTourStaticDataById (tId) = ("%s%d__tourStaticData__" + toString(tId)) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func keyTourDynamicDataById (tId) = ("%s%d__tourDynamicData__" + toString(tId)) | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func keyScoreBoardByTour (tId) = ("%s%d__scoreBoard__" + toString(tId)) | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func keySumScoresByTour (tId) = ("%s%d__sumScores__" + toString(tId)) | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func keyUnpaidRewardsByTour (tId) = ("%s%d__unpaidRewards__" + toString(tId)) | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func keyLastRegisteredTourByDuck (duckAssetId) = ("%s%s__lastRegisteredTourByDuck__" + duckAssetId) | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func keyIsRegisteredByTourAndDuck (tId,duckAssetId) = makeString(["%s%d%s__isRegisteredByTourAndDuck", toString(tId), duckAssetId], "__") | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func keyIsAwardedByTourAndDuck (tId,duckAssetId) = makeString(["%s%d%s__isAwardedByTourAndDuck", toString(tId), duckAssetId], "__") | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func keyLastAttemptByTourAndDuck (tId,duckAssetId) = makeString(["%s%d%s__lastAttemptByTourAndDuck", toString(tId), duckAssetId], "__") | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func keyBestResultByTourAndDuck (tId,duckAssetId) = makeString(["%s%d%s__bestResultByTourAndDuck", toString(tId), duckAssetId], "__") | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func keyBestTxByTourAndDuck (tId,duckAssetId) = makeString(["%s%d%s__bestTxByTourAndDuck", toString(tId), duckAssetId], "__") | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | let idxStatic = 0 | |
52 | 52 | ||
53 | 53 | let idxDynamic = 1 | |
54 | 54 | ||
55 | 55 | let tStaticRegisterCost = 2 | |
56 | 56 | ||
57 | 57 | let tStaticAttemptCost = 3 | |
58 | 58 | ||
59 | 59 | let tStaticStart = 5 | |
60 | 60 | ||
61 | 61 | let tStaticEnd = 6 | |
62 | 62 | ||
63 | 63 | let tStaticNumGrands = 7 | |
64 | 64 | ||
65 | 65 | let tDynamicStatus = 1 | |
66 | 66 | ||
67 | 67 | let tDynamicLeaders = 2 | |
68 | 68 | ||
69 | 69 | let tDynamicWinResult = 3 | |
70 | 70 | ||
71 | 71 | let tDynamicTotalRegCount = 4 | |
72 | 72 | ||
73 | 73 | let tDynamicTotalAttempts = 5 | |
74 | 74 | ||
75 | 75 | func getTourData (tourContract,tId) = { | |
76 | 76 | let static = split(valueOrErrorMessage(getString(tourContract, keyTourStaticDataById(tId)), (("Error reading tournament " + toString(tId)) + " data")), "__") | |
77 | 77 | let dynamic = split_4C(valueOrErrorMessage(getString(tourContract, keyTourDynamicDataById(tId)), (("Error reading tournament " + toString(tId)) + " data")), "__") | |
78 | 78 | [static, dynamic] | |
79 | 79 | } | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func isInTournament (tourContract,location) = { | |
83 | 83 | let lastId = valueOrElse(getInteger(tourContract, lastTourIdKey), 0) | |
84 | 84 | let loc = split(location, "_") | |
85 | 85 | let now = lastBlock.timestamp | |
86 | 86 | let tData = getTourData(tourContract, lastId) | |
87 | 87 | let static = tData[idxStatic] | |
88 | 88 | let dynamic = tData[idxDynamic] | |
89 | 89 | if (if (if ((loc[locIdxType] == "T")) | |
90 | 90 | then (parseIntValue(loc[locIdxContinent]) == lastId) | |
91 | 91 | else false) | |
92 | 92 | then (dynamic[tDynamicStatus] == "INPROGRESS") | |
93 | 93 | else false) | |
94 | 94 | then (parseIntValue(static[tStaticEnd]) > now) | |
95 | 95 | else false | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | let chain = take(drop(this.bytes, 1), 1) | |
100 | 100 | ||
101 | 101 | let defaultRestAddressStr = match chain { | |
102 | 102 | case _ => | |
103 | 103 | if ((base58'2W' == $match0)) | |
104 | 104 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
105 | 105 | else if ((base58'2T' == $match0)) | |
106 | 106 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
107 | 107 | else throw("Unknown chain") | |
108 | 108 | } | |
109 | 109 | ||
110 | 110 | let SEP = "__" | |
111 | 111 | ||
112 | 112 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | let IdxCfgStakingDapp = 1 | |
116 | 116 | ||
117 | 117 | let IdxCfgWlgDapp = 4 | |
118 | 118 | ||
119 | 119 | func keyRestCfg () = "%s__restConfig" | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func keyRestAddress () = "%s__restAddr" | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr)) | |
132 | 132 | ||
133 | 133 | let restCfg = readRestCfgOrFail(restContract) | |
134 | 134 | ||
135 | 135 | let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp) | |
136 | 136 | ||
137 | 137 | let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp) | |
138 | 138 | ||
139 | 139 | let wlgAssetIdKey = "wlg_assetId" | |
140 | 140 | ||
141 | 141 | let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "Not initialized yet") | |
142 | 142 | ||
143 | 143 | func asString (v) = match v { | |
144 | 144 | case s: String => | |
145 | 145 | s | |
146 | 146 | case _ => | |
147 | 147 | throw("fail to cast into String") | |
148 | 148 | } | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func asInt (v) = match v { | |
152 | 152 | case n: Int => | |
153 | 153 | n | |
154 | 154 | case _ => | |
155 | 155 | throw("fail to cast into Int") | |
156 | 156 | } | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func fixedPoint (val,decimals) = { | |
160 | 160 | let tenPow = pow(10, 0, decimals, 0, 0, DOWN) | |
161 | 161 | let lowPart = toString((val % tenPow)) | |
162 | 162 | let zeroes = drop(toString(tenPow), (1 + size(lowPart))) | |
163 | 163 | (((toString((val / tenPow)) + ".") + zeroes) + lowPart) | |
164 | 164 | } | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | func padL (val,len) = { | |
168 | 168 | let valS = toString(val) | |
169 | 169 | let zeroes = drop(toString(pow(10, 0, (len - size(valS)), 0, 0, DOWN)), 1) | |
170 | 170 | (zeroes + valS) | |
171 | 171 | } | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | let MAXTOURNAMENTLENGTH = 432000000 | |
175 | 175 | ||
176 | 176 | let HOUR = 3600000 | |
177 | 177 | ||
178 | 178 | let adminsList = [toString(this), match chain { | |
179 | 179 | case _ => | |
180 | 180 | if ((base58'2W' == $match0)) | |
181 | 181 | then "3PEe2RELUHCFCBsmSCNcBJ8N3URLVQende7" | |
182 | 182 | else if ((base58'2T' == $match0)) | |
183 | 183 | then "3MtBgJTaLxPB3C7UJD1UE8qjkHthfKvFQYY" | |
184 | 184 | else throw("Unknown chain") | |
185 | 185 | }] | |
186 | 186 | ||
187 | 187 | 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) | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | func dynamicData (status,leaders,winResult,totalRegs,totalAttempts) = makeString_2C(["%s%s%d%d%d", status, leaders, toString(winResult), toString(totalRegs), toString(totalAttempts)], SEP) | |
191 | 191 | ||
192 | 192 | ||
193 | 193 | func prolog () = asInt(invoke(stakingContract, "saveLastTx", nil, nil)) | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | func duckByCaller (caller) = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(caller))), "You don't have a duck staked") | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | @Callable(i) | |
200 | 200 | func createTournament (startTime,endTime,registerCost,attemptCost,numGrands) = { | |
201 | 201 | let caller = toString(i.caller) | |
202 | 202 | if (!(containsElement(adminsList, caller))) | |
203 | 203 | then throw("Permission denied") | |
204 | 204 | else { | |
205 | 205 | let lastId = getInteger(lastTourIdKey) | |
206 | 206 | let tId = if (isDefined(lastId)) | |
207 | 207 | then { | |
208 | 208 | let lastTourId = value(lastId) | |
209 | 209 | let dynamic = valueOrErrorMessage(getString(keyTourDynamicDataById(lastTourId)), (("Error reading tournament " + toString(lastTourId)) + " data")) | |
210 | 210 | let status = split(dynamic, SEP)[tDynamicStatus] | |
211 | 211 | if ((status != "ARCHIVED")) | |
212 | 212 | then throw(("Current tournement is not completed, status=" + status)) | |
213 | 213 | else (lastTourId + 1) | |
214 | 214 | } | |
215 | 215 | else 1 | |
216 | 216 | let now = lastBlock.timestamp | |
217 | 217 | if ((now > startTime)) | |
218 | 218 | then throw(((("startTime=" + toString(startTime)) + " < creationTime=") + toString(now))) | |
219 | 219 | else if ((startTime > endTime)) | |
220 | 220 | then throw(((("endTime=" + toString(endTime)) + " < startTime=") + toString(startTime))) | |
221 | 221 | else if (((endTime - startTime) > MAXTOURNAMENTLENGTH)) | |
222 | 222 | then throw(((("Tournament period exceeds max: " + toString((endTime - startTime))) + " > ") + toString(MAXTOURNAMENTLENGTH))) | |
223 | 223 | else if (if ((0 >= registerCost)) | |
224 | 224 | then true | |
225 | 225 | else (0 >= attemptCost)) | |
226 | 226 | then throw(((("Cost should be positive, but passed " + toString(registerCost)) + " and ") + toString(attemptCost))) | |
227 | 227 | else if ((0 > numGrands)) | |
228 | 228 | then throw("Number of Grand Prizes should be non-negative") | |
229 | 229 | 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) | |
230 | 230 | } | |
231 | 231 | } | |
232 | 232 | ||
233 | 233 | ||
234 | 234 | ||
235 | 235 | @Callable(i) | |
236 | 236 | func register () = { | |
237 | 237 | let prologResult = prolog() | |
238 | 238 | if ((size(i.payments) != 1)) | |
239 | 239 | then throw("exactly 1 payment must be attached") | |
240 | 240 | else { | |
241 | 241 | let pmt = i.payments[0] | |
242 | 242 | let wlgAmt = pmt.amount | |
243 | 243 | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WLGOLD payments only!") | |
244 | 244 | if ((pmtAssetId != wlgAssetId)) | |
245 | 245 | then throw("WLGOLD payments only!") | |
246 | 246 | else { | |
247 | 247 | let lastId = valueOrErrorMessage(getInteger(lastTourIdKey), "No active tournaments") | |
248 | 248 | let now = lastBlock.timestamp | |
249 | 249 | let tData = getTourData(this, lastId) | |
250 | 250 | let static = tData[idxStatic] | |
251 | 251 | let dynamic = tData[idxDynamic] | |
252 | 252 | let status = dynamic[tDynamicStatus] | |
253 | 253 | if (!(if (if (if ((status == "CREATED")) | |
254 | 254 | then (now > parseIntValue(static[tStaticStart])) | |
255 | 255 | else false) | |
256 | 256 | then ((parseIntValue(static[tStaticEnd]) - HOUR) > now) | |
257 | 257 | else false) | |
258 | 258 | then true | |
259 | 259 | else if ((status == "INPROGRESS")) | |
260 | 260 | then ((parseIntValue(static[tStaticEnd]) - HOUR) > now) | |
261 | 261 | else false)) | |
262 | 262 | then throw("Cannot register now") | |
263 | 263 | else { | |
264 | 264 | let regCost = parseIntValue(static[tStaticRegisterCost]) | |
265 | 265 | if ((wlgAmt != regCost)) | |
266 | 266 | then throw((("Need payment of " + fixedPoint(regCost, 8)) + " WLGOLD")) | |
267 | 267 | else { | |
268 | 268 | let duckAssetId = duckByCaller(i.originCaller) | |
269 | 269 | let scoreKey = keyScoreBoardByTour(lastId) | |
270 | 270 | let oldScoreBoard = valueOrElse(getString(scoreKey), "") | |
271 | 271 | if (if (valueOrElse(getBoolean(keyIsRegisteredByTourAndDuck(lastId, duckAssetId)), false)) | |
272 | 272 | then true | |
273 | 273 | else contains(oldScoreBoard, duckAssetId)) | |
274 | 274 | then throw(((("Your duck " + duckAssetId) + " is already registered at tournament ") + toString(lastId))) | |
275 | 275 | else { | |
276 | 276 | let updatedDynamicData = dynamicData("INPROGRESS", dynamic[tDynamicLeaders], parseIntValue(dynamic[tDynamicWinResult]), (parseIntValue(dynamic[tDynamicTotalRegCount]) + 1), parseIntValue(dynamic[tDynamicTotalAttempts])) | |
277 | 277 | $Tuple2([IntegerEntry(keyLastRegisteredTourByDuck(duckAssetId), lastId), BooleanEntry(keyIsRegisteredByTourAndDuck(lastId, duckAssetId), true), StringEntry(scoreKey, if ((oldScoreBoard == "")) | |
278 | 278 | then (duckAssetId + ":000") | |
279 | 279 | else (((oldScoreBoard + "_") + duckAssetId) + ":000")), StringEntry(keyTourDynamicDataById(lastId), updatedDynamicData)], prologResult) | |
280 | 280 | } | |
281 | 281 | } | |
282 | 282 | } | |
283 | 283 | } | |
284 | 284 | } | |
285 | 285 | } | |
286 | 286 | ||
287 | 287 | ||
288 | 288 | ||
289 | 289 | @Callable(i) | |
290 | 290 | func newAttempt () = { | |
291 | 291 | let prologResult = prolog() | |
292 | 292 | let duckAssetId = duckByCaller(i.originCaller) | |
293 | 293 | let lastId = valueOrErrorMessage(getInteger(lastTourIdKey), "No active tournaments") | |
294 | 294 | let now = lastBlock.timestamp | |
295 | 295 | let tData = getTourData(this, lastId) | |
296 | 296 | let static = tData[idxStatic] | |
297 | 297 | let dynamic = tData[idxDynamic] | |
298 | 298 | let status = dynamic[tDynamicStatus] | |
299 | 299 | if (!(if ((status == "INPROGRESS")) | |
300 | 300 | then ((parseIntValue(static[tStaticEnd]) - HOUR) > now) | |
301 | 301 | else false)) | |
302 | 302 | then throw("Attempt is not possible") | |
303 | 303 | else if (!(valueOrElse(getBoolean(keyIsRegisteredByTourAndDuck(lastId, duckAssetId)), false))) | |
304 | 304 | then throw(((("Your duck " + duckAssetId) + " is not registered at tournament ") + toString(lastId))) | |
305 | 305 | else { | |
306 | 306 | let attemptsIteratorKey = keyLastAttemptByTourAndDuck(lastId, duckAssetId) | |
307 | 307 | let lastAttempt = getInteger(attemptsIteratorKey) | |
308 | 308 | let $t061116743 = if (!(isDefined(lastAttempt))) | |
309 | 309 | then $Tuple2(0, 0) | |
310 | 310 | else if ((size(i.payments) != 1)) | |
311 | 311 | then throw("exactly 1 payment must be attached") | |
312 | 312 | else { | |
313 | 313 | let pmt = i.payments[0] | |
314 | 314 | let wlgAmt = pmt.amount | |
315 | 315 | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WLGOLD payments only!") | |
316 | 316 | if ((pmtAssetId != wlgAssetId)) | |
317 | 317 | then throw("WLGOLD payments only!") | |
318 | 318 | else { | |
319 | 319 | let attCost = parseIntValue(static[tStaticAttemptCost]) | |
320 | 320 | if ((wlgAmt != attCost)) | |
321 | 321 | then throw((("Need payment of " + fixedPoint(attCost, 8)) + " WLGOLD")) | |
322 | 322 | else $Tuple2((value(lastAttempt) + 1), 1) | |
323 | 323 | } | |
324 | 324 | } | |
325 | 325 | let payedAttempts = $t061116743._1 | |
326 | 326 | let increment = $t061116743._2 | |
327 | 327 | let updatedDynamicData = dynamicData("INPROGRESS", dynamic[tDynamicLeaders], parseIntValue(dynamic[tDynamicWinResult]), parseIntValue(dynamic[tDynamicTotalRegCount]), (parseIntValue(dynamic[tDynamicTotalAttempts]) + increment)) | |
328 | 328 | let tourLoc = asString(invoke(stakingContract, "initDuckTourAttempt", [duckAssetId], nil)) | |
329 | 329 | $Tuple2([IntegerEntry(attemptsIteratorKey, payedAttempts), StringEntry(keyTourDynamicDataById(lastId), updatedDynamicData)], [prologResult, payedAttempts, tourLoc]) | |
330 | 330 | } | |
331 | 331 | } | |
332 | 332 | ||
333 | 333 | ||
334 | 334 | ||
335 | 335 | @Callable(i) | |
336 | 336 | func saveDuckResult (duckAssetId,duckNewBest) = if ((i.caller != stakingContract)) | |
337 | 337 | then throw("Access denied") | |
338 | 338 | else { | |
339 | 339 | let lastId = valueOrErrorMessage(getInteger(lastTourIdKey), "No active tournaments") | |
340 | 340 | let tData = getTourData(this, lastId) | |
341 | 341 | let static = tData[idxStatic] | |
342 | 342 | let dynamic = tData[idxDynamic] | |
343 | 343 | let curLocation = valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION) | |
344 | 344 | let bestResultKey = keyBestResultByTourAndDuck(lastId, duckAssetId) | |
345 | 345 | let sumScoresKey = keySumScoresByTour(lastId) | |
346 | 346 | let oldSumScores = valueOrElse(getInteger(sumScoresKey), 0) | |
347 | 347 | if (isInTournament(this, curLocation)) | |
348 | 348 | then { | |
349 | 349 | let duckOldBest = valueOrElse(getInteger(bestResultKey), 0) | |
350 | 350 | let scoreKey = keyScoreBoardByTour(lastId) | |
351 | 351 | let oldScoreBoard = valueOrElse(getString(scoreKey), "") | |
352 | 352 | let $t082369397 = if ((duckNewBest > duckOldBest)) | |
353 | 353 | then if (!(contains(oldScoreBoard, duckAssetId))) | |
354 | 354 | then throw(("scoreBoard does not contain " + duckAssetId)) | |
355 | 355 | else { | |
356 | 356 | let oldBest = parseIntValue(dynamic[tDynamicWinResult]) | |
357 | 357 | let leaders = dynamic[tDynamicLeaders] | |
358 | 358 | let oldLeadersList = if (if ((leaders == "")) | |
359 | 359 | then true | |
360 | 360 | else (leaders == " ")) | |
361 | 361 | then nil | |
362 | 362 | else split_4C(leaders, ",") | |
363 | 363 | let newLeadersList = if ((duckNewBest > oldBest)) | |
364 | 364 | then [duckAssetId] | |
365 | 365 | else if (if ((oldBest > duckNewBest)) | |
366 | 366 | then true | |
367 | 367 | else containsElement(oldLeadersList, duckAssetId)) | |
368 | 368 | then oldLeadersList | |
369 | 369 | else (oldLeadersList :+ duckAssetId) | |
370 | 370 | let updatedDynamicData = dynamicData("INPROGRESS", makeString_2C(newLeadersList, ","), max([duckNewBest, oldBest]), parseIntValue(dynamic[tDynamicTotalRegCount]), parseIntValue(dynamic[tDynamicTotalAttempts])) | |
371 | 371 | let parts = split_51C(oldScoreBoard, duckAssetId) | |
372 | 372 | $Tuple3(((((parts[0] + duckAssetId) + ":") + padL(duckNewBest, 3)) + drop(parts[1], 4)), ((oldSumScores + duckNewBest) - duckOldBest), [StringEntry(keyTourDynamicDataById(lastId), updatedDynamicData)]) | |
373 | 373 | } | |
374 | 374 | else $Tuple3(oldScoreBoard, oldSumScores, nil) | |
375 | 375 | let newScoreBoard = $t082369397._1 | |
376 | 376 | let newSumScores = $t082369397._2 | |
377 | 377 | let globalActions = $t082369397._3 | |
378 | 378 | $Tuple2(([IntegerEntry(bestResultKey, max([duckOldBest, duckNewBest])), IntegerEntry(sumScoresKey, newSumScores), StringEntry(keyBestTxByTourAndDuck(lastId, duckAssetId), toBase58String(i.transactionId)), StringEntry(scoreKey, newScoreBoard)] ++ globalActions), 0) | |
379 | 379 | } | |
380 | 380 | else $Tuple2(nil, 0) | |
381 | 381 | } | |
382 | 382 | ||
383 | 383 | ||
384 | 384 | ||
385 | 385 | @Callable(i) | |
386 | 386 | func processTournament (tId) = { | |
387 | 387 | let caller = toString(i.caller) | |
388 | 388 | if (!(containsElement(adminsList, caller))) | |
389 | 389 | then throw("Permission denied") | |
390 | 390 | else { | |
391 | 391 | let now = lastBlock.timestamp | |
392 | 392 | let tData = getTourData(this, tId) | |
393 | 393 | let static = tData[idxStatic] | |
394 | 394 | let dynamic = tData[idxDynamic] | |
395 | 395 | let status = dynamic[tDynamicStatus] | |
396 | 396 | let registrations = parseIntValue(dynamic[tDynamicTotalRegCount]) | |
397 | 397 | let paidAttempts = parseIntValue(dynamic[tDynamicTotalAttempts]) | |
398 | 398 | let regCost = parseIntValue(static[tStaticRegisterCost]) | |
399 | 399 | let attCost = parseIntValue(static[tStaticAttemptCost]) | |
400 | 400 | if ((status == "ARCHIVED")) | |
401 | 401 | then throw((("Tournament " + toString(tId)) + " is already ARCHIVED")) | |
402 | 402 | else if (if ((status == "INPROGRESS")) | |
403 | 403 | then (parseIntValue(static[tStaticEnd]) > now) | |
404 | 404 | else false) | |
405 | 405 | then throw((("Tournament " + toString(tId)) + " is not over yet")) | |
406 | 406 | else { | |
407 | 407 | let updatedDynamicData = dynamicData("PROCESSING", dynamic[tDynamicLeaders], parseIntValue(dynamic[tDynamicWinResult]), registrations, paidAttempts) | |
408 | 408 | $Tuple2([StringEntry(keyTourDynamicDataById(tId), updatedDynamicData), IntegerEntry(keyUnpaidRewardsByTour(tId), (((registrations * regCost) + (paidAttempts * attCost)) / 2))], 0) | |
409 | 409 | } | |
410 | 410 | } | |
411 | 411 | } | |
412 | 412 | ||
413 | 413 | ||
414 | 414 | ||
415 | 415 | @Callable(i) | |
416 | 416 | func finishTournament (tId) = { | |
417 | 417 | let caller = toString(i.caller) | |
418 | 418 | if (!(containsElement(adminsList, caller))) | |
419 | 419 | then throw("Permission denied") | |
420 | 420 | else { | |
421 | 421 | let tData = getTourData(this, tId) | |
422 | 422 | let dynamic = tData[idxDynamic] | |
423 | 423 | let status = dynamic[tDynamicStatus] | |
424 | 424 | if ((status == "ARCHIVED")) | |
425 | 425 | then throw((("Tournament " + toString(tId)) + " is already ARCHIVED")) | |
426 | 426 | else { | |
427 | 427 | let updatedDynamicData = dynamicData("ARCHIVED", dynamic[tDynamicLeaders], parseIntValue(dynamic[tDynamicWinResult]), parseIntValue(dynamic[tDynamicTotalRegCount]), parseIntValue(dynamic[tDynamicTotalAttempts])) | |
428 | 428 | $Tuple2([StringEntry(keyTourDynamicDataById(tId), updatedDynamicData)], 0) | |
429 | 429 | } | |
430 | 430 | } | |
431 | 431 | } | |
432 | 432 | ||
433 | 433 | ||
434 | 434 | ||
435 | 435 | @Callable(i) | |
436 | 436 | func claimPrize (tId) = { | |
437 | 437 | let prologResult = prolog() | |
438 | 438 | if ((size(i.payments) != 0)) | |
439 | 439 | then throw("No payments required") | |
440 | 440 | else { | |
441 | 441 | let tData = getTourData(this, tId) | |
442 | 442 | let static = tData[idxStatic] | |
443 | 443 | let dynamic = tData[idxDynamic] | |
444 | 444 | let status = dynamic[tDynamicStatus] | |
445 | 445 | if ((status != "PROCESSING")) | |
446 | 446 | then throw((("Tournament " + toString(tId)) + " is not PROCESSING")) | |
447 | 447 | else { | |
448 | 448 | let registrations = parseIntValue(dynamic[tDynamicTotalRegCount]) | |
449 | 449 | let paidAttempts = parseIntValue(dynamic[tDynamicTotalAttempts]) | |
450 | 450 | let regCost = parseIntValue(static[tStaticRegisterCost]) | |
451 | 451 | let attCost = parseIntValue(static[tStaticAttemptCost]) | |
452 | 452 | let awardFunds = (((registrations * regCost) + (paidAttempts * attCost)) / 2) | |
453 | 453 | let unpaidKey = keyUnpaidRewardsByTour(tId) | |
454 | 454 | let unpaidFunds = valueOrElse(getInteger(unpaidKey), 0) | |
455 | 455 | let duckAssetId = duckByCaller(i.originCaller) | |
456 | 456 | if (!(valueOrElse(getBoolean(keyIsRegisteredByTourAndDuck(tId, duckAssetId)), false))) | |
457 | 457 | then throw(((("Your duck " + duckAssetId) + " is not registered at tournament ") + toString(tId))) | |
458 | 458 | else { | |
459 | 459 | let bestResultKey = keyBestResultByTourAndDuck(tId, duckAssetId) | |
460 | 460 | let duckBest = valueOrElse(getInteger(bestResultKey), 0) | |
461 | 461 | if ((duckBest == 0)) | |
462 | 462 | then throw("Your duck got zero score") | |
463 | 463 | else { | |
464 | 464 | let awardedKey = keyIsAwardedByTourAndDuck(tId, duckAssetId) | |
465 | 465 | if (valueOrElse(getBoolean(awardedKey), false)) | |
466 | 466 | then throw(((("Your duck " + duckAssetId) + " is already awarded at tournament ") + toString(tId))) | |
467 | 467 | else { | |
468 | 468 | let sumScoresKey = keySumScoresByTour(tId) | |
469 | 469 | let sumScores = valueOrElse(getInteger(sumScoresKey), 0) | |
470 | 470 | let leaders = dynamic[tDynamicLeaders] | |
471 | 471 | let leadersList = if (if ((leaders == "")) | |
472 | 472 | then true | |
473 | 473 | else (leaders == " ")) | |
474 | 474 | then nil | |
475 | 475 | else split_4C(leaders, ",") | |
476 | 476 | let numLeaders = size(leadersList) | |
477 | 477 | if ((numLeaders == 0)) | |
478 | 478 | then throw(("No leaders at tournament " + toString(tId))) | |
479 | 479 | else { | |
480 | 480 | let numGrands = parseIntValue(static[tStaticNumGrands]) | |
481 | 481 | let winResult = parseIntValue(dynamic[tDynamicWinResult]) | |
482 | 482 | let sumLeaderScores = if ((numLeaders > numGrands)) | |
483 | 483 | then 0 | |
484 | 484 | else if (containsElement(leadersList, duckAssetId)) | |
485 | 485 | then throw("As one of winners, you will be awarded by admins") | |
486 | 486 | else (numLeaders * winResult) | |
487 | 487 | let yourAmount = min([fraction(duckBest, awardFunds, (sumScores - sumLeaderScores)), unpaidFunds]) | |
488 | 488 | let newUnpaidAmount = (unpaidFunds - yourAmount) | |
489 | 489 | let updatedDynamicData = dynamicData("ARCHIVED", dynamic[tDynamicLeaders], winResult, registrations, paidAttempts) | |
490 | 490 | let archiveAction = if ((0 >= newUnpaidAmount)) | |
491 | 491 | then [StringEntry(keyTourDynamicDataById(tId), updatedDynamicData)] | |
492 | 492 | else nil | |
493 | 493 | $Tuple2(([ScriptTransfer(i.caller, yourAmount, wlgAssetId), BooleanEntry(awardedKey, true), IntegerEntry(unpaidKey, newUnpaidAmount)] ++ archiveAction), 0) | |
494 | 494 | } | |
495 | 495 | } | |
496 | 496 | } | |
497 | 497 | } | |
498 | 498 | } | |
499 | 499 | } | |
500 | 500 | } | |
501 | 501 | ||
502 | 502 | ||
503 | + | ||
504 | + | @Callable(i) | |
505 | + | func awardLand (winnerAddress) = { | |
506 | + | let caller = toString(i.caller) | |
507 | + | if (!(containsElement(adminsList, caller))) | |
508 | + | then throw("Permission denied") | |
509 | + | else { | |
510 | + | let landAssetId = asString(invoke(stakingContract, "awardSLand", [winnerAddress], nil)) | |
511 | + | $Tuple2(nil, landAssetId) | |
512 | + | } | |
513 | + | } | |
514 | + | ||
515 | + |
github/deemru/w8io/169f3d6 76.22 ms ◑