tx · FJGAMjZi1ezenyfjJUJ5MeYDXeABg4Zj7TxyLVR3x8e7

3MtKnDmJju2Y4dp9A2ACPr11jDZiW6gmKKK:  -0.05000000 Waves

2022.01.25 23:28 [1894916] smart account 3MtKnDmJju2Y4dp9A2ACPr11jDZiW6gmKKK > SELF 0.00000000 Waves

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

github/deemru/w8io/169f3d6 
76.17 ms