tx · 5CJ2t11J2Q7NXWGdUXBirzHKEf2U7L5tZvsRUAAczeWe 3MtC32eAy42jhwnHpfYCbUj11iUkXDQdYpt: -0.00900000 Waves 2022.11.20 17:23 [2325543] smart account 3MtC32eAy42jhwnHpfYCbUj11iUkXDQdYpt > SELF 0.00000000 Waves
{ "type": 13, "id": "5CJ2t11J2Q7NXWGdUXBirzHKEf2U7L5tZvsRUAAczeWe", "fee": 900000, "feeAssetId": null, "timestamp": 1668954210806, "version": 1, "sender": "3MtC32eAy42jhwnHpfYCbUj11iUkXDQdYpt", "senderPublicKey": "3xUNfrYKuaZmnMzb6e9tKC4azGnvWZyLzeKdUgAeFFpV", "proofs": [ "4bc2r3YmMzPfzG23wowsEmEr2MyFrJYtzPZEypKEHJ7TbEgtE1CoiJiWjc9uTTVjN3gwrRgGfYGdAxxWJvGm9bvQ" ], "script": "base64:BgIVCAISAwoBCBIDCgEIEgcKBQEICAEBHgABUwICX18AA0RFQwDAhD0ACVNDSEVEVUxFRAIJU0NIRURVTEVEAAZQTEFZRUQCBlBMQVlFRAEMZ2V0SW50T3JGYWlsAgdhZGRyZXNzA2tleQkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCaCAIFB2FkZHJlc3MFA2tleQkArAICCQCsAgIJAKwCAgkApQgBBQdhZGRyZXNzAgEuBQNrZXkCDyBpcyBub3QgZGVmaW5lZAEMZ2V0U3RyT3JGYWlsAgdhZGRyZXNzA2tleQkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCdCAIFB2FkZHJlc3MFA2tleQkArAICCQCsAgIJAKwCAgkApQgBBQdhZGRyZXNzAgEuBQNrZXkCDyBpcyBub3QgZGVmaW5lZAEGZ2V0SW50AwdhZGRyZXNzA2tleQdkZWZhdWx0CQELdmFsdWVPckVsc2UCCQCaCAIFB2FkZHJlc3MFA2tleQUHZGVmYXVsdAEGZ2V0U3RyAwdhZGRyZXNzA2tleQdkZWZhdWx0CQELdmFsdWVPckVsc2UCCQCdCAIF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cXVhbCB0byBpdHNlbGYuAAiXi1s=", "chainId": 84, "height": 2325543, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: E6HT1GeG28UodNYppePkzEsYNzKyBjMuXwrcCFCF9mAr Next: EGVvudJ6EFiVuNWGDARh9rPk3Gee2WbKrYpqUdbVw93d Diff:
Old | New | Differences | |
---|---|---|---|
219 | 219 | let awayTeamRound = readTeamRnd(awayTeamCode) | |
220 | 220 | if ((status != SCHEDULED)) | |
221 | 221 | then throw("Match is not in SCHEDULED status") | |
222 | - | else if (((time + (( | |
222 | + | else if (((time + ((30 * 60) * 1000)) > lastBlock.timestamp)) | |
223 | 223 | then throw("Wait 3h after match start before score update") | |
224 | 224 | else if ((homeTeamRound != round)) | |
225 | 225 | then throw(((("Home team's round doesn't match passed round: " + toString(round)) + " != ") + toString(homeTeamRound))) |
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 DEC = 1000000 | |
7 | 7 | ||
8 | 8 | let SCHEDULED = "SCHEDULED" | |
9 | 9 | ||
10 | 10 | let PLAYED = "PLAYED" | |
11 | 11 | ||
12 | 12 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (((toString(address) + ".") + key) + " is not defined")) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func getStrOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((toString(address) + ".") + key) + " is not defined")) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func getInt (address,key,default) = valueOrElse(getInteger(address, key), default) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func getStr (address,key,default) = valueOrElse(getString(address, key), default) | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func keyCfgPriceAssetId () = "%s%s__cfg__priceAsset" | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | let usdnId = fromBase58String(getStr(this, keyCfgPriceAssetId(), "HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ")) | |
28 | 28 | ||
29 | 29 | func keyTeamCap (teamCode) = makeString(["%s%s__teamCapitalization", teamCode], S) | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func keyTeamTkn (teamCode) = makeString(["%s%s__teamTokens", teamCode], S) | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func keyTeamRnd (teamCode) = makeString(["%s%s__teamRound", teamCode], S) | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func keyTeamRisks (teamCode) = makeString(["%s%s__teamRisks", teamCode], S) | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func keyTeamSchedule (teamCode) = makeString(["%s%s__teamSchedule", teamCode], S) | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func keyTeamStats (teamCode) = makeString(["%s%s__teamStats", teamCode], S) | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func keyUserTeam (user,teamCode) = makeString(["%s%s%s__userTeam", teamCode, user], S) | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func keyMatch (round,homeTeamCode,awayTeamCode) = makeString(["%s%d%s%s__match", toString(round), homeTeamCode, awayTeamCode], S) | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func dataTeamRisks (risk1,risk2,risk3,risk4) = makeString(["%d%d%d%d", risk1, risk2, risk3, risk4], S) | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func dataMatch (data,homeTeamGoals,awayTeamGoals) = makeString(["%d%d%s%d%d", data[1], data[2], PLAYED, toString(homeTeamGoals), toString(awayTeamGoals)], S) | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func readTeamRnd (teamCode) = getInt(this, keyTeamRnd(teamCode), 1) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func updateTeamRnd (teamCode) = { | |
63 | 63 | let r = readTeamRnd(teamCode) | |
64 | 64 | IntegerEntry(keyTeamRnd(teamCode), (r + 1)) | |
65 | 65 | } | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func isMe (i) = if ((this != i.caller)) | |
69 | 69 | then throw("not allowed") | |
70 | 70 | else true | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func calcRisks (round,pmt) = if ((round == 1)) | |
74 | 74 | then $Tuple4((pmt / 3), (pmt / 3), (pmt / 3), 0) | |
75 | 75 | else if ((round == 2)) | |
76 | 76 | then $Tuple4(0, (pmt / 2), (pmt / 2), 0) | |
77 | 77 | else if ((round == 3)) | |
78 | 78 | then $Tuple4(0, 0, pmt, 0) | |
79 | 79 | else $Tuple4(0, 0, 0, pmt) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func updateTeamRiskOnBuy (teamCode,pmt) = { | |
83 | 83 | let risksKey = keyTeamRisks(teamCode) | |
84 | 84 | let risksStr = getStr(this, risksKey, dataTeamRisks("0", "0", "0", "0")) | |
85 | 85 | let risksDat = split(risksStr, S) | |
86 | 86 | let teamRound = readTeamRnd(teamCode) | |
87 | 87 | let plusRisk = calcRisks(teamRound, pmt) | |
88 | 88 | let risk1 = toString((parseIntValue(risksDat[1]) + plusRisk._1)) | |
89 | 89 | let risk2 = toString((parseIntValue(risksDat[2]) + plusRisk._2)) | |
90 | 90 | let risk3 = toString((parseIntValue(risksDat[3]) + plusRisk._3)) | |
91 | 91 | let risk4 = toString((parseIntValue(risksDat[4]) + plusRisk._4)) | |
92 | 92 | StringEntry(risksKey, dataTeamRisks(risk1, risk2, risk3, risk4)) | |
93 | 93 | } | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func updateUserShareInTeam (userAddress,teamCode,teamTknDiff,pmt) = { | |
97 | 97 | let key = keyUserTeam(userAddress, teamCode) | |
98 | 98 | let data = split(getStr(this, key, "%d%d__0__0"), S) | |
99 | 99 | let teamTknAmtNew = toString((parseIntValue(data[1]) + teamTknDiff)) | |
100 | 100 | let investUsdnNew = toString((parseIntValue(data[2]) + pmt)) | |
101 | 101 | StringEntry(key, makeString(["%d%d", teamTknAmtNew, investUsdnNew], S)) | |
102 | 102 | } | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | 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) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func updateSingleTeamStats (teamCode,teamDiff) = { | |
109 | 109 | let key = keyTeamStats(teamCode) | |
110 | 110 | let data = split(getStr(this, key, dataTeamStats(0, 0, 0, 0, 0, 0, 0)), S) | |
111 | 111 | 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))) | |
112 | 112 | } | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func updateBothTeamsStats (homeTeamCode,awayTeamCode,homeTeamGoals,awayTeamGoals) = { | |
116 | 116 | let statsArray = if ((homeTeamGoals > awayTeamGoals)) | |
117 | 117 | then [$Tuple7(1, 1, 0, 0, homeTeamGoals, awayTeamGoals, 3), $Tuple7(1, 0, 0, 1, awayTeamGoals, homeTeamGoals, 0)] | |
118 | 118 | else if ((awayTeamGoals > homeTeamGoals)) | |
119 | 119 | then [$Tuple7(1, 0, 0, 1, homeTeamGoals, awayTeamGoals, 0), $Tuple7(1, 1, 0, 0, awayTeamGoals, homeTeamGoals, 3)] | |
120 | 120 | else [$Tuple7(1, 0, 1, 0, homeTeamGoals, awayTeamGoals, 1), $Tuple7(1, 0, 1, 0, awayTeamGoals, homeTeamGoals, 1)] | |
121 | 121 | let homeTeamDiff = statsArray[0] | |
122 | 122 | let awayTeamDiff = statsArray[1] | |
123 | 123 | [updateSingleTeamStats(homeTeamCode, homeTeamDiff), updateSingleTeamStats(awayTeamCode, awayTeamDiff)] | |
124 | 124 | } | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func updateTeamsCapsAndRisks (homeTeamCode,awayTeamCode,homeTeamGoals,awayTeamGoals) = { | |
128 | 128 | let homeTeamRound = readTeamRnd(homeTeamCode) | |
129 | 129 | let awayTeamRound = readTeamRnd(awayTeamCode) | |
130 | 130 | if ((homeTeamRound != awayTeamRound)) | |
131 | 131 | then throw("Teams rounds are not equals") | |
132 | 132 | else { | |
133 | 133 | let homeRisksKey = keyTeamRisks(homeTeamCode) | |
134 | 134 | let homeRisksDat = split(getStr(this, homeRisksKey, dataTeamRisks("0", "0", "0", "0")), S) | |
135 | 135 | let awayRisksKey = keyTeamRisks(awayTeamCode) | |
136 | 136 | let awayRisksDat = split(getStr(this, awayRisksKey, dataTeamRisks("0", "0", "0", "0")), S) | |
137 | 137 | let homeRisk = parseIntValue(homeRisksDat[homeTeamRound]) | |
138 | 138 | let awayRisk = parseIntValue(awayRisksDat[awayTeamRound]) | |
139 | 139 | let homeCapKey = keyTeamCap(homeTeamCode) | |
140 | 140 | let homeCap = getIntOrFail(this, homeCapKey) | |
141 | 141 | let awayCapKey = keyTeamCap(awayTeamCode) | |
142 | 142 | let awayCap = getIntOrFail(this, awayCapKey) | |
143 | 143 | let diff = if ((homeTeamGoals > awayTeamGoals)) | |
144 | 144 | then [$Tuple2((homeRisk + awayRisk), awayRisk), $Tuple2(0, -(awayRisk))] | |
145 | 145 | else if ((awayTeamGoals > homeTeamGoals)) | |
146 | 146 | then [$Tuple2(0, -(homeRisk)), $Tuple2((homeRisk + awayRisk), homeRisk)] | |
147 | 147 | else [$Tuple2(homeRisk, 0), $Tuple2(awayRisk, 0)] | |
148 | 148 | let homeDiff = diff[0] | |
149 | 149 | let awayDiff = diff[1] | |
150 | 150 | func refreshTeamRiskOnMatchPlayed (data,round,risk4diff) = { | |
151 | 151 | let risk1 = if ((1 == round)) | |
152 | 152 | then "0" | |
153 | 153 | else data[1] | |
154 | 154 | let risk2 = if ((2 == round)) | |
155 | 155 | then "0" | |
156 | 156 | else data[2] | |
157 | 157 | let risk3 = if ((3 == round)) | |
158 | 158 | then "0" | |
159 | 159 | else data[3] | |
160 | 160 | let risk4 = toString((parseIntValue(data[4]) + risk4diff)) | |
161 | 161 | dataTeamRisks(risk1, risk2, risk3, risk4) | |
162 | 162 | } | |
163 | 163 | ||
164 | 164 | [StringEntry(homeRisksKey, refreshTeamRiskOnMatchPlayed(homeRisksDat, homeTeamRound, homeDiff._1)), StringEntry(awayRisksKey, refreshTeamRiskOnMatchPlayed(awayRisksDat, awayTeamRound, awayDiff._1)), IntegerEntry(homeCapKey, (homeCap + homeDiff._2)), IntegerEntry(awayCapKey, (awayCap + awayDiff._2))] | |
165 | 165 | } | |
166 | 166 | } | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | @Callable(i) | |
170 | 170 | func init (priceAssetId) = { | |
171 | 171 | let checks = [isMe(i)] | |
172 | 172 | if ((checks == checks)) | |
173 | 173 | then [StringEntry(keyCfgPriceAssetId(), priceAssetId)] | |
174 | 174 | else throw("Strict value is not equal to itself.") | |
175 | 175 | } | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | ||
179 | 179 | @Callable(i) | |
180 | 180 | func buyTeam (teamCode) = { | |
181 | 181 | let user = toString(i.caller) | |
182 | 182 | let pmt = i.payments[0] | |
183 | 183 | let pmtAmt = pmt.amount | |
184 | 184 | let pmtAssetId = pmt.assetId | |
185 | 185 | if ((size(i.payments) != 1)) | |
186 | 186 | then throw("1 payment is expected") | |
187 | 187 | else if ((pmtAssetId != usdnId)) | |
188 | 188 | then throw("invalid payment asset id") | |
189 | 189 | else { | |
190 | 190 | let teamSchedule = getStrOrFail(this, keyTeamSchedule(teamCode)) | |
191 | 191 | let round = readTeamRnd(teamCode) | |
192 | 192 | let matchTimestamp = parseIntValue(split(teamSchedule, S)[round]) | |
193 | 193 | if (((((2 * 60) * 60) * 1000) > (matchTimestamp - lastBlock.timestamp))) | |
194 | 194 | then throw("Impossible to buy share - match is in progress. Please wait score finalization") | |
195 | 195 | else { | |
196 | 196 | let teamCap = getIntOrFail(this, keyTeamCap(teamCode)) | |
197 | 197 | let teamTkn = getIntOrFail(this, keyTeamTkn(teamCode)) | |
198 | 198 | let price = if ((teamTkn != 0)) | |
199 | 199 | then fraction(teamCap, DEC, teamTkn) | |
200 | 200 | else DEC | |
201 | 201 | let teamTknForUser = fraction(pmtAmt, DEC, price) | |
202 | 202 | [IntegerEntry(keyTeamCap(teamCode), (teamCap + pmtAmt)), IntegerEntry(keyTeamTkn(teamCode), (teamTkn + teamTknForUser)), updateUserShareInTeam(user, teamCode, teamTknForUser, pmtAmt), updateTeamRiskOnBuy(teamCode, pmtAmt)] | |
203 | 203 | } | |
204 | 204 | } | |
205 | 205 | } | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | ||
209 | 209 | @Callable(i) | |
210 | 210 | func score (round,homeTeamCode,awayTeamCode,homeTeamGoals,awayTeamGoals) = { | |
211 | 211 | let checks = [isMe(i)] | |
212 | 212 | if ((checks == checks)) | |
213 | 213 | then { | |
214 | 214 | let key = keyMatch(round, homeTeamCode, awayTeamCode) | |
215 | 215 | let data = split(getStrOrFail(this, key), S) | |
216 | 216 | let time = parseIntValue(data[2]) | |
217 | 217 | let status = data[3] | |
218 | 218 | let homeTeamRound = readTeamRnd(homeTeamCode) | |
219 | 219 | let awayTeamRound = readTeamRnd(awayTeamCode) | |
220 | 220 | if ((status != SCHEDULED)) | |
221 | 221 | then throw("Match is not in SCHEDULED status") | |
222 | - | else if (((time + (( | |
222 | + | else if (((time + ((30 * 60) * 1000)) > lastBlock.timestamp)) | |
223 | 223 | then throw("Wait 3h after match start before score update") | |
224 | 224 | else if ((homeTeamRound != round)) | |
225 | 225 | then throw(((("Home team's round doesn't match passed round: " + toString(round)) + " != ") + toString(homeTeamRound))) | |
226 | 226 | else if ((awayTeamRound != round)) | |
227 | 227 | then throw(((("Away team's round doesn't match passed round: " + toString(round)) + " != ") + toString(awayTeamRound))) | |
228 | 228 | else ((((updateBothTeamsStats(homeTeamCode, awayTeamCode, homeTeamGoals, awayTeamGoals) ++ updateTeamsCapsAndRisks(homeTeamCode, awayTeamCode, homeTeamGoals, awayTeamGoals)) :+ StringEntry(key, dataMatch(data, homeTeamGoals, awayTeamGoals))) :+ updateTeamRnd(homeTeamCode)) :+ updateTeamRnd(awayTeamCode)) | |
229 | 229 | } | |
230 | 230 | else throw("Strict value is not equal to itself.") | |
231 | 231 | } | |
232 | 232 | ||
233 | 233 |
github/deemru/w8io/03bedc9 35.34 ms ◑![]()