tx · 2p5LFMJMrrJbv7KdkJigWze5RLTd5q7mu9QvcKXCu1c2 3MtKnDmJju2Y4dp9A2ACPr11jDZiW6gmKKK: -0.05000000 Waves 2022.01.26 21:37 [1896270] smart account 3MtKnDmJju2Y4dp9A2ACPr11jDZiW6gmKKK > SELF 0.00000000 Waves
{ "type": 13, "id": "2p5LFMJMrrJbv7KdkJigWze5RLTd5q7mu9QvcKXCu1c2", "fee": 5000000, "feeAssetId": null, "timestamp": 1643222254722, "version": 2, "chainId": 84, "sender": "3MtKnDmJju2Y4dp9A2ACPr11jDZiW6gmKKK", "senderPublicKey": "3itc77jAZTQAcaPCyYEe4KD7h18CvqZZ2JRynZHsuJ61", "proofs": [ "5eAeNRnp42o11GpGQyyQn5orFfqHBjJ6qa1CzhfmUZ2zdox51vU9wUgdHfHPcX3Df3QqwD2s6RSuXw7dRT4HqjSM" ], "script": "base64:AAIFAAAAAAAAACkIAhIFCgMICAgSABIAEgMKAQgSBAoCCAESBAoCCAgSBAoCCAESAwoBCAAAABEAAAAADGFkbWluQWRkcmVzcwkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAR0aGlzAgAAAAVhZG1pbgIAAAAAAAAAABBpbnNwZWN0b3JBZGRyZXNzCQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwIAAAAJaW5zcGVjdG9yAgAAABpObyBrZXkgaW5zcGVjdG9yIHdhcyBmb3VuZAAAAAALdG90YWxTdXBwbHkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQaAAAAAgUAAAAEdGhpcwIAAAALdG90YWxTdXBwbHkAAAAAAAAAAAAAAAAADnZvdGluZ0R1cmF0aW9uCQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQaAAAAAgUAAAAEdGhpcwIAAAAOdm90aW5nRHVyYXRpb24CAAAAH05vIGtleSB2b3RpbmdEdXJhdGlvbiB3YXMgZm91bmQAAAAACGN0b2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kABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAANrZXkFAAAAA25pbAkAAAIAAAABAgAAACpBZGRyZXNzIGRvZXMgbm90IG1hdGNoIHdpdGggYWRtaW4gYWRkcmVzcyEAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleRjPLno=", "height": 1896270, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: A19ZfUqVp2FMjodY2z8bc1gM7nyFED5Fe1M9q2W4DuUy Next: 6U7DhW64Ve5mRw8GKbKpD4dBTEfq3DkqRpTUxhJhyhSg Diff:
Old | New | Differences | |
---|---|---|---|
361 | 361 | let newVote = ((callerAddress + "_") + toString(voting)) | |
362 | 362 | let currentVotingEntryList = [newVote] | |
363 | 363 | let votedField = parseIntValue(updateVotingResults(currentVotingEntryList)) | |
364 | - | let alteredBoard = alterBoard(votedField, -1, gameId, | |
364 | + | let alteredBoard = alterBoard(votedField, -1, gameId, unactiveTeam) | |
365 | 365 | [writeString((gameId + "_board"), alteredBoard), writeInteger((gameId + "_storedHeight"), (height + votingDuration)), writeString((gameId + "_status"), ((("round_" + toString((round + 1))) + ",turn_") + unactiveTeam)), writeString(((gameId + "_voting_") + toString((round + 1))), newVote), writeInteger((gameId + "_mostVoted"), votedField)] | |
366 | 366 | } | |
367 | 367 | else throw((("Caller is not in " + unactiveTeam) + "!")) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let adminAddress = valueOrElse(getString(this, "admin"), "") | |
5 | 5 | ||
6 | 6 | let inspectorAddress = valueOrErrorMessage(getString(this, "inspector"), "No key inspector was found") | |
7 | 7 | ||
8 | 8 | let totalSupply = valueOrElse(getInteger(this, "totalSupply"), 0) | |
9 | 9 | ||
10 | 10 | let votingDuration = valueOrErrorMessage(getInteger(this, "votingDuration"), "No key votingDuration was found") | |
11 | 11 | ||
12 | 12 | let ctokenId = valueOrErrorMessage(getString(this, "tokenId"), "No key cTokenId was found") | |
13 | 13 | ||
14 | 14 | let maxPlayersPerTeam = valueOrErrorMessage(getInteger(this, "playersPerTeam"), "No key playersPerTeam was found") | |
15 | 15 | ||
16 | 16 | func isAdmin (callerAddress) = if ((callerAddress == fromBase58String(adminAddress))) | |
17 | 17 | then true | |
18 | 18 | else false | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func writeInteger (key,integerValue) = IntegerEntry(key, integerValue) | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func writeString (key,stringValue) = StringEntry(key, stringValue) | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func countFrequency (helperList,votingList) = { | |
28 | 28 | func foldFrequency (accum,next) = { | |
29 | 29 | func countItems (acc,item) = if ((next == item)) | |
30 | 30 | then (acc + 1) | |
31 | 31 | else acc | |
32 | 32 | ||
33 | 33 | (accum :+ { | |
34 | 34 | let $l = votingList | |
35 | 35 | let $s = size($l) | |
36 | 36 | let $acc0 = 0 | |
37 | 37 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
38 | 38 | then $a | |
39 | 39 | else countItems($a, $l[$i]) | |
40 | 40 | ||
41 | 41 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
42 | 42 | then $a | |
43 | 43 | else throw("List size exceeds 5") | |
44 | 44 | ||
45 | 45 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
46 | 46 | }) | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | let $l = helperList | |
50 | 50 | let $s = size($l) | |
51 | 51 | let $acc0 = nil | |
52 | 52 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
53 | 53 | then $a | |
54 | 54 | else foldFrequency($a, $l[$i]) | |
55 | 55 | ||
56 | 56 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
57 | 57 | then $a | |
58 | 58 | else throw("List size exceeds 5") | |
59 | 59 | ||
60 | 60 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
61 | 61 | } | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func initVotingHelperList (voteArray) = { | |
65 | 65 | func foldHelperList (accum,next) = if ((containsElement(accum, next) == false)) | |
66 | 66 | then (accum :+ next) | |
67 | 67 | else accum | |
68 | 68 | ||
69 | 69 | let $l = voteArray | |
70 | 70 | let $s = size($l) | |
71 | 71 | let $acc0 = nil | |
72 | 72 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
73 | 73 | then $a | |
74 | 74 | else foldHelperList($a, $l[$i]) | |
75 | 75 | ||
76 | 76 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
77 | 77 | then $a | |
78 | 78 | else throw("List size exceeds 5") | |
79 | 79 | ||
80 | 80 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
81 | 81 | } | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func isGreaterThen (potential,itemList) = { | |
85 | 85 | let listLength = (size(itemList) - 1) | |
86 | 86 | let currentGreatest = itemList[listLength] | |
87 | 87 | if ((potential > currentGreatest)) | |
88 | 88 | then true | |
89 | 89 | else false | |
90 | 90 | } | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func findHighestVote (helperList,frequencies) = { | |
94 | 94 | func foldFrequencies (highestItemList,nextItem) = if ((size(highestItemList) == 0)) | |
95 | 95 | then (highestItemList :+ nextItem) | |
96 | 96 | else if (isGreaterThen(nextItem, highestItemList)) | |
97 | 97 | then (highestItemList :+ nextItem) | |
98 | 98 | else highestItemList | |
99 | 99 | ||
100 | 100 | let highestVotes = { | |
101 | 101 | let $l = frequencies | |
102 | 102 | let $s = size($l) | |
103 | 103 | let $acc0 = nil | |
104 | 104 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
105 | 105 | then $a | |
106 | 106 | else foldFrequencies($a, $l[$i]) | |
107 | 107 | ||
108 | 108 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
109 | 109 | then $a | |
110 | 110 | else throw("List size exceeds 5") | |
111 | 111 | ||
112 | 112 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
113 | 113 | } | |
114 | 114 | let lastIdx = (size(highestVotes) - 1) | |
115 | 115 | let highestVote = highestVotes[lastIdx] | |
116 | 116 | let helperIdx = indexOf(frequencies, highestVote) | |
117 | 117 | match helperIdx { | |
118 | 118 | case t: Int => | |
119 | 119 | helperList[t] | |
120 | 120 | case _ => | |
121 | 121 | throw("Type does not match! Function: findHighestVote") | |
122 | 122 | } | |
123 | 123 | } | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func createBoard (board) = makeString(board, ",") | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func alterBoard (newField,oldValue,gameId,team) = { | |
130 | 130 | let currentBoard = getStringValue((gameId + "_board")) | |
131 | 131 | let boardList = split(currentBoard, ",") | |
132 | 132 | let teamTag = if ((team == "teamBlue")) | |
133 | 133 | then "B" | |
134 | 134 | else "Y" | |
135 | 135 | func foldOldEntry (accum,nextValue) = { | |
136 | 136 | let $t047314754 = accum | |
137 | 137 | let result = $t047314754._1 | |
138 | 138 | let j = $t047314754._2 | |
139 | 139 | if ((j == oldValue)) | |
140 | 140 | then $Tuple2((result :+ "0"), (j + 1)) | |
141 | 141 | else $Tuple2((result :+ nextValue), (j + 1)) | |
142 | 142 | } | |
143 | 143 | ||
144 | 144 | func foldBoard (accum,nextValue) = { | |
145 | 145 | let $t049314954 = accum | |
146 | 146 | let result = $t049314954._1 | |
147 | 147 | let j = $t049314954._2 | |
148 | 148 | if ((j == newField)) | |
149 | 149 | then $Tuple2((result :+ teamTag), (j + 1)) | |
150 | 150 | else $Tuple2((result :+ nextValue), (j + 1)) | |
151 | 151 | } | |
152 | 152 | ||
153 | 153 | let cleanedBoard = { | |
154 | 154 | let $l = boardList | |
155 | 155 | let $s = size($l) | |
156 | 156 | let $acc0 = $Tuple2(nil, 0) | |
157 | 157 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
158 | 158 | then $a | |
159 | 159 | else foldOldEntry($a, $l[$i]) | |
160 | 160 | ||
161 | 161 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
162 | 162 | then $a | |
163 | 163 | else throw("List size exceeds 42") | |
164 | 164 | ||
165 | 165 | $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($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($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), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42) | |
166 | 166 | } | |
167 | 167 | let newBoardList = { | |
168 | 168 | let $l = cleanedBoard._1 | |
169 | 169 | let $s = size($l) | |
170 | 170 | let $acc0 = $Tuple2(nil, 0) | |
171 | 171 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
172 | 172 | then $a | |
173 | 173 | else foldBoard($a, $l[$i]) | |
174 | 174 | ||
175 | 175 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
176 | 176 | then $a | |
177 | 177 | else throw("List size exceeds 42") | |
178 | 178 | ||
179 | 179 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($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), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42) | |
180 | 180 | } | |
181 | 181 | createBoard(newBoardList._1) | |
182 | 182 | } | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | func updateVotingResults (currentVotingEntryList) = { | |
186 | 186 | func foldVotings (accum,nextValue) = (accum :+ split(nextValue, "_")[1]) | |
187 | 187 | ||
188 | 188 | let votes = { | |
189 | 189 | let $l = currentVotingEntryList | |
190 | 190 | let $s = size($l) | |
191 | 191 | let $acc0 = nil | |
192 | 192 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
193 | 193 | then $a | |
194 | 194 | else foldVotings($a, $l[$i]) | |
195 | 195 | ||
196 | 196 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
197 | 197 | then $a | |
198 | 198 | else throw("List size exceeds 5") | |
199 | 199 | ||
200 | 200 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
201 | 201 | } | |
202 | 202 | let helperList = initVotingHelperList(votes) | |
203 | 203 | let frequencies = countFrequency(helperList, votes) | |
204 | 204 | findHighestVote(helperList, frequencies) | |
205 | 205 | } | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | func checkTeammembers (team,potentialMember) = if (!(containsElement(team, potentialMember))) | |
209 | 209 | then true | |
210 | 210 | else false | |
211 | 211 | ||
212 | 212 | ||
213 | 213 | @Callable(i) | |
214 | 214 | func setup (inspectorAddress,tokenName,tokenDescription) = if (!(isDefined(getString(this, "admin")))) | |
215 | 215 | then { | |
216 | 216 | let asset = Issue(tokenName, tokenDescription, 0, 8, true) | |
217 | 217 | let tokenId = calculateAssetId(asset) | |
218 | 218 | [asset, writeString("admin", toBase58String(i.caller.bytes)), writeString("inspector", inspectorAddress), writeInteger("votingDuration", 2), writeInteger("totalSupply", 0), writeString("tokenName", tokenName), writeString("tokenId", toBase58String(tokenId)), writeInteger("tokenDecimals", 8)] | |
219 | 219 | } | |
220 | 220 | else throw("DApp already setup!") | |
221 | 221 | ||
222 | 222 | ||
223 | 223 | ||
224 | 224 | @Callable(i) | |
225 | 225 | func buyRound () = if ((size(i.payments) > 0)) | |
226 | 226 | then { | |
227 | 227 | let amount = i.payments[0].amount | |
228 | 228 | if ((amount >= 1)) | |
229 | 229 | then { | |
230 | 230 | let cTokenAmount = fraction(amount, 42, 1) | |
231 | 231 | let currentTotalSupply = (totalSupply + cTokenAmount) | |
232 | 232 | [writeInteger("totalSupply", currentTotalSupply), Reissue(fromBase58String(ctokenId), cTokenAmount, true), ScriptTransfer(i.caller, cTokenAmount, fromBase58String(ctokenId))] | |
233 | 233 | } | |
234 | 234 | else throw("Payment is to small!") | |
235 | 235 | } | |
236 | 236 | else throw("No payment attached!") | |
237 | 237 | ||
238 | 238 | ||
239 | 239 | ||
240 | 240 | @Callable(i) | |
241 | 241 | func createGame () = { | |
242 | 242 | let board = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0" | |
243 | 243 | let gameId = toBase58String(i.transactionId) | |
244 | 244 | [writeString((gameId + "_board"), board), writeString((gameId + "_status"), "waiting for players"), writeString((gameId + "_teamBlue"), toString(i.caller)), writeString((gameId + "_teamYellow"), "")] | |
245 | 245 | } | |
246 | 246 | ||
247 | 247 | ||
248 | 248 | ||
249 | 249 | @Callable(i) | |
250 | 250 | func joinGame (gameId) = { | |
251 | 251 | let userAddress = toBase58String(i.caller.bytes) | |
252 | 252 | let teamBlue = getStringValue((gameId + "_teamBlue")) | |
253 | 253 | let teamYellow = getStringValue((gameId + "_teamYellow")) | |
254 | 254 | let teamBlueList = split(teamBlue, ",") | |
255 | 255 | let teamYellowList = if ((size(teamYellow) > 0)) | |
256 | 256 | then split(teamYellow, ",") | |
257 | 257 | else nil | |
258 | 258 | if (if (checkTeammembers(teamBlueList, userAddress)) | |
259 | 259 | then checkTeammembers(teamYellowList, userAddress) | |
260 | 260 | else false) | |
261 | 261 | then if ((maxPlayersPerTeam > size(teamBlueList))) | |
262 | 262 | then [writeString((gameId + "_teamBlue"), ((teamBlue + ",") + userAddress))] | |
263 | 263 | else if ((size(teamYellowList) == (maxPlayersPerTeam - 1))) | |
264 | 264 | then [writeString((gameId + "_status"), "round_1,turn_teamBlue"), writeString((gameId + "_voting_1"), ""), writeString((gameId + "_winner"), ""), writeInteger((gameId + "_mostVoted"), -1), writeInteger((gameId + "_storedHeight"), (height + votingDuration)), writeString((gameId + "_teamYellow"), ((teamYellow + ",") + userAddress))] | |
265 | 265 | else if ((size(teamYellowList) == 0)) | |
266 | 266 | then [writeString((gameId + "_teamYellow"), userAddress)] | |
267 | 267 | else if (((maxPlayersPerTeam - 1) > size(teamYellowList))) | |
268 | 268 | then [writeString((gameId + "_teamYellow"), ((teamYellow + ",") + userAddress))] | |
269 | 269 | else throw("Teams are full, cannot join.") | |
270 | 270 | else throw("Player already in a Team!") | |
271 | 271 | } | |
272 | 272 | ||
273 | 273 | ||
274 | 274 | ||
275 | 275 | @Callable(i) | |
276 | 276 | func vote (gameId,voting) = { | |
277 | 277 | let status = valueOrErrorMessage(getStringValue((gameId + "_status")), "No status entry found under gameId!") | |
278 | 278 | let round = parseIntValue(drop(split(status, ",")[0], 6)) | |
279 | 279 | let activeTeam = drop(split(status, ",")[1], 5) | |
280 | 280 | let storedHeight = valueOrErrorMessage(getInteger((gameId + "_storedHeight")), (("No status entry found under " + gameId) + "_storedHeight!")) | |
281 | 281 | let storedMostVoted = valueOrErrorMessage(getIntegerValue((gameId + "_mostVoted")), (("No status entry found under " + gameId) + "_mostVoted!")) | |
282 | 282 | let votingEntry = valueOrErrorMessage(getStringValue(((gameId + "_voting_") + toString(round))), "No votes found for this game id!") | |
283 | 283 | let votingEntryList = if ((size(votingEntry) > 0)) | |
284 | 284 | then split(votingEntry, ",") | |
285 | 285 | else nil | |
286 | 286 | let members = if ((activeTeam == "teamBlue")) | |
287 | 287 | then { | |
288 | 288 | let teamB = getStringValue((gameId + "_teamBlue")) | |
289 | 289 | let teamBList = split(teamB, ",") | |
290 | 290 | teamBList | |
291 | 291 | } | |
292 | 292 | else { | |
293 | 293 | let teamY = getStringValue((gameId + "_teamYellow")) | |
294 | 294 | let teamYList = split(teamY, ",") | |
295 | 295 | teamYList | |
296 | 296 | } | |
297 | 297 | let unactiveTeam = if ((activeTeam == "teamBlue")) | |
298 | 298 | then "teamYellow" | |
299 | 299 | else "teamBlue" | |
300 | 300 | let membersUnactive = if ((unactiveTeam == "teamBlue")) | |
301 | 301 | then { | |
302 | 302 | let teamB = getStringValue((gameId + "_teamBlue")) | |
303 | 303 | let teamBList = split(teamB, ",") | |
304 | 304 | teamBList | |
305 | 305 | } | |
306 | 306 | else { | |
307 | 307 | let teamY = getStringValue((gameId + "_teamYellow")) | |
308 | 308 | let teamYList = split(teamY, ",") | |
309 | 309 | teamYList | |
310 | 310 | } | |
311 | 311 | let callerAddress = toBase58String(i.caller.bytes) | |
312 | 312 | if ((size(i.payments) > 0)) | |
313 | 313 | then if ((fromBase58String(ctokenId) == i.payments[0].assetId)) | |
314 | 314 | then if ((i.payments[0].amount == 100000000)) | |
315 | 315 | then if ((storedHeight >= height)) | |
316 | 316 | then if (containsElement(members, callerAddress)) | |
317 | 317 | then { | |
318 | 318 | func foldVoters (accum,nextValue) = (accum :+ split(nextValue, "_")[0]) | |
319 | 319 | ||
320 | 320 | let voters = { | |
321 | 321 | let $l = votingEntryList | |
322 | 322 | let $s = size($l) | |
323 | 323 | let $acc0 = nil | |
324 | 324 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
325 | 325 | then $a | |
326 | 326 | else foldVoters($a, $l[$i]) | |
327 | 327 | ||
328 | 328 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
329 | 329 | then $a | |
330 | 330 | else throw("List size exceeds 5") | |
331 | 331 | ||
332 | 332 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
333 | 333 | } | |
334 | 334 | if ((containsElement(voters, callerAddress) == false)) | |
335 | 335 | then { | |
336 | 336 | let newVote = ((callerAddress + "_") + toString(voting)) | |
337 | 337 | let currentVotingEntryList = (votingEntryList :+ newVote) | |
338 | 338 | let currentVotingEntry = makeString(currentVotingEntryList, ",") | |
339 | 339 | let votedField = parseIntValue(updateVotingResults(currentVotingEntryList)) | |
340 | 340 | let currentField = if ((votedField != storedMostVoted)) | |
341 | 341 | then votedField | |
342 | 342 | else storedMostVoted | |
343 | 343 | let alteredBoard = alterBoard(currentField, storedMostVoted, gameId, activeTeam) | |
344 | 344 | let potentialWinner = invoke(addressFromStringValue(inspectorAddress), "checkForWin", [alteredBoard], nil) | |
345 | 345 | if ((potentialWinner == potentialWinner)) | |
346 | 346 | then match potentialWinner { | |
347 | 347 | case t: String => | |
348 | 348 | if ((maxPlayersPerTeam > size(currentVotingEntryList))) | |
349 | 349 | then [writeString(((gameId + "_voting_") + toString(round)), currentVotingEntry), writeString((gameId + "_board"), alteredBoard), writeString((gameId + "_winner"), t), writeInteger((gameId + "_mostVoted"), currentField)] | |
350 | 350 | else [writeString(((gameId + "_voting_") + toString(round)), currentVotingEntry), writeString((gameId + "_board"), alteredBoard), writeString((gameId + "_winner"), t), writeInteger((gameId + "_mostVoted"), -1), writeInteger((gameId + "_storedHeight"), (height + votingDuration)), writeString((gameId + "_status"), ((("round_" + toString((round + 1))) + ",turn_") + unactiveTeam)), writeString(((gameId + "_voting_") + toString((round + 1))), "")] | |
351 | 351 | case _ => | |
352 | 352 | throw("Invokation result type is not a String!") | |
353 | 353 | } | |
354 | 354 | else throw("Strict value is not equal to itself.") | |
355 | 355 | } | |
356 | 356 | else throw("Caller already voted!") | |
357 | 357 | } | |
358 | 358 | else throw((("Caller is not in " + activeTeam) + "!")) | |
359 | 359 | else if (containsElement(membersUnactive, callerAddress)) | |
360 | 360 | then { | |
361 | 361 | let newVote = ((callerAddress + "_") + toString(voting)) | |
362 | 362 | let currentVotingEntryList = [newVote] | |
363 | 363 | let votedField = parseIntValue(updateVotingResults(currentVotingEntryList)) | |
364 | - | let alteredBoard = alterBoard(votedField, -1, gameId, | |
364 | + | let alteredBoard = alterBoard(votedField, -1, gameId, unactiveTeam) | |
365 | 365 | [writeString((gameId + "_board"), alteredBoard), writeInteger((gameId + "_storedHeight"), (height + votingDuration)), writeString((gameId + "_status"), ((("round_" + toString((round + 1))) + ",turn_") + unactiveTeam)), writeString(((gameId + "_voting_") + toString((round + 1))), newVote), writeInteger((gameId + "_mostVoted"), votedField)] | |
366 | 366 | } | |
367 | 367 | else throw((("Caller is not in " + unactiveTeam) + "!")) | |
368 | 368 | else throw("Amount has to be 1!") | |
369 | 369 | else throw("Payment has to be a Connect four Token!") | |
370 | 370 | else throw("No Payment attached!") | |
371 | 371 | } | |
372 | 372 | ||
373 | 373 | ||
374 | 374 | ||
375 | 375 | @Callable(i) | |
376 | 376 | func updateStringEntry (key,stringValue) = if (isAdmin(i.caller.bytes)) | |
377 | 377 | then [writeString(key, stringValue)] | |
378 | 378 | else throw("Address does not match with admin address!") | |
379 | 379 | ||
380 | 380 | ||
381 | 381 | ||
382 | 382 | @Callable(i) | |
383 | 383 | func updateIntegerEntry (key,integerValue) = if (isAdmin(i.caller.bytes)) | |
384 | 384 | then [writeInteger(key, integerValue)] | |
385 | 385 | else throw("Address does not match with admin address!") | |
386 | 386 | ||
387 | 387 | ||
388 | 388 | ||
389 | 389 | @Callable(i) | |
390 | 390 | func deleteStorageEntry (key) = if (isAdmin(i.caller.bytes)) | |
391 | 391 | then [DeleteEntry(key)] | |
392 | 392 | else throw("Address does not match with admin address!") | |
393 | 393 | ||
394 | 394 | ||
395 | 395 | @Verifier(tx) | |
396 | 396 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
397 | 397 |
github/deemru/w8io/026f985 67.58 ms ◑