tx · 9RKR2XEnDawRBxpFgxv9TEgsaSvS7sLJ8RBbmF3Qrjta

3N5CSShgGX7yvAy7BSvtB7CDEXfjHLvKYaS:  -0.01500000 Waves

2019.10.16 18:59 [722756] smart account 3N5CSShgGX7yvAy7BSvtB7CDEXfjHLvKYaS > SELF 0.00000000 Waves

{ "type": 13, "id": "9RKR2XEnDawRBxpFgxv9TEgsaSvS7sLJ8RBbmF3Qrjta", "fee": 1500000, "feeAssetId": null, "timestamp": 1571240627205, "version": 1, "sender": "3N5CSShgGX7yvAy7BSvtB7CDEXfjHLvKYaS", "senderPublicKey": "AbR29fB7BvBAs7UGQahXZBcSKWcFUPqox3CQq29zEXYd", "proofs": [ "4yTaEezvomk45R8gp7mTvjsrHSWqXWPcKhedkUJAthd36aqUo4wxtHNLKsCiZ7e9AzAjVt8LEvnA2d6pZFQrWBEo" ], "script": "base64:AAIDAAAAAAAAAAwIARIAEgYKBAgICAgAAAAoAAAAAA1yc2FQdWJsaWNLZXkxCQACWwAAAAECAAAAgE1Gd3dEUVlKS29aSWh2Y05BUUVCQlFBRFN3QXdTQUpCQU9raXV6L0JWNEVqb3hHaFRtTkNidDJUZ2tiU1BIL3c2OWIzRjFyS21ENjFKaVBYdnZGOEwycEk5eE9ZY1c0Rm1vRVpWSGxSUXRBbGFKeWtsMytyc3JFQ0F3RUFBUT09AAAAAA1yc2FQdWJsaWNLZXkyCQACWwAAAAECAAAAgE1Gd3dEUVlKS29aSWh2Y05BUUVCQlFBRFN3QXdTQUpCQUpuWHpiTS9WMnNEVjFVTGJQU09sSGtsZE9UV1JySGk1ZnhJa0JtdWV2ckNsTVBWSDdycWNjd2lyRE5jTWRJZHdYSEk5QWRoajlGV2p3R0l3ZlUvSzZNQ0F3RUFBUT09AAAAAA1yc2FQdWJsaWNLZXkzCQACWwAAAAECAAAAgE1Gd3dEUVlKS29aSWh2Y05BUUVCQlFBRFN3QXdTQUpCQU9SRGV2eTByNGt6THFPeVNsb0I2M0h1djJlNHplSEtIakNzeTV2dEZLbVdaYlhKYThnWll0NCtFa2xGSW8xSzlvcXU1QkFQVmZKM0ZPenMyVTFBK2cwQ0F3RUFBUT09AAAAAAVkcnVtMQkABEwAAAACAgAAAAEyCQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMgkABEwAAAACAgAAAAE1CQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMwkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATMJAARMAAAAAgIAAAABNAkABEwAAAACAgAAAAEzCQAETAAAAAICAAAAATQJAARMAAAAAgIAAAABMgkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATUJAARMAAAAAgIAAAABMgkABEwAAAACAgAAAAE3CQAETAAAAAICAAAAATQJAARMAAAAAgIAAAABNgkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATMFAAAAA25pbAAAAAAFZHJ1bTIJAARMAAAAAgIAAAABNwkABEwAAAACAgAAAAE2CQAETAAAAAICAAAAATMJAARMAAAAAgIAAAABMQkABEwAAAACAgAAAAE0CQAETAAAAAICAAAAATIJAARMAAAAAgIAAAABMQkABEwAAAACAgAAAAEyCQAETAAAAAICAAAAATUJAARMAAAAAgIAAAABMwkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATQJAARMAAAAAgIAAAABMwkABEwAAAACAgAAAAE2CQAETAAAAAICAAAAATUJAARMAAAAAgIAAAABMgkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMgkABEwAAAACAgAAAAE0BQAAAANuaWwAAAAABWRydW0zCQAETAAAAAICAAAAATQJAARMAAAAAgIAAAABMwkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATYJAARMAAAAAgIAAAABNQkABEwAAAACAgAAAAE3CQAETAAAAAICAAAAATQJAARMAAAAAgIAAAABMwkABEwAAAACAgAAAAE2CQAETAAAAAICAAAAATEJAARMAAAAAgIAAAABMgkABEwAAAACAgAAAAE0CQAETAAAAAICAAAAATMJAARMAAAAAgIAAAABMQkABEwAAAACA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AAAACAUAAAADdHR4AAAAD3NlbmRlclB1YmxpY0tleQMFAAAAD2F2YWlsaWJsZUFtb3VudAUAAAAJc2lnbmF0dXJlBwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAABHNzdHgFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAABHNzdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAARzc3R4AAAABnByb29mcwAAAAAAAAAAAAgFAAAABHNzdHgAAAAPc2VuZGVyUHVibGljS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdJbnZva2VTY3JpcHRUcmFuc2FjdGlvbgQAAAAEaXN0eAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAAEaXN0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAABGlzdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAAEaXN0eAAAAA9zZW5kZXJQdWJsaWNLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAADZHR4BQAAAAckbWF0Y2gwBgcoypDr", "chainId": 84, "height": 722756, "spentComplexity": 0 } View: original | compacted Prev: Do8JnnQE6iPdkA7dRnQxD9ZRStESGCB6yMtbrtWZAejS Next: 9EJTGPkikcGqc3NVUzqBTu5JGfBoxzL214uvqnX7r8BV Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let rsaPublicKey1 = base58'rbanryFCC6yJnCRCQgVWyYXvqkSBz4k8KhQ3RykxwarVH511hL9sT9BmXVhT46Chhifa5SxbS3bXaCfb3RLn3N6NQ9mq87bysFKHJVrJCVbT2V3utVa78CdZY6iSh37n'
4+let rsaPublicKey1 = fromBase64String("MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAOkiuz/BV4EjoxGhTmNCbt2TgkbSPH/w69b3F1rKmD61JiPXvvF8L2pI9xOYcW4FmoEZVHlRQtAlaJykl3+rsrECAwEAAQ==")
55
6-let rsaPublicKey2 = base58'rbanryFCC6yJnCRCQgVWyYXvqkSBz4k8KgcFkfv9b79KSZ15ZStM1TtV4AfYytGwAbY2shvFXFE318ZyJrAu8yc4BwATpiMGpj1KKc7rs6im2E4CZSdASf14VtddAYMv'
6+let rsaPublicKey2 = fromBase64String("MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJnXzbM/V2sDV1ULbPSOlHkldOTWRrHi5fxIkBmuevrClMPVH7rqccwirDNcMdIdwXHI9Adhj9FWjwGIwfU/K6MCAwEAAQ==")
77
8-let rsaPublicKey3 = base58'rbanryFCC6yJnCRCQgVWyYXvqkSBz4k8KhMEFmsx7sdRq1ZZfqhEbx87nhBZK8CYzzHfHDduuvwViTn7fPpRB8pJx3S3HRXNeFYut1B9wJVSPoGjRuzKw8uCfZo8JXNp'
8+let rsaPublicKey3 = fromBase64String("MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAORDevy0r4kzLqOySloB63Huv2e4zeHKHjCsy5vtFKmWZbXJa8gZYt4+EklFIo1K9oqu5BAPVfJ3FOzs2U1A+g0CAwEAAQ==")
99
1010 let drum1 = ["2", "1", "2", "5", "1", "3", "1", "3", "4", "3", "4", "2", "1", "5", "2", "7", "4", "6", "1", "3"]
1111
254254 let drum3Int = rsaToInt(gameId, rsaSign3, rsaPublicKey3)
255255 let twoInARow = (drum1[drum1Int] + drum2[drum2Int])
256256 let threeInARow = (twoInARow + drum3[drum3Int])
257- let droppedElementsString = {
258- let drum1ToString = drumIntToString(drum1Int)
259- let drum2ToString = drumIntToString(drum2Int)
260- let drum3ToString = drumIntToString(drum3Int)
261- ((drum1ToString + drum2ToString) + drum3ToString)
262- }
263- let winAmt = {
264- let multiplier = defineMultiplier(threeInARow, twoInARow)
265- ((betAmt * multiplier) / 10)
266- }
257+ let droppedElementsString = ((drumIntToString(drum1Int) + drumIntToString(drum2Int)) + drumIntToString(drum3Int))
258+ let winAmt = ((betAmt * defineMultiplier(threeInARow, twoInARow)) / 10)
267259 let winPmtAmt = {
268260 let balance = assetBalance(this, assetId58)
269261 if ((winAmt > balance))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let rsaPublicKey1 = base58'rbanryFCC6yJnCRCQgVWyYXvqkSBz4k8KhQ3RykxwarVH511hL9sT9BmXVhT46Chhifa5SxbS3bXaCfb3RLn3N6NQ9mq87bysFKHJVrJCVbT2V3utVa78CdZY6iSh37n'
4+let rsaPublicKey1 = fromBase64String("MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAOkiuz/BV4EjoxGhTmNCbt2TgkbSPH/w69b3F1rKmD61JiPXvvF8L2pI9xOYcW4FmoEZVHlRQtAlaJykl3+rsrECAwEAAQ==")
55
6-let rsaPublicKey2 = base58'rbanryFCC6yJnCRCQgVWyYXvqkSBz4k8KgcFkfv9b79KSZ15ZStM1TtV4AfYytGwAbY2shvFXFE318ZyJrAu8yc4BwATpiMGpj1KKc7rs6im2E4CZSdASf14VtddAYMv'
6+let rsaPublicKey2 = fromBase64String("MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJnXzbM/V2sDV1ULbPSOlHkldOTWRrHi5fxIkBmuevrClMPVH7rqccwirDNcMdIdwXHI9Adhj9FWjwGIwfU/K6MCAwEAAQ==")
77
8-let rsaPublicKey3 = base58'rbanryFCC6yJnCRCQgVWyYXvqkSBz4k8KhMEFmsx7sdRq1ZZfqhEbx87nhBZK8CYzzHfHDduuvwViTn7fPpRB8pJx3S3HRXNeFYut1B9wJVSPoGjRuzKw8uCfZo8JXNp'
8+let rsaPublicKey3 = fromBase64String("MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAORDevy0r4kzLqOySloB63Huv2e4zeHKHjCsy5vtFKmWZbXJa8gZYt4+EklFIo1K9oqu5BAPVfJ3FOzs2U1A+g0CAwEAAQ==")
99
1010 let drum1 = ["2", "1", "2", "5", "1", "3", "1", "3", "4", "3", "4", "2", "1", "5", "2", "7", "4", "6", "1", "3"]
1111
1212 let drum2 = ["7", "6", "3", "1", "4", "2", "1", "2", "5", "3", "1", "4", "3", "6", "5", "2", "1", "1", "2", "4"]
1313
1414 let drum3 = ["4", "3", "1", "6", "5", "7", "4", "3", "6", "1", "2", "4", "3", "1", "2", "5", "2", "1", "5", "1"]
1515
1616 let gameTimeFrame = (1440 * 2)
1717
1818 let commission = 500000
1919
2020 let stateAcc = "Accepted"
2121
2222 let stateWin = "Win"
2323
2424 let stateTimeout = "WinByTimeout"
2525
2626 let stateLose = "Lose"
2727
2828 let wavesId = unit
2929
3030 let btcId = base58'Gt4HLkHunts7bWbtYP5UCsAPW7TUA4gmQEnjgjbZ2NqB'
3131
3232 let ethId = base58'6A79GDQj8bdHqUaoJQ3qE1TCPnBc3wFirNCSsAY5RKry'
3333
3434 let ltcId = base58'7oRhs4zoufHM4KiBDuJwRXUWb9JQaFt98N8ubpmytMmw'
3535
3636 let vstId = base58'5UyDjBMx1Q8UWhJj1r7JuA6h4aCkKrHE1J19HvMXRpRd'
3737
3838 let wctId = base58'Ae5W927iuKSLLT6Sdt3bqWze6ZUbYHDWzPY6dLKQusZv'
3939
4040 let divider = 1000
4141
4242 let WavesMinAmt = (100000000 / divider)
4343
4444 let WavesMaxAmt = (WavesMinAmt * 10)
4545
4646 let BtcMinAmt = (10000 / divider)
4747
4848 let BtcMaxAmt = (BtcMinAmt * 10)
4949
5050 let EthMinAmt = (1000000 / divider)
5151
5252 let EthMaxAmt = (EthMinAmt * 10)
5353
5454 let LtcMinAmt = (2000000 / divider)
5555
5656 let LtcMaxAmt = (LtcMinAmt * 10)
5757
5858 let WctMinAmt = (500000000 / divider)
5959
6060 let WctMaxAmt = (WctMinAmt * 10)
6161
6262 let VstMinAmt = (500000000 / divider)
6363
6464 let VstMaxAmt = (VstMinAmt * 10)
6565
6666 func pmtAmtCheck (pmtAssetId,betAmount) = if ((pmtAssetId == "WAVES"))
6767 then if (if ((betAmount >= WavesMinAmt))
6868 then (WavesMaxAmt >= betAmount)
6969 else false)
7070 then true
7171 else throw("Bet amount is not in range")
7272 else if ((pmtAssetId == "BTC"))
7373 then if (if ((betAmount >= BtcMinAmt))
7474 then (BtcMaxAmt >= betAmount)
7575 else false)
7676 then true
7777 else throw("Bet amount is not in range")
7878 else if ((pmtAssetId == "ETH"))
7979 then if (if ((betAmount >= EthMinAmt))
8080 then (EthMaxAmt >= betAmount)
8181 else false)
8282 then true
8383 else throw("Bet amount is not in range")
8484 else if ((pmtAssetId == "LTC"))
8585 then if (if ((betAmount >= LtcMinAmt))
8686 then (LtcMaxAmt >= betAmount)
8787 else false)
8888 then true
8989 else throw("Bet amount is not in range")
9090 else if ((pmtAssetId == "WCT"))
9191 then if (if ((betAmount >= WctMinAmt))
9292 then (WctMaxAmt >= betAmount)
9393 else false)
9494 then true
9595 else throw("Bet amount is not in range")
9696 else if (if ((betAmount >= VstMinAmt))
9797 then (VstMaxAmt >= betAmount)
9898 else false)
9999 then true
100100 else throw("Bet amount is not in range")
101101
102102
103103 func getDataList (gameId) = {
104104 let getDataString = getString(this, (gameId + "_GameId"))
105105 let a = match getDataString {
106106 case a: String =>
107107 a
108108 case _ =>
109109 throw("GameId was not found")
110110 }
111111 split(a, "_")
112112 }
113113
114114
115115 func rsaToInt (gameId,rsaSign,rsaPublicKey) = {
116116 let rsaSign64 = base58'2W2vcyVTV'
117117 let rsaCheck = rsaVerify(SHA256, toBytes(gameId), rsaSign64, rsaPublicKey)
118118 if (rsaCheck)
119119 then (toInt(sha256(rsaSign64)) % 19)
120120 else throw("Rsa Signature is invalid")
121121 }
122122
123123
124124 func increaseReservedBalance (pmtAmt,pmtAssetName,assetId58) = {
125125 let currentReservedBalance = {
126126 let valueReservedBalance = getInteger(this, (pmtAssetName + "_Reserved"))
127127 match valueReservedBalance {
128128 case a: Int =>
129129 a
130130 case _ =>
131131 0
132132 }
133133 }
134134 let newReservedBalance = (currentReservedBalance + pmtAmt)
135135 if ((assetBalance(this, assetId58) >= newReservedBalance))
136136 then newReservedBalance
137137 else throw("Bet was rejected. Insufficient funds on game account.")
138138 }
139139
140140
141141 func decreaseReservedBalance (betAmt,assetId) = {
142142 let valueReservedBalance = getInteger(this, (assetId + "_Reserved"))
143143 let extractReservedBalance = match valueReservedBalance {
144144 case a: Int =>
145145 a
146146 case _ =>
147147 0
148148 }
149149 let decreaseReservedBalance = (extractReservedBalance - betAmt)
150150 if ((decreaseReservedBalance >= 0))
151151 then decreaseReservedBalance
152152 else throw("Reserved balance couldn't be less than 0")
153153 }
154154
155155
156156 func drumIntToString (drumInt) = if ((10 > drumInt))
157157 then ("0" + toString(drumInt))
158158 else toString(drumInt)
159159
160160
161161 func defineMultiplier (threeInARow,twoInARow) = if ((threeInARow == "777"))
162162 then 5370
163163 else if ((threeInARow == "666"))
164164 then 1300
165165 else if ((threeInARow == "555"))
166166 then 450
167167 else if ((threeInARow == "444"))
168168 then 200
169169 else if ((threeInARow == "333"))
170170 then 150
171171 else if ((threeInARow == "222"))
172172 then 110
173173 else if ((threeInARow == "111"))
174174 then 40
175175 else if ((twoInARow == "77"))
176176 then 270
177177 else if ((twoInARow == "66"))
178178 then 130
179179 else if ((twoInARow == "55"))
180180 then 65
181181 else if ((twoInARow == "44"))
182182 then 30
183183 else if ((twoInARow == "33"))
184184 then 20
185185 else if ((twoInARow == "22"))
186186 then 15
187187 else if ((twoInARow == "11"))
188188 then 10
189189 else 0
190190
191191
192192 func AssetNameToBase58 (assetName) = if ((assetName == "WAVES"))
193193 then wavesId
194194 else if ((assetName == "BTC"))
195195 then btcId
196196 else if ((assetName == "ETH"))
197197 then ethId
198198 else if ((assetName == "LTC"))
199199 then ltcId
200200 else if ((assetName == "VST"))
201201 then vstId
202202 else if ((assetName == "WCT"))
203203 then wctId
204204 else throw("Asset name is incorrect")
205205
206206
207207 func assetBase58ToName (assetId) = if (!(isDefined(assetId)))
208208 then "WAVES"
209209 else if ((assetId == btcId))
210210 then "BTC"
211211 else if ((assetId == ethId))
212212 then "ETH"
213213 else if ((assetId == ltcId))
214214 then "LTC"
215215 else if ((assetId == wctId))
216216 then "WCT"
217217 else if ((assetId == vstId))
218218 then "VST"
219219 else throw("AssetId is incorrect")
220220
221221
222222 @Callable(i)
223223 func makeBet () = {
224224 let pmt = extract(i.payment)
225225 let betAmount = (pmt.amount - commission)
226226 let assetId = pmt.assetId
227227 let gameId = toBase58String(i.transactionId)
228228 let playerAddress = extract(i.caller)
229229 let pmtAssetName = assetBase58ToName(assetId)
230230 let setReservedBalance = increaseReservedBalance(betAmount, pmtAssetName, pmt.assetId)
231231 let pmtAmtCorrect = pmtAmtCheck(pmtAssetName, betAmount)
232232 if (pmtAmtCorrect)
233233 then {
234234 let dataString = ((((((((stateAcc + "_") + toString(playerAddress)) + "_") + toString(betAmount)) + "_") + pmtAssetName) + "_") + toString(height))
235235 WriteSet([DataEntry((gameId + "_GameId"), dataString), DataEntry((pmtAssetName + "_Reserved"), setReservedBalance)])
236236 }
237237 else throw("assetId is incorrect")
238238 }
239239
240240
241241
242242 @Callable(i)
243243 func playGame (gameId,rsaSign1,rsaSign2,rsaSign3) = {
244244 let dataList = getDataList(gameId)
245245 let gameState = dataList[0]
246246 let playerAddress = addressFromStringValue(dataList[1])
247247 let betAmt = parseIntValue(dataList[2])
248248 let assetName = dataList[3]
249249 let gameStart = parseIntValue(dataList[4])
250250 let assetId58 = AssetNameToBase58(assetName)
251251 let setReservedBalance = decreaseReservedBalance(betAmt, assetName)
252252 let drum1Int = rsaToInt(gameId, rsaSign1, rsaPublicKey1)
253253 let drum2Int = rsaToInt(gameId, rsaSign2, rsaPublicKey2)
254254 let drum3Int = rsaToInt(gameId, rsaSign3, rsaPublicKey3)
255255 let twoInARow = (drum1[drum1Int] + drum2[drum2Int])
256256 let threeInARow = (twoInARow + drum3[drum3Int])
257- let droppedElementsString = {
258- let drum1ToString = drumIntToString(drum1Int)
259- let drum2ToString = drumIntToString(drum2Int)
260- let drum3ToString = drumIntToString(drum3Int)
261- ((drum1ToString + drum2ToString) + drum3ToString)
262- }
263- let winAmt = {
264- let multiplier = defineMultiplier(threeInARow, twoInARow)
265- ((betAmt * multiplier) / 10)
266- }
257+ let droppedElementsString = ((drumIntToString(drum1Int) + drumIntToString(drum2Int)) + drumIntToString(drum3Int))
258+ let winAmt = ((betAmt * defineMultiplier(threeInARow, twoInARow)) / 10)
267259 let winPmtAmt = {
268260 let balance = assetBalance(this, assetId58)
269261 if ((winAmt > balance))
270262 then (betAmt * 2)
271263 else winAmt
272264 }
273265 let gameTimeCheck = (gameTimeFrame > (height - gameStart))
274266 let stateCorrect = (gameState == stateAcc)
275267 if (stateCorrect)
276268 then if (gameTimeCheck)
277269 then if ((winAmt == 0))
278270 then WriteSet([DataEntry((gameId + "_GameId"), ((((((((((((((stateLose + "_") + dataList[1]) + "_") + dataList[2]) + "_") + dataList[3]) + "_") + toString(height)) + "_") + toString(winAmt)) + "_") + threeInARow) + "_") + droppedElementsString)), DataEntry((assetName + "_Reserved"), setReservedBalance)])
279271 else ScriptResult(WriteSet([DataEntry((gameId + "_GameId"), ((((((((((((((stateWin + "_") + dataList[1]) + "_") + dataList[2]) + "_") + dataList[3]) + "_") + toString(height)) + "_") + toString(winAmt)) + "_") + threeInARow) + "_") + droppedElementsString)), DataEntry((assetName + "_Reserved"), setReservedBalance)]), TransferSet([ScriptTransfer(playerAddress, winPmtAmt, assetId58)]))
280272 else ScriptResult(WriteSet([DataEntry((gameId + "_GameId"), ((((((((((((((stateTimeout + "_") + dataList[1]) + "_") + dataList[2]) + "_") + dataList[3]) + "_") + toString(height)) + "_") + toString((betAmt * 2))) + "_") + "000") + "_") + "000000")), DataEntry((assetName + "_Reserved"), setReservedBalance)]), TransferSet([ScriptTransfer(playerAddress, betAmt, assetId58)]))
281273 else throw("Game state is incorrect")
282274 }
283275
284276
285277 @Verifier(tx)
286278 func verify () = match tx {
287279 case ttx: TransferTransaction =>
288280 let assetName = assetBase58ToName(ttx.assetId)
289281 let valueReservedBalance = getInteger(this, (assetName + "_Reserved"))
290282 let reservedBalance = match valueReservedBalance {
291283 case a: Int =>
292284 a
293285 case _ =>
294286 0
295287 }
296288 let availableBalance = (assetBalance(this, ttx.assetId) - reservedBalance)
297289 let availibleAmount = (availableBalance >= ttx.amount)
298290 let signature = sigVerify(ttx.bodyBytes, ttx.proofs[0], ttx.senderPublicKey)
299291 if (availibleAmount)
300292 then signature
301293 else false
302294 case sstx: SetScriptTransaction =>
303295 sigVerify(sstx.bodyBytes, sstx.proofs[0], sstx.senderPublicKey)
304296 case istx: InvokeScriptTransaction =>
305297 sigVerify(istx.bodyBytes, istx.proofs[0], istx.senderPublicKey)
306298 case dtx: DataTransaction =>
307299 true
308300 case _ =>
309301 false
310302 }
311303

github/deemru/w8io/026f985 
56.30 ms