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:AAIFAAAAAAAAACkIAhIFCgMICAgSABIAEgMKAQgSBAoCCAESBAoCCAgSBAoCCAESAwoBCAAAAA4AAAAADGFkbWluQWRkcmVzcwkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAR0aGlzAgAAAAVhZG1pbgIAAAAAAAAAAAt0b3RhbFN1cHBseQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAR0aGlzAgAAAAt0b3RhbFN1cHBseQAAAAAAAAAAAAAAAAAOdm90aW5nRHVyYXRpb24JAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABBoAAAACBQAAAAR0aGlzAgAAAA52b3RpbmdEdXJhdGlvbgIAAAAfTm8ga2V5IHZvdGluZ0R1cmF0aW9uIHdhcyBmb3VuZAAAAAAIY3Rva2VuSWQJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACBQAAAAR0aGlzAgAAAAd0b2tlbklkAgAAABlObyBrZXkgZFRva2VuSWQgd2FzIGZvdW5kAQAAAAdpc0FkbWluAAAAAQAAAA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ggd2l0aCBhZG1pbiBhZGRyZXNzIQAAAAFpAQAAABJ1cGRhdGVJbnRlZ2VyRW50cnkAAAACAAAAA2tleQAAAAxpbnRlZ2VyVmFsdWUDCQEAAAAHaXNBZG1pbgAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMJAARMAAAAAgkBAAAADHdyaXRlSW50ZWdlcgAAAAIFAAAAA2tleQUAAAAMaW50ZWdlclZhbHVlBQAAAANuaWwJAAACAAAAAQIAAAAqQWRkcmVzcyBkb2VzIG5vdCBtYXRjaCB3aXRoIGFkbWluIGFkZHJlc3MhAAAAAWkBAAAAEmRlbGV0ZVN0b3JhZ2VFbnRyeQAAAAEAAAADa2V5AwkBAAAAB2lzQWRtaW4AAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEFAAAAA2tleQUAAAADbmlsCQAAAgAAAAECAAAAKkFkZHJlc3MgZG9lcyBub3QgbWF0Y2ggd2l0aCBhZG1pbiBhZGRyZXNzIQAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5p9NGRw==", "height": 1881921, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FhsJ9AhqRBzqV1M5BSgTV8uUqDLYVzq8fDaMaA7nRKv4 Next: FAZA1F2ZLBNPs4VXBgxrsBN9jSUKkfxfzRErmy3ycfud Diff:
OldNewDifferences
122122 func createBoard (board) = makeString(board, ",")
123123
124124
125-func alterBoard (field,gameId,team) = {
125+func alterBoard (newField,oldValue,gameId,team) = {
126126 let currentBoard = getStringValue((gameId + "_board"))
127127 let boardList = split(currentBoard, ",")
128128 let teamTag = if ((team == "teamBlue"))
129129 then "B"
130130 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+
131140 func foldBoard (accum,nextValue) = {
132- let $t044944517 = accum
133- let result = $t044944517._1
134- let j = $t044944517._2
135- if ((j == field))
141+ let $t047144737 = accum
142+ let result = $t047144737._1
143+ let j = $t047144737._2
144+ if ((j == newField))
136145 then $Tuple2((result :+ teamTag), (j + 1))
137146 else $Tuple2((result :+ nextValue), (j + 1))
138147 }
139148
140- let newBoardList = {
149+ let cleanedBoard = {
141150 let $l = boardList
142151 let $s = size($l)
143152 let $acc0 = $Tuple2(nil, 0)
144153 func $f0_1 ($a,$i) = if (($i >= $s))
145154 then $a
146- else foldBoard($a, $l[$i])
155+ else foldOldEntry($a, $l[$i])
147156
148157 func $f0_2 ($a,$i) = if (($i >= $s))
149158 then $a
151160
152161 $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)
153162 }
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+ }
154177 createBoard(newBoardList._1)
155178 }
156179
157180
158-func updateVotingResults (gameId,round,activeTeam,currentVotingEntryList) = {
181+func updateVotingResults (currentVotingEntryList) = {
159182 func foldVotings (accum,nextValue) = (accum :+ split(nextValue, "_")[1])
160183
161184 let votes = {
174197 }
175198 let helperList = initVotingHelperList(votes)
176199 let frequencies = countFrequency(helperList, votes)
177- let votedField = findHighestVote(helperList, frequencies)
178- alterBoard(parseIntValue(votedField), gameId, activeTeam)
200+ findHighestVote(helperList, frequencies)
179201 }
180202
181203
224246 if ((5 > size(teamBlueList)))
225247 then [writeString((gameId + "_teamBlue"), ((teamBlue + ",") + toBase58String(i.caller.bytes)))]
226248 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)))]
228250 else if ((size(teamYellowList) == 0))
229251 then [writeString((gameId + "_teamYellow"), toBase58String(i.caller.bytes))]
230252 else if ((4 > size(teamYellowList)))
240262 let round = parseIntValue(drop(split(status, ",")[0], 6))
241263 let activeTeam = drop(split(status, ",")[1], 5)
242264 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!"))
243266 let votingEntry = valueOrErrorMessage(getStringValue(((gameId + "_voting_") + toString(round))), "No votes found for this game id!")
244267 let votingEntryList = if ((size(votingEntry) > 0))
245268 then split(votingEntry, ",")
270293 teamYList
271294 }
272295 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])
277303
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])
285311
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")
289315
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!")
317347 }
318348
319349
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let adminAddress = valueOrElse(getString(this, "admin"), "")
55
66 let totalSupply = valueOrElse(getInteger(this, "totalSupply"), 0)
77
88 let votingDuration = valueOrErrorMessage(getInteger(this, "votingDuration"), "No key votingDuration was found")
99
1010 let ctokenId = valueOrErrorMessage(getString(this, "tokenId"), "No key dTokenId was found")
1111
1212 func isAdmin (callerAddress) = if ((callerAddress == fromBase58String(adminAddress)))
1313 then true
1414 else false
1515
1616
1717 func writeInteger (key,integerValue) = IntegerEntry(key, integerValue)
1818
1919
2020 func writeString (key,stringValue) = StringEntry(key, stringValue)
2121
2222
2323 func countFrequency (helperList,votingList) = {
2424 func foldFrequency (accum,next) = {
2525 func countItems (acc,item) = if ((next == item))
2626 then (acc + 1)
2727 else acc
2828
2929 (accum :+ {
3030 let $l = votingList
3131 let $s = size($l)
3232 let $acc0 = 0
3333 func $f0_1 ($a,$i) = if (($i >= $s))
3434 then $a
3535 else countItems($a, $l[$i])
3636
3737 func $f0_2 ($a,$i) = if (($i >= $s))
3838 then $a
3939 else throw("List size exceeds 5")
4040
4141 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
4242 })
4343 }
4444
4545 let $l = helperList
4646 let $s = size($l)
4747 let $acc0 = nil
4848 func $f0_1 ($a,$i) = if (($i >= $s))
4949 then $a
5050 else foldFrequency($a, $l[$i])
5151
5252 func $f0_2 ($a,$i) = if (($i >= $s))
5353 then $a
5454 else throw("List size exceeds 5")
5555
5656 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
5757 }
5858
5959
6060 func initVotingHelperList (voteArray) = {
6161 func foldHelperList (accum,next) = if ((containsElement(accum, next) == false))
6262 then (accum :+ next)
6363 else accum
6464
6565 let $l = voteArray
6666 let $s = size($l)
6767 let $acc0 = nil
6868 func $f0_1 ($a,$i) = if (($i >= $s))
6969 then $a
7070 else foldHelperList($a, $l[$i])
7171
7272 func $f0_2 ($a,$i) = if (($i >= $s))
7373 then $a
7474 else throw("List size exceeds 5")
7575
7676 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
7777 }
7878
7979
8080 func isGreaterThen (potential,itemList) = {
8181 let listLength = (size(itemList) - 1)
8282 let currentGreatest = itemList[listLength]
8383 if ((potential > currentGreatest))
8484 then true
8585 else false
8686 }
8787
8888
8989 func findHighestVote (helperList,frequencies) = {
9090 func foldFrequencies (highestItemList,nextItem) = if ((size(highestItemList) == 0))
9191 then (highestItemList :+ nextItem)
9292 else if (isGreaterThen(nextItem, highestItemList))
9393 then (highestItemList :+ nextItem)
9494 else highestItemList
9595
9696 let highestVotes = {
9797 let $l = frequencies
9898 let $s = size($l)
9999 let $acc0 = nil
100100 func $f0_1 ($a,$i) = if (($i >= $s))
101101 then $a
102102 else foldFrequencies($a, $l[$i])
103103
104104 func $f0_2 ($a,$i) = if (($i >= $s))
105105 then $a
106106 else throw("List size exceeds 5")
107107
108108 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
109109 }
110110 let lastIdx = (size(highestVotes) - 1)
111111 let highestVote = highestVotes[lastIdx]
112112 let helperIdx = indexOf(frequencies, highestVote)
113113 match helperIdx {
114114 case t: Int =>
115115 helperList[t]
116116 case _ =>
117117 throw("Type does not match! Function: findHighestVote")
118118 }
119119 }
120120
121121
122122 func createBoard (board) = makeString(board, ",")
123123
124124
125-func alterBoard (field,gameId,team) = {
125+func alterBoard (newField,oldValue,gameId,team) = {
126126 let currentBoard = getStringValue((gameId + "_board"))
127127 let boardList = split(currentBoard, ",")
128128 let teamTag = if ((team == "teamBlue"))
129129 then "B"
130130 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+
131140 func foldBoard (accum,nextValue) = {
132- let $t044944517 = accum
133- let result = $t044944517._1
134- let j = $t044944517._2
135- if ((j == field))
141+ let $t047144737 = accum
142+ let result = $t047144737._1
143+ let j = $t047144737._2
144+ if ((j == newField))
136145 then $Tuple2((result :+ teamTag), (j + 1))
137146 else $Tuple2((result :+ nextValue), (j + 1))
138147 }
139148
140- let newBoardList = {
149+ let cleanedBoard = {
141150 let $l = boardList
142151 let $s = size($l)
143152 let $acc0 = $Tuple2(nil, 0)
144153 func $f0_1 ($a,$i) = if (($i >= $s))
145154 then $a
146- else foldBoard($a, $l[$i])
155+ else foldOldEntry($a, $l[$i])
147156
148157 func $f0_2 ($a,$i) = if (($i >= $s))
149158 then $a
150159 else throw("List size exceeds 42")
151160
152161 $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)
153162 }
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+ }
154177 createBoard(newBoardList._1)
155178 }
156179
157180
158-func updateVotingResults (gameId,round,activeTeam,currentVotingEntryList) = {
181+func updateVotingResults (currentVotingEntryList) = {
159182 func foldVotings (accum,nextValue) = (accum :+ split(nextValue, "_")[1])
160183
161184 let votes = {
162185 let $l = currentVotingEntryList
163186 let $s = size($l)
164187 let $acc0 = nil
165188 func $f0_1 ($a,$i) = if (($i >= $s))
166189 then $a
167190 else foldVotings($a, $l[$i])
168191
169192 func $f0_2 ($a,$i) = if (($i >= $s))
170193 then $a
171194 else throw("List size exceeds 5")
172195
173196 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
174197 }
175198 let helperList = initVotingHelperList(votes)
176199 let frequencies = countFrequency(helperList, votes)
177- let votedField = findHighestVote(helperList, frequencies)
178- alterBoard(parseIntValue(votedField), gameId, activeTeam)
200+ findHighestVote(helperList, frequencies)
179201 }
180202
181203
182204 @Callable(i)
183205 func setup (adminAddress,tokenName,tokenDescription) = if (!(isDefined(getString(this, "admin"))))
184206 then {
185207 let asset = Issue(tokenName, tokenDescription, 0, 8, true)
186208 let tokenId = calculateAssetId(asset)
187209 [asset, writeString("admin", adminAddress), writeInteger("votingDuration", 2), writeInteger("totalSupply", 0), writeString("tokenName", tokenName), writeString("tokenId", toBase58String(tokenId)), writeInteger("tokenDecimals", 8)]
188210 }
189211 else throw("Pool already setup!")
190212
191213
192214
193215 @Callable(i)
194216 func buyRound () = if ((size(i.payments) > 0))
195217 then {
196218 let amount = i.payments[0].amount
197219 if ((amount >= 1))
198220 then {
199221 let cTokenAmount = fraction(amount, 42, 1)
200222 let currentTotalSupply = (totalSupply + cTokenAmount)
201223 [writeInteger("totalSupply", currentTotalSupply), Reissue(fromBase58String(ctokenId), cTokenAmount, true), ScriptTransfer(i.caller, cTokenAmount, fromBase58String(ctokenId))]
202224 }
203225 else throw("Payment is to small!")
204226 }
205227 else throw("No payment attached!")
206228
207229
208230
209231 @Callable(i)
210232 func createGame () = {
211233 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"
212234 let gameId = toBase58String(i.transactionId)
213235 [writeString((gameId + "_board"), board), writeString((gameId + "_status"), "waiting for players"), writeString((gameId + "_teamBlue"), toString(i.caller)), writeString((gameId + "_teamYellow"), "")]
214236 }
215237
216238
217239
218240 @Callable(i)
219241 func joinGame (gameId) = {
220242 let teamBlue = getStringValue((gameId + "_teamBlue"))
221243 let teamYellow = getStringValue((gameId + "_teamYellow"))
222244 let teamBlueList = split(teamBlue, ",")
223245 let teamYellowList = split(teamYellow, ",")
224246 if ((5 > size(teamBlueList)))
225247 then [writeString((gameId + "_teamBlue"), ((teamBlue + ",") + toBase58String(i.caller.bytes)))]
226248 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)))]
228250 else if ((size(teamYellowList) == 0))
229251 then [writeString((gameId + "_teamYellow"), toBase58String(i.caller.bytes))]
230252 else if ((4 > size(teamYellowList)))
231253 then [writeString((gameId + "_teamYellow"), ((teamYellow + ",") + toBase58String(i.caller.bytes)))]
232254 else throw("Teams are full, cannot join.")
233255 }
234256
235257
236258
237259 @Callable(i)
238260 func vote (gameId,voting) = {
239261 let status = valueOrErrorMessage(getStringValue((gameId + "_status")), "No status entry found under gameId!")
240262 let round = parseIntValue(drop(split(status, ",")[0], 6))
241263 let activeTeam = drop(split(status, ",")[1], 5)
242264 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!"))
243266 let votingEntry = valueOrErrorMessage(getStringValue(((gameId + "_voting_") + toString(round))), "No votes found for this game id!")
244267 let votingEntryList = if ((size(votingEntry) > 0))
245268 then split(votingEntry, ",")
246269 else nil
247270 let members = if ((activeTeam == "teamBlue"))
248271 then {
249272 let teamB = getStringValue((gameId + "_teamBlue"))
250273 let teamBList = split(teamB, ",")
251274 teamBList
252275 }
253276 else {
254277 let teamY = getStringValue((gameId + "_teamYellow"))
255278 let teamYList = split(teamY, ",")
256279 teamYList
257280 }
258281 let unactiveTeam = if ((activeTeam == "teamBlue"))
259282 then "teamYellow"
260283 else "teamBlue"
261284 let membersUnactive = if ((unactiveTeam == "teamBlue"))
262285 then {
263286 let teamB = getStringValue((gameId + "_teamBlue"))
264287 let teamBList = split(teamB, ",")
265288 teamBList
266289 }
267290 else {
268291 let teamY = getStringValue((gameId + "_teamYellow"))
269292 let teamYList = split(teamY, ",")
270293 teamYList
271294 }
272295 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])
277303
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])
285311
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")
289315
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!")
317347 }
318348
319349
320350
321351 @Callable(i)
322352 func updateStringEntry (key,stringValue) = if (isAdmin(i.caller.bytes))
323353 then [writeString(key, stringValue)]
324354 else throw("Address does not match with admin address!")
325355
326356
327357
328358 @Callable(i)
329359 func updateIntegerEntry (key,integerValue) = if (isAdmin(i.caller.bytes))
330360 then [writeInteger(key, integerValue)]
331361 else throw("Address does not match with admin address!")
332362
333363
334364
335365 @Callable(i)
336366 func deleteStorageEntry (key) = if (isAdmin(i.caller.bytes))
337367 then [DeleteEntry(key)]
338368 else throw("Address does not match with admin address!")
339369
340370
341371 @Verifier(tx)
342372 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
343373

github/deemru/w8io/026f985 
74.52 ms