tx · 995YqVDxcowe84RpH2nhXsk9c54Y57FK6jcMw5nMQYeN

3MvjTVdccn9BAJcy9uK2uiMj3rWzuRPceNJ:  -0.01200000 Waves

2022.12.20 12:54 [2368454] smart account 3MvjTVdccn9BAJcy9uK2uiMj3rWzuRPceNJ > SELF 0.00000000 Waves

{ "type": 13, "id": "995YqVDxcowe84RpH2nhXsk9c54Y57FK6jcMw5nMQYeN", "fee": 1200000, "feeAssetId": null, "timestamp": 1671530182206, "version": 1, "sender": "3MvjTVdccn9BAJcy9uK2uiMj3rWzuRPceNJ", "senderPublicKey": "Fctyv3ezWUWWuoap6B4qwJYC95K8E8q6JcAYEU5anZcF", "proofs": [ "3dACY6XfHfusEzKbm4Mcbc2z9zo8jLSCo6GokbF7TYqTsTTSsbZP2tbcyVKTDKvZmpBaqCTLyMT32zHz2KyU5pr7" ], "script": "base64:AgQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAABm9yYWNsZQkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTkN6YVlUTkRHdFI4emY5eWZjcWVQRmpDcUZ4OVM1emhzNAQAAAAObWluV2l0aGRyYXdGZWUAAAAAAAAHoSAEAAAAEHJlZ2lzdGVyQmV0VHhGZWUAAAAAAAAHoSAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAp3aXRoZHJhd1R4BQAAAAckbWF0Y2gwBAAAAAR0eElkCQEAAAAHZXh0cmFjdAAAAAEJAAQdAAAAAgUAAAACbWUJAAEsAAAAAgkAAlgAAAABCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAECAAAACV93aXRoZHJhdwQAAAAHJG1hdGNoMQkAA+gAAAABCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEDCQAAAQAAAAIFAAAAByRtY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AABAAAAAAAAAAAFAAAAAAAAAAAHCQAAygAAAAIJAADJAAAAAgUAAAAKdmFsQ29tcGxleAAAAAAAAAAABwAAAAAAAAAABgkAAAIAAAABAgAAACBJbmNvcnJlY3QgdHlwZSBvZiBndWVzcyBwcm92aWRlZAQAAAAFaXNXaW4JAAAAAAAAAgkAAMoAAAACBQAAAAVndWVzcwAAAAAAAAAAAQUAAAAHdmFsUmVhbAQAAAASaXNNb25leVN0aWxsRW5vdWdoCQAAZgAAAAIJAABkAAAAAgkAAGgAAAACCQAAZQAAAAIIBQAAAAlwYXltZW50VHgAAAAGYW1vdW50BQAAABByZWdpc3RlckJldFR4RmVlBQAAAAVrb2VmZgUAAAAObWluV2l0aGRyYXdGZWUFAAAAB25ld0ZlZXMDAwUAAAAFaXNXaW4GCQAAAgAAAAECAAAAEFlvdSBkaWRuJ3QgZ3Vlc3MDBQAAABJpc01vbmV5U3RpbGxFbm91Z2gGCQAAAgAAAAECAAAAHU5vdCBlbm91Z2ggbW9uZXkgZm9yIHdpdGhkcmF3BwcHBwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnNTQ9C", "chainId": 84, "height": 2368454, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6DFKpT4FGdJneoQfYNrkJd9eSBETK9jnmkEczM2VJZBo Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 2 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
33 let me = tx.sender
44 let oracle = extract(addressFromString("3NCzaYTNDGtR8zf9yfcqePFjCqFx9S5zhs4"))
55 let minWithdrawFee = 500000
66 let registerBetTxFee = 500000
77 match tx {
88 case withdrawTx: TransferTransaction =>
99 let txId = extract(getString(me, (toBase58String(tx.proofs[1]) + "_withdraw")))
1010 match transactionById(tx.proofs[1]) {
1111 case paymentTx: TransferTransaction =>
1212 let isPaymentTookPlace = if ((txId == toBase58String(tx.id)))
1313 then sigVerify(tx.bodyBytes, tx.proofs[0], paymentTx.senderPublicKey)
1414 else false
1515 let feesKey = (toBase58String(tx.proofs[1]) + "_withdraw_fees")
1616 let dataTxsFees = extract(getInteger(me, feesKey))
1717 let guessUnit = getBinary(me, toBase58String(tx.proofs[1]))
1818 let correctAmount = if (!(isDefined(guessUnit)))
1919 then ((paymentTx.amount - dataTxsFees) - withdrawTx.fee)
2020 else {
2121 let guess = extract(guessUnit)
2222 let type = take(guess, 1)
2323 let val = drop(guess, 1)
2424 let key = extract(getString(me, (toBase58String(tx.proofs[1]) + "_round")))
2525 let valComplex = extract(getBinary(oracle, key))
2626 let koeff = if ((type == drop(toBytes(0), 7)))
2727 then 36
2828 else if ((type == drop(toBytes(1), 7)))
2929 then 2
3030 else if ((type == drop(toBytes(2), 7)))
3131 then 2
3232 else if ((type == drop(toBytes(3), 7)))
3333 then 2
3434 else if ((type == drop(toBytes(4), 7)))
3535 then 3
3636 else if ((type == drop(toBytes(5), 7)))
3737 then 3
3838 else 0
3939 ((((paymentTx.amount - registerBetTxFee) * koeff) - dataTxsFees) - withdrawTx.fee)
4040 }
4141 if (if (if (isPaymentTookPlace)
4242 then true
4343 else throw("There was no bet"))
4444 then if ((withdrawTx.amount == correctAmount))
4545 then true
4646 else throw(("Amount is incorrect. Correct amount is " + toString(correctAmount)))
4747 else false)
4848 then if (if (!(isDefined(withdrawTx.feeAssetId)))
4949 then !(isDefined(withdrawTx.assetId))
5050 else false)
5151 then true
5252 else throw("Withdraw and fee must be in WAVES")
5353 else false
5454 case _ =>
5555 false
5656 }
5757 case dtx: DataTransaction =>
5858 if ((size(dtx.data) == 3))
5959 then {
6060 let minBet = 50000000
6161 let maxSumBet = 1000000000
6262 let paymentTxIdStr = extract(dtx.data[0].key)
6363 let guessStr = extract(getString(dtx.data, paymentTxIdStr))
6464 let paymentRoundKey = (paymentTxIdStr + "_round")
6565 let paymentRound = extract(getString(dtx.data, paymentRoundKey))
6666 let sumBetsOld = if (isDefined(getInteger(me, (paymentRound + "_betsSum"))))
6767 then extract(getInteger(me, (paymentRound + "_betsSum")))
6868 else 0
6969 let sumBetsNew = extract(getInteger(dtx.data, (paymentRound + "_betsSum")))
7070 let itsTooLate = isDefined(getString(me, (paymentRound + "_stop")))
7171 let isPaymentAlreadyMentioned = isDefined(getString(me, paymentTxIdStr))
7272 let paymentTx = transactionById(fromBase58String(paymentTxIdStr))
7373 match paymentTx {
7474 case paymentTx: TransferTransaction =>
7575 let isDtxSignedByPayer = sigVerify(dtx.bodyBytes, dtx.proofs[0], paymentTx.senderPublicKey)
7676 let correctSumBets = ((sumBetsOld + paymentTx.amount) - dtx.fee)
7777 if (if (if (if (if (if (if (if ((addressFromRecipient(paymentTx.recipient) == me))
7878 then true
7979 else throw("Incorrect recipient of the payment"))
8080 then if (!(isPaymentAlreadyMentioned))
8181 then true
8282 else throw("This transfer is already used as a bet")
8383 else false)
8484 then if ((sumBetsNew == correctSumBets))
8585 then true
8686 else throw(("Wrong value for Sum of Bets. Must be " + toString(correctSumBets)))
8787 else false)
8888 then if ((maxSumBet > sumBetsNew))
8989 then true
9090 else throw(((("Maximum amount of bets for round " + toString(maxSumBet)) + ". With your bet it's ") + toString(sumBetsNew)))
9191 else false)
9292 then if ((dtx.fee == registerBetTxFee))
9393 then true
9494 else throw(("Fee of bet registration data transaction must be " + toString(registerBetTxFee)))
9595 else false)
9696 then if (((paymentTx.amount - registerBetTxFee) >= minBet))
9797 then true
9898 else throw(((("Your Bet amount is less then minimal bet " + toString(minBet)) + ". Payment amount for such bet must be ") + toString((minBet + registerBetTxFee))))
9999 else false)
100100 then if (!(isDefined(paymentTx.feeAssetId)))
101101 then true
102102 else throw("Paymnet must be in WAVES")
103103 else false)
104104 then if (!(itsTooLate))
105105 then true
106106 else throw("It's too late to play this round. Try next one")
107107 else false
108108 case _ =>
109109 false
110110 }
111111 }
112112 else if ((size(dtx.data) == 2))
113113 then {
114114 let isDataCountOk = (size(dtx.data) == 2)
115115 let paymentTxIdStr = dropRight(extract(dtx.data[0].key), 9)
116116 let feesKey = (paymentTxIdStr + "_withdraw_fees")
117117 let paymentTx = transactionById(fromBase58String(paymentTxIdStr))
118118 let newFees = extract(getInteger(dtx.data, feesKey))
119119 let oldFeesUnit = getInteger(me, feesKey)
120120 let oldFees = if (isDefined(oldFeesUnit))
121121 then extract(oldFeesUnit)
122122 else 0
123123 let isFeeCorrect = (newFees == (oldFees + dtx.fee))
124124 let withdrawTxIdUnit = getString(me, paymentTxIdStr)
125125 let isPaymentAlreadyMentioned = isDefined(withdrawTxIdUnit)
126126 let withdrawTransactionId = fromBase58String(extract(withdrawTxIdUnit))
127127 match paymentTx {
128128 case paymentTx: TransferTransaction =>
129129 let isDtxSignedByPayer = sigVerify(dtx.bodyBytes, dtx.proofs[0], paymentTx.senderPublicKey)
130130 if (if (if (if (if ((addressFromRecipient(paymentTx.recipient) == me))
131131 then if (!(isPaymentAlreadyMentioned))
132132 then true
133133 else !(isDefined(transactionById(withdrawTransactionId)))
134134 else false)
135135 then isDtxSignedByPayer
136136 else false)
137137 then isFeeCorrect
138138 else false)
139139 then isDataCountOk
140140 else false)
141141 then {
142142 let guess = extract(getBinary(me, paymentTxIdStr))
143143 let type = take(guess, 1)
144144 let key = extract(getString(me, (paymentTxIdStr + "_round")))
145145 let valComplex = extract(getBinary(oracle, key))
146146 let koeff = if ((type == drop(toBytes(0), 7)))
147147 then 36
148148 else if ((type == drop(toBytes(1), 7)))
149149 then 2
150150 else if ((type == drop(toBytes(2), 7)))
151151 then 2
152152 else if ((type == drop(toBytes(3), 7)))
153153 then 2
154154 else if ((type == drop(toBytes(4), 7)))
155155 then 3
156156 else if ((type == drop(toBytes(5), 7)))
157157 then 3
158158 else 0
159159 let valReal = if ((type == drop(toBytes(0), 7)))
160160 then drop(take(valComplex, 2), 1)
161161 else if ((type == drop(toBytes(1), 7)))
162162 then drop(take(valComplex, 3), 2)
163163 else if ((type == drop(toBytes(2), 7)))
164164 then drop(take(valComplex, 4), 3)
165165 else if ((type == drop(toBytes(3), 7)))
166166 then drop(take(valComplex, 5), 4)
167167 else if ((type == drop(toBytes(4), 7)))
168168 then drop(take(valComplex, 6), 5)
169169 else if ((type == drop(toBytes(5), 7)))
170170 then drop(take(valComplex, 7), 6)
171171 else throw("Incorrect type of guess provided")
172172 let isWin = (drop(guess, 1) == valReal)
173173 let isMoneyStillEnough = ((((paymentTx.amount - registerBetTxFee) * koeff) + minWithdrawFee) > newFees)
174174 if (if (isWin)
175175 then true
176176 else throw("You didn't guess"))
177177 then if (isMoneyStillEnough)
178178 then true
179179 else throw("Not enough money for withdraw")
180180 else false
181181 }
182182 else false
183183 case _ =>
184184 false
185185 }
186186 }
187187 else false
188188 case _ =>
189189 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
190190 }

github/deemru/w8io/169f3d6 
52.00 ms