tx · 3UzrUWbFrh4BmBt9cHWZSUZXoZQCpDJFfvsyoad5YJEK 3NAjwfxvJp9VShPRRyyqxM7DBur7oCPn79L: -0.00800000 Waves 2022.08.31 22:34 [2209053] smart account 3NAjwfxvJp9VShPRRyyqxM7DBur7oCPn79L > SELF 0.00000000 Waves
{ "type": 13, "id": "3UzrUWbFrh4BmBt9cHWZSUZXoZQCpDJFfvsyoad5YJEK", "fee": 800000, "feeAssetId": null, "timestamp": 1661974550327, "version": 2, "chainId": 84, "sender": "3NAjwfxvJp9VShPRRyyqxM7DBur7oCPn79L", "senderPublicKey": "3qLStkxzTGZubeF2nmuXT2iopYYNg89sPT7VaNpTqihE", "proofs": [ "4veiA75d7YgGeMaL1afrYqh5gUFTfijgWe3DtdVTxkHcx2fGyR4Fypf1Db8K2PsMNxpD5HAyqm5NCki4gYxpRStX" ], "script": "base64:AAIFAAAAAAAAABAIAhIAEgASABIAEgASABIAAAAAGgAAAAAOZ2FtZVRva2VuTGFiZWwCAAAACUdfVE9LRU5JRAAAAAAQZ2FtZUJhbGFuY2VMYWJlbAIAAAAJR19CQUxBTkNFAAAAABVnYW1lQ29tbXVuaXR5UG90TGFiZWwCAAAADkdfQ09NTVVOSVRZUE9UAQAAABFnYW1lUHJpemVQb3RMYWJlbAAAAAEAAAAKZ2FtZU51bWJlcgkAASwAAAACCQABLAAAAAICAAAAAkdfCQABpAAAAAEFAAAACmdhbWVOdW1iZXICAAAACFBSSVpFUE9UAQAAABlnYW1lUHJpemVTaGFyZUFtb3VudExhYmVsAAAAAQAAAApnYW1lTnVtYmVyCQABLAAAAAIJAAEsAAAAAgIAAAACR18JAAGkAAAAAQUAAAAKZ2FtZU51bWJlcgIAAAAQUFJJWkVTSEFSRUFNT1VOVAAAAAAQZ2FtZUNvdW50ZXJMYWJlbAIAAAAOR19HQU1FU0NPVU5URVIBAAAAEmdhbWVUb3RhbEJldHNMYWJlbAAAAAEAAAAKZ2FtZU51bWJlcgkAASwAAAACCQABLAAAAAICA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AAQcHJpemVTaGFyZUFtb3VudAkBAAAACWdhbWVUb2tlbgAAAAAFAAAAA25pbAkAAAIAAAABAgAAADtHYW1lIGhhcyBub3QgYmVlbiBpbml0aWFsaXplZCwgcHJpemUgc2hhcmUgYW1vdW50IG5vdCBmb3VuZAkAAAIAAAABAgAAAEBHYW1lIGhhcyBub3QgYmVlbiBpbml0aWFsaXplZCwgdG90YWwgcHJvY2Vzc2VkIHdpbm5lcnMgbm90IGZvdW5kCQAAAgAAAAECAAAANkdhbWUgaGFzIG5vdCBiZWVuIGluaXRpYWxpemVkLCB0b3RhbCB3aW5uZXJzIG5vdCBmb3VuZAkAAAIAAAABAgAAADRHYW1lIGhhcyBub3QgYmVlbiBpbml0aWFsaXplZCwgdG90YWwgZ2FtZXMgbm90IGZvdW5kAAAAABT4hA4=", "height": 2209053, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C3ZnRi8xem8b1TWeohZQdFo7kHJWmGiKSepLAGcZDD2e Next: CZjZpiSFnGjRbNhbaZyHBf7fjTyx298JH8zF7ZsJE5NG Diff:
Old | New | Differences | |
---|---|---|---|
91 | 91 | func startGame () = match gamesGetCounter() { | |
92 | 92 | case currentGame: Int => | |
93 | 93 | let newGame = (currentGame + 1) | |
94 | - | [IntegerEntry(gameCounterLabel, newGame), IntegerEntry(gamePrizePotLabel( | |
94 | + | [IntegerEntry(gameCounterLabel, newGame), IntegerEntry(gamePrizePotLabel(newGame), 10000000), IntegerEntry(gamePrizeShareAmountLabel(newGame), 0), IntegerEntry(gameTotalBetsLabel(newGame), 0), IntegerEntry(gameProcessedBetsLabel(newGame), 0), IntegerEntry(gameWinnersCounterLabel(newGame), 0), IntegerEntry(gameProcessedWinnersLabel(newGame), 0)] | |
95 | 95 | case _ => | |
96 | 96 | throw("Game has not been initialized, total games not found") | |
97 | 97 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let gameTokenLabel = "G_TOKENID" | |
5 | 5 | ||
6 | 6 | let gameBalanceLabel = "G_BALANCE" | |
7 | 7 | ||
8 | 8 | let gameCommunityPotLabel = "G_COMMUNITYPOT" | |
9 | 9 | ||
10 | 10 | func gamePrizePotLabel (gameNumber) = (("G_" + toString(gameNumber)) + "PRIZEPOT") | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func gamePrizeShareAmountLabel (gameNumber) = (("G_" + toString(gameNumber)) + "PRIZESHAREAMOUNT") | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | let gameCounterLabel = "G_GAMESCOUNTER" | |
17 | 17 | ||
18 | 18 | func gameTotalBetsLabel (gameNumber) = (("G_" + toString(gameNumber)) + "TOTALBETS") | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func gameProcessedBetsLabel (gameNumber) = (("G_" + toString(gameNumber)) + "PROCESSEDBETS") | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func gameWinnersCounterLabel (gameNumber) = (("G_" + toString(gameNumber)) + "WINNERSCOUNT") | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func gameProcessedWinnersLabel (gameNumber) = (("G_" + toString(gameNumber)) + "PROCESSEDWINNERS") | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func gameResultLabel (gameNumber) = (("G_" + toString(gameNumber)) + "_RESULT") | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func betDetailsLabel (betNumber) = (("B_" + toString(betNumber)) + "_BETDETAILS") | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func winnerDetailsLabel (winnerNumber) = (("W_" + toString(winnerNumber)) + "_WINNERDETAILS") | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func gameBalance () = getInteger(this, gameBalanceLabel) | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func gameCommunityPot () = getInteger(this, gameCommunityPotLabel) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func gamePrizePot (gameNumber) = getInteger(this, gamePrizePotLabel(gameNumber)) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func gamePrizeShareAmount (gameNumber) = getInteger(this, gamePrizeShareAmountLabel(gameNumber)) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func gamesGetCounter () = getInteger(this, gameCounterLabel) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func gameTotalBets (gameNumber) = getInteger(this, gameTotalBetsLabel(gameNumber)) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func gameProcessedBets (gameNumber) = getInteger(this, gameProcessedBetsLabel(gameNumber)) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func gameWinnersCounter (gameNumber) = getInteger(this, gameWinnersCounterLabel(gameNumber)) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func gameProcessedWinners (gameNumber) = getInteger(this, gameProcessedWinnersLabel(gameNumber)) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func gameGetResult (gameNumber) = getStringValue(this, gameResultLabel(gameNumber)) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func betDetails (betNumber) = getStringValue(this, betDetailsLabel(betNumber)) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func winnerDetails (winnerNumber) = getStringValue(this, winnerDetailsLabel(winnerNumber)) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func gameToken () = match getString(this, gameTokenLabel) { | |
76 | 76 | case tokenId: String => | |
77 | 77 | if ((tokenId == "")) | |
78 | 78 | then unit | |
79 | 79 | else fromBase58String(tokenId) | |
80 | 80 | case _ => | |
81 | 81 | unit | |
82 | 82 | } | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | @Callable(i) | |
86 | 86 | func initGame () = [IntegerEntry(gameBalanceLabel, 0), IntegerEntry(gameCommunityPotLabel, 0), IntegerEntry(gameCounterLabel, 0)] | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | ||
90 | 90 | @Callable(i) | |
91 | 91 | func startGame () = match gamesGetCounter() { | |
92 | 92 | case currentGame: Int => | |
93 | 93 | let newGame = (currentGame + 1) | |
94 | - | [IntegerEntry(gameCounterLabel, newGame), IntegerEntry(gamePrizePotLabel( | |
94 | + | [IntegerEntry(gameCounterLabel, newGame), IntegerEntry(gamePrizePotLabel(newGame), 10000000), IntegerEntry(gamePrizeShareAmountLabel(newGame), 0), IntegerEntry(gameTotalBetsLabel(newGame), 0), IntegerEntry(gameProcessedBetsLabel(newGame), 0), IntegerEntry(gameWinnersCounterLabel(newGame), 0), IntegerEntry(gameProcessedWinnersLabel(newGame), 0)] | |
95 | 95 | case _ => | |
96 | 96 | throw("Game has not been initialized, total games not found") | |
97 | 97 | } | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | ||
101 | 101 | @Callable(i) | |
102 | 102 | func placeBet () = match gamesGetCounter() { | |
103 | 103 | case currentGame: Int => | |
104 | 104 | match gameTotalBets(currentGame) { | |
105 | 105 | case totalBets: Int => | |
106 | 106 | let newBet = (totalBets + 1) | |
107 | 107 | let bet = "1,2,3" | |
108 | 108 | [IntegerEntry(gameTotalBetsLabel(currentGame), newBet), StringEntry(betDetailsLabel(newBet), ((("G" + toString(currentGame)) + "-") + bet))] | |
109 | 109 | case _ => | |
110 | 110 | throw("Game has not been initialized, total bets not found") | |
111 | 111 | } | |
112 | 112 | case _ => | |
113 | 113 | throw("Game has not been initialized, total games not found") | |
114 | 114 | } | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | ||
118 | 118 | @Callable(i) | |
119 | 119 | func endGame () = match gamesGetCounter() { | |
120 | 120 | case currentGame: Int => | |
121 | 121 | [StringEntry(gameResultLabel(currentGame), ((("G" + toString(currentGame)) + "-") + "1,2,3"))] | |
122 | 122 | case _ => | |
123 | 123 | throw("Game has not been initialized, total games not found") | |
124 | 124 | } | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | ||
128 | 128 | @Callable(i) | |
129 | 129 | func processNextBet () = match gamesGetCounter() { | |
130 | 130 | case currentGame: Int => | |
131 | 131 | match gameTotalBets(currentGame) { | |
132 | 132 | case totalBets: Int => | |
133 | 133 | match gameProcessedBets(currentGame) { | |
134 | 134 | case lastProcessedBet: Int => | |
135 | 135 | let nextBet = (lastProcessedBet + 1) | |
136 | 136 | if ((nextBet > totalBets)) | |
137 | 137 | then throw("Next bet has not been placed.") | |
138 | 138 | else match gamesGetCounter() { | |
139 | 139 | case gameNumber: Int => | |
140 | 140 | match gameWinnersCounter(currentGame) { | |
141 | 141 | case winnersCount: Int => | |
142 | 142 | let result = gameGetResult(gameNumber) | |
143 | 143 | let betDetail = betDetails(nextBet) | |
144 | 144 | if ((betDetail == result)) | |
145 | 145 | then { | |
146 | 146 | let newWinnersCount = (winnersCount + 1) | |
147 | 147 | [IntegerEntry(gameProcessedBetsLabel(currentGame), nextBet), IntegerEntry(gameWinnersCounterLabel(currentGame), (winnersCount + 1)), StringEntry(winnerDetailsLabel(newWinnersCount), toBase58String(i.caller.bytes))] | |
148 | 148 | } | |
149 | 149 | else [IntegerEntry(gameProcessedBetsLabel(currentGame), nextBet)] | |
150 | 150 | case _ => | |
151 | 151 | throw("Game has not been initialized, total winners not found") | |
152 | 152 | } | |
153 | 153 | case _ => | |
154 | 154 | throw("Game has not been initialized, total games not found") | |
155 | 155 | } | |
156 | 156 | case _ => | |
157 | 157 | throw("Game has not been initialized, total processed bets not found") | |
158 | 158 | } | |
159 | 159 | case _ => | |
160 | 160 | throw("Game has not been initialized, total bets not found") | |
161 | 161 | } | |
162 | 162 | case _ => | |
163 | 163 | throw("Game has not been initialized, total games not found") | |
164 | 164 | } | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | ||
168 | 168 | @Callable(i) | |
169 | 169 | func calculatePrize () = match gamesGetCounter() { | |
170 | 170 | case currentGame: Int => | |
171 | 171 | match gameWinnersCounter(currentGame) { | |
172 | 172 | case winnersCount: Int => | |
173 | 173 | if ((winnersCount == 0)) | |
174 | 174 | then throw("There are no winners this round.") | |
175 | 175 | else match gamePrizePot(currentGame) { | |
176 | 176 | case prizePotAmount: Int => | |
177 | 177 | let prizeShareAmount = (prizePotAmount / winnersCount) | |
178 | 178 | [IntegerEntry(gamePrizeShareAmountLabel(currentGame), prizeShareAmount)] | |
179 | 179 | case _ => | |
180 | 180 | throw("Game has not been initialized, total games not found") | |
181 | 181 | } | |
182 | 182 | case _ => | |
183 | 183 | throw("Game has not been initialized, total winners not found") | |
184 | 184 | } | |
185 | 185 | case _ => | |
186 | 186 | throw("Game has not been initialized, total games not found") | |
187 | 187 | } | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | ||
191 | 191 | @Callable(i) | |
192 | 192 | func processNextWinner () = match gamesGetCounter() { | |
193 | 193 | case currentGame: Int => | |
194 | 194 | match gameWinnersCounter(currentGame) { | |
195 | 195 | case totalWinners: Int => | |
196 | 196 | if ((totalWinners == 0)) | |
197 | 197 | then throw("There are no winners this round.") | |
198 | 198 | else match gameProcessedWinners(currentGame) { | |
199 | 199 | case lastProcessedWinner: Int => | |
200 | 200 | let nextWinner = (lastProcessedWinner + 1) | |
201 | 201 | if ((nextWinner > totalWinners)) | |
202 | 202 | then throw("No more winners to be processed.") | |
203 | 203 | else match gamePrizeShareAmount(currentGame) { | |
204 | 204 | case prizeShareAmount: Int => | |
205 | 205 | let betPlacer = winnerDetails(nextWinner) | |
206 | 206 | let address = value(addressFromString(betPlacer)) | |
207 | 207 | [ScriptTransfer(address, prizeShareAmount, gameToken())] | |
208 | 208 | case _ => | |
209 | 209 | throw("Game has not been initialized, prize share amount not found") | |
210 | 210 | } | |
211 | 211 | case _ => | |
212 | 212 | throw("Game has not been initialized, total processed winners not found") | |
213 | 213 | } | |
214 | 214 | case _ => | |
215 | 215 | throw("Game has not been initialized, total winners not found") | |
216 | 216 | } | |
217 | 217 | case _ => | |
218 | 218 | throw("Game has not been initialized, total games not found") | |
219 | 219 | } | |
220 | 220 | ||
221 | 221 |
github/deemru/w8io/169f3d6 37.79 ms ◑