tx · CFJTzodtTfc9BN6gqaKMCjoN9S9G4Er3fHxoYvtWZ8EZ

3N8NLvRGsbGhgoXy7EdigPbAz6N2i7ygBcZ:  -0.01700000 Waves

2023.12.12 19:18 [2883744] smart account 3N8NLvRGsbGhgoXy7EdigPbAz6N2i7ygBcZ > SELF 0.00000000 Waves

{ "type": 13, "id": "CFJTzodtTfc9BN6gqaKMCjoN9S9G4Er3fHxoYvtWZ8EZ", "fee": 1700000, "feeAssetId": null, "timestamp": 1702397936732, "version": 2, "chainId": 84, "sender": "3N8NLvRGsbGhgoXy7EdigPbAz6N2i7ygBcZ", "senderPublicKey": "CQoe8BRHR78TuPQLcK3Ykv39w9CeNLhjKdj6TNbJ5FrM", "proofs": [ "3HxcftkfdWDtAehWv4UUvW4EePw5VkMaL87SVfXkTzTHWo4pyQ6cmyVbNxwde5RxzGc9vR36aAwvhCJtnfADfVX4" ], "script": "base64:BgIaCAISBgoECAgBCBIDCgEEEgMKAQgSBAoCCAJGAANTRVACAl9fAAdXQVZFU0lEAQQTq9kzAAZXQVZFU0QAgMLXLwAJR0FNRV9OQU1FAglYbWFzIFRyZWUADFJBTkRPTV9SQU5HRQAFAAhOVU1fQkVUUwABAQxnZXRTdHJPckZhaWwCB2FkZHJlc3MDa2V5CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJ0IAgUHYWRkcmVzcwUDa2V5CQC5CQIJAMwIAgIKbWFuZGF0b3J5IAkAzAgCCQClCAEFB2FkZHJlc3MJAMwIAgIBLgkAzAgCBQNrZXkJAMwIAgIPIGlzIG5vdCBkZWZpbmVkBQNuaWwCAAEMZ2V0SW50T3JGYWlsAgdhZGRyZXNzA2tleQkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCaCAIFB2FkZHJlc3MFA2tleQkAuQkCCQDMCAICCm1hbmRhdG9yeSAJAMwIAgkApQgBBQdhZGRyZXNzCQDMCAICAS4JAMwIAgUDa2V5CQDMCAICDyBpcyBub3QgZGVmaW5lZAUDbmlsAg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HJG1hdGNoMAoBB2NoZWNrZXICA2FjYwVhc3NldAMFA2FjYwkAAAIJAQhnZXRJbnRPcgIJARhrZXlSZXNlcnZhdGlvbkJ5QXNzZXRTdHIBBQVhc3NldAAAAAAHCgACJGwFBkFTU0VUUwoAAiRzCQCQAwEFAiRsCgAFJGFjYzAGCgEFJGYwXzECAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAQdjaGVja2VyAgUCJGEJAJEDAgUCJGwFAiRpCgEFJGYwXzICAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAAIBAhRMaXN0IHNpemUgZXhjZWVkcyAxMAkBBSRmMF8yAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgUFJGFjYzAAAAABAAIAAwAEAAUABgAHAAgACQAKAwkAAQIFByRtYXRjaDACF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBANpdHgFByRtYXRjaDADCQAAAggFA2l0eARkQXBwBQR0aGlzCQAAAggFA2l0eAhmdW5jdGlvbgINY29uc3RydWN0b3JWMQcHBwHq5S4=", "height": 2883744, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9pLrAG7Mx534ypsMBVJRpL2Deo2cMyNdBajZsjcooiPM Next: 2fKnLFXeMRi15d4aYSuwwSv34kWdRbmGpWC3qgVUyJf5 Diff:
OldNewDifferences
1212 let RANDOM_RANGE = 5
1313
1414 let NUM_BETS = 1
15-
16-let HOR_LINES = [[491, 506, 44], [455, 542, 120], [404, 596, 166], [441, 556, 177], [387, 620, 232], [410, 592, 244], [329, 665, 321], [370, 666, 337], [355, 645, 349], [313, 692, 384], [289, 682, 405], [324, 657, 461], [450, 575, 525], [505, 505, 532]]
1715
1816 func getStrOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
1917
4139 let blockedKey = "%s%s__runtime__contractIsBlocked"
4240
4341 let reservedAmountsKey = "%s%s__runtime__reservedAmounts"
44-
45-func keyCoords (gameId) = ("%s%s%s__runtime__coordsByGameId__" + gameId)
46-
4742
4843 func getIntArray (key) = {
4944 let a = getStrOrFail(this, key)
213208 }
214209
215210
211+let HOR_LINES = [[491, 506, 44], [455, 542, 120], [404, 596, 166], [441, 556, 177], [387, 620, 232], [423, 620, 232], [410, 592, 244], [329, 665, 321], [370, 666, 337], [355, 645, 349], [313, 692, 384], [289, 682, 405], [324, 657, 461], [450, 575, 525], [505, 505, 532]]
212+
213+let HALF = 5000
214+
215+let M4 = 10000
216+
217+func getCoords (gameId,rsaSign) = {
218+ func calcAreas (acc,ignored) = {
219+ let i = acc._3
220+ let top = HOR_LINES[i]
221+ let bottom = HOR_LINES[(i + 1)]
222+ let area4 = (((((top[1] - top[0]) + bottom[1]) - bottom[0]) * (bottom[2] - top[2])) * 5000)
223+ $Tuple3((acc._1 :+ area4), (acc._2 + area4), (acc._3 + 1))
224+ }
225+
226+ let $t079398006 = {
227+ let $l = HOR_LINES
228+ let $s = size($l)
229+ let $acc0 = $Tuple3(nil, 0, 0)
230+ func $f0_1 ($a,$i) = if (($i >= $s))
231+ then $a
232+ else calcAreas($a, $l[$i])
233+
234+ func $f0_2 ($a,$i) = if (($i >= $s))
235+ then $a
236+ else throw("List size exceeds 14")
237+
238+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14)
239+ }
240+ let areas = $t079398006._1
241+ let totalArea = $t079398006._2
242+ let rand = (toInt(sha256(rsaSign)) % totalArea)
243+ func check (acc,area) = {
244+ let i = acc._1
245+ let newArea = (acc._2 + area)
246+ $Tuple3((i + 1), newArea, if ((newArea > rand))
247+ then i
248+ else acc._3)
249+ }
250+
251+ let j = ( let $l = areas
252+ let $s = size($l)
253+ let $acc0 = $Tuple3(0, 0, -1)
254+ func $f1_1 ($a,$i) = if (($i >= $s))
255+ then $a
256+ else check($a, $l[$i])
257+
258+ func $f1_2 ($a,$i) = if (($i >= $s))
259+ then $a
260+ else throw("List size exceeds 14")
261+
262+ $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14))._3
263+ let top = HOR_LINES[j]
264+ let bottom = HOR_LINES[(j + 1)]
265+ let mx04 = ((top[0] + bottom[0]) * HALF)
266+ let mx14 = ((top[1] + bottom[1]) * HALF)
267+ let h4 = ((bottom[2] - top[2]) * M4)
268+ let my4 = ((top[2] + bottom[2]) * HALF)
269+ let randX4 = (mx04 + (toInt(sha256((rsaSign + toBytes(j)))) % (mx14 - mx04)))
270+ let randY4 = (top[2] + (toInt(sha256((rsaSign + toBytes(randX4)))) % h4))
271+ let a4 = ((top[2] * M4) - randY4)
272+ let b4 = ((bottom[2] * M4) - randY4)
273+ let x04 = fraction(((top[0] * b4) - (bottom[0] * a4)), M4, h4)
274+ let x14 = fraction(((top[1] * b4) - (bottom[1] * a4)), M4, h4)
275+ if ((x04 > randX4))
276+ then [((2 * mx04) - randX4), ((2 * my4) - randY4)]
277+ else if ((randX4 > x14))
278+ then [((2 * mx14) - randX4), ((2 * my4) - randY4)]
279+ else [randX4, randY4]
280+ }
281+
282+
216283 func generateRandChoice (gameId,rsaSign) = {
217284 let rsaSigValid = rsaVerify_16Kb(SHA256, toBytes(gameId), rsaSign, RSAPUBLIC)
218285 if (!(rsaSigValid))
247314 }
248315
249316
250-func formatGameDataS (gameStatus,playerChoice,playerPubKey58,startedHeight,winAmount,assetIdx,randOrEmpty) = makeString([gameStatus, playerChoice, playerPubKey58, startedHeight, winAmount, assetIdx, if ((randOrEmpty == ""))
317+func formatGameDataS (gameStatus,playerChoice,playerPubKey58,startedHeight,winAmount,assetIdx,randOrEmpty,xCoord,yCoord) = makeString([gameStatus, playerChoice, playerPubKey58, startedHeight, winAmount, assetIdx, if ((randOrEmpty == ""))
251318 then ""
252- else randOrEmpty], "_")
319+ else randOrEmpty, xCoord, yCoord], "_")
253320
254321
255-func formatGameData (gameStatus,playerChoice,playerPubKey58,startedHeight,winAmount,assetIdx,randOrEmpty) = formatGameDataS(gameStatus, playerChoice, playerPubKey58, toString(startedHeight), toString(winAmount), toString(assetIdx), randOrEmpty)
322+func formatGameData (gameStatus,playerChoice,playerPubKey58,startedHeight,winAmount,assetIdx,randOrEmpty,xCoord,yCoord) = formatGameDataS(gameStatus, playerChoice, playerPubKey58, toString(startedHeight), toString(winAmount), toString(assetIdx), randOrEmpty, toString(xCoord), toString(yCoord))
256323
257324
258-func finishGameData (origGameData,gameStatus,rand,winByTimeout) = {
259- let finishGameData = formatGameDataS(gameStatus, origGameData[IdxPlayerChoice], origGameData[IdxPlayerPubKey58], origGameData[IdxStartedHeight], origGameData[IdxWinAmount], origGameData[IdxAssetId], rand)
325+func finishGameData (origGameData,gameStatus,rand,winByTimeout,xCoord,yCoord) = {
326+ let finishGameData = formatGameDataS(gameStatus, origGameData[IdxPlayerChoice], origGameData[IdxPlayerPubKey58], origGameData[IdxStartedHeight], origGameData[IdxWinAmount], origGameData[IdxAssetId], rand, toString(xCoord), toString(yCoord))
260327 if (winByTimeout)
261328 then (finishGameData + "_TIMEOUT")
262329 else finishGameData
272339
273340
274341 @Callable(i)
275-func constructorV1 (rsaPublic64,benzAddress,randOracleTimeFrame,tokensDescriptor) = if ((i.caller != SERVER))
342+func constructorV1 (rsaPublic64,benzAddress,randOracleTimeFrame,tokensDescriptor) = if ((i.caller != this))
276343 then throw("not authorized")
277344 else {
278345 func splitter (acc,elem) = {
330397 let commission = feePmt.amount
331398 let winAmount = validateBetAndGetWinAmount(betPmt.amount, internalAssetIdx, playerChoice)
332399 let playerPubKey58 = toBase58String(i.callerPublicKey)
333- let gameData = formatGameData(STATESUBMITTED, playerChoice, playerPubKey58, height, winAmount, internalAssetIdx, "")
400+ let gameData = formatGameData(STATESUBMITTED, playerChoice, playerPubKey58, height, winAmount, internalAssetIdx, "", -1, -1)
334401 [IntegerEntry(keyReservationByAssetIdx(internalAssetIdx), increaseReserveAmount(winAmount, internalAssetIdx)), incrementInt(GAMESCOUNTERKEY), StringEntry(gameId, gameData), ScriptTransfer(SERVER, commission, feePmt.assetId)]
335402 }
336403 }
361428 let newGameStatus = if (playerWin)
362429 then STATEWON
363430 else STATELOST
364- let newGameData = finishGameData(gameData, newGameStatus, randChoice, winByTimeout)
431+ let coords = if (playerWin)
432+ then [-(M4), -(M4)]
433+ else getCoords(gameId, rsaSign)
434+ let newGameData = finishGameData(gameData, newGameStatus, randChoice, winByTimeout, (coords[0] / M4), (coords[1] / M4))
365435 ([StringEntry(gameId, newGameData), decreaseReservedAmount(gameId, assetIdx, winAmount)] ++ (if (playerWin)
366436 then [ScriptTransfer(playerAddress, winAmount, assetIdFromStr(ASSETS[assetIdx]))]
367- else [StringEntry(keyCoords(gameId), "500_280")]))
437+ else nil))
368438 }
369439 }
370440
392462 else throw("List size exceeds 10")
393463
394464 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
465+ case itx: InvokeScriptTransaction =>
466+ if ((itx.dApp == this))
467+ then (itx.function == "constructorV1")
468+ else false
395469 case _ =>
396470 false
397471 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let WAVESID = base58'WAVES'
77
88 let WAVESD = 100000000
99
1010 let GAME_NAME = "Xmas Tree"
1111
1212 let RANDOM_RANGE = 5
1313
1414 let NUM_BETS = 1
15-
16-let HOR_LINES = [[491, 506, 44], [455, 542, 120], [404, 596, 166], [441, 556, 177], [387, 620, 232], [410, 592, 244], [329, 665, 321], [370, 666, 337], [355, 645, 349], [313, 692, 384], [289, 682, 405], [324, 657, 461], [450, 575, 525], [505, 505, 532]]
1715
1816 func getStrOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
1917
2018
2119 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
2220
2321
2422 func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
2523
2624
2725 let allowedAssetsKey = "%s%s__cfg__allowedAssets"
2826
2927 let assetsDecimalsKey = "%s%s__cfg__assetsDecimals"
3028
3129 let betDividersKey = "%s%s__cfg__assetsBetDividers"
3230
3331 let RSAPUBLIC64KEY = "%s%s__cfg__rsaPublic64"
3432
3533 let SERVERADDRESSKEY = "%s%s__cfg__benzAddress"
3634
3735 let RANDTIMEFRAMEKEY = "%s%s__cfg__withdrawTimeFrame"
3836
3937 let GAMESCOUNTERKEY = "%s%s__runtime__gameNum"
4038
4139 let blockedKey = "%s%s__runtime__contractIsBlocked"
4240
4341 let reservedAmountsKey = "%s%s__runtime__reservedAmounts"
44-
45-func keyCoords (gameId) = ("%s%s%s__runtime__coordsByGameId__" + gameId)
46-
4742
4843 func getIntArray (key) = {
4944 let a = getStrOrFail(this, key)
5045 func filler (acc,el) = (acc :+ parseIntValue(el))
5146
5247 let $l = split(a, SEP)
5348 let $s = size($l)
5449 let $acc0 = nil
5550 func $f0_1 ($a,$i) = if (($i >= $s))
5651 then $a
5752 else filler($a, $l[$i])
5853
5954 func $f0_2 ($a,$i) = if (($i >= $s))
6055 then $a
6156 else throw("List size exceeds 10")
6257
6358 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
6459 }
6560
6661
6762 let ASSETS = split(getStrOrFail(this, allowedAssetsKey), SEP)
6863
6964 let DECIMALS = getIntArray(assetsDecimalsKey)
7065
7166 let BETDIVIDERS = getIntArray(betDividersKey)
7267
7368 func keyReservationByAssetStr (assetStr) = ("$RESERVED_AMOUNT_" + assetStr)
7469
7570
7671 func keyReservationByAssetIdx (assetIdx) = keyReservationByAssetStr(ASSETS[assetIdx])
7772
7873
7974 let MINFEEWAVES = ((5 * WAVESD) / 1000)
8075
8176 let idxAssets = 0
8277
8378 let idxDecimals = 1
8479
8580 let idxDividers = 2
8681
8782 let BET1 = 1
8883
8984 let BET2 = 2
9085
9186 let BET4 = 4
9287
9388 let BET8 = 8
9489
9590 let BET14 = 14
9691
9792 let RATEMULT = 10000
9893
9994 let RATE = 250000
10095
10196 let BETS = [BET2]
10297
10398 let IdxGameState = 0
10499
105100 let IdxPlayerChoice = 1
106101
107102 let IdxPlayerPubKey58 = 2
108103
109104 let IdxStartedHeight = 3
110105
111106 let IdxWinAmount = 4
112107
113108 let IdxAssetId = 5
114109
115110 let STATESUBMITTED = "SUBMITTED"
116111
117112 let STATEWON = "WON"
118113
119114 let STATELOST = "LOST"
120115
121116 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " key is not specified in this.state"))
122117
123118
124119 let RSAPUBLIC = fromBase64String(getStringOrFail(RSAPUBLIC64KEY))
125120
126121 let SERVER = addressFromStringValue(getStringOrFail(SERVERADDRESSKEY))
127122
128123 let RANDORACLETIMEFRAME = valueOrElse(getInteger(this, RANDTIMEFRAMEKEY), 7200)
129124
130125 func getIntOr (key,default) = if (isDefined(getInteger(key)))
131126 then getIntegerValue(key)
132127 else default
133128
134129
135130 func setInt (key,value) = IntegerEntry(key, value)
136131
137132
138133 func incrementInt (key) = setInt(key, (getIntOr(key, -1) + 1))
139134
140135
141136 func changeInt (key,by) = setInt(key, (getIntOr(key, 0) + by))
142137
143138
144139 func assetIdToStr (assetIdOrUnit) = match assetIdOrUnit {
145140 case b: ByteVector =>
146141 toBase58String(b)
147142 case _ =>
148143 "WAVES"
149144 }
150145
151146
152147 func assetIdFromStr (assetIdStr) = if ((assetIdStr == "WAVES"))
153148 then unit
154149 else fromBase58String(assetIdStr)
155150
156151
157152 func getAssetBalance (assetIdOrUnit) = match assetIdOrUnit {
158153 case assetId: ByteVector =>
159154 assetBalance(this, assetId)
160155 case _ =>
161156 wavesBalance(this).available
162157 }
163158
164159
165160 func increaseReserveAmount (winAmount,assetIdx) = {
166161 let assetIdStr = ASSETS[assetIdx]
167162 let newReservedAmount = (getIntOr(keyReservationByAssetIdx(assetIdx), 0) + winAmount)
168163 if ((newReservedAmount > getAssetBalance(assetIdFromStr(assetIdStr))))
169164 then throw((("Insufficient funds on " + GAME_NAME) + " account. Transaction was rejected for your safety."))
170165 else newReservedAmount
171166 }
172167
173168
174169 func decreaseReservedAmount (gameId,assetIdx,winAmount) = if ((0 > (getIntOr(keyReservationByAssetIdx(assetIdx), 0) - winAmount)))
175170 then throw((("Invalid " + GAME_NAME) + " account state - reserved amount is less than 0"))
176171 else changeInt(keyReservationByAssetIdx(assetIdx), -(winAmount))
177172
178173
179174 func validateAndGetAssetIdx (assetIdStr) = {
180175 let idx = indexOf(ASSETS, assetIdStr)
181176 if (!(isDefined(idx)))
182177 then throw("Invalid payment asset")
183178 else value(idx)
184179 }
185180
186181
187182 func validateBetAndGetWinAmount (bet,internalAssetIdx,playerChoice) = {
188183 let dicesCount = size(playerChoice)
189184 func checkAmount (a,x) = if (a)
190185 then true
191186 else (bet == ((x * DECIMALS[internalAssetIdx]) / BETDIVIDERS[internalAssetIdx]))
192187
193188 if (!({
194189 let $l = BETS
195190 let $s = size($l)
196191 let $acc0 = false
197192 func $f0_1 ($a,$i) = if (($i >= $s))
198193 then $a
199194 else checkAmount($a, $l[$i])
200195
201196 func $f0_2 ($a,$i) = if (($i >= $s))
202197 then $a
203198 else throw("List size exceeds 5")
204199
205200 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
206201 }))
207202 then throw("Bet amount is not valid")
208203 else if ((parseInt(playerChoice) == unit))
209204 then throw("Invalid player's choice")
210205 else if ((dicesCount != NUM_BETS))
211206 then throw("Invalid length of player's choice")
212207 else fraction(bet, RATE, RATEMULT)
213208 }
214209
215210
211+let HOR_LINES = [[491, 506, 44], [455, 542, 120], [404, 596, 166], [441, 556, 177], [387, 620, 232], [423, 620, 232], [410, 592, 244], [329, 665, 321], [370, 666, 337], [355, 645, 349], [313, 692, 384], [289, 682, 405], [324, 657, 461], [450, 575, 525], [505, 505, 532]]
212+
213+let HALF = 5000
214+
215+let M4 = 10000
216+
217+func getCoords (gameId,rsaSign) = {
218+ func calcAreas (acc,ignored) = {
219+ let i = acc._3
220+ let top = HOR_LINES[i]
221+ let bottom = HOR_LINES[(i + 1)]
222+ let area4 = (((((top[1] - top[0]) + bottom[1]) - bottom[0]) * (bottom[2] - top[2])) * 5000)
223+ $Tuple3((acc._1 :+ area4), (acc._2 + area4), (acc._3 + 1))
224+ }
225+
226+ let $t079398006 = {
227+ let $l = HOR_LINES
228+ let $s = size($l)
229+ let $acc0 = $Tuple3(nil, 0, 0)
230+ func $f0_1 ($a,$i) = if (($i >= $s))
231+ then $a
232+ else calcAreas($a, $l[$i])
233+
234+ func $f0_2 ($a,$i) = if (($i >= $s))
235+ then $a
236+ else throw("List size exceeds 14")
237+
238+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14)
239+ }
240+ let areas = $t079398006._1
241+ let totalArea = $t079398006._2
242+ let rand = (toInt(sha256(rsaSign)) % totalArea)
243+ func check (acc,area) = {
244+ let i = acc._1
245+ let newArea = (acc._2 + area)
246+ $Tuple3((i + 1), newArea, if ((newArea > rand))
247+ then i
248+ else acc._3)
249+ }
250+
251+ let j = ( let $l = areas
252+ let $s = size($l)
253+ let $acc0 = $Tuple3(0, 0, -1)
254+ func $f1_1 ($a,$i) = if (($i >= $s))
255+ then $a
256+ else check($a, $l[$i])
257+
258+ func $f1_2 ($a,$i) = if (($i >= $s))
259+ then $a
260+ else throw("List size exceeds 14")
261+
262+ $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14))._3
263+ let top = HOR_LINES[j]
264+ let bottom = HOR_LINES[(j + 1)]
265+ let mx04 = ((top[0] + bottom[0]) * HALF)
266+ let mx14 = ((top[1] + bottom[1]) * HALF)
267+ let h4 = ((bottom[2] - top[2]) * M4)
268+ let my4 = ((top[2] + bottom[2]) * HALF)
269+ let randX4 = (mx04 + (toInt(sha256((rsaSign + toBytes(j)))) % (mx14 - mx04)))
270+ let randY4 = (top[2] + (toInt(sha256((rsaSign + toBytes(randX4)))) % h4))
271+ let a4 = ((top[2] * M4) - randY4)
272+ let b4 = ((bottom[2] * M4) - randY4)
273+ let x04 = fraction(((top[0] * b4) - (bottom[0] * a4)), M4, h4)
274+ let x14 = fraction(((top[1] * b4) - (bottom[1] * a4)), M4, h4)
275+ if ((x04 > randX4))
276+ then [((2 * mx04) - randX4), ((2 * my4) - randY4)]
277+ else if ((randX4 > x14))
278+ then [((2 * mx14) - randX4), ((2 * my4) - randY4)]
279+ else [randX4, randY4]
280+ }
281+
282+
216283 func generateRandChoice (gameId,rsaSign) = {
217284 let rsaSigValid = rsaVerify_16Kb(SHA256, toBytes(gameId), rsaSign, RSAPUBLIC)
218285 if (!(rsaSigValid))
219286 then throw("Invalid RSA signature")
220287 else {
221288 let rand = (toInt(sha256(rsaSign)) % RANDOM_RANGE)
222289 toString((rand + 1))
223290 }
224291 }
225292
226293
227294 func isPlayerWin (playerChoice,randChoise) = {
228295 let s = size(playerChoice)
229296 func check (a,x) = if (a)
230297 then true
231298 else if ((s >= x))
232299 then (take(drop(playerChoice, (x - 1)), 1) == randChoise)
233300 else false
234301
235302 let $l = [1, 2, 3, 4, 5]
236303 let $s = size($l)
237304 let $acc0 = false
238305 func $f0_1 ($a,$i) = if (($i >= $s))
239306 then $a
240307 else check($a, $l[$i])
241308
242309 func $f0_2 ($a,$i) = if (($i >= $s))
243310 then $a
244311 else throw("List size exceeds 5")
245312
246313 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
247314 }
248315
249316
250-func formatGameDataS (gameStatus,playerChoice,playerPubKey58,startedHeight,winAmount,assetIdx,randOrEmpty) = makeString([gameStatus, playerChoice, playerPubKey58, startedHeight, winAmount, assetIdx, if ((randOrEmpty == ""))
317+func formatGameDataS (gameStatus,playerChoice,playerPubKey58,startedHeight,winAmount,assetIdx,randOrEmpty,xCoord,yCoord) = makeString([gameStatus, playerChoice, playerPubKey58, startedHeight, winAmount, assetIdx, if ((randOrEmpty == ""))
251318 then ""
252- else randOrEmpty], "_")
319+ else randOrEmpty, xCoord, yCoord], "_")
253320
254321
255-func formatGameData (gameStatus,playerChoice,playerPubKey58,startedHeight,winAmount,assetIdx,randOrEmpty) = formatGameDataS(gameStatus, playerChoice, playerPubKey58, toString(startedHeight), toString(winAmount), toString(assetIdx), randOrEmpty)
322+func formatGameData (gameStatus,playerChoice,playerPubKey58,startedHeight,winAmount,assetIdx,randOrEmpty,xCoord,yCoord) = formatGameDataS(gameStatus, playerChoice, playerPubKey58, toString(startedHeight), toString(winAmount), toString(assetIdx), randOrEmpty, toString(xCoord), toString(yCoord))
256323
257324
258-func finishGameData (origGameData,gameStatus,rand,winByTimeout) = {
259- let finishGameData = formatGameDataS(gameStatus, origGameData[IdxPlayerChoice], origGameData[IdxPlayerPubKey58], origGameData[IdxStartedHeight], origGameData[IdxWinAmount], origGameData[IdxAssetId], rand)
325+func finishGameData (origGameData,gameStatus,rand,winByTimeout,xCoord,yCoord) = {
326+ let finishGameData = formatGameDataS(gameStatus, origGameData[IdxPlayerChoice], origGameData[IdxPlayerPubKey58], origGameData[IdxStartedHeight], origGameData[IdxWinAmount], origGameData[IdxAssetId], rand, toString(xCoord), toString(yCoord))
260327 if (winByTimeout)
261328 then (finishGameData + "_TIMEOUT")
262329 else finishGameData
263330 }
264331
265332
266333 func extractGameData (gameId) = split(match getString(this, gameId) {
267334 case str: String =>
268335 str
269336 case _ =>
270337 throw((("Game: " + gameId) + " not found."))
271338 }, "_")
272339
273340
274341 @Callable(i)
275-func constructorV1 (rsaPublic64,benzAddress,randOracleTimeFrame,tokensDescriptor) = if ((i.caller != SERVER))
342+func constructorV1 (rsaPublic64,benzAddress,randOracleTimeFrame,tokensDescriptor) = if ((i.caller != this))
276343 then throw("not authorized")
277344 else {
278345 func splitter (acc,elem) = {
279346 let tokList = split(elem, ":")
280347 if ((size(tokList) != 3))
281348 then throw("Invalid asset record")
282349 else $Tuple3((acc._1 :+ tokList[idxAssets]), (acc._2 :+ tokList[idxDecimals]), (acc._3 :+ tokList[idxDividers]))
283350 }
284351
285352 let r = {
286353 let $l = split_4C(tokensDescriptor, "_")
287354 let $s = size($l)
288355 let $acc0 = $Tuple3(nil, nil, nil)
289356 func $f0_1 ($a,$i) = if (($i >= $s))
290357 then $a
291358 else splitter($a, $l[$i])
292359
293360 func $f0_2 ($a,$i) = if (($i >= $s))
294361 then $a
295362 else throw("List size exceeds 10")
296363
297364 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
298365 }
299366 [StringEntry(RSAPUBLIC64KEY, rsaPublic64), StringEntry(SERVERADDRESSKEY, benzAddress), IntegerEntry(RANDTIMEFRAMEKEY, randOracleTimeFrame), StringEntry(allowedAssetsKey, makeString_2C(r._1, SEP)), StringEntry(assetsDecimalsKey, makeString(r._2, SEP)), StringEntry(betDividersKey, makeString(r._3, SEP))]
300367 }
301368
302369
303370
304371 @Callable(i)
305372 func maintenance (blocked) = if ((i.caller != SERVER))
306373 then throw("not authorized")
307374 else [BooleanEntry(blockedKey, blocked)]
308375
309376
310377
311378 @Callable(i)
312379 func bet (playerChoice) = if (valueOrElse(getBoolean(blockedKey), false))
313380 then throw("Game is stopped for maintenence")
314381 else {
315382 let gameId = toBase58String(i.transactionId)
316383 if ((1 >= size(i.payments)))
317384 then throw("2 payments must be attached")
318385 else if (isDefined(getString(this, gameId)))
319386 then throw((("Bet for: " + gameId) + " was already made."))
320387 else {
321388 let betPmt = value(i.payments[0])
322389 let feePmt = value(i.payments[1])
323390 if (isDefined(feePmt.assetId))
324391 then throw("feePmt (2nd payment) assetId must be in Waves")
325392 else if ((MINFEEWAVES > feePmt.amount))
326393 then throw("feePmt (2nd payment) must be >= 0.005 Waves")
327394 else {
328395 let assetIdStr = assetIdToStr(betPmt.assetId)
329396 let internalAssetIdx = validateAndGetAssetIdx(assetIdStr)
330397 let commission = feePmt.amount
331398 let winAmount = validateBetAndGetWinAmount(betPmt.amount, internalAssetIdx, playerChoice)
332399 let playerPubKey58 = toBase58String(i.callerPublicKey)
333- let gameData = formatGameData(STATESUBMITTED, playerChoice, playerPubKey58, height, winAmount, internalAssetIdx, "")
400+ let gameData = formatGameData(STATESUBMITTED, playerChoice, playerPubKey58, height, winAmount, internalAssetIdx, "", -1, -1)
334401 [IntegerEntry(keyReservationByAssetIdx(internalAssetIdx), increaseReserveAmount(winAmount, internalAssetIdx)), incrementInt(GAMESCOUNTERKEY), StringEntry(gameId, gameData), ScriptTransfer(SERVER, commission, feePmt.assetId)]
335402 }
336403 }
337404 }
338405
339406
340407
341408 @Callable(i)
342409 func withdraw (gameId,rsaSign) = {
343410 let gameData = extractGameData(gameId)
344411 let gameState = gameData[IdxGameState]
345412 let playerChoice = gameData[IdxPlayerChoice]
346413 let startedHeight = parseIntValue(gameData[IdxStartedHeight])
347414 let winAmount = parseIntValue(gameData[IdxWinAmount])
348415 let assetIdx = parseIntValue(gameData[IdxAssetId])
349416 let playerPubKey58 = gameData[IdxPlayerPubKey58]
350417 let playerAddress = addressFromPublicKey(fromBase58String(playerPubKey58))
351418 if ((gameState != STATESUBMITTED))
352419 then throw("Invalid game state for passed gameId")
353420 else if ((i.caller != SERVER))
354421 then throw("Regular withdraw can be done by server only")
355422 else {
356423 let winByTimeout = ((height - startedHeight) > RANDORACLETIMEFRAME)
357424 let randChoice = if (winByTimeout)
358425 then take(playerChoice, 1)
359426 else generateRandChoice(gameId, rsaSign)
360427 let playerWin = isPlayerWin(playerChoice, randChoice)
361428 let newGameStatus = if (playerWin)
362429 then STATEWON
363430 else STATELOST
364- let newGameData = finishGameData(gameData, newGameStatus, randChoice, winByTimeout)
431+ let coords = if (playerWin)
432+ then [-(M4), -(M4)]
433+ else getCoords(gameId, rsaSign)
434+ let newGameData = finishGameData(gameData, newGameStatus, randChoice, winByTimeout, (coords[0] / M4), (coords[1] / M4))
365435 ([StringEntry(gameId, newGameData), decreaseReservedAmount(gameId, assetIdx, winAmount)] ++ (if (playerWin)
366436 then [ScriptTransfer(playerAddress, winAmount, assetIdFromStr(ASSETS[assetIdx]))]
367- else [StringEntry(keyCoords(gameId), "500_280")]))
437+ else nil))
368438 }
369439 }
370440
371441
372442 @Verifier(tx)
373443 func verify () = if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey))
374444 then match tx {
375445 case ttx: TransferTransaction =>
376446 let assetIdx = validateAndGetAssetIdx(assetIdToStr(ttx.assetId))
377447 ((getAssetBalance(ttx.assetId) - ttx.amount) >= getIntOr(keyReservationByAssetIdx(assetIdx), 0))
378448 case stx: SetScriptTransaction =>
379449 func checker (acc,asset) = if (acc)
380450 then (getIntOr(keyReservationByAssetStr(asset), 0) == 0)
381451 else false
382452
383453 let $l = ASSETS
384454 let $s = size($l)
385455 let $acc0 = true
386456 func $f0_1 ($a,$i) = if (($i >= $s))
387457 then $a
388458 else checker($a, $l[$i])
389459
390460 func $f0_2 ($a,$i) = if (($i >= $s))
391461 then $a
392462 else throw("List size exceeds 10")
393463
394464 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
465+ case itx: InvokeScriptTransaction =>
466+ if ((itx.dApp == this))
467+ then (itx.function == "constructorV1")
468+ else false
395469 case _ =>
396470 false
397471 }
398472 else false
399473

github/deemru/w8io/169f3d6 
62.28 ms