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