tx · FTXRqbxmLXL2KMYr5vNiAvSX3Mrk39CyibA6ufTt7UXG

3NBEPHaV4mp5kmQyAyUKzssJMFfDrXSXQSe:  -0.01500000 Waves

2020.04.29 17:22 [976171] smart account 3NBEPHaV4mp5kmQyAyUKzssJMFfDrXSXQSe > SELF 0.00000000 Waves

{ "type": 13, "id": "FTXRqbxmLXL2KMYr5vNiAvSX3Mrk39CyibA6ufTt7UXG", "fee": 1500000, "feeAssetId": null, "timestamp": 1588170168257, "version": 1, "sender": "3NBEPHaV4mp5kmQyAyUKzssJMFfDrXSXQSe", "senderPublicKey": "Zvr25zgD3vUFgdBm3MW3ax4MeSEckBLALVcFfgoQJrw", "proofs": [ "5R49oB8SNkDiKwcRdhDcrPj1JRLoGjdZfqrhtbsU4Pd2mdwxQgkrno4mwvPUELJ6AG4zsQHLrHiS8fURHExvT9yr" ], "script": "base64:AAIDAAAAAAAAAA0IARIDCgEIEgQKAggCAAAAKAAAAAAJUlNBUFVCTElDCQACWwAAAAECAAABj2Jhc2U2NDpNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQW1wdVhjSS9vNHBJQjV5d3Y5RE9PR2FwVEJVd1JWbE0vNitINmhGZWxPWHRrcndZL1lJdG1QeEVEcHo3ckFlclFQUWU5dERQRWFBdi9HbmxFenR5Yk9GWGd1OUR6RGU4WW9NUkQxdmFrZ29BY29nbWJZNThRRDZLTWo1SGtvVmoveVROSWM5c3pqNXFoSWxyQWRtYjNLTEw2aFFVN3k4K0pqNjlCV1ZQc2FRZ2tzcFNkZVl0YjF0SFFjN3Q5NW43T1o1NnIyQTdHMytiUWY2blNNa1BrQWhJckVwYkNtNThvaUdCY3pkVGQvTHFGU1ZvdFpzYkw3WWg2U0hMZm5IZUQrUWdjZkpybmFtOE9ITUdKRUpUUlhqSUxlSEdqbFJDUDhvVnBpb0hyeTFTMnhQeDVzVnpJbTJNTStDelllbkFHbG8wajI2YXRCaGlVTG9UdWx3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eAAAAA9zZW5kZXJQdWJsaWNLZXkEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAN0dHgFAAAAByRtYXRjaDAEAAAAB2Fzc2V0SWQJAQAAABV2YWxpZGF0ZUFuZEdldEFzc2V0SWQAAAABCAUAAAADdHR4AAAAB2Fzc2V0SWQJAABnAAAAAgkAAGUAAAACCQEAAAAMd2F2ZXNCYWxhbmNlAAAAAQUAAAAEdGhpcwgFAAAAA3R0eAAAAAZhbW91bnQJAQAAAAhnZXRJbnRPcgAAAAIJAAGRAAAAAgUAAAAOUkVTRVJWQVRJT05LRVkFAAAAB2Fzc2V0SWQAAAAAAAAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAANzdHgFAAAAByRtYXRjaDADCQAAAAAAAAIJAQAAAAhnZXRJbnRPcgAAAAIJAAGRAAAAAgUAAAAOUkVTRVJWQVRJT05LRVkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJAAAAAAAAAgkBAAAACGdldEludE9yAAAAAgkAAZEAAAACBQAAAA5SRVNFUlZBVElPTktFWQAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAcHB6DZEmY=", "chainId": 84, "height": 976171, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let RSAPUBLIC = fromBase64String("base64:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmpuXcI/o4pIB5ywv9DOOGapTBUwRVlM/6+H6hFelOXtkrwY/YItmPxEDpz7rAerQPQe9tDPEaAv/GnlEztybOFXgu9DzDe8YoMRD1vakgoAcogmbY58QD6KMj5HkoVj/yTNIc9szj5qhIlrAdmb3KLL6hQU7y8+Jj69BWVPsaQgkspSdeYtb1tHQc7t95n7OZ56r2A7G3+bQf6nSMkPkAhIrEpbCm58oiGBczdTd/LqFSVotZsbL7Yh6SHLfnHeD+QgcfJrnam8OHMGJEJTRXjILeHGjlRCP8oVpioHry1S2xPx5sVzIm2MM+CzYenAGlo0j26atBhiULoTulwD3pQIDAQAB")
5+
6+let SERVER = addressFromStringValue("3N4Aib5iubWiGMzdTh6wWiVDVbo32oeVUmH")
7+
8+let RANDORACLETIMEFRAME = 4320
9+
10+let BET1 = 1
11+
12+let BET2 = 2
13+
14+let BET4 = 4
15+
16+let BET8 = 8
17+
18+let BET14 = 14
19+
20+let BETS = [BET1, BET2, BET4, BET8, BET14]
21+
22+let WAVESD = 100000000
23+
24+let USDND = 1000000
25+
26+let DECIMALS = [WAVESD, USDND]
27+
28+let ASSETS = [unit, fromBase58String("3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC")]
29+
30+func getCommission (assetId) = ((5 * DECIMALS[assetId]) / 1000)
31+
32+
33+let RATEMULT = 10000
34+
35+let RATE = 19000
36+
37+let IdxGameState = 0
38+
39+let IdxPlayerChoice = 1
40+
41+let IdxPlayerPubKey58 = 2
42+
43+let IdxStartedHeight = 3
44+
45+let IdxWinAmount = 4
46+
47+let IdxAssetId = 5
48+
49+let RESERVATIONKEY = ["$RESERVED_AMOUNT_WAVES", "$RESERVED_AMOUNT_USDN"]
50+
51+let GAMESCOUNTERKEY = "$GAME_NUM"
52+
53+let STATESUBMITTED = "SUBMITTED"
54+
55+let STATEWON = "WON"
56+
57+let STATELOST = "LOST"
58+
59+func getIntOr (key,default) = if (isDefined(getInteger(this, key)))
60+ then getIntegerValue(this, key)
61+ else default
62+
63+
64+func setInt (key,value) = DataEntry(key, value)
65+
66+
67+func incrementInt (key) = setInt(key, (getIntOr(key, -1) + 1))
68+
69+
70+func changeInt (key,by) = setInt(key, (getIntOr(key, 0) + by))
71+
72+
73+func increaseReserveAmount (winAmount,assetId) = {
74+ let newReservedAmount = (getIntOr(RESERVATIONKEY[assetId], 0) + winAmount)
75+ if ((newReservedAmount > wavesBalance(this)))
76+ then throw("Insufficient funds on Dice Roller account. Transaction was rejected for your safety.")
77+ else newReservedAmount
78+ }
79+
80+
81+func decreaseReservedAmount (gameId,assetId,winAmount) = if ((0 > (getIntOr(RESERVATIONKEY[assetId], 0) - winAmount)))
82+ then throw("Invalid Dice Roller account state - reserved amount is less than 0")
83+ else changeInt(RESERVATIONKEY[assetId], -(winAmount))
84+
85+
86+func validateAndGetAssetId (assetId) = if ((assetId == ASSETS[0]))
87+ then 0
88+ else if ((assetId == ASSETS[1]))
89+ then 1
90+ else throw("Invalid payment asset")
91+
92+
93+func validateBetAndGetWinAmount (betAmount,assetId,playerChoice) = {
94+ let dicesCount = size(playerChoice)
95+ let commission = getCommission(assetId)
96+ func checkAmount (a,x) = if (a)
97+ then true
98+ else (betAmount == ((x * DECIMALS[assetId]) + commission))
99+
100+ if (!({
101+ let $list43784411 = BETS
102+ let $size43784411 = size($list43784411)
103+ let $acc043784411 = false
104+ if (($size43784411 == 0))
105+ then $acc043784411
106+ else {
107+ let $acc143784411 = checkAmount($acc043784411, $list43784411[0])
108+ if (($size43784411 == 1))
109+ then $acc143784411
110+ else {
111+ let $acc243784411 = checkAmount($acc143784411, $list43784411[1])
112+ if (($size43784411 == 2))
113+ then $acc243784411
114+ else {
115+ let $acc343784411 = checkAmount($acc243784411, $list43784411[2])
116+ if (($size43784411 == 3))
117+ then $acc343784411
118+ else {
119+ let $acc443784411 = checkAmount($acc343784411, $list43784411[3])
120+ if (($size43784411 == 4))
121+ then $acc443784411
122+ else {
123+ let $acc543784411 = checkAmount($acc443784411, $list43784411[4])
124+ if (($size43784411 == 5))
125+ then $acc543784411
126+ else {
127+ let $acc643784411 = checkAmount($acc543784411, $list43784411[5])
128+ throw("List size exceed 5")
129+ }
130+ }
131+ }
132+ }
133+ }
134+ }
135+ }))
136+ then throw("Bet amount is not valid")
137+ else if ((parseInt(playerChoice) == unit))
138+ then throw("Invalid player's choice")
139+ else if (if ((1 > dicesCount))
140+ then true
141+ else (dicesCount > 5))
142+ then throw("Invalid dices count in player's choice")
143+ else {
144+ let bet = (betAmount - commission)
145+ ((bet * RATE) / RATEMULT)
146+ }
147+ }
148+
149+
150+func generateRandInt (gameId,rsaSign) = {
151+ let rsaSigValid = rsaVerify(SHA256, toBytes(gameId), rsaSign, RSAPUBLIC)
152+ if (!(rsaSigValid))
153+ then throw("Invalid RSA signature")
154+ else {
155+ let rand = (toInt(sha256(rsaSign)) % 2)
156+ let result = if ((0 > rand))
157+ then (-1 * rand)
158+ else rand
159+ toString(result)
160+ }
161+ }
162+
163+
164+func isPlayerWin (playerChoice,randStr) = {
165+ let s = size(playerChoice)
166+ if ((s == 1))
167+ then (playerChoice == randStr)
168+ else false
169+ }
170+
171+
172+func formatGameData (gameState,playerChoice,playerPubKey58,startedHeight,winAmount,assetId,randOrEmpty) = (((((((((((gameState + "_") + playerChoice) + "_") + playerPubKey58) + "_") + toString(startedHeight)) + "_") + toString(winAmount)) + "_") + toString(assetId)) + (if ((randOrEmpty == ""))
173+ then ""
174+ else ("_" + randOrEmpty)))
175+
176+
177+func extractGameData (gameId) = split(match getString(this, gameId) {
178+ case str: String =>
179+ str
180+ case _ =>
181+ throw((("Game: " + gameId) + " not found."))
182+}, "_")
183+
184+
185+func winScriptSet (gameId,playerAddress,winAmount,assetId,newGameDataStr,winByTimeout,decreasedReserves) = {
186+ let wSetCommonData = [decreasedReserves]
187+ let tSetCommonData = [ScriptTransfer(playerAddress, winAmount, ASSETS[assetId])]
188+ if (winByTimeout)
189+ then {
190+ let newGameDataStrAdjusted = (newGameDataStr + "_TIMEOUT")
191+ let gameData = DataEntry(gameId, newGameDataStrAdjusted)
192+ ScriptResult(WriteSet(gameData :: wSetCommonData), TransferSet(tSetCommonData))
193+ }
194+ else {
195+ let gameData = DataEntry(gameId, newGameDataStr)
196+ ScriptResult(WriteSet(gameData :: wSetCommonData), TransferSet(tSetCommonData))
197+ }
198+ }
199+
200+
201+@Callable(i)
202+func bet (playerChoice) = {
203+ let gameId = toBase58String(i.transactionId)
204+ if ((i.payment == unit))
205+ then throw("No payment")
206+ else if (isDefined(getString(this, gameId)))
207+ then throw((("Bet for: " + gameId) + " was already made."))
208+ else {
209+ let p = extract(i.payment)
210+ let assetId = validateAndGetAssetId(p.assetId)
211+ let commission = getCommission(assetId)
212+ let winAmount = validateBetAndGetWinAmount(p.amount, assetId, playerChoice)
213+ let txIdUsed = isDefined(getString(this, gameId))
214+ let playerPubKey58 = toBase58String(i.callerPublicKey)
215+ let gameDataStr = formatGameData(STATESUBMITTED, playerChoice, playerPubKey58, height, winAmount, assetId, "")
216+ ScriptResult(WriteSet([DataEntry(RESERVATIONKEY[assetId], increaseReserveAmount(winAmount, assetId)), incrementInt(GAMESCOUNTERKEY), DataEntry(gameId, gameDataStr)]), TransferSet([ScriptTransfer(SERVER, commission, unit)]))
217+ }
218+ }
219+
220+
221+
222+@Callable(i)
223+func withdraw (gameId,rsaSign) = {
224+ let gameData = extractGameData(gameId)
225+ let gameState = gameData[IdxGameState]
226+ let playerChoice = gameData[IdxPlayerChoice]
227+ let startedHeight = parseIntValue(gameData[IdxStartedHeight])
228+ let winAmount = parseIntValue(gameData[IdxWinAmount])
229+ let assetId = parseIntValue(gameData[IdxAssetId])
230+ let playerPubKey58 = gameData[IdxPlayerPubKey58]
231+ let playerAddress = addressFromPublicKey(fromBase58String(playerPubKey58))
232+ let winByTimeout = ((height - startedHeight) > RANDORACLETIMEFRAME)
233+ let decreasedReserves = decreaseReservedAmount(gameId, assetId, winAmount)
234+ if ((gameState != STATESUBMITTED))
235+ then throw("Invalid game state for passed gameId")
236+ else if (winByTimeout)
237+ then {
238+ let randStr = take(playerChoice, 1)
239+ let newGameDataStr = formatGameData(STATEWON, playerChoice, playerPubKey58, startedHeight, winAmount, assetId, randStr)
240+ winScriptSet(gameId, playerAddress, winAmount, assetId, newGameDataStr, winByTimeout, decreasedReserves)
241+ }
242+ else {
243+ let randStr = generateRandInt(gameId, rsaSign)
244+ if (isPlayerWin(playerChoice, randStr))
245+ then {
246+ let newGameDataStr = formatGameData(STATEWON, playerChoice, playerPubKey58, startedHeight, winAmount, assetId, randStr)
247+ winScriptSet(gameId, playerAddress, winAmount, assetId, newGameDataStr, winByTimeout, decreasedReserves)
248+ }
249+ else {
250+ let newGameDataStr = formatGameData(STATELOST, playerChoice, playerPubKey58, startedHeight, winAmount, assetId, randStr)
251+ WriteSet([DataEntry(gameId, newGameDataStr), decreasedReserves])
252+ }
253+ }
254+ }
255+
256+
257+@Verifier(tx)
258+func verify () = if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey))
259+ then match tx {
260+ case ttx: TransferTransaction =>
261+ let assetId = validateAndGetAssetId(ttx.assetId)
262+ ((wavesBalance(this) - ttx.amount) >= getIntOr(RESERVATIONKEY[assetId], 0))
263+ case stx: SetScriptTransaction =>
264+ if ((getIntOr(RESERVATIONKEY[0], 0) == 0))
265+ then (getIntOr(RESERVATIONKEY[1], 0) == 0)
266+ else false
267+ case _ =>
268+ false
269+ }
270+ else false
271+

github/deemru/w8io/169f3d6 
26.89 ms