tx · 6UAcj3D8rHgTzyRsz7iBX8ac8Cuw5cPxBB2kkfpZSobt 3MtC32eAy42jhwnHpfYCbUj11iUkXDQdYpt: -0.01500000 Waves 2022.11.28 18:41 [2337151] smart account 3MtC32eAy42jhwnHpfYCbUj11iUkXDQdYpt > SELF 0.00000000 Waves
{ "type": 13, "id": "6UAcj3D8rHgTzyRsz7iBX8ac8Cuw5cPxBB2kkfpZSobt", "fee": 1500000, "feeAssetId": null, "timestamp": 1669650193619, "version": 1, "sender": "3MtC32eAy42jhwnHpfYCbUj11iUkXDQdYpt", "senderPublicKey": "3xUNfrYKuaZmnMzb6e9tKC4azGnvWZyLzeKdUgAeFFpV", "proofs": [ "4wYYajgA3NrUt4x46zbZU6QTxuMWdqZrZzs74U8hFbsGbUry36nAMbjVJEEnNbhFsxub9sqZiVMvFjEekKNbDpdh" ], "script": "base64:BgIeCAISAwoBCBIDCgEIEgcKBQEICAEBEgMKAQESABIALgABUwICX18AAlMyAgE6AANERUMAwIQ9AAlTQ0hFRFVMRUQCCVNDSEVEVUxFRAAGUExBWUVEAgZQTEFZRUQBA2FicwEBdgMJAGYCAAAFAXYJAGgCAP///////////wEFAXYFAXYBDGdldEludE9yRmFpbAIHYWRkcmVzcwNrZXkJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAmggCBQdhZGRyZXNzBQNrZXkJAKwCAgkArAICCQCsAgIJAKUIAQUHYWRkcmVzcwIBLgUDa2V5Ag8gaXMgbm90IGRlZmluZWQBDGdldFN0ck9yRmFpbAIHYWRkcmVzcwNrZXkJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAnQgCBQdhZGRyZXNzBQNrZXkJAKwCAgkArAICCQCsAgIJAKUIAQUHYWRkcmVzcwIBLgUDa2V5Ag8gaXMgbm90IGRlZmluZWQBBmdldEludAMHYWRkcmVzcwNrZXkHZGVmYXVsdAkBC3ZhbHVlT3JFbHNlAgkAmggCBQdhZGRyZXNzBQNrZXkFB2RlZmF1bHQBBmdldFN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gADAAQABQAGAAcACAAJAAoACwkBDEludGVnZXJFbnRyeQIJAKwCAgIZJXMlZF9fZ29sZGVuSG91clJlc3VsdHNfXwkApAMBBQhyb3VuZE51bQUKcmFuZEhlaWdodAFpARN3aW5uaW5qYUNsYWltUmV3YXJkAAQGcGxheWVyCAUBaQZjYWxsZXIECXBsYXllclN0cgkApQgBBQZwbGF5ZXIECHJvdW5kTnVtCQEMZ2V0SW50T3JGYWlsAgUEdGhpcwkBFWtleUdvbGRlbkhvdXJSb3VuZE51bQAECXBsYXllcktFWQkBE2tleUdvbGRlbkhvdXJQbGF5ZXICBQhyb3VuZE51bQUJcGxheWVyU3RyBARkYXRhCQC1CQIJAQxnZXRTdHJPckZhaWwCBQR0aGlzBQlwbGF5ZXJLRVkFAVMEBndpbkFtdAkBDXBhcnNlSW50VmFsdWUBCQCRAwIFBGRhdGEAAQQGc3RhdHVzCQCRAwIFBGRhdGEAAgMJAGcCAAAFBndpbkFtdAkAAgECEE5vdGhpbmcgdG8gY2xhaW0DCQAAAgUGc3RhdHVzBQlHSENMQUlNRUQJAAIBAg9BbHJlYWR5IGNsYWltZWQJAMwIAgkBC1N0cmluZ0VudHJ5AgUJcGxheWVyS0VZCQEUZGF0YUdvbGRlbkhvdXJQbGF5ZXICBQZ3aW5BbXQFCUdIQ0xBSU1FRAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDBQZwbGF5ZXIFBndpbkFtdAUGdXNkbklkBQNuaWwAbbAsZA==", "chainId": 84, "height": 2337151, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: H3YrCmwcSRBZ5FiGtfydAf7PGtKNGPPMLZ3LhUQ2uA2A Next: none Diff:
Old | New | Differences | |
---|---|---|---|
194 | 194 | func keyGoldenHourEnd (roundNum) = ("%s%d__goldenHourEnd__" + toString(roundNum)) | |
195 | 195 | ||
196 | 196 | ||
197 | - | func keyGoldenHourRandomOn (roundNum) = ("%s%d__ | |
197 | + | func keyGoldenHourRandomOn (roundNum) = ("%s%d__goldenHourResults__" + toString(roundNum)) | |
198 | 198 | ||
199 | 199 | ||
200 | 200 | func keyGoldenHourRoundNum () = "%s__goldenHourRoundNum" | |
352 | 352 | else { | |
353 | 353 | let blockEnd = (blockStart + durationBlocks) | |
354 | 354 | let randomOn = (blockEnd + 5) | |
355 | - | [IntegerEntry(keyGoldenHourRoundNum(), roundNum), IntegerEntry(keyGoldenHourStart(roundNum), blockStart), IntegerEntry(keyGoldenHourEnd(roundNum), blockEnd), IntegerEntry(keyGoldenHourRandomOn(roundNum), | |
355 | + | [IntegerEntry(keyGoldenHourRoundNum(), roundNum), IntegerEntry(keyGoldenHourStart(roundNum), blockStart), IntegerEntry(keyGoldenHourEnd(roundNum), blockEnd), IntegerEntry(keyGoldenHourRandomOn(roundNum), 0)] | |
356 | 356 | } | |
357 | 357 | } | |
358 | 358 | } | |
366 | 366 | let winAmtMain = 50000000 | |
367 | 367 | let winAmtSecond = 5000000 | |
368 | 368 | let roundNum = getIntOrFail(this, keyGoldenHourRoundNum()) | |
369 | - | let randomOnHeight = getIntOrFail(this, keyGoldenHourRandomOn(roundNum)) | |
370 | - | if ((randomOnHeight > height)) | |
371 | - | then throw((("wait " + toString(randomOnHeight)) + " to generate random")) | |
369 | + | let randHeight = (getIntOrFail(this, keyGoldenHourEnd(roundNum)) + 2) | |
370 | + | let randHeightStr = toString(randHeight) | |
371 | + | if ((randHeight > height)) | |
372 | + | then throw((("wait " + randHeightStr) + " to generate random")) | |
372 | 373 | else { | |
373 | - | let randHeight = (randomOnHeight - 2) | |
374 | - | let randHeightStr = toString(randHeight) | |
375 | 374 | let blockInfo = valueOrErrorMessage(blockInfoByHeight(randHeight), ("couldn't find block " + randHeightStr)) | |
376 | 375 | let vrf = valueOrErrorMessage(blockInfo.vrf, (("block " + randHeightStr) + " doesn't support vrf")) | |
377 | 376 | let seed = sha256(vrf) | |
426 | 425 | } | |
427 | 426 | else entries | |
428 | 427 | ||
429 | - | let $l = randCount | |
430 | - | let $s = size($l) | |
431 | - | let $acc0 = nil | |
432 | - | func $f1_1 ($a,$i) = if (($i >= $s)) | |
433 | - | then $a | |
434 | - | else forEachWinner($a, $l[$i]) | |
428 | + | ({ | |
429 | + | let $l = randCount | |
430 | + | let $s = size($l) | |
431 | + | let $acc0 = nil | |
432 | + | func $f1_1 ($a,$i) = if (($i >= $s)) | |
433 | + | then $a | |
434 | + | else forEachWinner($a, $l[$i]) | |
435 | 435 | ||
436 | - | func $f1_2 ($a,$i) = if (($i >= $s)) | |
437 | - | then $a | |
438 | - | else throw("List size exceeds 11") | |
436 | + | func $f1_2 ($a,$i) = if (($i >= $s)) | |
437 | + | then $a | |
438 | + | else throw("List size exceeds 11") | |
439 | 439 | ||
440 | - | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11) | |
440 | + | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11) | |
441 | + | } :+ IntegerEntry(("%s%d__goldenHourResults__" + toString(roundNum)), randHeight)) | |
441 | 442 | } | |
442 | 443 | } | |
443 | 444 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let S = "__" | |
5 | 5 | ||
6 | 6 | let S2 = ":" | |
7 | 7 | ||
8 | 8 | let DEC = 1000000 | |
9 | 9 | ||
10 | 10 | let SCHEDULED = "SCHEDULED" | |
11 | 11 | ||
12 | 12 | let PLAYED = "PLAYED" | |
13 | 13 | ||
14 | 14 | func abs (v) = if ((0 > v)) | |
15 | 15 | then (-1 * v) | |
16 | 16 | else v | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (((toString(address) + ".") + key) + " is not defined")) | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func getStrOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((toString(address) + ".") + key) + " is not defined")) | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func getInt (address,key,default) = valueOrElse(getInteger(address, key), default) | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func getStr (address,key,default) = valueOrElse(getString(address, key), default) | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func keyCfgPriceAssetId () = "%s%s__cfg__priceAsset" | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func keyCfgAdmin () = "%s%s__cfg__admin" | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | let usdnId = fromBase58String(getStr(this, keyCfgPriceAssetId(), "HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ")) | |
38 | 38 | ||
39 | 39 | func keyTeamCap (teamCode) = makeString(["%s%s__teamCapitalization", teamCode], S) | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func keyTeamTkn (teamCode) = makeString(["%s%s__teamTokens", teamCode], S) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func keyTeamRnd (teamCode) = makeString(["%s%s__teamRound", teamCode], S) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func keyTeamRisks (teamCode) = makeString(["%s%s__teamRisks", teamCode], S) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func keyTeamSchedule (teamCode) = makeString(["%s%s__teamSchedule", teamCode], S) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func keyTeamStats (teamCode) = makeString(["%s%s__teamStats", teamCode], S) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func keyUserTeam (user,teamCode) = makeString(["%s%s%s__userTeam", teamCode, user], S) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func keyMatch (round,homeTeamCode,awayTeamCode) = makeString(["%s%d%s%s__match", toString(round), homeTeamCode, awayTeamCode], S) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func dataTeamRisks (risk1,risk2,risk3,risk4) = makeString(["%d%d%d%d", risk1, risk2, risk3, risk4], S) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func dataMatch (data,homeTeamGoals,awayTeamGoals) = makeString(["%d%d%s%d%d", data[1], data[2], PLAYED, toString(homeTeamGoals), toString(awayTeamGoals)], S) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func readTeamRnd (teamCode) = getInt(this, keyTeamRnd(teamCode), 1) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func updateTeamRnd (teamCode) = { | |
73 | 73 | let r = readTeamRnd(teamCode) | |
74 | 74 | IntegerEntry(keyTeamRnd(teamCode), (r + 1)) | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func isMe (i) = if ((this != i.caller)) | |
79 | 79 | then throw("not allowed") | |
80 | 80 | else true | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func isAdmin (i) = { | |
84 | 84 | let adminAddress = addressFromStringValue(getStrOrFail(this, keyCfgAdmin())) | |
85 | 85 | if ((adminAddress != i.caller)) | |
86 | 86 | then throw("not allowed") | |
87 | 87 | else true | |
88 | 88 | } | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func calcRisks (round,pmt) = if ((round == 1)) | |
92 | 92 | then $Tuple4((pmt / 3), (pmt / 3), (pmt / 3), 0) | |
93 | 93 | else if ((round == 2)) | |
94 | 94 | then $Tuple4(0, (pmt / 2), (pmt / 2), 0) | |
95 | 95 | else if ((round == 3)) | |
96 | 96 | then $Tuple4(0, 0, pmt, 0) | |
97 | 97 | else $Tuple4(0, 0, 0, pmt) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func updateTeamRiskOnBuy (teamCode,pmt) = { | |
101 | 101 | let risksKey = keyTeamRisks(teamCode) | |
102 | 102 | let risksStr = getStr(this, risksKey, dataTeamRisks("0", "0", "0", "0")) | |
103 | 103 | let risksDat = split(risksStr, S) | |
104 | 104 | let teamRound = readTeamRnd(teamCode) | |
105 | 105 | let plusRisk = calcRisks(teamRound, pmt) | |
106 | 106 | let risk1 = toString((parseIntValue(risksDat[1]) + plusRisk._1)) | |
107 | 107 | let risk2 = toString((parseIntValue(risksDat[2]) + plusRisk._2)) | |
108 | 108 | let risk3 = toString((parseIntValue(risksDat[3]) + plusRisk._3)) | |
109 | 109 | let risk4 = toString((parseIntValue(risksDat[4]) + plusRisk._4)) | |
110 | 110 | StringEntry(risksKey, dataTeamRisks(risk1, risk2, risk3, risk4)) | |
111 | 111 | } | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func updateUserShareInTeam (userAddress,teamCode,teamTknDiff,pmt) = { | |
115 | 115 | let key = keyUserTeam(userAddress, teamCode) | |
116 | 116 | let data = split(getStr(this, key, "%d%d__0__0"), S) | |
117 | 117 | let teamTknAmtNew = toString((parseIntValue(data[1]) + teamTknDiff)) | |
118 | 118 | let investUsdnNew = toString((parseIntValue(data[2]) + pmt)) | |
119 | 119 | StringEntry(key, makeString(["%d%d", teamTknAmtNew, investUsdnNew], S)) | |
120 | 120 | } | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func dataTeamStats (gameNum,wins,draws,loses,goalsFor,goalsAgainst,points) = makeString(["%d%d%d%d%d%d%d", toString(gameNum), toString(wins), toString(draws), toString(loses), toString(goalsFor), toString(goalsAgainst), toString(points)], S) | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func updateSingleTeamStats (teamCode,teamDiff) = { | |
127 | 127 | let key = keyTeamStats(teamCode) | |
128 | 128 | let data = split(getStr(this, key, dataTeamStats(0, 0, 0, 0, 0, 0, 0)), S) | |
129 | 129 | StringEntry(key, dataTeamStats((parseIntValue(data[1]) + teamDiff._1), (parseIntValue(data[2]) + teamDiff._2), (parseIntValue(data[3]) + teamDiff._3), (parseIntValue(data[4]) + teamDiff._4), (parseIntValue(data[5]) + teamDiff._5), (parseIntValue(data[6]) + teamDiff._6), (parseIntValue(data[7]) + teamDiff._7))) | |
130 | 130 | } | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func updateBothTeamsStats (homeTeamCode,awayTeamCode,homeTeamGoals,awayTeamGoals) = { | |
134 | 134 | let statsArray = if ((homeTeamGoals > awayTeamGoals)) | |
135 | 135 | then [$Tuple7(1, 1, 0, 0, homeTeamGoals, awayTeamGoals, 3), $Tuple7(1, 0, 0, 1, awayTeamGoals, homeTeamGoals, 0)] | |
136 | 136 | else if ((awayTeamGoals > homeTeamGoals)) | |
137 | 137 | then [$Tuple7(1, 0, 0, 1, homeTeamGoals, awayTeamGoals, 0), $Tuple7(1, 1, 0, 0, awayTeamGoals, homeTeamGoals, 3)] | |
138 | 138 | else [$Tuple7(1, 0, 1, 0, homeTeamGoals, awayTeamGoals, 1), $Tuple7(1, 0, 1, 0, awayTeamGoals, homeTeamGoals, 1)] | |
139 | 139 | let homeTeamDiff = statsArray[0] | |
140 | 140 | let awayTeamDiff = statsArray[1] | |
141 | 141 | [updateSingleTeamStats(homeTeamCode, homeTeamDiff), updateSingleTeamStats(awayTeamCode, awayTeamDiff)] | |
142 | 142 | } | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func updateTeamsCapsAndRisks (homeTeamCode,awayTeamCode,homeTeamGoals,awayTeamGoals) = { | |
146 | 146 | let homeTeamRound = readTeamRnd(homeTeamCode) | |
147 | 147 | let awayTeamRound = readTeamRnd(awayTeamCode) | |
148 | 148 | if ((homeTeamRound != awayTeamRound)) | |
149 | 149 | then throw("Teams rounds are not equals") | |
150 | 150 | else { | |
151 | 151 | let homeRisksKey = keyTeamRisks(homeTeamCode) | |
152 | 152 | let homeRisksDat = split(getStr(this, homeRisksKey, dataTeamRisks("0", "0", "0", "0")), S) | |
153 | 153 | let awayRisksKey = keyTeamRisks(awayTeamCode) | |
154 | 154 | let awayRisksDat = split(getStr(this, awayRisksKey, dataTeamRisks("0", "0", "0", "0")), S) | |
155 | 155 | let homeRisk = parseIntValue(homeRisksDat[homeTeamRound]) | |
156 | 156 | let awayRisk = parseIntValue(awayRisksDat[awayTeamRound]) | |
157 | 157 | let homeCapKey = keyTeamCap(homeTeamCode) | |
158 | 158 | let homeCap = getIntOrFail(this, homeCapKey) | |
159 | 159 | let awayCapKey = keyTeamCap(awayTeamCode) | |
160 | 160 | let awayCap = getIntOrFail(this, awayCapKey) | |
161 | 161 | let diff = if ((homeTeamGoals > awayTeamGoals)) | |
162 | 162 | then [$Tuple2((homeRisk + awayRisk), awayRisk), $Tuple2(0, -(awayRisk))] | |
163 | 163 | else if ((awayTeamGoals > homeTeamGoals)) | |
164 | 164 | then [$Tuple2(0, -(homeRisk)), $Tuple2((homeRisk + awayRisk), homeRisk)] | |
165 | 165 | else [$Tuple2(homeRisk, 0), $Tuple2(awayRisk, 0)] | |
166 | 166 | let homeDiff = diff[0] | |
167 | 167 | let awayDiff = diff[1] | |
168 | 168 | func refreshTeamRiskOnMatchPlayed (data,round,risk4diff) = { | |
169 | 169 | let risk1 = if ((1 == round)) | |
170 | 170 | then "0" | |
171 | 171 | else data[1] | |
172 | 172 | let risk2 = if ((2 == round)) | |
173 | 173 | then "0" | |
174 | 174 | else data[2] | |
175 | 175 | let risk3 = if ((3 == round)) | |
176 | 176 | then "0" | |
177 | 177 | else data[3] | |
178 | 178 | let risk4 = toString((parseIntValue(data[4]) + risk4diff)) | |
179 | 179 | dataTeamRisks(risk1, risk2, risk3, risk4) | |
180 | 180 | } | |
181 | 181 | ||
182 | 182 | [StringEntry(homeRisksKey, refreshTeamRiskOnMatchPlayed(homeRisksDat, homeTeamRound, homeDiff._1)), StringEntry(awayRisksKey, refreshTeamRiskOnMatchPlayed(awayRisksDat, awayTeamRound, awayDiff._1)), IntegerEntry(homeCapKey, (homeCap + homeDiff._2)), IntegerEntry(awayCapKey, (awayCap + awayDiff._2))] | |
183 | 183 | } | |
184 | 184 | } | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | let GHCLAIMED = "CLAIMED" | |
188 | 188 | ||
189 | 189 | let GHPENDING = "PENDING" | |
190 | 190 | ||
191 | 191 | func keyGoldenHourStart (roundNum) = ("%s%d__goldenHourStart__" + toString(roundNum)) | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | func keyGoldenHourEnd (roundNum) = ("%s%d__goldenHourEnd__" + toString(roundNum)) | |
195 | 195 | ||
196 | 196 | ||
197 | - | func keyGoldenHourRandomOn (roundNum) = ("%s%d__ | |
197 | + | func keyGoldenHourRandomOn (roundNum) = ("%s%d__goldenHourResults__" + toString(roundNum)) | |
198 | 198 | ||
199 | 199 | ||
200 | 200 | func keyGoldenHourRoundNum () = "%s__goldenHourRoundNum" | |
201 | 201 | ||
202 | 202 | ||
203 | 203 | func keyGoldenHourTicketOwner (roundNum,ticketNum) = makeString(["%s%d%d__goldenHourTicketOwner", toString(roundNum), toString(ticketNum)], S) | |
204 | 204 | ||
205 | 205 | ||
206 | 206 | func keyGoldenHourAllTickets (roundNum) = ("%s%d__goldenHourAllTickets__" + toString(roundNum)) | |
207 | 207 | ||
208 | 208 | ||
209 | 209 | func keyGoldenHourPlayerNum (roundNum) = makeString(["%s%d__goldenHourPlayerNum", toString(roundNum)], S) | |
210 | 210 | ||
211 | 211 | ||
212 | 212 | func keyGoldenHourPlayer (roundNum,player) = makeString(["%s%d%s__goldenHourPlayer", toString(roundNum), player], S) | |
213 | 213 | ||
214 | 214 | ||
215 | 215 | func dataGoldenHourPlayer (amt,status) = makeString(["%d%s", toString(amt), status], S) | |
216 | 216 | ||
217 | 217 | ||
218 | 218 | func generateGoldenHourTickets (player,pmt) = { | |
219 | 219 | let roundNum = getInt(this, keyGoldenHourRoundNum(), 0) | |
220 | 220 | let roundStart = getInt(this, keyGoldenHourStart(roundNum), 0) | |
221 | 221 | let roundEnd = getInt(this, keyGoldenHourEnd(roundNum), 0) | |
222 | 222 | if (if ((roundStart > height)) | |
223 | 223 | then true | |
224 | 224 | else (height >= roundEnd)) | |
225 | 225 | then nil | |
226 | 226 | else { | |
227 | 227 | let ticketCost = 5000000 | |
228 | 228 | let ticketsIdxs = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] | |
229 | 229 | let ticketsTmp = (pmt / ticketCost) | |
230 | 230 | let ticketsCount = if ((ticketsTmp > size(ticketsIdxs))) | |
231 | 231 | then size(ticketsIdxs) | |
232 | 232 | else ticketsTmp | |
233 | 233 | let lastTicketNumKey = keyGoldenHourPlayerNum(roundNum) | |
234 | 234 | let lastTicketNum = getInt(this, lastTicketNumKey, 0) | |
235 | 235 | let lastTicketNumNew = (lastTicketNum + ticketsCount) | |
236 | 236 | func genTickets (genData,next) = { | |
237 | 237 | let ticketNum = (lastTicketNum + next) | |
238 | 238 | let entries = genData._1 | |
239 | 239 | let ticketsAll = genData._2 | |
240 | 240 | if ((ticketNum >= lastTicketNumNew)) | |
241 | 241 | then genData | |
242 | 242 | else $Tuple2((entries :+ StringEntry(keyGoldenHourTicketOwner(roundNum, ticketNum), player)), makeString_2C([ticketsAll, toString(ticketNum), S2], "")) | |
243 | 243 | } | |
244 | 244 | ||
245 | 245 | let data = { | |
246 | 246 | let $l = ticketsIdxs | |
247 | 247 | let $s = size($l) | |
248 | 248 | let $acc0 = $Tuple2(nil, "") | |
249 | 249 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
250 | 250 | then $a | |
251 | 251 | else genTickets($a, $l[$i]) | |
252 | 252 | ||
253 | 253 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
254 | 254 | then $a | |
255 | 255 | else throw("List size exceeds 20") | |
256 | 256 | ||
257 | 257 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
258 | 258 | } | |
259 | 259 | let slot2userEntries = data._1 | |
260 | 260 | let allTicketsTail = data._2 | |
261 | 261 | let allTicketsKey = keyGoldenHourAllTickets(roundNum) | |
262 | 262 | let allTickets = getStr(this, allTicketsKey, "") | |
263 | 263 | (((slot2userEntries :+ IntegerEntry(lastTicketNumKey, lastTicketNumNew)) :+ StringEntry(keyGoldenHourPlayer(roundNum, player), dataGoldenHourPlayer(0, GHPENDING))) :+ StringEntry(allTicketsKey, (allTickets + allTicketsTail))) | |
264 | 264 | } | |
265 | 265 | } | |
266 | 266 | ||
267 | 267 | ||
268 | 268 | @Callable(i) | |
269 | 269 | func init (priceAssetId) = { | |
270 | 270 | let checks = [isMe(i)] | |
271 | 271 | if ((checks == checks)) | |
272 | 272 | then [StringEntry(keyCfgPriceAssetId(), priceAssetId)] | |
273 | 273 | else throw("Strict value is not equal to itself.") | |
274 | 274 | } | |
275 | 275 | ||
276 | 276 | ||
277 | 277 | ||
278 | 278 | @Callable(i) | |
279 | 279 | func buyTeam (teamCode) = { | |
280 | 280 | let user = toString(i.caller) | |
281 | 281 | let pmt = i.payments[0] | |
282 | 282 | let pmtAmt = pmt.amount | |
283 | 283 | let pmtAssetId = pmt.assetId | |
284 | 284 | if ((size(i.payments) != 1)) | |
285 | 285 | then throw("1 payment is expected") | |
286 | 286 | else if ((pmtAssetId != usdnId)) | |
287 | 287 | then throw("invalid payment asset id") | |
288 | 288 | else { | |
289 | 289 | let teamSchedule = getStrOrFail(this, keyTeamSchedule(teamCode)) | |
290 | 290 | let round = readTeamRnd(teamCode) | |
291 | 291 | let matchTimestamp = parseIntValue(split(teamSchedule, S)[round]) | |
292 | 292 | if ((((10 * 60) * 1000) > (matchTimestamp - lastBlock.timestamp))) | |
293 | 293 | then throw("Impossible to buy share - match is in progress. Please wait score finalization") | |
294 | 294 | else { | |
295 | 295 | let teamCap = getIntOrFail(this, keyTeamCap(teamCode)) | |
296 | 296 | let teamTkn = getIntOrFail(this, keyTeamTkn(teamCode)) | |
297 | 297 | let price = if ((teamTkn != 0)) | |
298 | 298 | then fraction(teamCap, DEC, teamTkn) | |
299 | 299 | else DEC | |
300 | 300 | let teamTknForUser = fraction(pmtAmt, DEC, price) | |
301 | 301 | ([IntegerEntry(keyTeamCap(teamCode), (teamCap + pmtAmt)), IntegerEntry(keyTeamTkn(teamCode), (teamTkn + teamTknForUser)), updateUserShareInTeam(user, teamCode, teamTknForUser, pmtAmt), updateTeamRiskOnBuy(teamCode, pmtAmt)] ++ generateGoldenHourTickets(user, pmtAmt)) | |
302 | 302 | } | |
303 | 303 | } | |
304 | 304 | } | |
305 | 305 | ||
306 | 306 | ||
307 | 307 | ||
308 | 308 | @Callable(i) | |
309 | 309 | func score (round,homeTeamCode,awayTeamCode,homeTeamGoals,awayTeamGoals) = { | |
310 | 310 | let checks = [isMe(i)] | |
311 | 311 | if ((checks == checks)) | |
312 | 312 | then { | |
313 | 313 | let key = keyMatch(round, homeTeamCode, awayTeamCode) | |
314 | 314 | let data = split(getStrOrFail(this, key), S) | |
315 | 315 | let time = parseIntValue(data[2]) | |
316 | 316 | let status = data[3] | |
317 | 317 | let homeTeamRound = readTeamRnd(homeTeamCode) | |
318 | 318 | let awayTeamRound = readTeamRnd(awayTeamCode) | |
319 | 319 | if ((status != SCHEDULED)) | |
320 | 320 | then throw("Match is not in SCHEDULED status") | |
321 | 321 | else if (((time + (((2 * 60) * 60) * 1000)) > lastBlock.timestamp)) | |
322 | 322 | then throw("Wait 2h after match start before score update") | |
323 | 323 | else if ((homeTeamRound != round)) | |
324 | 324 | then throw(((("Home team's round doesn't match passed round: " + toString(round)) + " != ") + toString(homeTeamRound))) | |
325 | 325 | else if ((awayTeamRound != round)) | |
326 | 326 | then throw(((("Away team's round doesn't match passed round: " + toString(round)) + " != ") + toString(awayTeamRound))) | |
327 | 327 | else ((((updateBothTeamsStats(homeTeamCode, awayTeamCode, homeTeamGoals, awayTeamGoals) ++ updateTeamsCapsAndRisks(homeTeamCode, awayTeamCode, homeTeamGoals, awayTeamGoals)) :+ StringEntry(key, dataMatch(data, homeTeamGoals, awayTeamGoals))) :+ updateTeamRnd(homeTeamCode)) :+ updateTeamRnd(awayTeamCode)) | |
328 | 328 | } | |
329 | 329 | else throw("Strict value is not equal to itself.") | |
330 | 330 | } | |
331 | 331 | ||
332 | 332 | ||
333 | 333 | ||
334 | 334 | @Callable(i) | |
335 | 335 | func winninjaGoldenHour100UsdnPrizeFundSchedule (blockStart) = { | |
336 | 336 | let durationBlocks = 60 | |
337 | 337 | let checks = [isAdmin(i)] | |
338 | 338 | if ((checks == checks)) | |
339 | 339 | then { | |
340 | 340 | let pmt = i.payments[0] | |
341 | 341 | if ((pmt.assetId != usdnId)) | |
342 | 342 | then throw("only usdn is supported") | |
343 | 343 | else if ((pmt.amount != (100 * DEC))) | |
344 | 344 | then throw("100 usdn must be attached") | |
345 | 345 | else { | |
346 | 346 | let roundNum = (getInt(this, keyGoldenHourRoundNum(), -1) + 1) | |
347 | 347 | let prevEnd = getInt(this, keyGoldenHourEnd(roundNum), 0) | |
348 | 348 | if (((60 * 12) >= (height - prevEnd))) | |
349 | 349 | then throw("min duration between golden hours is 12h") | |
350 | 350 | else if ((height >= blockStart)) | |
351 | 351 | then throw("blockStart is in the past") | |
352 | 352 | else { | |
353 | 353 | let blockEnd = (blockStart + durationBlocks) | |
354 | 354 | let randomOn = (blockEnd + 5) | |
355 | - | [IntegerEntry(keyGoldenHourRoundNum(), roundNum), IntegerEntry(keyGoldenHourStart(roundNum), blockStart), IntegerEntry(keyGoldenHourEnd(roundNum), blockEnd), IntegerEntry(keyGoldenHourRandomOn(roundNum), | |
355 | + | [IntegerEntry(keyGoldenHourRoundNum(), roundNum), IntegerEntry(keyGoldenHourStart(roundNum), blockStart), IntegerEntry(keyGoldenHourEnd(roundNum), blockEnd), IntegerEntry(keyGoldenHourRandomOn(roundNum), 0)] | |
356 | 356 | } | |
357 | 357 | } | |
358 | 358 | } | |
359 | 359 | else throw("Strict value is not equal to itself.") | |
360 | 360 | } | |
361 | 361 | ||
362 | 362 | ||
363 | 363 | ||
364 | 364 | @Callable(i) | |
365 | 365 | func winninjaGoldenHour100UsdnPrizeFundGenerateRandom () = { | |
366 | 366 | let winAmtMain = 50000000 | |
367 | 367 | let winAmtSecond = 5000000 | |
368 | 368 | let roundNum = getIntOrFail(this, keyGoldenHourRoundNum()) | |
369 | - | let randomOnHeight = getIntOrFail(this, keyGoldenHourRandomOn(roundNum)) | |
370 | - | if ((randomOnHeight > height)) | |
371 | - | then throw((("wait " + toString(randomOnHeight)) + " to generate random")) | |
369 | + | let randHeight = (getIntOrFail(this, keyGoldenHourEnd(roundNum)) + 2) | |
370 | + | let randHeightStr = toString(randHeight) | |
371 | + | if ((randHeight > height)) | |
372 | + | then throw((("wait " + randHeightStr) + " to generate random")) | |
372 | 373 | else { | |
373 | - | let randHeight = (randomOnHeight - 2) | |
374 | - | let randHeightStr = toString(randHeight) | |
375 | 374 | let blockInfo = valueOrErrorMessage(blockInfoByHeight(randHeight), ("couldn't find block " + randHeightStr)) | |
376 | 375 | let vrf = valueOrErrorMessage(blockInfo.vrf, (("block " + randHeightStr) + " doesn't support vrf")) | |
377 | 376 | let seed = sha256(vrf) | |
378 | 377 | let ticketsCount = getIntOrFail(this, keyGoldenHourPlayerNum(roundNum)) | |
379 | 378 | let allTickets = getStrOrFail(this, keyGoldenHourAllTickets(roundNum)) | |
380 | 379 | let randCount = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | |
381 | 380 | func genRands (winnersMap,nextRandOffset) = { | |
382 | 381 | let winnersList = winnersMap._1 | |
383 | 382 | let amountsList = winnersMap._2 | |
384 | 383 | let allTicketsList = winnersMap._3 | |
385 | 384 | let randIdx = (abs(toInt(drop(seed, nextRandOffset))) % (ticketsCount - nextRandOffset)) | |
386 | 385 | let winTicketNum = parseIntValue(allTicketsList[randIdx]) | |
387 | 386 | let allTicketsListNew = removeByIndex(allTicketsList, randIdx) | |
388 | 387 | let winner = getStrOrFail(this, keyGoldenHourTicketOwner(roundNum, winTicketNum)) | |
389 | 388 | if ((size(winnersList) == 0)) | |
390 | 389 | then $Tuple3([winner], [winAmtMain], allTicketsListNew) | |
391 | 390 | else { | |
392 | 391 | let idxOpt = indexOf(winnersList, winner) | |
393 | 392 | if (!(isDefined(idxOpt))) | |
394 | 393 | then $Tuple3((winnersList :+ winner), (amountsList :+ winAmtSecond), allTicketsListNew) | |
395 | 394 | else { | |
396 | 395 | let idx = value(idxOpt) | |
397 | 396 | let amtNew = (amountsList[idx] + winAmtSecond) | |
398 | 397 | let winnersListNew = (removeByIndex(winnersList, idx) :+ winner) | |
399 | 398 | let amountsListNew = (removeByIndex(amountsList, idx) :+ amtNew) | |
400 | 399 | $Tuple3(winnersListNew, amountsListNew, allTicketsListNew) | |
401 | 400 | } | |
402 | 401 | } | |
403 | 402 | } | |
404 | 403 | ||
405 | 404 | let randResults = { | |
406 | 405 | let $l = randCount | |
407 | 406 | let $s = size($l) | |
408 | 407 | let $acc0 = $Tuple3(nil, nil, split_51C(allTickets, S2)) | |
409 | 408 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
410 | 409 | then $a | |
411 | 410 | else genRands($a, $l[$i]) | |
412 | 411 | ||
413 | 412 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
414 | 413 | then $a | |
415 | 414 | else throw("List size exceeds 11") | |
416 | 415 | ||
417 | 416 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11) | |
418 | 417 | } | |
419 | 418 | let winnersListRes = randResults._1 | |
420 | 419 | let amountsListRes = randResults._2 | |
421 | 420 | func forEachWinner (entries,nextIdx) = if ((size(winnersListRes) > nextIdx)) | |
422 | 421 | then { | |
423 | 422 | let winner = winnersListRes[nextIdx] | |
424 | 423 | let amt = amountsListRes[nextIdx] | |
425 | 424 | (entries :+ StringEntry(keyGoldenHourPlayer(roundNum, winner), dataGoldenHourPlayer(amt, GHPENDING))) | |
426 | 425 | } | |
427 | 426 | else entries | |
428 | 427 | ||
429 | - | let $l = randCount | |
430 | - | let $s = size($l) | |
431 | - | let $acc0 = nil | |
432 | - | func $f1_1 ($a,$i) = if (($i >= $s)) | |
433 | - | then $a | |
434 | - | else forEachWinner($a, $l[$i]) | |
428 | + | ({ | |
429 | + | let $l = randCount | |
430 | + | let $s = size($l) | |
431 | + | let $acc0 = nil | |
432 | + | func $f1_1 ($a,$i) = if (($i >= $s)) | |
433 | + | then $a | |
434 | + | else forEachWinner($a, $l[$i]) | |
435 | 435 | ||
436 | - | func $f1_2 ($a,$i) = if (($i >= $s)) | |
437 | - | then $a | |
438 | - | else throw("List size exceeds 11") | |
436 | + | func $f1_2 ($a,$i) = if (($i >= $s)) | |
437 | + | then $a | |
438 | + | else throw("List size exceeds 11") | |
439 | 439 | ||
440 | - | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11) | |
440 | + | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11) | |
441 | + | } :+ IntegerEntry(("%s%d__goldenHourResults__" + toString(roundNum)), randHeight)) | |
441 | 442 | } | |
442 | 443 | } | |
443 | 444 | ||
444 | 445 | ||
445 | 446 | ||
446 | 447 | @Callable(i) | |
447 | 448 | func winninjaClaimReward () = { | |
448 | 449 | let player = i.caller | |
449 | 450 | let playerStr = toString(player) | |
450 | 451 | let roundNum = getIntOrFail(this, keyGoldenHourRoundNum()) | |
451 | 452 | let playerKEY = keyGoldenHourPlayer(roundNum, playerStr) | |
452 | 453 | let data = split(getStrOrFail(this, playerKEY), S) | |
453 | 454 | let winAmt = parseIntValue(data[1]) | |
454 | 455 | let status = data[2] | |
455 | 456 | if ((0 >= winAmt)) | |
456 | 457 | then throw("Nothing to claim") | |
457 | 458 | else if ((status == GHCLAIMED)) | |
458 | 459 | then throw("Already claimed") | |
459 | 460 | else [StringEntry(playerKEY, dataGoldenHourPlayer(winAmt, GHCLAIMED)), ScriptTransfer(player, winAmt, usdnId)] | |
460 | 461 | } | |
461 | 462 | ||
462 | 463 |
github/deemru/w8io/026f985 86.94 ms ◑