tx · w433iYaXYXGn8DR8kQArforf8QT2hCRwrv4Ejndkoyz

3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b:  -0.01400000 Waves

2021.02.09 10:02 [1390323] smart account 3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b > SELF 0.00000000 Waves

{ "type": 13, "id": "w433iYaXYXGn8DR8kQArforf8QT2hCRwrv4Ejndkoyz", "fee": 1400000, "feeAssetId": null, "timestamp": 1612854154383, "version": 2, "chainId": 84, "sender": "3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b", "senderPublicKey": "3BKFQLeo5ExZ5Y1pt9Ftzsno7aRwzD96zoYVHP3tcLgV", "proofs": [ "3fYrKiGFy7ESkWpmLXV97aWXqpb1iEMrrHPGSyeXPevZzKtL3EY6HkAwdFLwDv4p6bse2ZA6yLeLpAA8CwbxVKkn" ], "script": "base64:AAIDAAAAAAAAAA0IARIHCgUBAQEBCBIAAAAAEAAAAAANbG90dGVyeWFtb3VudAIAAAAHX2Ftb3VudAAAAAASbG90dGVyeXByb2JhYmlsaXR5AgAAAAxfcHJvYmFiaWxpdHkAAAAAGWxvdHRlcnlwcm9iYWJpbGl0eWRlY2ltYWwCAAAAFF9wcm9iYWJpbGl0eV9kZWNpbWFsAAAAAAxsb3R0ZXJ5UHJpY2UCAAAABl9wcmljZQAAAAANbG90dGVyeVByaWNlcwIAAAAPX2xvdHRlcnlfcHJpY2VzAAAAAA5sb3R0ZXJ5QXNzZXRJZAIAAAARX2xvdHRlcnlfYXNzZXRfaWQAAAAADWNvdW50T2ZQcmljZXMCAAAADV9jb3VudF9wcmljZXMAAAAAFGxhc3RIYXNoUmFuZG9tTnVtYmVyAgAAABVsYXN0X3NwaW5fcmFuZG9tX2hhc2gAAAAAE2xhc3RUb2tlblJhbmRvbUhhc2gCAAAAFmxhc3RfdG9rZW5fcmFuZG9tX2hhc2gAAAAACmRBcHBBZGRyZXMCAAAALDNCS0ZRTGVvNUV4WjVZMXB0OUZ0enNubz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AAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24GCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tled+OqrI=", "height": 1390323, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9NzdWXa5i7Q7PU7xYavSLRyLb91G1QUBJbWxdRXY8Ykb Next: F9c3dFdejPYaaLdfJ9NEULhkhBJ9ApPEF3gGuTC2iEAa Diff:
OldNewDifferences
104104 let lotteryAssetTN = if ((assetId == ""))
105105 then true
106106 else false
107+ let totalRequiredAmount = (amount * poolprice)
107108 if ((paymentIsDefined == true))
108- then throw(toString(lotteryAssetTN))
109+ then {
110+ let payment = extract(i.payment)
111+ let paymentAssetId = match payment.assetId {
112+ case a: ByteVector =>
113+ toBase64String(a)
114+ case _: Unit =>
115+ ""
116+ case _ =>
117+ throw("Match error")
118+ }
119+ let paymentAmount = payment.amount
120+ if ((paymentAssetId != assetId))
121+ then throw("Asset Id not matching with Payment Asset Id")
122+ else if ((totalRequiredAmount > paymentAmount))
123+ then throw("Not enough Asset Amount")
124+ else {
125+ let tempValue = match getString(this, lotteryPrices) {
126+ case a: String =>
127+ a
128+ case _: Unit =>
129+ ""
130+ case _ =>
131+ throw("Match error")
132+ }
133+ let containKey = indexOf(tempValue, token)
134+ let storedTokensValues = match containKey {
135+ case _: Unit =>
136+ ((tempValue + token) + ",")
137+ case x: Int =>
138+ throw("Token is duplicated")
139+ case _ =>
140+ throw("Match error")
141+ }
142+ let countTokens = match getInteger(this, countOfPrices) {
143+ case a: Int =>
144+ a
145+ case _: Unit =>
146+ 0
147+ case _ =>
148+ throw("Match error")
149+ }
150+ let updateLotteryPool = WriteSet([DataEntry((token + lotteryamount), amount), DataEntry((token + lotteryprobability), probability), DataEntry((token + lotteryPrice), poolprice), DataEntry(lotteryPrices, storedTokensValues), DataEntry(countOfPrices, (countTokens + 1)), DataEntry((token + lotteryprobabilitydecimal), probDecimal), DataEntry((token + lotteryAssetId), assetId), DataEntry(lastTokenRandomHash, token)])
151+ ScriptResult(updateLotteryPool, TransferSet(nil))
152+ }
153+ }
109154 else {
110155 let tnBalance = if (lotteryAssetTN)
111156 then wavesBalance(this)
112157 else assetBalance(this, fromBase64String(assetId))
113- let totalRequiredAmount = (amount * poolprice)
114158 if ((totalRequiredAmount > tnBalance))
115159 then throw("Not enough Asset Amount")
116160 else {
155199 let priceList = getPriceArray()
156200 let randNumber = toInt(randhash)
157201 let winningToken = {
158- let $list66196656 = priceList
159- let $size66196656 = size($list66196656)
160- let $acc066196656 = nil
161- if (($size66196656 == 0))
162- then $acc066196656
202+ let $list83548391 = priceList
203+ let $size83548391 = size($list83548391)
204+ let $acc083548391 = nil
205+ if (($size83548391 == 0))
206+ then $acc083548391
163207 else {
164- let $acc166196656 = procedLottery($acc066196656, $list66196656[0])
165- if (($size66196656 == 1))
166- then $acc166196656
208+ let $acc183548391 = procedLottery($acc083548391, $list83548391[0])
209+ if (($size83548391 == 1))
210+ then $acc183548391
167211 else {
168- let $acc266196656 = procedLottery($acc166196656, $list66196656[1])
169- if (($size66196656 == 2))
170- then $acc266196656
212+ let $acc283548391 = procedLottery($acc183548391, $list83548391[1])
213+ if (($size83548391 == 2))
214+ then $acc283548391
171215 else {
172- let $acc366196656 = procedLottery($acc266196656, $list66196656[2])
173- if (($size66196656 == 3))
174- then $acc366196656
216+ let $acc383548391 = procedLottery($acc283548391, $list83548391[2])
217+ if (($size83548391 == 3))
218+ then $acc383548391
175219 else {
176- let $acc466196656 = procedLottery($acc366196656, $list66196656[3])
177- if (($size66196656 == 4))
178- then $acc466196656
220+ let $acc483548391 = procedLottery($acc383548391, $list83548391[3])
221+ if (($size83548391 == 4))
222+ then $acc483548391
179223 else {
180- let $acc566196656 = procedLottery($acc466196656, $list66196656[4])
181- if (($size66196656 == 5))
182- then $acc566196656
224+ let $acc583548391 = procedLottery($acc483548391, $list83548391[4])
225+ if (($size83548391 == 5))
226+ then $acc583548391
183227 else {
184- let $acc666196656 = procedLottery($acc566196656, $list66196656[5])
228+ let $acc683548391 = procedLottery($acc583548391, $list83548391[5])
185229 throw("List size exceed 5")
186230 }
187231 }
208252 if ((actualAmount == 0))
209253 then {
210254 let actualListPrices = {
211- let $list74747524 = priceList
212- let $size74747524 = size($list74747524)
213- let $acc074747524 = token
214- if (($size74747524 == 0))
215- then $acc074747524
255+ let $list92099259 = priceList
256+ let $size92099259 = size($list92099259)
257+ let $acc092099259 = token
258+ if (($size92099259 == 0))
259+ then $acc092099259
216260 else {
217- let $acc174747524 = generateNewListOfPrices($acc074747524, $list74747524[0])
218- if (($size74747524 == 1))
219- then $acc174747524
261+ let $acc192099259 = generateNewListOfPrices($acc092099259, $list92099259[0])
262+ if (($size92099259 == 1))
263+ then $acc192099259
220264 else {
221- let $acc274747524 = generateNewListOfPrices($acc174747524, $list74747524[1])
222- if (($size74747524 == 2))
223- then $acc274747524
265+ let $acc292099259 = generateNewListOfPrices($acc192099259, $list92099259[1])
266+ if (($size92099259 == 2))
267+ then $acc292099259
224268 else {
225- let $acc374747524 = generateNewListOfPrices($acc274747524, $list74747524[2])
226- if (($size74747524 == 3))
227- then $acc374747524
269+ let $acc392099259 = generateNewListOfPrices($acc292099259, $list92099259[2])
270+ if (($size92099259 == 3))
271+ then $acc392099259
228272 else {
229- let $acc474747524 = generateNewListOfPrices($acc374747524, $list74747524[3])
230- if (($size74747524 == 4))
231- then $acc474747524
273+ let $acc492099259 = generateNewListOfPrices($acc392099259, $list92099259[3])
274+ if (($size92099259 == 4))
275+ then $acc492099259
232276 else {
233- let $acc574747524 = generateNewListOfPrices($acc474747524, $list74747524[4])
234- if (($size74747524 == 5))
235- then $acc574747524
277+ let $acc592099259 = generateNewListOfPrices($acc492099259, $list92099259[4])
278+ if (($size92099259 == 5))
279+ then $acc592099259
236280 else {
237- let $acc674747524 = generateNewListOfPrices($acc574747524, $list74747524[5])
281+ let $acc692099259 = generateNewListOfPrices($acc592099259, $list92099259[5])
238282 throw("List size exceed 5")
239283 }
240284 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let lotteryamount = "_amount"
55
66 let lotteryprobability = "_probability"
77
88 let lotteryprobabilitydecimal = "_probability_decimal"
99
1010 let lotteryPrice = "_price"
1111
1212 let lotteryPrices = "_lottery_prices"
1313
1414 let lotteryAssetId = "_lottery_asset_id"
1515
1616 let countOfPrices = "_count_prices"
1717
1818 let lastHashRandomNumber = "last_spin_random_hash"
1919
2020 let lastTokenRandomHash = "last_token_random_hash"
2121
2222 let dAppAddres = "3BKFQLeo5ExZ5Y1pt9Ftzsno7aRwzD96zoYVHP3tcLgV"
2323
2424 func randomizer (inv) = {
2525 let lastPlay = match getBinary(this, lastHashRandomNumber) {
2626 case s: ByteVector =>
2727 s
2828 case _: Unit =>
2929 base58'2ee4oFDYriWJ9EMeR'
3030 case _ =>
3131 throw("Match error")
3232 }
3333 let rand = (((((lastPlay + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
3434 sha256(rand)
3535 }
3636
3737
3838 func generatorRandomHash (inv) = {
3939 let lastHashForToken = match getBinary(this, lastTokenRandomHash) {
4040 case s: ByteVector =>
4141 s
4242 case _: Unit =>
4343 base58'4dD7osCQzvuXJdTiGfKvTwnKT'
4444 case _ =>
4545 throw("Match error")
4646 }
4747 let rand = (((((lastHashForToken + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
4848 sha256(rand)
4949 }
5050
5151
5252 func getSizePriceArray () = match getInteger(this, countOfPrices) {
5353 case a: Int =>
5454 a
5555 case _: Unit =>
5656 0
5757 case _ =>
5858 throw("Match error")
5959 }
6060
6161
6262 func getPriceArray () = {
6363 let tempPrices = getStringValue(this, lotteryPrices)
6464 let trimPrices = take(tempPrices, (size(tempPrices) - 1))
6565 let newArray = split(trimPrices, ",")
6666 newArray
6767 }
6868
6969
7070 func generateNewListOfPrices (token,val) = {
7171 let indexOfComma = indexOf(token, ",")
7272 if ((indexOfComma == unit))
7373 then (val + ",")
7474 else ((token + val) + ",")
7575 }
7676
7777
7878 func procedLottery (win,token) = {
7979 let tokenProbability = getIntegerValue(this, (token + lotteryprobability))
8080 let tokenProbabilityDecimal = getIntegerValue(this, (token + lotteryprobabilitydecimal))
8181 let probabilityValue = (tokenProbabilityDecimal * 1000)
8282 let hash = (tokenProbabilityDecimal % probabilityValue)
8383 let sizeOfWin = size(win)
8484 if ((sizeOfWin == 1))
8585 then {
8686 let randomNumber = win[0]
8787 if ((probabilityValue > hash))
8888 then {
8989 let newList = token :: win
9090 newList
9191 }
9292 else win
9393 }
9494 else win
9595 }
9696
9797
9898 @Callable(i)
9999 func updateprobability (probability,amount,poolprice,probDecimal,assetId) = {
100100 let token = toBase64String(generatorRandomHash(i))
101101 let paymentIsDefined = if (!(isDefined(i.payment)))
102102 then false
103103 else true
104104 let lotteryAssetTN = if ((assetId == ""))
105105 then true
106106 else false
107+ let totalRequiredAmount = (amount * poolprice)
107108 if ((paymentIsDefined == true))
108- then throw(toString(lotteryAssetTN))
109+ then {
110+ let payment = extract(i.payment)
111+ let paymentAssetId = match payment.assetId {
112+ case a: ByteVector =>
113+ toBase64String(a)
114+ case _: Unit =>
115+ ""
116+ case _ =>
117+ throw("Match error")
118+ }
119+ let paymentAmount = payment.amount
120+ if ((paymentAssetId != assetId))
121+ then throw("Asset Id not matching with Payment Asset Id")
122+ else if ((totalRequiredAmount > paymentAmount))
123+ then throw("Not enough Asset Amount")
124+ else {
125+ let tempValue = match getString(this, lotteryPrices) {
126+ case a: String =>
127+ a
128+ case _: Unit =>
129+ ""
130+ case _ =>
131+ throw("Match error")
132+ }
133+ let containKey = indexOf(tempValue, token)
134+ let storedTokensValues = match containKey {
135+ case _: Unit =>
136+ ((tempValue + token) + ",")
137+ case x: Int =>
138+ throw("Token is duplicated")
139+ case _ =>
140+ throw("Match error")
141+ }
142+ let countTokens = match getInteger(this, countOfPrices) {
143+ case a: Int =>
144+ a
145+ case _: Unit =>
146+ 0
147+ case _ =>
148+ throw("Match error")
149+ }
150+ let updateLotteryPool = WriteSet([DataEntry((token + lotteryamount), amount), DataEntry((token + lotteryprobability), probability), DataEntry((token + lotteryPrice), poolprice), DataEntry(lotteryPrices, storedTokensValues), DataEntry(countOfPrices, (countTokens + 1)), DataEntry((token + lotteryprobabilitydecimal), probDecimal), DataEntry((token + lotteryAssetId), assetId), DataEntry(lastTokenRandomHash, token)])
151+ ScriptResult(updateLotteryPool, TransferSet(nil))
152+ }
153+ }
109154 else {
110155 let tnBalance = if (lotteryAssetTN)
111156 then wavesBalance(this)
112157 else assetBalance(this, fromBase64String(assetId))
113- let totalRequiredAmount = (amount * poolprice)
114158 if ((totalRequiredAmount > tnBalance))
115159 then throw("Not enough Asset Amount")
116160 else {
117161 let tempValue = match getString(this, lotteryPrices) {
118162 case a: String =>
119163 a
120164 case _: Unit =>
121165 ""
122166 case _ =>
123167 throw("Match error")
124168 }
125169 let containKey = indexOf(tempValue, token)
126170 let storedTokensValues = match containKey {
127171 case _: Unit =>
128172 ((tempValue + token) + ",")
129173 case x: Int =>
130174 throw("Token is duplicated")
131175 case _ =>
132176 throw("Match error")
133177 }
134178 let countTokens = match getInteger(this, countOfPrices) {
135179 case a: Int =>
136180 a
137181 case _: Unit =>
138182 0
139183 case _ =>
140184 throw("Match error")
141185 }
142186 let updateLotteryPool = WriteSet([DataEntry((token + lotteryamount), amount), DataEntry((token + lotteryprobability), probability), DataEntry((token + lotteryPrice), poolprice), DataEntry(lotteryPrices, storedTokensValues), DataEntry(countOfPrices, (countTokens + 1)), DataEntry((token + lotteryprobabilitydecimal), probDecimal), DataEntry((token + lotteryAssetId), assetId), DataEntry(lastTokenRandomHash, token)])
143187 ScriptResult(updateLotteryPool, TransferSet(nil))
144188 }
145189 }
146190 }
147191
148192
149193
150194 @Callable(i)
151195 func startlotto () = {
152196 let currentKey = toBase58String(i.caller.bytes)
153197 let randhash = randomizer(i)
154198 let sizeTempPrice = getSizePriceArray()
155199 let priceList = getPriceArray()
156200 let randNumber = toInt(randhash)
157201 let winningToken = {
158- let $list66196656 = priceList
159- let $size66196656 = size($list66196656)
160- let $acc066196656 = nil
161- if (($size66196656 == 0))
162- then $acc066196656
202+ let $list83548391 = priceList
203+ let $size83548391 = size($list83548391)
204+ let $acc083548391 = nil
205+ if (($size83548391 == 0))
206+ then $acc083548391
163207 else {
164- let $acc166196656 = procedLottery($acc066196656, $list66196656[0])
165- if (($size66196656 == 1))
166- then $acc166196656
208+ let $acc183548391 = procedLottery($acc083548391, $list83548391[0])
209+ if (($size83548391 == 1))
210+ then $acc183548391
167211 else {
168- let $acc266196656 = procedLottery($acc166196656, $list66196656[1])
169- if (($size66196656 == 2))
170- then $acc266196656
212+ let $acc283548391 = procedLottery($acc183548391, $list83548391[1])
213+ if (($size83548391 == 2))
214+ then $acc283548391
171215 else {
172- let $acc366196656 = procedLottery($acc266196656, $list66196656[2])
173- if (($size66196656 == 3))
174- then $acc366196656
216+ let $acc383548391 = procedLottery($acc283548391, $list83548391[2])
217+ if (($size83548391 == 3))
218+ then $acc383548391
175219 else {
176- let $acc466196656 = procedLottery($acc366196656, $list66196656[3])
177- if (($size66196656 == 4))
178- then $acc466196656
220+ let $acc483548391 = procedLottery($acc383548391, $list83548391[3])
221+ if (($size83548391 == 4))
222+ then $acc483548391
179223 else {
180- let $acc566196656 = procedLottery($acc466196656, $list66196656[4])
181- if (($size66196656 == 5))
182- then $acc566196656
224+ let $acc583548391 = procedLottery($acc483548391, $list83548391[4])
225+ if (($size83548391 == 5))
226+ then $acc583548391
183227 else {
184- let $acc666196656 = procedLottery($acc566196656, $list66196656[5])
228+ let $acc683548391 = procedLottery($acc583548391, $list83548391[5])
185229 throw("List size exceed 5")
186230 }
187231 }
188232 }
189233 }
190234 }
191235 }
192236 }
193237 let sizeOfWinPrices = size(winningToken)
194238 if ((sizeOfWinPrices == 1))
195239 then {
196240 let writeSets = WriteSet(nil)
197241 ScriptResult(writeSets, TransferSet(nil))
198242 }
199243 else {
200244 let token = winningToken[1]
201245 let currentAmount = getIntegerValue(this, (token + lotteryamount))
202246 if ((currentAmount == 0))
203247 then throw("Amount exceeded")
204248 else {
205249 let actualAmount = (currentAmount - 1)
206250 let tokenPrice = getIntegerValue(this, (token + lotteryPrice))
207251 let tokenAssetId = getStringValue(this, (token + lotteryAssetId))
208252 if ((actualAmount == 0))
209253 then {
210254 let actualListPrices = {
211- let $list74747524 = priceList
212- let $size74747524 = size($list74747524)
213- let $acc074747524 = token
214- if (($size74747524 == 0))
215- then $acc074747524
255+ let $list92099259 = priceList
256+ let $size92099259 = size($list92099259)
257+ let $acc092099259 = token
258+ if (($size92099259 == 0))
259+ then $acc092099259
216260 else {
217- let $acc174747524 = generateNewListOfPrices($acc074747524, $list74747524[0])
218- if (($size74747524 == 1))
219- then $acc174747524
261+ let $acc192099259 = generateNewListOfPrices($acc092099259, $list92099259[0])
262+ if (($size92099259 == 1))
263+ then $acc192099259
220264 else {
221- let $acc274747524 = generateNewListOfPrices($acc174747524, $list74747524[1])
222- if (($size74747524 == 2))
223- then $acc274747524
265+ let $acc292099259 = generateNewListOfPrices($acc192099259, $list92099259[1])
266+ if (($size92099259 == 2))
267+ then $acc292099259
224268 else {
225- let $acc374747524 = generateNewListOfPrices($acc274747524, $list74747524[2])
226- if (($size74747524 == 3))
227- then $acc374747524
269+ let $acc392099259 = generateNewListOfPrices($acc292099259, $list92099259[2])
270+ if (($size92099259 == 3))
271+ then $acc392099259
228272 else {
229- let $acc474747524 = generateNewListOfPrices($acc374747524, $list74747524[3])
230- if (($size74747524 == 4))
231- then $acc474747524
273+ let $acc492099259 = generateNewListOfPrices($acc392099259, $list92099259[3])
274+ if (($size92099259 == 4))
275+ then $acc492099259
232276 else {
233- let $acc574747524 = generateNewListOfPrices($acc474747524, $list74747524[4])
234- if (($size74747524 == 5))
235- then $acc574747524
277+ let $acc592099259 = generateNewListOfPrices($acc492099259, $list92099259[4])
278+ if (($size92099259 == 5))
279+ then $acc592099259
236280 else {
237- let $acc674747524 = generateNewListOfPrices($acc574747524, $list74747524[5])
281+ let $acc692099259 = generateNewListOfPrices($acc592099259, $list92099259[5])
238282 throw("List size exceed 5")
239283 }
240284 }
241285 }
242286 }
243287 }
244288 }
245289 }
246290 let writeSets = WriteSet([DataEntry((currentKey + "_winning_token_"), token), DataEntry((currentKey + "_wininning_address_"), currentKey), DataEntry((token + lotteryamount), actualAmount), DataEntry((token + lotteryPrices), actualListPrices), DataEntry(lastHashRandomNumber, randNumber)])
247291 if ((tokenAssetId == ""))
248292 then {
249293 let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, unit)])
250294 ScriptResult(writeSets, winTransfer)
251295 }
252296 else {
253297 let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, unit)])
254298 ScriptResult(writeSets, winTransfer)
255299 }
256300 }
257301 else {
258302 let writeSets = WriteSet([DataEntry((currentKey + "_winning_token_"), token), DataEntry((currentKey + "_wininning_address_"), currentKey), DataEntry((token + lotteryamount), actualAmount), DataEntry(lastHashRandomNumber, randNumber)])
259303 if ((tokenAssetId == ""))
260304 then {
261305 let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, unit)])
262306 ScriptResult(writeSets, winTransfer)
263307 }
264308 else {
265309 let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, unit)])
266310 ScriptResult(writeSets, winTransfer)
267311 }
268312 }
269313 }
270314 }
271315 }
272316
273317
274318 @Verifier(tx)
275319 func verify () = match tx {
276320 case _: DataTransaction =>
277321 true
278322 case _: SetScriptTransaction =>
279323 true
280324 case _ =>
281325 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
282326 }
283327

github/deemru/w8io/026f985 
90.86 ms