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