tx · 6D5jukQNyDTQ3VzjosRZ1TCYpEj63M1fJqgdwCJP8JZS

3ND68eBy9NyJPeq4eRqi42c45hoDAzzRjSm:  -0.01500000 Waves

2019.06.28 16:02 [562000] smart account 3ND68eBy9NyJPeq4eRqi42c45hoDAzzRjSm > SELF 0.00000000 Waves

{ "type": 13, "id": "6D5jukQNyDTQ3VzjosRZ1TCYpEj63M1fJqgdwCJP8JZS", "fee": 1500000, "feeAssetId": null, "timestamp": 1561726971805, "version": 1, "sender": "3ND68eBy9NyJPeq4eRqi42c45hoDAzzRjSm", "senderPublicKey": "G96KjJm4zuY2fBkuSsXDF78nNX921QaQtck3gaF3AksA", "proofs": [ "5pZ9ERTgGNbLq7XgCW15c34okdFg8NxonRxgPLBSfpEugPRAXmG3tTG1dBJtdb9hAtMK4Gu8Qf4y1Tm3QTCThLYM" ], "script": "base64:AAIDAAAAAAAAAAAAAAAmAAAAAAlSU0FQVUJMSUMJAAJbAAAAAQIAAAGPYmFzZTY0Ok1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBcWxBaUFOU21CcERIWUtQOXNLZ2VOL2wxYkFiMjhnL3RHbGdEa3dUNUZpTU40WDNwd2R2ZHhFN212U1I4LzQxZFU5cng0akcrNnRacGIxVUxWRFBzNDMxdFIySVJhVFh3NUNqK0FjMnZoTCs1SmFtQ2VyR0QxVVcrYmgvRUdRdHhvOFczWUxEcm9mWEI1UUhKeDRQa3oyS2dmK29TL0M4aEh1Qi9VNGtyTzc2VTA1MDdHVGpaUFA5a1JRMHVMU01lcVFYdDh3WFMrbk1wNXdhanF4UHBETE1hU1JFZ3NLd3YvQUVrUDRkenBUWWJpa0xCWWw0cXRkSnNEODRITEZTa2l3ZDNCaGNPclBqb0lZbUx4UXVCRDVUSU1LVEtEM3NkWmdhWTlyc3lxeDNBMDBpbm55eEQ2enAzYjRnRnBVT1g4SnhLWmRFQzJteUVxbGVOZ2c3R3p3SURBUUFCAAAAAAZT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JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAAZnYW1lSWQFAAAADm5ld0dhbWVEYXRhU3RyCQAETAAAAAIFAAAAEWRlY3JlYXNlZFJlc2VydmVzBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAN0dHgFAAAAByRtYXRjaDAJAABnAAAAAgkAAGUAAAACCQEAAAAMd2F2ZXNCYWxhbmNlAAAAAQUAAAAEdGhpcwgFAAAAA3R0eAAAAAZhbW91bnQJAQAAABJFeHRyYWN0UmVzZXJ2ZWRBbXQAAAAAAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAADc3R4BQAAAAckbWF0Y2gwBgcHfmyWuw==", "chainId": 84, "height": 562000, "spentComplexity": 0 } View: original | compacted Prev: 51kDzNyF4P6xFHidCDgoaDWKXxMV9KDwwgTUuEN7vkUK Next: J6KK2EAQTcUtnt9um91vP7TQb5g6g6cDzr1r5o58mPiM Diff:
OldNewDifferences
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)
213237 func withdraw (gameId,rsaSign) = {
214238 let gameDataList = ExtractGameDataList(gameId)
215239 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
66 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)
213237 func withdraw (gameId,rsaSign) = {
214238 let gameDataList = ExtractGameDataList(gameId)
215239 let gameState = gameDataList[IdxGameState]
216240 let playerChoice = gameDataList[IdxPlayerChoice]
217241 let startedHeight = parseIntValue(gameDataList[IdxStartedHeight])
218242 let winAmt = parseIntValue(gameDataList[IdxWinAmt])
219243 let playerPubKey58 = gameDataList[IdxPlayerPubKey58]
220244 let playerAddress = addressFromPublicKey(fromBase58String(playerPubKey58))
221245 let winByTimeout = ((height - startedHeight) > RANDORACLETIMEFRAME)
222246 let decreasedReserves = DecreaseReservedAmt(gameId, winAmt)
223247 if ((gameState != STATESUBMITTED))
224248 then throw("Invalid game state for passed gameId")
225249 else if (winByTimeout)
226250 then {
227251 let randStr = take(playerChoice, 1)
228252 let newGameDataStr = FormatGameDataStr(STATEWON, playerChoice, playerPubKey58, startedHeight, winAmt, randStr)
229253 WinScriptSet(gameId, playerAddress, winAmt, newGameDataStr, winByTimeout, decreasedReserves)
230254 }
231255 else {
232256 let randStr = RandToStr(GenerateRandInt(gameId, rsaSign))
233257 if (IsPlayerWin(playerChoice, randStr))
234258 then {
235259 let newGameDataStr = FormatGameDataStr(STATEWON, playerChoice, playerPubKey58, startedHeight, winAmt, randStr)
236260 WinScriptSet(gameId, playerAddress, winAmt, newGameDataStr, winByTimeout, decreasedReserves)
237261 }
238262 else {
239263 let newGameDataStr = FormatGameDataStr(STATELOST, playerChoice, playerPubKey58, startedHeight, winAmt, randStr)
240264 WriteSet([DataEntry(gameId, newGameDataStr), decreasedReserves])
241265 }
242266 }
243267 }
244268
245269
246270 @Verifier(tx)
247271 func verify () = if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey))
248272 then match tx {
249273 case ttx: TransferTransaction =>
250274 ((wavesBalance(this) - ttx.amount) >= ExtractReservedAmt())
251275 case stx: SetScriptTransaction =>
252276 true
253277 case _ =>
254278 false
255279 }
256280 else false
257281

github/deemru/w8io/026f985 
31.86 ms