tx · 3S2JyDGkTom14LNPTBiq6KtziuMSU8pSRjYZSfVimCi6

3MqQ9ihYKGehfUnXYf5WmkYSZUD71ByeCQe:  -0.01500000 Waves

2019.07.10 19:53 [579849] smart account 3MqQ9ihYKGehfUnXYf5WmkYSZUD71ByeCQe > SELF 0.00000000 Waves

{ "type": 13, "id": "3S2JyDGkTom14LNPTBiq6KtziuMSU8pSRjYZSfVimCi6", "fee": 1500000, "feeAssetId": null, "timestamp": 1562777657595, "version": 1, "sender": "3MqQ9ihYKGehfUnXYf5WmkYSZUD71ByeCQe", "senderPublicKey": "HcUXEkA9JTGp78LcTKsu4FmEpbDmnqntL4aMNLx1BHMB", "proofs": [ "CGpPbn1sLbGLBZ6tq7NVZHq7Sub1oQ9ccRFMmzt7VjnSZvXVbx6euR6fw84bF5F17yXCttQWY85gFedEXNRgHt4" ], "script": "base64:AAIDAAAAAAAAAAAAAAAqAAAAAAlSU0FQVUJMSUMJAAJbAAAAAQIAAAGPYmFzZTY0Ok1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBbGVtcjk1SjFqWlVzN2NKbXJtbWxONHpvN1lWc0JKekllSmRrOExERkdoVUtTSTZ5ZnMyMFp5SmUyMSs2R0p3Tm5LVVUxVXlvYzE3d1NXTUtrclowTU12WUUrWjVBaWlqdkJLNHNTSjNJZ0dqZFU4L05oSThDQkR1MEYreFJNOXEzVEIzTExiRHk1c0JkdWRZZkhmc1VPYytNVHZBRDY5bjI3ZGIyUmg4K3laUU10dWJrdVRRTnA4OXNwaEhRYUxHeVFGYU5sSy9OYTNsRng2b21xemFhMWdqb3BsVXI2cnZZS2dmQUlDVUIzelZtSlNoaUVpN3c3UjBoV2xOUkQzcWNaakNVT05TcEZvNFdiemtuR09henc4NEIrSU1JRm5JcFhXelFMOFJYMHZOY2ZzQnZMRGZNNmsyWmFjcXd5TUthTExxaWdkQmlHZEo3VyswbE9TdE9RSURBUUFCAAAAAAZTRVJWRVIJA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5AAAAAAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5BAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAADdHR4BQAAAAckbWF0Y2gwCQAAZwAAAAIJAABlAAAAAgkBAAAADHdhdmVzQmFsYW5jZQAAAAEFAAAABHRoaXMIBQAAAAN0dHgAAAAGYW1vdW50CQEAAAASRXh0cmFjdFJlc2VydmVkQW10AAAAAAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAA3N0eAUAAAAHJG1hdGNoMAYHB8Oh0q8=", "chainId": 84, "height": 579849, "spentComplexity": 0 } View: original | compacted Prev: Ayo5G5Vi6KqUKPoGrEeWJgZs9fpbNRdHJftHp8BsqCLS Next: BqjVLajQ1eZvxnPAM5w9MjxinzjhyiYYYX2mLK3FYukn Diff:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let RSAPUBLIC = fromBase64String("base64:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlemr95J1jZUs7cJmrmmlN4zo7YVsBJzIeJdk8LDFGhUKSI6yfs20ZyJe21+6GJwNnKUU1Uyoc17wSWMKkrZ0MMvYE+Z5AiijvBK4sSJ3IgGjdU8/NhI8CBDu0F+xRM9q3TB3LLbDy5sBdudYfHfsUOc+MTvAD69n27db2Rh8+yZQMtubkuTQNp89sphHQaLGyQFaNlK/Na3lFx6omqzaa1gjoplUr6rvYKgfAICUB3zVmJShiEi7w7R0hWlNRD3qcZjCUONSpFo4WbzknGOazw84B+IMIFnIpXWzQL8RX0vNcfsBvLDfM6k2ZacqwyMKaLLqigdBiGdJ7W+0lOStOQIDAQAB")
55
6-let SERVER = addressFromStringValue("3N4Aib5iubWiGMzdTh6wWiVDVbo32oeVUmH")
6+let SERVER = addressFromStringValue("3NCiG28LmWyTigWG13E5QnvdHBsZFYXSS2j")
77
88 let RANDORACLETIMEFRAME = 2880
99
254254
255255
256256 @Callable(i)
257-func bet (playerChoice) = {
258- let newGameNum = IncrementGameNum()
259- let gameId = toBase58String(i.transactionId)
260- let pmt = extract(i.payment)
261- let betNotInWaves = isDefined(pmt.assetId)
262- let feeNotInWaves = isDefined(pmt.assetId)
263- let winAmt = ValidateBetAndDefineWinAmt(pmt.amount, playerChoice)
264- let txIdUsed = isDefined(getString(this, gameId))
265- if (betNotInWaves)
266- then throw("Bet amount must be in Waves")
267- else if (feeNotInWaves)
268- then throw("Transaction's fee must be in Waves")
269- else if (txIdUsed)
270- then throw("Passed txId had been used before. Game aborted.")
271- else {
272- let playerPubKey58 = toBase58String(i.callerPublicKey)
273- let gameDataStr = FormatGameDataStr(STATESUBMITTED, playerChoice, playerPubKey58, height, winAmt, "")
274- ScriptResult(WriteSet([DataEntry(RESERVATIONKEY, ValidateAndIncreaseReservedAmt(winAmt)), DataEntry(GAMESCOUNTERKEY, newGameNum), DataEntry(gameId, gameDataStr)]), TransferSet([ScriptTransfer(SERVER, COMMISSION, unit)]))
275- }
276- }
277-
278-
279-
280-@Callable(i)
281257 func withdraw (gameId,rsaSign) = {
282258 let gameDataList = ExtractGameDataList(gameId)
283259 let gameState = gameDataList[IdxGameState]
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let RSAPUBLIC = fromBase64String("base64:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlemr95J1jZUs7cJmrmmlN4zo7YVsBJzIeJdk8LDFGhUKSI6yfs20ZyJe21+6GJwNnKUU1Uyoc17wSWMKkrZ0MMvYE+Z5AiijvBK4sSJ3IgGjdU8/NhI8CBDu0F+xRM9q3TB3LLbDy5sBdudYfHfsUOc+MTvAD69n27db2Rh8+yZQMtubkuTQNp89sphHQaLGyQFaNlK/Na3lFx6omqzaa1gjoplUr6rvYKgfAICUB3zVmJShiEi7w7R0hWlNRD3qcZjCUONSpFo4WbzknGOazw84B+IMIFnIpXWzQL8RX0vNcfsBvLDfM6k2ZacqwyMKaLLqigdBiGdJ7W+0lOStOQIDAQAB")
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 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 RESERVATIONKEY = "$RESERVED_AMOUNT"
4949
5050 let GAMESCOUNTERKEY = "$GAME_NUM"
5151
5252 let STATESUBMITTED = "SUBMITTED"
5353
5454 let STATEWON = "WON"
5555
5656 let STATELOST = "LOST"
5757
5858 func IncrementGameNum () = {
5959 let gameNum = match getInteger(this, GAMESCOUNTERKEY) {
6060 case num: Int =>
6161 num
6262 case _ =>
6363 0
6464 }
6565 (gameNum + 1)
6666 }
6767
6868
6969 func ExtractReservedAmt () = match getInteger(this, RESERVATIONKEY) {
7070 case a: Int =>
7171 a
7272 case _ =>
7373 0
7474 }
7575
7676
7777 func ValidateAndIncreaseReservedAmt (winAmt) = {
7878 let newReservedAmount = (ExtractReservedAmt() + winAmt)
7979 let balance = wavesBalance(this)
8080 if ((newReservedAmount > balance))
8181 then throw("Insufficient funds on Dice Roller account. Transaction was rejected for your safety.")
8282 else newReservedAmount
8383 }
8484
8585
8686 func DecreaseReservedAmt (gameId,winAmt) = {
8787 let newReservedAmount = (ExtractReservedAmt() - winAmt)
8888 if ((0 > newReservedAmount))
8989 then throw("Invalid Dice Roller account state - reserved amount is less than 0")
9090 else DataEntry(RESERVATIONKEY, newReservedAmount)
9191 }
9292
9393
9494 func ValidateBetAndDefineWinAmt (betAmt,playerChoice) = {
9595 let betAmtValid = if (if (if (if ((betAmt == (BET1 + COMMISSION)))
9696 then true
9797 else (betAmt == (BET2 + COMMISSION)))
9898 then true
9999 else (betAmt == (BET4 + COMMISSION)))
100100 then true
101101 else (betAmt == (BET8 + COMMISSION)))
102102 then true
103103 else (betAmt == (BET14 + COMMISSION))
104104 if (betAmtValid)
105105 then {
106106 let dicesCount = size(playerChoice)
107107 let bet = (betAmt - COMMISSION)
108108 if ((dicesCount == 1))
109109 then ((bet * RATE1) / RATEMULT)
110110 else if ((dicesCount == 2))
111111 then ((bet * RATE2) / RATEMULT)
112112 else if ((dicesCount == 3))
113113 then ((bet * RATE3) / RATEMULT)
114114 else if ((dicesCount == 4))
115115 then ((bet * RATE4) / RATEMULT)
116116 else if ((dicesCount == 5))
117117 then ((bet * RATE5) / RATEMULT)
118118 else throw("Invalid dices count in player's choice")
119119 }
120120 else throw("Bet amount is not in range")
121121 }
122122
123123
124124 func RandToStr (r) = if ((r == 0))
125125 then "1"
126126 else if ((r == 1))
127127 then "2"
128128 else if ((r == 2))
129129 then "3"
130130 else if ((r == 3))
131131 then "4"
132132 else if ((r == 4))
133133 then "5"
134134 else if ((r == 5))
135135 then "6"
136136 else throw(("Unsupported r parameter passed: expected=[0,...,5] actual=" + toString(r)))
137137
138138
139139 func GenerateRandInt (gameId,rsaSign) = {
140140 let rsaSigValid = rsaVerify(SHA256, toBytes(gameId), rsaSign, RSAPUBLIC)
141141 if (rsaSigValid)
142142 then {
143143 let rand = (toInt(sha256(rsaSign)) % 6)
144144 if ((0 > rand))
145145 then (-1 * rand)
146146 else rand
147147 }
148148 else throw("Invalid RSA signature")
149149 }
150150
151151
152152 func IsPlayerWin (playerChoice,randStr) = {
153153 let s = size(playerChoice)
154154 if (if (if (if (if (if ((s >= 1))
155155 then (take(drop(playerChoice, 0), 1) == randStr)
156156 else false)
157157 then true
158158 else if ((s >= 2))
159159 then (take(drop(playerChoice, 1), 1) == randStr)
160160 else false)
161161 then true
162162 else if ((s >= 3))
163163 then (take(drop(playerChoice, 2), 1) == randStr)
164164 else false)
165165 then true
166166 else if ((s >= 4))
167167 then (take(drop(playerChoice, 3), 1) == randStr)
168168 else false)
169169 then true
170170 else if ((s >= 5))
171171 then (take(drop(playerChoice, 4), 1) == randStr)
172172 else false)
173173 then true
174174 else if ((s >= 6))
175175 then (take(drop(playerChoice, 5), 1) == randStr)
176176 else false
177177 }
178178
179179
180180 func FormatGameDataParam (p) = {
181181 let s = size(p)
182182 if ((s == 0))
183183 then throw("Parameter size must be greater then 0")
184184 else if ((s > 99))
185185 then throw("Parameter size must be less then 100")
186186 else if ((10 > s))
187187 then (("0" + toString(s)) + p)
188188 else (toString(s) + p)
189189 }
190190
191191
192192 func FormatGameDataStr (gameState,playerChoice,playerPubKey58,startedHeight,winAmt,randOrEmpty) = {
193193 let fullStateStr = ((((((((FormatGameDataParam(gameState) + "_") + FormatGameDataParam(playerChoice)) + "_") + FormatGameDataParam(playerPubKey58)) + "_") + FormatGameDataParam(toString(startedHeight))) + "_") + FormatGameDataParam(toString(winAmt)))
194194 if ((randOrEmpty == ""))
195195 then fullStateStr
196196 else ((fullStateStr + "_") + FormatGameDataParam(randOrEmpty))
197197 }
198198
199199
200200 func RemoveUnderscoreIfPresent (remaining) = if ((size(remaining) > 0))
201201 then drop(remaining, 1)
202202 else remaining
203203
204204
205205 func ParseNextAttribute (remaining) = {
206206 let s = size(remaining)
207207 if ((s > 0))
208208 then {
209209 let nn = parseIntValue(take(remaining, 2))
210210 let v = take(drop(remaining, 2), nn)
211211 let tmpRemaining = drop(remaining, (nn + 2))
212212 let remainingState = RemoveUnderscoreIfPresent(tmpRemaining)
213213 [v, remainingState]
214214 }
215215 else throw("Empty string was passed into parseNextAttribute func")
216216 }
217217
218218
219219 func ParseGameRawDataStr (rawStateStr) = {
220220 let gameState = ParseNextAttribute(rawStateStr)
221221 let playerChoice = ParseNextAttribute(gameState[1])
222222 let playerPubKey58 = ParseNextAttribute(playerChoice[1])
223223 let startedHeight = ParseNextAttribute(playerPubKey58[1])
224224 let winAmt = ParseNextAttribute(startedHeight[1])
225225 [gameState[0], playerChoice[0], playerPubKey58[0], startedHeight[0], winAmt[0]]
226226 }
227227
228228
229229 func ExtractGameDataList (gameId) = {
230230 let rawDataStr = match getString(this, gameId) {
231231 case str: String =>
232232 str
233233 case _ =>
234234 throw(("Couldn't find game by " + gameId))
235235 }
236236 ParseGameRawDataStr(rawDataStr)
237237 }
238238
239239
240240 func WinScriptSet (gameId,playerAddress,winAmt,newGameDataStr,winByTimeout,decreasedReserves) = {
241241 let wSetCommonData = [decreasedReserves]
242242 let tSetCommonData = [ScriptTransfer(playerAddress, winAmt, unit)]
243243 if (winByTimeout)
244244 then {
245245 let newGameDataStrAdjusted = ((newGameDataStr + "_") + FormatGameDataParam("TIMEOUT"))
246246 let gameData = DataEntry(gameId, newGameDataStrAdjusted)
247247 ScriptResult(WriteSet(gameData :: wSetCommonData), TransferSet(tSetCommonData))
248248 }
249249 else {
250250 let gameData = DataEntry(gameId, newGameDataStr)
251251 ScriptResult(WriteSet(gameData :: wSetCommonData), TransferSet(tSetCommonData))
252252 }
253253 }
254254
255255
256256 @Callable(i)
257-func bet (playerChoice) = {
258- let newGameNum = IncrementGameNum()
259- let gameId = toBase58String(i.transactionId)
260- let pmt = extract(i.payment)
261- let betNotInWaves = isDefined(pmt.assetId)
262- let feeNotInWaves = isDefined(pmt.assetId)
263- let winAmt = ValidateBetAndDefineWinAmt(pmt.amount, playerChoice)
264- let txIdUsed = isDefined(getString(this, gameId))
265- if (betNotInWaves)
266- then throw("Bet amount must be in Waves")
267- else if (feeNotInWaves)
268- then throw("Transaction's fee must be in Waves")
269- else if (txIdUsed)
270- then throw("Passed txId had been used before. Game aborted.")
271- else {
272- let playerPubKey58 = toBase58String(i.callerPublicKey)
273- let gameDataStr = FormatGameDataStr(STATESUBMITTED, playerChoice, playerPubKey58, height, winAmt, "")
274- ScriptResult(WriteSet([DataEntry(RESERVATIONKEY, ValidateAndIncreaseReservedAmt(winAmt)), DataEntry(GAMESCOUNTERKEY, newGameNum), DataEntry(gameId, gameDataStr)]), TransferSet([ScriptTransfer(SERVER, COMMISSION, unit)]))
275- }
276- }
277-
278-
279-
280-@Callable(i)
281257 func withdraw (gameId,rsaSign) = {
282258 let gameDataList = ExtractGameDataList(gameId)
283259 let gameState = gameDataList[IdxGameState]
284260 let playerChoice = gameDataList[IdxPlayerChoice]
285261 let startedHeight = parseIntValue(gameDataList[IdxStartedHeight])
286262 let winAmt = parseIntValue(gameDataList[IdxWinAmt])
287263 let playerPubKey58 = gameDataList[IdxPlayerPubKey58]
288264 let playerAddress = addressFromPublicKey(fromBase58String(playerPubKey58))
289265 let winByTimeout = ((height - startedHeight) > RANDORACLETIMEFRAME)
290266 let decreasedReserves = DecreaseReservedAmt(gameId, winAmt)
291267 if ((gameState != STATESUBMITTED))
292268 then throw("Invalid game state for passed gameId")
293269 else if (winByTimeout)
294270 then {
295271 let randStr = take(playerChoice, 1)
296272 let newGameDataStr = FormatGameDataStr(STATEWON, playerChoice, playerPubKey58, startedHeight, winAmt, randStr)
297273 WinScriptSet(gameId, playerAddress, winAmt, newGameDataStr, winByTimeout, decreasedReserves)
298274 }
299275 else {
300276 let randStr = RandToStr(GenerateRandInt(gameId, rsaSign))
301277 if (IsPlayerWin(playerChoice, randStr))
302278 then {
303279 let newGameDataStr = FormatGameDataStr(STATEWON, playerChoice, playerPubKey58, startedHeight, winAmt, randStr)
304280 WinScriptSet(gameId, playerAddress, winAmt, newGameDataStr, winByTimeout, decreasedReserves)
305281 }
306282 else {
307283 let newGameDataStr = FormatGameDataStr(STATELOST, playerChoice, playerPubKey58, startedHeight, winAmt, randStr)
308284 WriteSet([DataEntry(gameId, newGameDataStr), decreasedReserves])
309285 }
310286 }
311287 }
312288
313289
314290 @Verifier(tx)
315291 func verify () = if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey))
316292 then match tx {
317293 case ttx: TransferTransaction =>
318294 ((wavesBalance(this) - ttx.amount) >= ExtractReservedAmt())
319295 case stx: SetScriptTransaction =>
320296 true
321297 case _ =>
322298 false
323299 }
324300 else false
325301

github/deemru/w8io/026f985 
47.86 ms