tx · YNrxnAa6KAqkXarRzGbjvVERhLKKHN7vcosuUyxMbX3

3N4zabLE5JbtJfVdNL7CP1STkCnmU15Uwyz:  -0.05000000 Waves

2021.08.18 03:25 [1663053] smart account 3N4zabLE5JbtJfVdNL7CP1STkCnmU15Uwyz > SELF 0.00000000 Waves

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

github/deemru/w8io/169f3d6 
46.15 ms