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