tx · 7obcaRZQW8VdVGVUP8Nt51F6MBEbVWGTfauVj2B7eTyk

3Mr1FdiZzG9iTQUtPmQEs1hBVbyQhG6LU93:  -0.01500000 Waves

2021.08.04 10:00 [1643258] smart account 3Mr1FdiZzG9iTQUtPmQEs1hBVbyQhG6LU93 > SELF 0.00000000 Waves

{ "type": 13, "id": "7obcaRZQW8VdVGVUP8Nt51F6MBEbVWGTfauVj2B7eTyk", "fee": 1500000, "feeAssetId": null, "timestamp": 1628060488339, "version": 1, "sender": "3Mr1FdiZzG9iTQUtPmQEs1hBVbyQhG6LU93", "senderPublicKey": "De2GV53Brxd2GCQnLJWRugSidGtrVvPL9kJn2Dh4NTpJ", "proofs": [ "2jrB7BeBMr5vSV5wakxgLGBckmk4kW7C4XyagyTtcqnEJk1Avjew8At6LNjdYiwEqScj154qxDRwDQmSiR6jDbr8" ], "script": "base64:AAIEAAAAAAAAABQIAhIFCgMICAESAwoBCBIECgIIAgAAADUAAAAABldBVkVTRAAAAAAABfXhAAAAAAAFVVNETkQAAAAAAAAPQkAAAAAABEVHR0QAAAAAAAAAAGQAAAAACERFQ0lNQUxTCQAETAAAAAIFAAAABldBVkVTRAkABEwAAAACBQAAAAVVU0RORAkABEwAAAACBQAAAARFR0dEBQAAAANuaWwAAAAABkFTU0VUUwkABEwAAAACBQAAAAR1bml0CQAETAAAAAIJAAJZAAAAAQIAAAAsMjVGRXFFalJrcUs2eUNraVQ3THo2U0FZejdnVUZDdHhmQ0NobnJWRkQ1QVQJAARMAAAAAgkAAlkAAAABAgAAACxIc0V3V3V1UWpVb2hyWDI2Rng4dGc1ZWlMNExERDd1bTZqcU5xRmdFUng2ZwUAAAADbmlsAAAAAAtCRVRESVZJREVSUwkABEwAAAACAAAAAAAAAAABCQAETAAAAAIAAAAAAAAAAAEJAARMAAAAAgAAAAAAAAAAZAUAAAADbmlsAAAAAAtNSU5GRUVXQVZFUwkAAGkAAAACCQAAaAAAAAIAAAAAAAAAAAUFAAAABldBVkVTRAAAA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AAHYXNzZXRJZAkAAGcAAAACCQAAZQAAAAIJAQAAAA9nZXRBc3NldEJhbGFuY2UAAAABCAUAAAADdHR4AAAAB2Fzc2V0SWQIBQAAAAN0dHgAAAAGYW1vdW50CQEAAAAIZ2V0SW50T3IAAAACCQABkQAAAAIFAAAADlJFU0VSVkFUSU9OS0VZBQAAAAdhc3NldElkAAAAAAAAAAAAAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAADc3R4BQAAAAckbWF0Y2gwAwMJAAAAAAAAAgkBAAAACGdldEludE9yAAAAAgkAAZEAAAACBQAAAA5SRVNFUlZBVElPTktFWQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAAAAAACCQEAAAAIZ2V0SW50T3IAAAACCQABkQAAAAIFAAAADlJFU0VSVkFUSU9OS0VZAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAABwkAAAAAAAACCQEAAAAIZ2V0SW50T3IAAAACCQABkQAAAAIFAAAADlJFU0VSVkFUSU9OS0VZAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAABwcHznGw8Q==", "chainId": 84, "height": 1643258, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C337qM2FryZMoZHj5SBNSixKtewfmsVc2xBCG5Y5nMmz Next: 921cQV3NjtRLNtq8Kk3UT62X4wYWgD7kq2Kwxmn4VRbD Diff:
OldNewDifferences
5353
5454 let IdxAssetId = 5
5555
56-let RESERVATIONKEY = ["$RESERVED_AMOUNT_WAVES", "$RESERVED_AMOUNT_USDN"]
56+let RESERVATIONKEY = ["$RESERVED_AMOUNT_WAVES", "$RESERVED_AMOUNT_USDN", "$RESERVED_AMOUNT_EGG"]
5757
5858 let GAMESCOUNTERKEY = "$GAME_NUM"
5959
215215
216216
217217 @Callable(i)
218+func constructor (rsaPublic64,benzAddress,randOracleTimeFrame) = if ((addressFromPublicKey(i.callerPublicKey) != this))
219+ then throw("not authorized")
220+ else [StringEntry(RSAPUBLIC64KEY, rsaPublic64), StringEntry(SERVERADDRESSKEY, benzAddress), IntegerEntry(RANDTIMEFRAMEKEY, randOracleTimeFrame)]
221+
222+
223+
224+@Callable(i)
218225 func bet (playerChoice) = {
219226 let gameId = toBase58String(i.transactionId)
220227 if ((1 >= size(i.payments)))
279286 let assetId = validateAndGetAssetId(ttx.assetId)
280287 ((getAssetBalance(ttx.assetId) - ttx.amount) >= getIntOr(RESERVATIONKEY[assetId], 0))
281288 case stx: SetScriptTransaction =>
282- if ((getIntOr(RESERVATIONKEY[0], 0) == 0))
289+ if (if ((getIntOr(RESERVATIONKEY[0], 0) == 0))
283290 then (getIntOr(RESERVATIONKEY[1], 0) == 0)
291+ else false)
292+ then (getIntOr(RESERVATIONKEY[2], 0) == 0)
284293 else false
285294 case _ =>
286295 false
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let WAVESD = 100000000
55
66 let USDND = 1000000
77
88 let EGGD = 100
99
1010 let DECIMALS = [WAVESD, USDND, EGGD]
1111
1212 let ASSETS = [unit, fromBase58String("25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), fromBase58String("HsEwWuuQjUohrX26Fx8tg5eiL4LDD7um6jqNqFgERx6g")]
1313
1414 let BETDIVIDERS = [1, 1, 100]
1515
1616 let MINFEEWAVES = ((5 * WAVESD) / 1000)
1717
1818 let BET1 = 1
1919
2020 let BET2 = 2
2121
2222 let BET4 = 4
2323
2424 let BET8 = 8
2525
2626 let BET14 = 14
2727
2828 let RATEMULT = 10000
2929
3030 let RATE1 = 39655
3131
3232 let RATE2 = 24600
3333
3434 let RATE3 = 19000
3535
3636 let RATE4 = 14200
3737
3838 let RATE5 = 11400
3939
4040 let RATES = [RATE1, RATE2, RATE3, RATE4, RATE5]
4141
4242 let BETS = [BET1, BET2, BET4, BET8, BET14]
4343
4444 let IdxGameState = 0
4545
4646 let IdxPlayerChoice = 1
4747
4848 let IdxPlayerPubKey58 = 2
4949
5050 let IdxStartedHeight = 3
5151
5252 let IdxWinAmount = 4
5353
5454 let IdxAssetId = 5
5555
56-let RESERVATIONKEY = ["$RESERVED_AMOUNT_WAVES", "$RESERVED_AMOUNT_USDN"]
56+let RESERVATIONKEY = ["$RESERVED_AMOUNT_WAVES", "$RESERVED_AMOUNT_USDN", "$RESERVED_AMOUNT_EGG"]
5757
5858 let GAMESCOUNTERKEY = "$GAME_NUM"
5959
6060 let RSAPUBLIC64KEY = "$RSA_PUBLIC64"
6161
6262 let SERVERADDRESSKEY = "$BENZ_ADDRESS"
6363
6464 let RANDTIMEFRAMEKEY = "$RAND_ORACLE_TIMEFRAME"
6565
6666 let STATESUBMITTED = "SUBMITTED"
6767
6868 let STATEWON = "WON"
6969
7070 let STATELOST = "LOST"
7171
7272 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " key is not specified in this.state"))
7373
7474
7575 let RSAPUBLIC = fromBase64String(getStringOrFail(RSAPUBLIC64KEY))
7676
7777 let SERVER = addressFromStringValue(getStringOrFail(SERVERADDRESSKEY))
7878
7979 let RANDORACLETIMEFRAME = valueOrElse(getInteger(this, RANDTIMEFRAMEKEY), 7200)
8080
8181 func getIntOr (key,default) = if (isDefined(getInteger(this, key)))
8282 then getIntegerValue(this, key)
8383 else default
8484
8585
8686 func setInt (key,value) = IntegerEntry(key, value)
8787
8888
8989 func incrementInt (key) = setInt(key, (getIntOr(key, -1) + 1))
9090
9191
9292 func changeInt (key,by) = setInt(key, (getIntOr(key, 0) + by))
9393
9494
9595 func getAssetBalance (assetIdOrUnit) = match assetIdOrUnit {
9696 case assetId: ByteVector =>
9797 assetBalance(this, assetId)
9898 case _ =>
9999 wavesBalance(this).available
100100 }
101101
102102
103103 func increaseReserveAmount (winAmount,assetId) = {
104104 let newReservedAmount = (getIntOr(RESERVATIONKEY[assetId], 0) + winAmount)
105105 if ((newReservedAmount > getAssetBalance(ASSETS[assetId])))
106106 then throw("Insufficient funds on Dice Roller account. Transaction was rejected for your safety.")
107107 else newReservedAmount
108108 }
109109
110110
111111 func decreaseReservedAmount (gameId,assetId,winAmount) = if ((0 > (getIntOr(RESERVATIONKEY[assetId], 0) - winAmount)))
112112 then throw("Invalid Dice Roller account state - reserved amount is less than 0")
113113 else changeInt(RESERVATIONKEY[assetId], -(winAmount))
114114
115115
116116 func validateAndGetAssetId (assetId) = if ((assetId == ASSETS[0]))
117117 then 0
118118 else if ((assetId == ASSETS[1]))
119119 then 1
120120 else if ((assetId == ASSETS[2]))
121121 then 2
122122 else throw("Invalid payment asset")
123123
124124
125125 func validateBetAndGetWinAmount (bet,internalAssetId,playerChoice) = {
126126 let dicesCount = size(playerChoice)
127127 func checkAmount (a,x) = if (a)
128128 then true
129129 else (bet == ((x * DECIMALS[internalAssetId]) / BETDIVIDERS[internalAssetId]))
130130
131131 if (!({
132132 let $l = BETS
133133 let $s = size($l)
134134 let $acc0 = false
135135 func 1 ($a,$i) = if (($i >= $s))
136136 then $a
137137 else checkAmount($a, $l[$i])
138138
139139 func 2 ($a,$i) = if (($i >= $s))
140140 then $a
141141 else throw("List size exceeds 5")
142142
143143 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5)
144144 }))
145145 then throw("Bet amount is not valid")
146146 else if ((parseInt(playerChoice) == unit))
147147 then throw("Invalid player's choice")
148148 else if (if ((1 > dicesCount))
149149 then true
150150 else (dicesCount > 5))
151151 then throw("Invalid dices count in player's choice")
152152 else ((bet * RATES[(dicesCount - 1)]) / RATEMULT)
153153 }
154154
155155
156156 func generateRandChoise (gameId,rsaSign) = {
157157 let rsaSigValid = rsaVerify_16Kb(SHA256, toBytes(gameId), rsaSign, RSAPUBLIC)
158158 if (!(rsaSigValid))
159159 then throw("Invalid RSA signature")
160160 else {
161161 let rand = (toInt(sha256(rsaSign)) % 6)
162162 let result = if ((0 > rand))
163163 then (-1 * rand)
164164 else rand
165165 toString((result + 1))
166166 }
167167 }
168168
169169
170170 func isPlayerWin (playerChoice,randChoise) = {
171171 let s = size(playerChoice)
172172 func check (a,x) = if (a)
173173 then true
174174 else if ((s >= x))
175175 then (take(drop(playerChoice, (x - 1)), 1) == randChoise)
176176 else false
177177
178178 let $l = [1, 2, 3, 4, 5]
179179 let $s = size($l)
180180 let $acc0 = false
181181 func 1 ($a,$i) = if (($i >= $s))
182182 then $a
183183 else check($a, $l[$i])
184184
185185 func 2 ($a,$i) = if (($i >= $s))
186186 then $a
187187 else throw("List size exceeds 5")
188188
189189 2(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5)
190190 }
191191
192192
193193 func formatGameDataS (gameStatus,playerChoice,playerPubKey58,startedHeight,winAmount,assetId,randOrEmpty) = makeString([gameStatus, playerChoice, playerPubKey58, startedHeight, winAmount, assetId, if ((randOrEmpty == ""))
194194 then ""
195195 else ("_" + randOrEmpty)], "_")
196196
197197
198198 func formatGameData (gameStatus,playerChoice,playerPubKey58,startedHeight,winAmount,assetId,randOrEmpty) = formatGameDataS(gameStatus, playerChoice, playerPubKey58, toString(startedHeight), toString(winAmount), toString(assetId), randOrEmpty)
199199
200200
201201 func finishGameData (origGameData,gameStatus,rand,winByTimeout) = {
202202 let finishGameData = formatGameDataS(gameStatus, origGameData[IdxPlayerChoice], origGameData[IdxPlayerPubKey58], origGameData[IdxStartedHeight], origGameData[IdxWinAmount], origGameData[IdxAssetId], rand)
203203 if (winByTimeout)
204204 then (finishGameData + "_TIMEOUT")
205205 else finishGameData
206206 }
207207
208208
209209 func extractGameData (gameId) = split(match getString(this, gameId) {
210210 case str: String =>
211211 str
212212 case _ =>
213213 throw((("Game: " + gameId) + " not found."))
214214 }, "_")
215215
216216
217217 @Callable(i)
218+func constructor (rsaPublic64,benzAddress,randOracleTimeFrame) = if ((addressFromPublicKey(i.callerPublicKey) != this))
219+ then throw("not authorized")
220+ else [StringEntry(RSAPUBLIC64KEY, rsaPublic64), StringEntry(SERVERADDRESSKEY, benzAddress), IntegerEntry(RANDTIMEFRAMEKEY, randOracleTimeFrame)]
221+
222+
223+
224+@Callable(i)
218225 func bet (playerChoice) = {
219226 let gameId = toBase58String(i.transactionId)
220227 if ((1 >= size(i.payments)))
221228 then throw("2 payments must be attached")
222229 else if (isDefined(getString(this, gameId)))
223230 then throw((("Bet for: " + gameId) + " was already made."))
224231 else {
225232 let betPmt = value(i.payments[0])
226233 let feePmt = value(i.payments[1])
227234 if (isDefined(feePmt.assetId))
228235 then throw("feePmt (2nd payment) assetId must be in Waves")
229236 else if ((MINFEEWAVES > feePmt.amount))
230237 then throw("feePmt (2nd payment) must be >= 0.005 Waves")
231238 else {
232239 let internalAssetId = validateAndGetAssetId(betPmt.assetId)
233240 let commission = feePmt.amount
234241 let winAmount = validateBetAndGetWinAmount(betPmt.amount, internalAssetId, playerChoice)
235242 let playerPubKey58 = toBase58String(i.callerPublicKey)
236243 let gameData = formatGameData(STATESUBMITTED, playerChoice, playerPubKey58, height, winAmount, internalAssetId, "")
237244 [IntegerEntry(RESERVATIONKEY[internalAssetId], increaseReserveAmount(winAmount, internalAssetId)), incrementInt(GAMESCOUNTERKEY), StringEntry(gameId, gameData), ScriptTransfer(SERVER, commission, feePmt.assetId)]
238245 }
239246 }
240247 }
241248
242249
243250
244251 @Callable(i)
245252 func withdraw (gameId,rsaSign) = {
246253 let gameData = extractGameData(gameId)
247254 let gameState = gameData[IdxGameState]
248255 let playerChoice = gameData[IdxPlayerChoice]
249256 let startedHeight = parseIntValue(gameData[IdxStartedHeight])
250257 let winAmount = parseIntValue(gameData[IdxWinAmount])
251258 let assetId = parseIntValue(gameData[IdxAssetId])
252259 let playerPubKey58 = gameData[IdxPlayerPubKey58]
253260 let playerAddress = addressFromPublicKey(fromBase58String(playerPubKey58))
254261 if ((gameState != STATESUBMITTED))
255262 then throw("Invalid game state for passed gameId")
256263 else if ((i.caller != SERVER))
257264 then throw("Regular withdraw can be done by server only")
258265 else {
259266 let winByTimeout = ((height - startedHeight) > RANDORACLETIMEFRAME)
260267 let randChoise = if (winByTimeout)
261268 then take(playerChoice, 1)
262269 else generateRandChoise(gameId, rsaSign)
263270 let playerWin = isPlayerWin(playerChoice, randChoise)
264271 let newGameStatus = if (playerWin)
265272 then STATEWON
266273 else STATELOST
267274 let newGameData = finishGameData(gameData, newGameStatus, randChoise, winByTimeout)
268275 ([StringEntry(gameId, newGameData), decreaseReservedAmount(gameId, assetId, winAmount)] ++ (if (playerWin)
269276 then [ScriptTransfer(playerAddress, winAmount, ASSETS[assetId])]
270277 else nil))
271278 }
272279 }
273280
274281
275282 @Verifier(tx)
276283 func verify () = if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey))
277284 then match tx {
278285 case ttx: TransferTransaction =>
279286 let assetId = validateAndGetAssetId(ttx.assetId)
280287 ((getAssetBalance(ttx.assetId) - ttx.amount) >= getIntOr(RESERVATIONKEY[assetId], 0))
281288 case stx: SetScriptTransaction =>
282- if ((getIntOr(RESERVATIONKEY[0], 0) == 0))
289+ if (if ((getIntOr(RESERVATIONKEY[0], 0) == 0))
283290 then (getIntOr(RESERVATIONKEY[1], 0) == 0)
291+ else false)
292+ then (getIntOr(RESERVATIONKEY[2], 0) == 0)
284293 else false
285294 case _ =>
286295 false
287296 }
288297 else false
289298

github/deemru/w8io/169f3d6 
53.44 ms