tx · 95ogVTJ4xVeU254VYDh8G5rqZ9BPnvtfWM1P5MuPowwk 3NBFHpzVTqcHQB6Zxec1f6N6ZGBWQ4VsBFD: -0.01500000 Waves 2019.09.22 19:36 [687768] smart account 3NBFHpzVTqcHQB6Zxec1f6N6ZGBWQ4VsBFD > SELF 0.00000000 Waves
{ "type": 13, "id": "95ogVTJ4xVeU254VYDh8G5rqZ9BPnvtfWM1P5MuPowwk", "fee": 1500000, "feeAssetId": null, "timestamp": 1569170079642, "version": 1, "sender": "3NBFHpzVTqcHQB6Zxec1f6N6ZGBWQ4VsBFD", "senderPublicKey": "8W9JLTJTfxrJrBNXxngzueBF4vJqeb6p9jFob7wb6QWQ", "proofs": [ "2G2FiEfZampxcCWzTPATm41d1an7Zt4Ey4W1P5nEytQS6R51WuxU37wn2PgwKMtVC39dURG5nrrhvZ9SPsbAQy4D" ], "script": "base64:AAIDAAAAAAAAAAwIARIAEgYKBAgCAgIAAAAgAAAAAA1yc2FQdWJsaWNLZXkxCQACWwAAAAECAAAACGJhc2U2NDoxAAAAAA1yc2FQdWJsaWNLZXkyCQACWwAAAAECAAAACGJhc2U2NDoyAAAAAA1yc2FQdWJsaWNLZXkzCQACWwAAAAECAAAACGJhc2U2NDozAAAAAA1nYW1lVGltZUZyYW1lAAAAAAAAAAWgAAAAAAhzdGF0ZUFjYwIAAAAIQWNjZXB0ZWQAAAAACHN0YXRlV2luAgAAAANXaW4AAAAADHN0YXRlVGltZW91dAIAAAAMV2luQnlUaW1lb3V0AAAAAAlzdGF0ZUxvc2UCAAAABExvc2UAAAAABHdCVEMJAAJZAAAAAQIAAAAEd0JUQwAAAAAEd0VUSAkAAlkAAAABAgAAAAR3RVRIAAAAAAR3TFRDCQACWQAAAAECAAAABHdMVEMAAAAAA1ZTVAkAAlkAAAABAgAAAANWU1QAAAAAA1dDVAkAAlkAAAABAgAAAANXQ1QAAAAAC1dhdmVzTWluQW10AAAAAAAF9eEAAAAAAAtXYXZlc01heEFtdAkAAGgAAA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W50CQAAZwAAAAIFAAAAEGF2YWlsYWJsZUJhbGFuY2UIBQAAAAN0dHgAAAAGYW1vdW50BAAAAAlzaWduYXR1cmUJAAH0AAAAAwgFAAAAA3R0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAA3R0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAN0dHgAAAAPc2VuZGVyUHVibGljS2V5AwUAAAAPYXZhaWxpYmxlQW1vdW50BQAAAAlzaWduYXR1cmUHAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAAEc3N0eAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAAEc3N0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAABHNzdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAAEc3N0eAAAAA9zZW5kZXJQdWJsaWNLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBAAAAARpc3R4BQAAAAckbWF0Y2gwCQAB9AAAAAMIBQAAAARpc3R4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAAEaXN0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAARpc3R4AAAAD3NlbmRlclB1YmxpY0tleQdwIw++", "chainId": 84, "height": 687768, "spentComplexity": 0 } View: original | compacted Prev: none Next: G4NXVLtnvYqYtJAvYtU3vjp6QRtMxKj44ePTLsF5JReT Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let rsaPublicKey1 = fromBase64String("base64:1") | |
5 | + | ||
6 | + | let rsaPublicKey2 = fromBase64String("base64:2") | |
7 | + | ||
8 | + | let rsaPublicKey3 = fromBase64String("base64:3") | |
9 | + | ||
10 | + | let gameTimeFrame = 1440 | |
11 | + | ||
12 | + | let stateAcc = "Accepted" | |
13 | + | ||
14 | + | let stateWin = "Win" | |
15 | + | ||
16 | + | let stateTimeout = "WinByTimeout" | |
17 | + | ||
18 | + | let stateLose = "Lose" | |
19 | + | ||
20 | + | let wBTC = fromBase58String("wBTC") | |
21 | + | ||
22 | + | let wETH = fromBase58String("wETH") | |
23 | + | ||
24 | + | let wLTC = fromBase58String("wLTC") | |
25 | + | ||
26 | + | let VST = fromBase58String("VST") | |
27 | + | ||
28 | + | let WCT = fromBase58String("WCT") | |
29 | + | ||
30 | + | let WavesMinAmt = 100000000 | |
31 | + | ||
32 | + | let WavesMaxAmt = (WavesMinAmt * 10) | |
33 | + | ||
34 | + | let BtcMinAmt = 10000 | |
35 | + | ||
36 | + | let BtcMaxAmt = (BtcMinAmt * 10) | |
37 | + | ||
38 | + | let EthMinAmt = 1000000 | |
39 | + | ||
40 | + | let EthMaxAmt = (EthMinAmt * 10) | |
41 | + | ||
42 | + | let LtcMinAmt = 2000000 | |
43 | + | ||
44 | + | let LtcMaxAmt = (LtcMinAmt * 10) | |
45 | + | ||
46 | + | let WctMinAmt = 500000000 | |
47 | + | ||
48 | + | let WctMaxAmt = (WctMinAmt * 10) | |
49 | + | ||
50 | + | let VstMinAmt = 500000000 | |
51 | + | ||
52 | + | let VstMaxAmt = (VstMinAmt * 10) | |
53 | + | ||
54 | + | func pmtAmtCheck (pmtAssetId,pmtAmt) = if ((pmtAssetId == "WAVES")) | |
55 | + | then if (if ((pmtAmt >= WavesMinAmt)) | |
56 | + | then (WavesMaxAmt >= pmtAmt) | |
57 | + | else false) | |
58 | + | then true | |
59 | + | else throw("Bet amount is not in range") | |
60 | + | else if ((pmtAssetId == "BTC")) | |
61 | + | then if (if ((pmtAmt >= BtcMinAmt)) | |
62 | + | then (BtcMaxAmt >= pmtAmt) | |
63 | + | else false) | |
64 | + | then true | |
65 | + | else throw("Bet amount is not in range") | |
66 | + | else if ((pmtAssetId == "ETH")) | |
67 | + | then if (if ((pmtAmt >= EthMinAmt)) | |
68 | + | then (EthMaxAmt >= pmtAmt) | |
69 | + | else false) | |
70 | + | then true | |
71 | + | else throw("Bet amount is not in range") | |
72 | + | else if ((pmtAssetId == "LTC")) | |
73 | + | then if (if ((pmtAmt >= LtcMinAmt)) | |
74 | + | then (LtcMaxAmt >= pmtAmt) | |
75 | + | else false) | |
76 | + | then true | |
77 | + | else throw("Bet amount is not in range") | |
78 | + | else if ((pmtAssetId == "WCT")) | |
79 | + | then if (if ((pmtAmt >= WctMinAmt)) | |
80 | + | then (WctMaxAmt >= pmtAmt) | |
81 | + | else false) | |
82 | + | then true | |
83 | + | else throw("Bet amount is not in range") | |
84 | + | else if (if ((pmtAmt >= VstMinAmt)) | |
85 | + | then (VstMaxAmt >= pmtAmt) | |
86 | + | else false) | |
87 | + | then true | |
88 | + | else throw("Bet amount is not in range") | |
89 | + | ||
90 | + | ||
91 | + | func increaseReservedBalance (pmtAmt,pmtAssetId) = { | |
92 | + | let currentReservedBalance = { | |
93 | + | let valueReservedBalance = getInteger(this, ("Reserved_" + pmtAssetId)) | |
94 | + | match valueReservedBalance { | |
95 | + | case a: Int => | |
96 | + | a | |
97 | + | case _ => | |
98 | + | 0 | |
99 | + | } | |
100 | + | } | |
101 | + | let newReservedBalance = (currentReservedBalance + pmtAmt) | |
102 | + | if ((wavesBalance(this) >= newReservedBalance)) | |
103 | + | then { | |
104 | + | let increaseReservedBalance = newReservedBalance | |
105 | + | increaseReservedBalance | |
106 | + | } | |
107 | + | else throw("Bet was rejected. Insufficient funds on game account.") | |
108 | + | } | |
109 | + | ||
110 | + | ||
111 | + | func getDataList (gameId) = { | |
112 | + | let getDataString = getString(this, gameId) | |
113 | + | let a = match getDataString { | |
114 | + | case a: String => | |
115 | + | a | |
116 | + | case _ => | |
117 | + | throw("GameId was not found") | |
118 | + | } | |
119 | + | split(a, "_") | |
120 | + | } | |
121 | + | ||
122 | + | ||
123 | + | func intToElem (rsaInt) = if ((2 > rsaInt)) | |
124 | + | then "1" | |
125 | + | else if ((4 > rsaInt)) | |
126 | + | then "2" | |
127 | + | else if ((6 > rsaInt)) | |
128 | + | then "3" | |
129 | + | else if ((8 > rsaInt)) | |
130 | + | then "4" | |
131 | + | else if ((10 > rsaInt)) | |
132 | + | then "5" | |
133 | + | else if ((12 > rsaInt)) | |
134 | + | then "6" | |
135 | + | else "7" | |
136 | + | ||
137 | + | ||
138 | + | func rsaToInt (gameId,rsaSign,rsaPublicKey) = { | |
139 | + | let rsaCheck = rsaVerify(SHA256, toBytes(gameId), rsaSign, rsaPublicKey) | |
140 | + | if (rsaCheck) | |
141 | + | then { | |
142 | + | let rsaInt = ((toInt(sha256(rsaSign)) % 19) + 1) | |
143 | + | if (if ((rsaInt > 0)) | |
144 | + | then (20 >= rsaInt) | |
145 | + | else false) | |
146 | + | then rsaInt | |
147 | + | else throw("Rsa integer is not in range") | |
148 | + | } | |
149 | + | else throw("Rsa Signature is invalid") | |
150 | + | } | |
151 | + | ||
152 | + | ||
153 | + | func decreaseReservedBalance (betAmt,assetId) = { | |
154 | + | let valueReservedBalance = getInteger(this, ("Reserved_" + assetId)) | |
155 | + | let extractReservedBalance = match valueReservedBalance { | |
156 | + | case a: Int => | |
157 | + | a | |
158 | + | case _ => | |
159 | + | 0 | |
160 | + | } | |
161 | + | let decreaseReservedBalance = (extractReservedBalance - betAmt) | |
162 | + | if ((decreaseReservedBalance > 0)) | |
163 | + | then decreaseReservedBalance | |
164 | + | else throw("Reserved balance couldn't be less than 0") | |
165 | + | } | |
166 | + | ||
167 | + | ||
168 | + | func defineMultiplier (threeDrums,twoDrums) = if ((threeDrums == "111")) | |
169 | + | then 1 | |
170 | + | else if ((threeDrums == "222")) | |
171 | + | then 2 | |
172 | + | else if ((threeDrums == "333")) | |
173 | + | then 3 | |
174 | + | else if ((threeDrums == "444")) | |
175 | + | then 4 | |
176 | + | else if ((threeDrums == "555")) | |
177 | + | then 5 | |
178 | + | else if ((threeDrums == "666")) | |
179 | + | then 6 | |
180 | + | else if ((threeDrums == "777")) | |
181 | + | then 7 | |
182 | + | else if ((twoDrums == "11")) | |
183 | + | then 8 | |
184 | + | else if ((twoDrums == "22")) | |
185 | + | then 9 | |
186 | + | else if ((twoDrums == "33")) | |
187 | + | then 10 | |
188 | + | else if ((twoDrums == "44")) | |
189 | + | then 11 | |
190 | + | else if ((twoDrums == "55")) | |
191 | + | then 12 | |
192 | + | else if ((twoDrums == "66")) | |
193 | + | then 13 | |
194 | + | else if ((twoDrums == "77")) | |
195 | + | then 14 | |
196 | + | else 0 | |
197 | + | ||
198 | + | ||
199 | + | @Callable(i) | |
200 | + | func bet () = { | |
201 | + | let pmt = extract(i.payment) | |
202 | + | let pmtAmt = pmt.amount | |
203 | + | let gameId = toBase58String(i.transactionId) | |
204 | + | let gameStart = height | |
205 | + | let playerPublicKey = toBase58String(i.callerPublicKey) | |
206 | + | let pmtAssetId = if (!(isDefined(pmt.assetId))) | |
207 | + | then "WAVES" | |
208 | + | else if ((pmt.assetId == wBTC)) | |
209 | + | then "BTC" | |
210 | + | else if ((pmt.assetId == wETH)) | |
211 | + | then "ETH" | |
212 | + | else if ((pmt.assetId == wLTC)) | |
213 | + | then "LTC" | |
214 | + | else if ((pmt.assetId == WCT)) | |
215 | + | then "WCT" | |
216 | + | else if ((pmt.assetId == VST)) | |
217 | + | then "VST" | |
218 | + | else throw("AssetId is incorrect") | |
219 | + | let setReservedBalance = increaseReservedBalance(pmtAmt, pmtAssetId) | |
220 | + | let pmtAmtCorrect = pmtAmtCheck(pmtAssetId, pmtAmt) | |
221 | + | if (pmtAmtCorrect) | |
222 | + | then { | |
223 | + | let dataString = ((((((((stateAcc + "_") + playerPublicKey) + "_") + toString(pmtAmt)) + "_") + pmtAssetId) + "_") + toString(gameStart)) | |
224 | + | WriteSet([DataEntry(gameId, dataString), DataEntry(("Reserved_" + pmtAssetId), setReservedBalance)]) | |
225 | + | } | |
226 | + | else throw("assetId is incorrect") | |
227 | + | } | |
228 | + | ||
229 | + | ||
230 | + | ||
231 | + | @Callable(i) | |
232 | + | func withdraw (gameId,rsaSign1,rsaSign2,rsaSign3) = { | |
233 | + | let dataList = getDataList(gameId) | |
234 | + | let gameState = dataList[0] | |
235 | + | let playerAddress = addressFromPublicKey(fromBase58String(dataList[1])) | |
236 | + | let betAmt = parseIntValue(dataList[2]) | |
237 | + | let assetId = dataList[3] | |
238 | + | let gameStart = parseIntValue(dataList[4]) | |
239 | + | let gameTimeCheck = (gameTimeFrame > (height - gameStart)) | |
240 | + | let stateCheck = (gameState == stateAcc) | |
241 | + | let setReservedBalance = decreaseReservedBalance(betAmt, assetId) | |
242 | + | let droppedElementsList = { | |
243 | + | let roll1Int = rsaToInt(gameId, rsaSign1, rsaPublicKey1) | |
244 | + | let roll2Int = rsaToInt(gameId, rsaSign2, rsaPublicKey2) | |
245 | + | let roll3Int = rsaToInt(gameId, rsaSign3, rsaPublicKey3) | |
246 | + | let element1 = intToElem(roll1Int) | |
247 | + | let element2 = intToElem(roll2Int) | |
248 | + | let element3 = intToElem(roll3Int) | |
249 | + | [element1, element2, element3] | |
250 | + | } | |
251 | + | let winAmt = { | |
252 | + | let threeDrums = ((droppedElementsList[0] + droppedElementsList[1]) + droppedElementsList[2]) | |
253 | + | let twoDrums = (droppedElementsList[0] + droppedElementsList[1]) | |
254 | + | let multiplier = defineMultiplier(threeDrums, twoDrums) | |
255 | + | (betAmt * multiplier) | |
256 | + | } | |
257 | + | let stringForNewData = ((((((dataList[1] + "_") + dataList[2]) + "_") + dataList[3]) + "_") + dataList[4]) | |
258 | + | let droppedElements = ((droppedElementsList[0] + droppedElementsList[1]) + droppedElementsList[2]) | |
259 | + | if (stateCheck) | |
260 | + | then if (gameTimeCheck) | |
261 | + | then if ((winAmt == 0)) | |
262 | + | then WriteSet([DataEntry(gameId, (((stateLose + stringForNewData) + toString(winAmt)) + droppedElements)), DataEntry(("Reserved_" + assetId), setReservedBalance)]) | |
263 | + | else ScriptResult(WriteSet([DataEntry(gameId, (((stateWin + stringForNewData) + toString(winAmt)) + droppedElements)), DataEntry(("Reserved_" + assetId), setReservedBalance)]), TransferSet([ScriptTransfer(playerAddress, winAmt, fromBase58String(assetId))])) | |
264 | + | else ScriptResult(WriteSet([DataEntry(gameId, (stateTimeout + stringForNewData)), DataEntry(("Reserved_" + assetId), setReservedBalance)]), TransferSet([ScriptTransfer(playerAddress, betAmt, fromBase58String(assetId))])) | |
265 | + | else throw("Game state is incorrect") | |
266 | + | } | |
267 | + | ||
268 | + | ||
269 | + | @Verifier(tx) | |
270 | + | func verify () = match tx { | |
271 | + | case ttx: TransferTransaction => | |
272 | + | let valueReservedBalance = getInteger(this, "Reserved") | |
273 | + | let reservedBalance = match valueReservedBalance { | |
274 | + | case a: Int => | |
275 | + | a | |
276 | + | case _ => | |
277 | + | 0 | |
278 | + | } | |
279 | + | let availableBalance = (wavesBalance(this) - reservedBalance) | |
280 | + | let availibleAmount = (availableBalance >= ttx.amount) | |
281 | + | let signature = sigVerify(ttx.bodyBytes, ttx.proofs[0], ttx.senderPublicKey) | |
282 | + | if (availibleAmount) | |
283 | + | then signature | |
284 | + | else false | |
285 | + | case sstx: SetScriptTransaction => | |
286 | + | sigVerify(sstx.bodyBytes, sstx.proofs[0], sstx.senderPublicKey) | |
287 | + | case istx: InvokeScriptTransaction => | |
288 | + | sigVerify(istx.bodyBytes, istx.proofs[0], istx.senderPublicKey) | |
289 | + | case _ => | |
290 | + | false | |
291 | + | } | |
292 | + |
github/deemru/w8io/169f3d6 37.48 ms ◑