tx · JCQZwPvbiaA5PsjzFtxuU73eHxcpTtj5TMkE9UmcmxVw 3Mu2nqkKHbGJRAki6gPoBaLE5RSiJN1m1DC: -0.01500000 Waves 2020.04.29 20:03 [976332] smart account 3Mu2nqkKHbGJRAki6gPoBaLE5RSiJN1m1DC > SELF 0.00000000 Waves
{ "type": 13, "id": "JCQZwPvbiaA5PsjzFtxuU73eHxcpTtj5TMkE9UmcmxVw", "fee": 1500000, "feeAssetId": null, "timestamp": 1588179919600, "version": 1, "sender": "3Mu2nqkKHbGJRAki6gPoBaLE5RSiJN1m1DC", "senderPublicKey": "Fcmt4Df1v4zeGFhgMBx3PFRDq8BYMsKQbkGBhF1jrXZy", "proofs": [ "3JwvRnhWhqZFu64d8M9p8jLJi5LtoGPBh6XcQMx3LusdVAHguwyyYN322ghkhJyMgL5afBhW4rxo6dok5KXNUPYY" ], "script": "base64:AAIDAAAAAAAAAA0IARIDCgEIEgQKAggCAAAAKQAAAAAJUlNBUFVCTElDCQACWwAAAAECAAABj2Jhc2U2NDpNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQW1wdVhjSS9vNHBJQjV5d3Y5RE9PR2FwVEJVd1JWbE0vNitINmhGZWxPWHRrcndZL1lJdG1QeEVEcHo3ckFlclFQUWU5dERQRWFBdi9HbmxFenR5Yk9GWGd1OUR6RGU4WW9NUkQxdmFrZ29BY29nbWJZNThRRDZLTWo1SGtvVmoveVROSWM5c3pqNXFoSWxyQWRtYjNLTEw2aFFVN3k4K0pqNjlCV1ZQc2FRZ2tzcFNkZVl0YjF0SFFjN3Q5NW43T1o1NnIyQTdHMytiUWY2blNNa1BrQWhJckVwYkNtNThvaUdCY3pkVGQvTHFGU1ZvdFpzYkw3WWg2U0hMZm5IZUQrUWdjZkpybmFtOE9ITUdKRUpUUlhqSUxlSEdqbFJDUDhvVnBpb0hyeTFTMnhQeDVzVnpJbTJNTStDelllbkFHbG8wajI2YXRCaGlVTG9UdW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YXNlZFJlc2VydmVzBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAN0dHgFAAAAByRtYXRjaDAEAAAAB2Fzc2V0SWQJAQAAABV2YWxpZGF0ZUFuZEdldEFzc2V0SWQAAAABCAUAAAADdHR4AAAAB2Fzc2V0SWQJAABnAAAAAgkAAGUAAAACCQAD6wAAAAIFAAAABHRoaXMIBQAAAAN0dHgAAAAHYXNzZXRJZAgFAAAAA3R0eAAAAAZhbW91bnQJAQAAAAhnZXRJbnRPcgAAAAIJAAGRAAAAAgUAAAAOUkVTRVJWQVRJT05LRVkFAAAAB2Fzc2V0SWQAAAAAAAAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAANzdHgFAAAAByRtYXRjaDADCQAAAAAAAAIJAQAAAAhnZXRJbnRPcgAAAAIJAAGRAAAAAgUAAAAOUkVTRVJWQVRJT05LRVkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJAAAAAAAAAgkBAAAACGdldEludE9yAAAAAgkAAZEAAAACBQAAAA5SRVNFUlZBVElPTktFWQAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAcHB+waxSQ=", "chainId": 84, "height": 976332, "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("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 | + | let COMMISSION = [((5 * WAVESD) / 1000), (((5 * USDND) / 1000) * 10)] | |
31 | + | ||
32 | + | func getCommission (assetId) = COMMISSION[assetId] | |
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 $list44394472 = BETS | |
104 | + | let $size44394472 = size($list44394472) | |
105 | + | let $acc044394472 = false | |
106 | + | if (($size44394472 == 0)) | |
107 | + | then $acc044394472 | |
108 | + | else { | |
109 | + | let $acc144394472 = checkAmount($acc044394472, $list44394472[0]) | |
110 | + | if (($size44394472 == 1)) | |
111 | + | then $acc144394472 | |
112 | + | else { | |
113 | + | let $acc244394472 = checkAmount($acc144394472, $list44394472[1]) | |
114 | + | if (($size44394472 == 2)) | |
115 | + | then $acc244394472 | |
116 | + | else { | |
117 | + | let $acc344394472 = checkAmount($acc244394472, $list44394472[2]) | |
118 | + | if (($size44394472 == 3)) | |
119 | + | then $acc344394472 | |
120 | + | else { | |
121 | + | let $acc444394472 = checkAmount($acc344394472, $list44394472[3]) | |
122 | + | if (($size44394472 == 4)) | |
123 | + | then $acc444394472 | |
124 | + | else { | |
125 | + | let $acc544394472 = checkAmount($acc444394472, $list44394472[4]) | |
126 | + | if (($size44394472 == 5)) | |
127 | + | then $acc544394472 | |
128 | + | else { | |
129 | + | let $acc644394472 = checkAmount($acc544394472, $list44394472[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 ((dicesCount != 1)) | |
142 | + | then throw("Invalid length of 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 | + | ((assetBalance(this, ttx.assetId) - 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/026f985 20.65 ms ◑