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:BgIVCAISAwoBCBIDCgEIEgcKBQEICAEBHgABUwICX18AA0RFQwDAhD0ACVNDSEVEVUxFRAIJU0NIRURVTEVEAAZQTEFZRUQCBlBMQVlFRAEMZ2V0SW50T3JGYWlsAgdhZGRyZXNzA2tleQkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCaCAIFB2FkZHJlc3MFA2tleQkArAICCQCsAgIJAKwCAgkApQgBBQdhZGRyZXNzAgEuBQNrZXkCDyBpcyBub3QgZGVmaW5lZAEMZ2V0U3RyT3JGYWlsAgdhZGRyZXNzA2tleQkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCdCAIFB2FkZHJlc3MFA2tleQkArAICCQCsAgIJAKwCAgkApQgBBQdhZGRyZXNzAgEuBQNrZXkCDyBpcyBub3QgZGVmaW5lZAEGZ2V0SW50AwdhZGRyZXNzA2tleQdkZWZhdWx0CQELdmFsdWVPckVsc2UCCQCaCAIFB2FkZHJlc3MFA2tleQUHZGVmYXVsdAEGZ2V0U3RyAwdhZGRyZXNzA2tleQdkZWZhdWx0CQELdmFsdWVPckVsc2UCCQCdCAI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lcXVhbCB0byBpdHNlbGYuAAiXi1s=", "chainId": 84, "height": 2325543, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: E6HT1GeG28UodNYppePkzEsYNzKyBjMuXwrcCFCF9mAr Next: EGVvudJ6EFiVuNWGDARh9rPk3Gee2WbKrYpqUdbVw93d Diff:
OldNewDifferences
219219 let awayTeamRound = readTeamRnd(awayTeamCode)
220220 if ((status != SCHEDULED))
221221 then throw("Match is not in SCHEDULED status")
222- else if (((time + (((3 * 60) * 60) * 1000)) > lastBlock.timestamp))
222+ else if (((time + ((30 * 60) * 1000)) > lastBlock.timestamp))
223223 then throw("Wait 3h after match start before score update")
224224 else if ((homeTeamRound != round))
225225 then throw(((("Home team's round doesn't match passed round: " + toString(round)) + " != ") + toString(homeTeamRound)))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let S = "__"
55
66 let DEC = 1000000
77
88 let SCHEDULED = "SCHEDULED"
99
1010 let PLAYED = "PLAYED"
1111
1212 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (((toString(address) + ".") + key) + " is not defined"))
1313
1414
1515 func getStrOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((toString(address) + ".") + key) + " is not defined"))
1616
1717
1818 func getInt (address,key,default) = valueOrElse(getInteger(address, key), default)
1919
2020
2121 func getStr (address,key,default) = valueOrElse(getString(address, key), default)
2222
2323
2424 func keyCfgPriceAssetId () = "%s%s__cfg__priceAsset"
2525
2626
2727 let usdnId = fromBase58String(getStr(this, keyCfgPriceAssetId(), "HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ"))
2828
2929 func keyTeamCap (teamCode) = makeString(["%s%s__teamCapitalization", teamCode], S)
3030
3131
3232 func keyTeamTkn (teamCode) = makeString(["%s%s__teamTokens", teamCode], S)
3333
3434
3535 func keyTeamRnd (teamCode) = makeString(["%s%s__teamRound", teamCode], S)
3636
3737
3838 func keyTeamRisks (teamCode) = makeString(["%s%s__teamRisks", teamCode], S)
3939
4040
4141 func keyTeamSchedule (teamCode) = makeString(["%s%s__teamSchedule", teamCode], S)
4242
4343
4444 func keyTeamStats (teamCode) = makeString(["%s%s__teamStats", teamCode], S)
4545
4646
4747 func keyUserTeam (user,teamCode) = makeString(["%s%s%s__userTeam", teamCode, user], S)
4848
4949
5050 func keyMatch (round,homeTeamCode,awayTeamCode) = makeString(["%s%d%s%s__match", toString(round), homeTeamCode, awayTeamCode], S)
5151
5252
5353 func dataTeamRisks (risk1,risk2,risk3,risk4) = makeString(["%d%d%d%d", risk1, risk2, risk3, risk4], S)
5454
5555
5656 func dataMatch (data,homeTeamGoals,awayTeamGoals) = makeString(["%d%d%s%d%d", data[1], data[2], PLAYED, toString(homeTeamGoals), toString(awayTeamGoals)], S)
5757
5858
5959 func readTeamRnd (teamCode) = getInt(this, keyTeamRnd(teamCode), 1)
6060
6161
6262 func updateTeamRnd (teamCode) = {
6363 let r = readTeamRnd(teamCode)
6464 IntegerEntry(keyTeamRnd(teamCode), (r + 1))
6565 }
6666
6767
6868 func isMe (i) = if ((this != i.caller))
6969 then throw("not allowed")
7070 else true
7171
7272
7373 func calcRisks (round,pmt) = if ((round == 1))
7474 then $Tuple4((pmt / 3), (pmt / 3), (pmt / 3), 0)
7575 else if ((round == 2))
7676 then $Tuple4(0, (pmt / 2), (pmt / 2), 0)
7777 else if ((round == 3))
7878 then $Tuple4(0, 0, pmt, 0)
7979 else $Tuple4(0, 0, 0, pmt)
8080
8181
8282 func updateTeamRiskOnBuy (teamCode,pmt) = {
8383 let risksKey = keyTeamRisks(teamCode)
8484 let risksStr = getStr(this, risksKey, dataTeamRisks("0", "0", "0", "0"))
8585 let risksDat = split(risksStr, S)
8686 let teamRound = readTeamRnd(teamCode)
8787 let plusRisk = calcRisks(teamRound, pmt)
8888 let risk1 = toString((parseIntValue(risksDat[1]) + plusRisk._1))
8989 let risk2 = toString((parseIntValue(risksDat[2]) + plusRisk._2))
9090 let risk3 = toString((parseIntValue(risksDat[3]) + plusRisk._3))
9191 let risk4 = toString((parseIntValue(risksDat[4]) + plusRisk._4))
9292 StringEntry(risksKey, dataTeamRisks(risk1, risk2, risk3, risk4))
9393 }
9494
9595
9696 func updateUserShareInTeam (userAddress,teamCode,teamTknDiff,pmt) = {
9797 let key = keyUserTeam(userAddress, teamCode)
9898 let data = split(getStr(this, key, "%d%d__0__0"), S)
9999 let teamTknAmtNew = toString((parseIntValue(data[1]) + teamTknDiff))
100100 let investUsdnNew = toString((parseIntValue(data[2]) + pmt))
101101 StringEntry(key, makeString(["%d%d", teamTknAmtNew, investUsdnNew], S))
102102 }
103103
104104
105105 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)
106106
107107
108108 func updateSingleTeamStats (teamCode,teamDiff) = {
109109 let key = keyTeamStats(teamCode)
110110 let data = split(getStr(this, key, dataTeamStats(0, 0, 0, 0, 0, 0, 0)), S)
111111 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)))
112112 }
113113
114114
115115 func updateBothTeamsStats (homeTeamCode,awayTeamCode,homeTeamGoals,awayTeamGoals) = {
116116 let statsArray = if ((homeTeamGoals > awayTeamGoals))
117117 then [$Tuple7(1, 1, 0, 0, homeTeamGoals, awayTeamGoals, 3), $Tuple7(1, 0, 0, 1, awayTeamGoals, homeTeamGoals, 0)]
118118 else if ((awayTeamGoals > homeTeamGoals))
119119 then [$Tuple7(1, 0, 0, 1, homeTeamGoals, awayTeamGoals, 0), $Tuple7(1, 1, 0, 0, awayTeamGoals, homeTeamGoals, 3)]
120120 else [$Tuple7(1, 0, 1, 0, homeTeamGoals, awayTeamGoals, 1), $Tuple7(1, 0, 1, 0, awayTeamGoals, homeTeamGoals, 1)]
121121 let homeTeamDiff = statsArray[0]
122122 let awayTeamDiff = statsArray[1]
123123 [updateSingleTeamStats(homeTeamCode, homeTeamDiff), updateSingleTeamStats(awayTeamCode, awayTeamDiff)]
124124 }
125125
126126
127127 func updateTeamsCapsAndRisks (homeTeamCode,awayTeamCode,homeTeamGoals,awayTeamGoals) = {
128128 let homeTeamRound = readTeamRnd(homeTeamCode)
129129 let awayTeamRound = readTeamRnd(awayTeamCode)
130130 if ((homeTeamRound != awayTeamRound))
131131 then throw("Teams rounds are not equals")
132132 else {
133133 let homeRisksKey = keyTeamRisks(homeTeamCode)
134134 let homeRisksDat = split(getStr(this, homeRisksKey, dataTeamRisks("0", "0", "0", "0")), S)
135135 let awayRisksKey = keyTeamRisks(awayTeamCode)
136136 let awayRisksDat = split(getStr(this, awayRisksKey, dataTeamRisks("0", "0", "0", "0")), S)
137137 let homeRisk = parseIntValue(homeRisksDat[homeTeamRound])
138138 let awayRisk = parseIntValue(awayRisksDat[awayTeamRound])
139139 let homeCapKey = keyTeamCap(homeTeamCode)
140140 let homeCap = getIntOrFail(this, homeCapKey)
141141 let awayCapKey = keyTeamCap(awayTeamCode)
142142 let awayCap = getIntOrFail(this, awayCapKey)
143143 let diff = if ((homeTeamGoals > awayTeamGoals))
144144 then [$Tuple2((homeRisk + awayRisk), awayRisk), $Tuple2(0, -(awayRisk))]
145145 else if ((awayTeamGoals > homeTeamGoals))
146146 then [$Tuple2(0, -(homeRisk)), $Tuple2((homeRisk + awayRisk), homeRisk)]
147147 else [$Tuple2(homeRisk, 0), $Tuple2(awayRisk, 0)]
148148 let homeDiff = diff[0]
149149 let awayDiff = diff[1]
150150 func refreshTeamRiskOnMatchPlayed (data,round,risk4diff) = {
151151 let risk1 = if ((1 == round))
152152 then "0"
153153 else data[1]
154154 let risk2 = if ((2 == round))
155155 then "0"
156156 else data[2]
157157 let risk3 = if ((3 == round))
158158 then "0"
159159 else data[3]
160160 let risk4 = toString((parseIntValue(data[4]) + risk4diff))
161161 dataTeamRisks(risk1, risk2, risk3, risk4)
162162 }
163163
164164 [StringEntry(homeRisksKey, refreshTeamRiskOnMatchPlayed(homeRisksDat, homeTeamRound, homeDiff._1)), StringEntry(awayRisksKey, refreshTeamRiskOnMatchPlayed(awayRisksDat, awayTeamRound, awayDiff._1)), IntegerEntry(homeCapKey, (homeCap + homeDiff._2)), IntegerEntry(awayCapKey, (awayCap + awayDiff._2))]
165165 }
166166 }
167167
168168
169169 @Callable(i)
170170 func init (priceAssetId) = {
171171 let checks = [isMe(i)]
172172 if ((checks == checks))
173173 then [StringEntry(keyCfgPriceAssetId(), priceAssetId)]
174174 else throw("Strict value is not equal to itself.")
175175 }
176176
177177
178178
179179 @Callable(i)
180180 func buyTeam (teamCode) = {
181181 let user = toString(i.caller)
182182 let pmt = i.payments[0]
183183 let pmtAmt = pmt.amount
184184 let pmtAssetId = pmt.assetId
185185 if ((size(i.payments) != 1))
186186 then throw("1 payment is expected")
187187 else if ((pmtAssetId != usdnId))
188188 then throw("invalid payment asset id")
189189 else {
190190 let teamSchedule = getStrOrFail(this, keyTeamSchedule(teamCode))
191191 let round = readTeamRnd(teamCode)
192192 let matchTimestamp = parseIntValue(split(teamSchedule, S)[round])
193193 if (((((2 * 60) * 60) * 1000) > (matchTimestamp - lastBlock.timestamp)))
194194 then throw("Impossible to buy share - match is in progress. Please wait score finalization")
195195 else {
196196 let teamCap = getIntOrFail(this, keyTeamCap(teamCode))
197197 let teamTkn = getIntOrFail(this, keyTeamTkn(teamCode))
198198 let price = if ((teamTkn != 0))
199199 then fraction(teamCap, DEC, teamTkn)
200200 else DEC
201201 let teamTknForUser = fraction(pmtAmt, DEC, price)
202202 [IntegerEntry(keyTeamCap(teamCode), (teamCap + pmtAmt)), IntegerEntry(keyTeamTkn(teamCode), (teamTkn + teamTknForUser)), updateUserShareInTeam(user, teamCode, teamTknForUser, pmtAmt), updateTeamRiskOnBuy(teamCode, pmtAmt)]
203203 }
204204 }
205205 }
206206
207207
208208
209209 @Callable(i)
210210 func score (round,homeTeamCode,awayTeamCode,homeTeamGoals,awayTeamGoals) = {
211211 let checks = [isMe(i)]
212212 if ((checks == checks))
213213 then {
214214 let key = keyMatch(round, homeTeamCode, awayTeamCode)
215215 let data = split(getStrOrFail(this, key), S)
216216 let time = parseIntValue(data[2])
217217 let status = data[3]
218218 let homeTeamRound = readTeamRnd(homeTeamCode)
219219 let awayTeamRound = readTeamRnd(awayTeamCode)
220220 if ((status != SCHEDULED))
221221 then throw("Match is not in SCHEDULED status")
222- else if (((time + (((3 * 60) * 60) * 1000)) > lastBlock.timestamp))
222+ else if (((time + ((30 * 60) * 1000)) > lastBlock.timestamp))
223223 then throw("Wait 3h after match start before score update")
224224 else if ((homeTeamRound != round))
225225 then throw(((("Home team's round doesn't match passed round: " + toString(round)) + " != ") + toString(homeTeamRound)))
226226 else if ((awayTeamRound != round))
227227 then throw(((("Away team's round doesn't match passed round: " + toString(round)) + " != ") + toString(awayTeamRound)))
228228 else ((((updateBothTeamsStats(homeTeamCode, awayTeamCode, homeTeamGoals, awayTeamGoals) ++ updateTeamsCapsAndRisks(homeTeamCode, awayTeamCode, homeTeamGoals, awayTeamGoals)) :+ StringEntry(key, dataMatch(data, homeTeamGoals, awayTeamGoals))) :+ updateTeamRnd(homeTeamCode)) :+ updateTeamRnd(awayTeamCode))
229229 }
230230 else throw("Strict value is not equal to itself.")
231231 }
232232
233233

github/deemru/w8io/026f985 
48.81 ms