tx · 51kDzNyF4P6xFHidCDgoaDWKXxMV9KDwwgTUuEN7vkUK

3ND68eBy9NyJPeq4eRqi42c45hoDAzzRjSm:  -0.01500000 Waves

2019.06.28 15:01 [561941] smart account 3ND68eBy9NyJPeq4eRqi42c45hoDAzzRjSm > SELF 0.00000000 Waves

{ "type": 13, "id": "51kDzNyF4P6xFHidCDgoaDWKXxMV9KDwwgTUuEN7vkUK", "fee": 1500000, "feeAssetId": null, "timestamp": 1561723259395, "version": 1, "sender": "3ND68eBy9NyJPeq4eRqi42c45hoDAzzRjSm", "senderPublicKey": "G96KjJm4zuY2fBkuSsXDF78nNX921QaQtck3gaF3AksA", "proofs": [ "3ZrmpV4vyUm89VB3qhkX1tcUk4ZJjuC1ZQkyZkURwGWXZz3bdctWqUNToNuxDHU6JfC1YmbWAcUD8B1DB1EELpJq" ], "script": "base64:AAIDAAAAAAAAAAAAAAAmAAAAAAlSU0FQVUJMSUMJAAJbAAAAAQIAAAGPYmFzZTY0Ok1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBcWxBaUFOU21CcERIWUtQOXNLZ2VOL2wxYkFiMjhnL3RHbGdEa3dUNUZpTU40WDNwd2R2ZHhFN212U1I4LzQxZFU5cng0akcrNnRacGIxVUxWRFBzNDMxdFIySVJhVFh3NUNqK0FjMnZoTCs1SmFtQ2VyR0QxVVcrYmgvRUdRdHhvOFczWUxEcm9mWEI1UUhKeDRQa3oyS2dmK29TL0M4aEh1Qi9VNGtyTzc2VTA1MDdHVGpaUFA5a1JRMHVMU01lcVFYdDh3WFMrbk1wNXdhanF4UHBETE1hU1JFZ3NLd3YvQUVrUDRkenBUWWJpa0xCWWw0cXRkSnNEODRITEZTa2l3ZDNCaGNPclBqb0lZbUx4UXVCRDVUSU1LVEtEM3NkWmdhWTlyc3lxeDNBMDBpbm55eEQ2enAzYjRnRnBVT1g4SnhLWmRFQzJteUVxbGVOZ2c3R3p3SURBUUFCAAAAAAZTRV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CQEAAAASRXh0cmFjdFJlc2VydmVkQW10AAAAAAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAA3N0eAUAAAAHJG1hdGNoMAYHByvZf68=", "chainId": 84, "height": 561941, "spentComplexity": 0 } View: original | compacted Prev: 9xigoFb6rVaKmCj9SKj4qj2PdzBKGdV4zEPaLARrwLWz Next: 6D5jukQNyDTQ3VzjosRZ1TCYpEj63M1fJqgdwCJP8JZS Diff:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let RSAPUBLIC = fromBase64String("base64:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqlAiANSmBpDHYKP9sKgeN/l1bAb28g/tGlgDkwT5FiMN4X3pwdvdxE7mvSR8/41dU9rx4jG+6tZpb1ULVDPs431tR2IRaTXw5Cj+Ac2vhL+5JamCerGD1UW+bh/EGQtxo8W3YLDrofXB5QHJx4Pkz2Kgf+oS/C8hHuB/U4krO76U0507GTjZPP9kRQ0uLSMeqQXt8wXS+nMp5wajqxPpDLMaSREgsKwv/AEkP4dzpTYbikLBYl4qtdJsD84HLFSkiwd3BhcOrPjoIYmLxQuBD5TIMKTKD3sdZgaY9rsyqx3A00innyxD6zp3b4gFpUOX8JxKZdEC2myEqleNgg7GzwIDAQAB")
55
6-let SERVER = addressFromStringValue("3N4Aib5iubWiGMzdTh6wWiVDVbo32oeVUmH")
6+let SERVER = addressFromStringValue("3NCiG28LmWyTigWG13E5QnvdHBsZFYXSS2j")
77
88 let RANDORACLETIMEFRAME = 2880
99
210210
211211
212212 @Callable(i)
213-func bet (playerChoice) = {
214- let newGameNum = IncrementGameNum()
215- let gameId = toBase58String(i.transactionId)
216- let pmt = extract(i.payment)
217- let betNotInWaves = isDefined(pmt.assetId)
218- let feeNotInWaves = isDefined(pmt.assetId)
219- let winAmt = ValidateBetAndDefineWinAmt(pmt.amount, playerChoice)
220- let txIdUsed = isDefined(getString(this, gameId))
221- if (betNotInWaves)
222- then throw("Bet amount must be in Waves")
223- else if (feeNotInWaves)
224- then throw("Transaction's fee must be in Waves")
225- else if (txIdUsed)
226- then throw("Passed txId had been used before. Game aborted.")
227- else {
228- let playerPubKey58 = toBase58String(i.callerPublicKey)
229- let gameDataStr = FormatGameDataStr(STATESUBMITTED, playerChoice, playerPubKey58, height, winAmt, "")
230- ScriptResult(WriteSet([DataEntry(RESERVATIONKEY, ValidateAndIncreaseReservedAmt(winAmt)), DataEntry(GAMESCOUNTERKEY, newGameNum), DataEntry(gameId, gameDataStr)]), TransferSet([ScriptTransfer(SERVER, COMMISSION, unit)]))
231- }
232- }
233-
234-
235-
236-@Callable(i)
237213 func withdraw (gameId,rsaSign) = {
238214 let gameDataList = ExtractGameDataList(gameId)
239215 let gameState = gameDataList[IdxGameState]
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let RSAPUBLIC = fromBase64String("base64:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqlAiANSmBpDHYKP9sKgeN/l1bAb28g/tGlgDkwT5FiMN4X3pwdvdxE7mvSR8/41dU9rx4jG+6tZpb1ULVDPs431tR2IRaTXw5Cj+Ac2vhL+5JamCerGD1UW+bh/EGQtxo8W3YLDrofXB5QHJx4Pkz2Kgf+oS/C8hHuB/U4krO76U0507GTjZPP9kRQ0uLSMeqQXt8wXS+nMp5wajqxPpDLMaSREgsKwv/AEkP4dzpTYbikLBYl4qtdJsD84HLFSkiwd3BhcOrPjoIYmLxQuBD5TIMKTKD3sdZgaY9rsyqx3A00innyxD6zp3b4gFpUOX8JxKZdEC2myEqleNgg7GzwIDAQAB")
55
6-let SERVER = addressFromStringValue("3N4Aib5iubWiGMzdTh6wWiVDVbo32oeVUmH")
6+let SERVER = addressFromStringValue("3NCiG28LmWyTigWG13E5QnvdHBsZFYXSS2j")
77
88 let RANDORACLETIMEFRAME = 2880
99
1010 let WAVELET = ((100 * 1000) * 1000)
1111
1212 let COMMISSION = ((5 * 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 RATE = 19000
2727
2828 let IdxGameState = 0
2929
3030 let IdxPlayerChoice = 1
3131
3232 let IdxPlayerPubKey58 = 2
3333
3434 let IdxStartedHeight = 3
3535
3636 let IdxWinAmt = 4
3737
3838 let IdxRandOrEmpty = 5
3939
4040 let RESERVATIONKEY = "$RESERVED_AMOUNT"
4141
4242 let GAMESCOUNTERKEY = "$GAME_NUM"
4343
4444 let STATESUBMITTED = "SUBMITTED"
4545
4646 let STATEWON = "WON"
4747
4848 let STATELOST = "LOST"
4949
5050 func IncrementGameNum () = {
5151 let gameNum = match getInteger(this, GAMESCOUNTERKEY) {
5252 case num: Int =>
5353 num
5454 case _ =>
5555 0
5656 }
5757 (gameNum + 1)
5858 }
5959
6060
6161 func ExtractReservedAmt () = match getInteger(this, RESERVATIONKEY) {
6262 case a: Int =>
6363 a
6464 case _ =>
6565 0
6666 }
6767
6868
6969 func ValidateAndIncreaseReservedAmt (winAmt) = {
7070 let newReservedAmount = (ExtractReservedAmt() + winAmt)
7171 let balance = wavesBalance(this)
7272 if ((newReservedAmount > balance))
7373 then throw("Insufficient funds on Dice Roller account. Transaction was rejected for your safety.")
7474 else newReservedAmount
7575 }
7676
7777
7878 func DecreaseReservedAmt (gameId,winAmt) = {
7979 let newReservedAmount = (ExtractReservedAmt() - winAmt)
8080 if ((0 > newReservedAmount))
8181 then throw("Invalid Dice Roller account state - reserved amount is less than 0")
8282 else DataEntry(RESERVATIONKEY, newReservedAmount)
8383 }
8484
8585
8686 func ValidateBetAndDefineWinAmt (betAmt,playerChoice) = {
8787 let betAmtValid = if (if (if (if ((betAmt == (BET1 + COMMISSION)))
8888 then true
8989 else (betAmt == (BET2 + COMMISSION)))
9090 then true
9191 else (betAmt == (BET4 + COMMISSION)))
9292 then true
9393 else (betAmt == (BET8 + COMMISSION)))
9494 then true
9595 else (betAmt == (BET14 + COMMISSION))
9696 if (betAmtValid)
9797 then {
9898 let choiceSize = size(playerChoice)
9999 let bet = (betAmt - COMMISSION)
100100 if ((choiceSize == 1))
101101 then ((bet * RATE) / RATEMULT)
102102 else throw("Invalid player's choice format")
103103 }
104104 else throw("Bet amount is not in range")
105105 }
106106
107107
108108 func RandToStr (r) = if ((r == 0))
109109 then "0"
110110 else if ((r == 1))
111111 then "1"
112112 else throw(("Unsupported r parameter passed: expected=[0,...,1] actual=" + toString(r)))
113113
114114
115115 func GenerateRandInt (gameId,rsaSign) = {
116116 let rsaSigValid = rsaVerify(SHA256, toBytes(gameId), rsaSign, RSAPUBLIC)
117117 if (rsaSigValid)
118118 then {
119119 let rand = (toInt(sha256(rsaSign)) % 2)
120120 if ((0 > rand))
121121 then (-1 * rand)
122122 else rand
123123 }
124124 else throw("Invalid RSA signature")
125125 }
126126
127127
128128 func IsPlayerWin (playerChoice,randStr) = {
129129 let s = size(playerChoice)
130130 if ((s == 1))
131131 then (playerChoice == randStr)
132132 else false
133133 }
134134
135135
136136 func FormatGameDataParam (p) = {
137137 let s = size(p)
138138 if ((s == 0))
139139 then throw("Parameter size must be greater then 0")
140140 else if ((s > 99))
141141 then throw("Parameter size must be less then 100")
142142 else if ((10 > s))
143143 then (("0" + toString(s)) + p)
144144 else (toString(s) + p)
145145 }
146146
147147
148148 func FormatGameDataStr (gameState,playerChoice,playerPubKey58,startedHeight,winAmt,randOrEmpty) = {
149149 let fullStateStr = ((((((((FormatGameDataParam(gameState) + "_") + FormatGameDataParam(playerChoice)) + "_") + FormatGameDataParam(playerPubKey58)) + "_") + FormatGameDataParam(toString(startedHeight))) + "_") + FormatGameDataParam(toString(winAmt)))
150150 if ((randOrEmpty == ""))
151151 then fullStateStr
152152 else ((fullStateStr + "_") + FormatGameDataParam(randOrEmpty))
153153 }
154154
155155
156156 func RemoveUnderscoreIfPresent (remaining) = if ((size(remaining) > 0))
157157 then drop(remaining, 1)
158158 else remaining
159159
160160
161161 func ParseNextAttribute (remaining) = {
162162 let s = size(remaining)
163163 if ((s > 0))
164164 then {
165165 let nn = parseIntValue(take(remaining, 2))
166166 let v = take(drop(remaining, 2), nn)
167167 let tmpRemaining = drop(remaining, (nn + 2))
168168 let remainingState = RemoveUnderscoreIfPresent(tmpRemaining)
169169 [v, remainingState]
170170 }
171171 else throw("Empty string was passed into parseNextAttribute func")
172172 }
173173
174174
175175 func ParseGameRawDataStr (rawStateStr) = {
176176 let gameState = ParseNextAttribute(rawStateStr)
177177 let playerChoice = ParseNextAttribute(gameState[1])
178178 let playerPubKey58 = ParseNextAttribute(playerChoice[1])
179179 let startedHeight = ParseNextAttribute(playerPubKey58[1])
180180 let winAmt = ParseNextAttribute(startedHeight[1])
181181 [gameState[0], playerChoice[0], playerPubKey58[0], startedHeight[0], winAmt[0]]
182182 }
183183
184184
185185 func ExtractGameDataList (gameId) = {
186186 let rawDataStr = match getString(this, gameId) {
187187 case str: String =>
188188 str
189189 case _ =>
190190 throw(("Couldn't find game by " + gameId))
191191 }
192192 ParseGameRawDataStr(rawDataStr)
193193 }
194194
195195
196196 func WinScriptSet (gameId,playerAddress,winAmt,newGameDataStr,winByTimeout,decreasedReserves) = {
197197 let wSetCommonData = [decreasedReserves]
198198 let tSetCommonData = [ScriptTransfer(playerAddress, winAmt, unit)]
199199 if (winByTimeout)
200200 then {
201201 let newGameDataStrAdjusted = ((newGameDataStr + "_") + FormatGameDataParam("TIMEOUT"))
202202 let gameData = DataEntry(gameId, newGameDataStrAdjusted)
203203 ScriptResult(WriteSet(gameData :: wSetCommonData), TransferSet(tSetCommonData))
204204 }
205205 else {
206206 let gameData = DataEntry(gameId, newGameDataStr)
207207 ScriptResult(WriteSet(gameData :: wSetCommonData), TransferSet(tSetCommonData))
208208 }
209209 }
210210
211211
212212 @Callable(i)
213-func bet (playerChoice) = {
214- let newGameNum = IncrementGameNum()
215- let gameId = toBase58String(i.transactionId)
216- let pmt = extract(i.payment)
217- let betNotInWaves = isDefined(pmt.assetId)
218- let feeNotInWaves = isDefined(pmt.assetId)
219- let winAmt = ValidateBetAndDefineWinAmt(pmt.amount, playerChoice)
220- let txIdUsed = isDefined(getString(this, gameId))
221- if (betNotInWaves)
222- then throw("Bet amount must be in Waves")
223- else if (feeNotInWaves)
224- then throw("Transaction's fee must be in Waves")
225- else if (txIdUsed)
226- then throw("Passed txId had been used before. Game aborted.")
227- else {
228- let playerPubKey58 = toBase58String(i.callerPublicKey)
229- let gameDataStr = FormatGameDataStr(STATESUBMITTED, playerChoice, playerPubKey58, height, winAmt, "")
230- ScriptResult(WriteSet([DataEntry(RESERVATIONKEY, ValidateAndIncreaseReservedAmt(winAmt)), DataEntry(GAMESCOUNTERKEY, newGameNum), DataEntry(gameId, gameDataStr)]), TransferSet([ScriptTransfer(SERVER, COMMISSION, unit)]))
231- }
232- }
233-
234-
235-
236-@Callable(i)
237213 func withdraw (gameId,rsaSign) = {
238214 let gameDataList = ExtractGameDataList(gameId)
239215 let gameState = gameDataList[IdxGameState]
240216 let playerChoice = gameDataList[IdxPlayerChoice]
241217 let startedHeight = parseIntValue(gameDataList[IdxStartedHeight])
242218 let winAmt = parseIntValue(gameDataList[IdxWinAmt])
243219 let playerPubKey58 = gameDataList[IdxPlayerPubKey58]
244220 let playerAddress = addressFromPublicKey(fromBase58String(playerPubKey58))
245221 let winByTimeout = ((height - startedHeight) > RANDORACLETIMEFRAME)
246222 let decreasedReserves = DecreaseReservedAmt(gameId, winAmt)
247223 if ((gameState != STATESUBMITTED))
248224 then throw("Invalid game state for passed gameId")
249225 else if (winByTimeout)
250226 then {
251227 let randStr = take(playerChoice, 1)
252228 let newGameDataStr = FormatGameDataStr(STATEWON, playerChoice, playerPubKey58, startedHeight, winAmt, randStr)
253229 WinScriptSet(gameId, playerAddress, winAmt, newGameDataStr, winByTimeout, decreasedReserves)
254230 }
255231 else {
256232 let randStr = RandToStr(GenerateRandInt(gameId, rsaSign))
257233 if (IsPlayerWin(playerChoice, randStr))
258234 then {
259235 let newGameDataStr = FormatGameDataStr(STATEWON, playerChoice, playerPubKey58, startedHeight, winAmt, randStr)
260236 WinScriptSet(gameId, playerAddress, winAmt, newGameDataStr, winByTimeout, decreasedReserves)
261237 }
262238 else {
263239 let newGameDataStr = FormatGameDataStr(STATELOST, playerChoice, playerPubKey58, startedHeight, winAmt, randStr)
264240 WriteSet([DataEntry(gameId, newGameDataStr), decreasedReserves])
265241 }
266242 }
267243 }
268244
269245
270246 @Verifier(tx)
271247 func verify () = if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey))
272248 then match tx {
273249 case ttx: TransferTransaction =>
274250 ((wavesBalance(this) - ttx.amount) >= ExtractReservedAmt())
275251 case stx: SetScriptTransaction =>
276252 true
277253 case _ =>
278254 false
279255 }
280256 else false
281257

github/deemru/w8io/026f985 
42.41 ms