tx · 9HsaoEDHRegTfjyVzrppe68z7byRZAhs1RsWzoYHM1pc

3N4zabLE5JbtJfVdNL7CP1STkCnmU15Uwyz:  -0.01000000 Waves

2021.08.30 09:08 [1680695] smart account 3N4zabLE5JbtJfVdNL7CP1STkCnmU15Uwyz > SELF 0.00000000 Waves

{ "type": 13, "id": "9HsaoEDHRegTfjyVzrppe68z7byRZAhs1RsWzoYHM1pc", "fee": 1000000, "feeAssetId": null, "timestamp": 1630303689469, "version": 2, "chainId": 84, "sender": "3N4zabLE5JbtJfVdNL7CP1STkCnmU15Uwyz", "senderPublicKey": "H2xJWsT7HURFk1LcASPmFbNrxJ1AoYmbjiYy2qTiUDmg", "proofs": [ "5vywTKuwZMsqupve7zmFBDPxn2c2sYhC9i62pe6JT7XhLpDVTN2yuUGXNNrYWSuwEPN32Qi66PBNrXk2QEsCZxYV" ], "script": "base64:AAIDAAAAAAAAB8EIARIDCgEIEgQKAggIGhUKAmExEg9TZXJ2ZXJQdWJsaWNLZXkaDAoCYTISBlNFUlZFUhoZCgJhMxITUkFORE9SQUNMRVRJTUVGUkFNRRoNCgJhNBIHV0FWRUxFVBoUCgJhNRIOV0FWRUxFVDFmcm9tMTAaEAoCYTYSCkNPTU1JU1NJT04aCwoCYTcSBUJFVDAyGgsKAmE4EgVCRVQwNRoKCgJhORIEQkVUMRoKCgJiMRIEQkVUMhoKCgJiMhIEQkVUNBoOCgJiMxIIUkFURU1VTFQaCwoCYjQSBVJBVEUxGgsKAmI1EgVSQVRFMhoLCgJiNhIFUkFURTMaCwoCYjcSBVJBVEU0GgsKAmI4EgVSQVRFNRoSCgJiORIMSWR4R2FtZVN0YXRlGhUKAmMxEg9JZHhQbGF5ZXJDaG9pY2UaFwoCYzISEUlkeFBsYXllclB1YktleTU4GhYKAmMzEhBJZHhTdGFydGVkSGVpZ2h0Gg8KAmM0EglJZHhXaW5BbXQaFQoCYzUSD0dBTUVTQ09VTlRFUktFWRoUCgJjNhIOUkVTRVJWQVRJT05LRVk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RyeQAAAAIFAAAAAmQyBQAAAAJrMgkABEwAAAACBQAAAAJrNAUAAAADbmlsAAAAAMkpI04=", "height": 1680695, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: A96cvUwN2aspGnonUphTs3a5nLzxBR4srVyZh5P6h3vP Next: none Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let ServerPublicKey = fromBase58String("4VAAsVuuSJAB5XammAXe6G98tYKJYvGheyvpKG8NJWn1")
4+let ServerPublicKey = fromBase58String("CGZFbzAaJCpy2bXmwSDeHG3BTNyZzTUrVpeFWj5nbwm5")
55
66 let SERVER = addressFromStringValue("3NAPoUBwL7jaPW3ngVF3dT5b68q4eaHAiiC")
77
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let ServerPublicKey = fromBase58String("4VAAsVuuSJAB5XammAXe6G98tYKJYvGheyvpKG8NJWn1")
4+let ServerPublicKey = fromBase58String("CGZFbzAaJCpy2bXmwSDeHG3BTNyZzTUrVpeFWj5nbwm5")
55
66 let SERVER = addressFromStringValue("3NAPoUBwL7jaPW3ngVF3dT5b68q4eaHAiiC")
77
88 let RANDORACLETIMEFRAME = 4320
99
1010 let WAVELET = ((100 * 1000) * 1000)
1111
1212 let WAVELET1from10 = ((100 * 1000) * 100)
1313
1414 let COMMISSION = ((9 * WAVELET) / 1000)
1515
1616 let BET02 = (2 * WAVELET1from10)
1717
1818 let BET05 = (5 * WAVELET1from10)
1919
2020 let BET1 = (1 * WAVELET)
2121
2222 let BET2 = (2 * WAVELET)
2323
2424 let BET4 = (4 * WAVELET)
2525
2626 let RATEMULT = 10000
2727
2828 let RATE1 = 39655
2929
3030 let RATE2 = 24600
3131
3232 let RATE3 = 19000
3333
3434 let RATE4 = 14200
3535
3636 let RATE5 = 11400
3737
3838 let IdxGameState = 0
3939
4040 let IdxPlayerChoice = 1
4141
4242 let IdxPlayerPubKey58 = 2
4343
4444 let IdxStartedHeight = 3
4545
4646 let IdxWinAmt = 4
4747
4848 let GAMESCOUNTERKEY = "$GAME_NUM"
4949
5050 let RESERVATIONKEY = "$RESERVED_AMOUNT"
5151
5252 let STATESUBMITTED = "SUBMITTED"
5353
5454 let STATEWON = "WON"
5555
5656 let STATELOST = "LOST"
5757
5858 func GenerateRandInt (gameId,rsaSign) = {
5959 let rsaSigValid = sigVerify(toBytes(gameId), rsaSign, ServerPublicKey)
6060 if (rsaSigValid)
6161 then {
6262 let rand = (toInt(sha256(rsaSign)) % 6)
6363 if ((0 > rand))
6464 then ((-1 * rand) + 1)
6565 else (rand + 1)
6666 }
6767 else throw("Invalid RSA signature")
6868 }
6969
7070
7171 func RemoveUnderscoreIfPresent (remaining) = if ((size(remaining) > 0))
7272 then drop(remaining, 1)
7373 else remaining
7474
7575
7676 func ParseNextAttribute (remaining) = {
7777 let s = size(remaining)
7878 if ((s > 0))
7979 then {
8080 let nn = parseIntValue(take(remaining, 2))
8181 let v = take(drop(remaining, 2), nn)
8282 let tmpRemaining = drop(remaining, (nn + 2))
8383 let remainingState = RemoveUnderscoreIfPresent(tmpRemaining)
8484 [v, remainingState]
8585 }
8686 else throw("Empty string was passed into parseNextAttribute func")
8787 }
8888
8989
9090 func ParseGameRawDataStr (rawStateStr) = {
9191 let gameState = ParseNextAttribute(rawStateStr)
9292 let playerChoice = ParseNextAttribute(gameState[1])
9393 let playerPubKey58 = ParseNextAttribute(playerChoice[1])
9494 let startedHeight = ParseNextAttribute(playerPubKey58[1])
9595 let winAmt = ParseNextAttribute(startedHeight[1])
9696 [gameState[0], playerChoice[0], playerPubKey58[0], startedHeight[0], winAmt[0]]
9797 }
9898
9999
100100 func ExtractGameDataList (gameId) = {
101101 let rawDataStr = match getString(this, gameId) {
102102 case str: String =>
103103 str
104104 case _ =>
105105 throw(("Couldn't find game by " + gameId))
106106 }
107107 ParseGameRawDataStr(rawDataStr)
108108 }
109109
110110
111111 func ExtractReservedAmt () = match getInteger(this, RESERVATIONKEY) {
112112 case a: Int =>
113113 a
114114 case _ =>
115115 0
116116 }
117117
118118
119119 func ValidateAndIncreaseReservedAmt (winAmt) = {
120120 let newReservedAmount = (ExtractReservedAmt() + winAmt)
121121 let balance = wavesBalance(this)
122122 if ((newReservedAmount > balance))
123123 then throw("Insufficient funds on Russian Roulette account. Transaction was rejected for your safety.")
124124 else newReservedAmount
125125 }
126126
127127
128128 func IncrementGameNum () = {
129129 let gameNum = match getInteger(this, GAMESCOUNTERKEY) {
130130 case num: Int =>
131131 num
132132 case _ =>
133133 0
134134 }
135135 (gameNum + 1)
136136 }
137137
138138
139139 func DecreaseReservedAmt (gameId,winAmt) = {
140140 let newReservedAmount = (ExtractReservedAmt() - winAmt)
141141 if ((0 > newReservedAmount))
142142 then throw("Invalid Russian Roulette account state - reserved amount is less than 0")
143143 else DataEntry(RESERVATIONKEY, newReservedAmount)
144144 }
145145
146146
147147 func FormatGameDataParam (p) = {
148148 let s = size(p)
149149 if ((s == 0))
150150 then throw("Parameter size must be greater then 0")
151151 else if ((s > 99))
152152 then throw("Parameter size must be less then 100")
153153 else if ((10 > s))
154154 then (("0" + toString(s)) + p)
155155 else (toString(s) + p)
156156 }
157157
158158
159159 func FormatGameDataStr (gameState,playerChoice,playerPubKey58,startedHeight,winAmt,randOrEmpty) = {
160160 let fullStateStr = ((((((((FormatGameDataParam(gameState) + "_") + FormatGameDataParam(playerChoice)) + "_") + FormatGameDataParam(playerPubKey58)) + "_") + FormatGameDataParam(toString(startedHeight))) + "_") + FormatGameDataParam(toString(winAmt)))
161161 if ((randOrEmpty == ""))
162162 then fullStateStr
163163 else ((fullStateStr + "_") + FormatGameDataParam(randOrEmpty))
164164 }
165165
166166
167167 func RandToStr (r) = if ((r == 1))
168168 then "1"
169169 else if ((r == 2))
170170 then "2"
171171 else if ((r == 3))
172172 then "3"
173173 else if ((r == 4))
174174 then "4"
175175 else if ((r == 5))
176176 then "5"
177177 else if ((r == 6))
178178 then "6"
179179 else throw(("Unsupported r parameter passed: expected=[1,...,6] actual=" + toString(r)))
180180
181181
182182 func ValidateBetAndDefineWinAmt (betAmt,playerChoice) = {
183183 let betAmtValid = if (if (if (if (if ((betAmt == (BET02 + COMMISSION)))
184184 then true
185185 else (betAmt == (BET05 + COMMISSION)))
186186 then true
187187 else (betAmt == (BET1 + COMMISSION)))
188188 then true
189189 else (betAmt == (BET2 + COMMISSION)))
190190 then true
191191 else (betAmt == (BET4 + COMMISSION)))
192192 then true
193193 else false
194194 if (betAmtValid)
195195 then {
196196 let bulletsCount = size(playerChoice)
197197 let bet = (betAmt - COMMISSION)
198198 let b1 = parseIntValue(take(playerChoice, 1))
199199 let forB2 = drop(playerChoice, 1)
200200 let b2 = parseIntValue(take(forB2, 1))
201201 let forB3 = drop(forB2, 1)
202202 let b3 = parseIntValue(take(forB3, 1))
203203 let forB4 = drop(forB3, 1)
204204 let b4 = parseIntValue(take(forB4, 1))
205205 let forB5 = drop(forB4, 1)
206206 let b5 = parseIntValue(take(forB5, 1))
207207 let forB6 = drop(forB5, 1)
208208 let b6 = parseIntValue(take(forB6, 1))
209209 let activeBullets = (((((b1 + b2) + b3) + b4) + b5) + b6)
210210 if ((activeBullets == 5))
211211 then ((bet * RATE1) / RATEMULT)
212212 else if ((activeBullets == 4))
213213 then ((bet * RATE2) / RATEMULT)
214214 else if ((activeBullets == 3))
215215 then ((bet * RATE3) / RATEMULT)
216216 else if ((activeBullets == 2))
217217 then ((bet * RATE4) / RATEMULT)
218218 else if ((activeBullets == 1))
219219 then ((bet * RATE5) / RATEMULT)
220220 else throw(("Invalid player's choice, active bullets = " + toString(activeBullets)))
221221 }
222222 else throw("Bet amount is not in range")
223223 }
224224
225225
226226 func getWinStr (playerChoice) = {
227227 let b1 = parseIntValue(take(playerChoice, 1))
228228 let forB2 = drop(playerChoice, 1)
229229 let b2 = parseIntValue(take(forB2, 1))
230230 let forB3 = drop(playerChoice, 1)
231231 let b3 = parseIntValue(take(forB3, 1))
232232 let forB4 = drop(playerChoice, 1)
233233 let b4 = parseIntValue(take(forB4, 1))
234234 let forB5 = drop(playerChoice, 1)
235235 let b5 = parseIntValue(take(forB5, 1))
236236 let forB6 = drop(playerChoice, 1)
237237 let b6 = parseIntValue(take(forB6, 1))
238238 if ((b1 == 0))
239239 then "1"
240240 else if ((b2 == 0))
241241 then "2"
242242 else if ((b3 == 0))
243243 then "3"
244244 else if ((b4 == 0))
245245 then "4"
246246 else if ((b5 == 0))
247247 then "5"
248248 else if ((b6 == 0))
249249 then "6"
250250 else throw("Bet amount is not in range")
251251 }
252252
253253
254254 func IsPlayerWin (playerChoice,randStr) = {
255255 let randInt = parseIntValue(randStr)
256256 let choiceArray = split(playerChoice, "")
257257 if ((choiceArray[(randInt - 1)] == "0"))
258258 then true
259259 else false
260260 }
261261
262262
263263 func WinScriptSet (gameId,playerAddress,winAmt,newGameDataStr,winByTimeout,decreasedReserves) = {
264264 let wSetCommonData = [decreasedReserves]
265265 let tSetCommonData = [ScriptTransfer(playerAddress, winAmt, unit)]
266266 if (winByTimeout)
267267 then {
268268 let newGameDataStrAdjusted = ((newGameDataStr + "_") + FormatGameDataParam("TIMEOUT"))
269269 let gameData = DataEntry(gameId, newGameDataStrAdjusted)
270270 ScriptResult(WriteSet(gameData :: wSetCommonData), TransferSet(tSetCommonData))
271271 }
272272 else {
273273 let gameData = DataEntry(gameId, newGameDataStr)
274274 ScriptResult(WriteSet(gameData :: wSetCommonData), TransferSet(tSetCommonData))
275275 }
276276 }
277277
278278
279279 @Callable(i)
280280 func bet (playerChoice) = {
281281 let newGameNum = IncrementGameNum()
282282 let gameId = toBase58String(i.transactionId)
283283 let pmt = extract(i.payment)
284284 let betNotInWaves = isDefined(pmt.assetId)
285285 let feeNotInWaves = isDefined(pmt.assetId)
286286 let winAmt = ValidateBetAndDefineWinAmt(pmt.amount, playerChoice)
287287 let txIdUsed = isDefined(getString(this, gameId))
288288 if (betNotInWaves)
289289 then throw("Bet amount must be in Waves")
290290 else if (feeNotInWaves)
291291 then throw("Transaction's fee must be in Waves")
292292 else if (txIdUsed)
293293 then throw("Passed txId had been used before. Game aborted.")
294294 else {
295295 let playerPubKey58 = toBase58String(i.callerPublicKey)
296296 let gameDataStr = FormatGameDataStr(STATESUBMITTED, playerChoice, playerPubKey58, height, winAmt, "")
297297 let readableGameData = ((((((((STATESUBMITTED + "_") + playerChoice) + "_") + playerPubKey58) + "_") + toString(height)) + "_") + toString(winAmt))
298298 let serverTransfer = [ScriptTransfer(SERVER, COMMISSION, unit)]
299299 let betData = [DataEntry(RESERVATIONKEY, ValidateAndIncreaseReservedAmt(winAmt)), DataEntry(GAMESCOUNTERKEY, newGameNum), DataEntry(gameId, gameDataStr)]
300300 ScriptResult(WriteSet(betData), TransferSet(serverTransfer))
301301 }
302302 }
303303
304304
305305
306306 @Callable(i)
307307 func withdraw (gameId,rsaSignCrypted) = {
308308 let rsaSign = fromBase58String(rsaSignCrypted)
309309 let gameDataList = ExtractGameDataList(gameId)
310310 let gameState = gameDataList[IdxGameState]
311311 let playerChoice = gameDataList[IdxPlayerChoice]
312312 let startedHeight = parseIntValue(gameDataList[IdxStartedHeight])
313313 let winAmt = parseIntValue(gameDataList[IdxWinAmt])
314314 let playerPubKey58 = gameDataList[IdxPlayerPubKey58]
315315 let playerAddress = addressFromPublicKey(fromBase58String(playerPubKey58))
316316 let winByTimeout = ((height - startedHeight) > RANDORACLETIMEFRAME)
317317 let decreasedReserves = DecreaseReservedAmt(gameId, winAmt)
318318 if ((gameState != STATESUBMITTED))
319319 then throw("Invalid game state for passed gameId")
320320 else if (winByTimeout)
321321 then {
322322 let randStr = getWinStr(playerChoice)
323323 let newGameDataStr = FormatGameDataStr(STATEWON, playerChoice, playerPubKey58, startedHeight, winAmt, randStr)
324324 WinScriptSet(gameId, playerAddress, winAmt, newGameDataStr, winByTimeout, decreasedReserves)
325325 }
326326 else {
327327 let randInt = GenerateRandInt(gameId, rsaSign)
328328 let randStr = RandToStr(randInt)
329329 if (IsPlayerWin(playerChoice, randStr))
330330 then {
331331 let newGameDataStr = FormatGameDataStr(STATEWON, playerChoice, playerPubKey58, startedHeight, winAmt, randStr)
332332 WinScriptSet(gameId, playerAddress, winAmt, newGameDataStr, winByTimeout, decreasedReserves)
333333 }
334334 else {
335335 let newGameDataStr = FormatGameDataStr(STATELOST, playerChoice, playerPubKey58, startedHeight, winAmt, randStr)
336336 WriteSet([DataEntry(gameId, newGameDataStr), decreasedReserves])
337337 }
338338 }
339339 }
340340
341341

github/deemru/w8io/169f3d6 
37.57 ms