tx · 26Sp4vWKjnqpy8ypjg7wtygpiaNefPqtPhz7GR7RxvpG

3NCsdiPMueuzzsezfmcJAWXCpsG7kFNz8wy:  -0.01000000 Waves

2019.07.26 12:04 [602833] smart account 3NCsdiPMueuzzsezfmcJAWXCpsG7kFNz8wy > SELF 0.00000000 Waves

{ "type": 13, "id": "26Sp4vWKjnqpy8ypjg7wtygpiaNefPqtPhz7GR7RxvpG", "fee": 1000000, "feeAssetId": null, "timestamp": 1564131885625, "version": 1, "sender": "3NCsdiPMueuzzsezfmcJAWXCpsG7kFNz8wy", "senderPublicKey": "46SaPobsdJxMnTeQDEvLxLiCCTSDfchYSBuEiDdbCeno", "proofs": [ "H9GwJphZmd8QhrpMkNKRTkR5Afiy9JcA2rBjFbuw7bRYnzRWjygRYoWHpTN7nRLtuFSZtUE7Bi9RJq5fEcMt4Mz" ], "script": "base64:AgQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAABm9yYWNsZQkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTkN6YVlUTkRHdFI4emY5eWZjcWVQRmpDcUZ4OVM1emhzNAQAAAAObWluV2l0aGRyYXdGZWUAAAAAAAAHoSAEAAAAEHJlZ2lzdGVyQmV0VHhGZWUAAAAAAAAHoSAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAp3aXRoZHJhd1R4BQAAAAckbWF0Y2gwBAAAAAR0eElkCQEAAAAHZXh0cmFjdAAAAAEJAAQdAAAAAgUAAAACbWUJAAEsAAAAAgkAAlgAAAABCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAECAAAACV93aXRoZHJhdwQAAAAHJG1hdGNoMQkAA+gAAAABCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEDCQAAAQAAAAIFAAAABy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oAAAABAAAAAAAAAAAFAAAAAAAAAAAHCQAAygAAAAIJAADJAAAAAgUAAAAKdmFsQ29tcGxleAAAAAAAAAAABwAAAAAAAAAABgkAAAIAAAABAgAAACBJbmNvcnJlY3QgdHlwZSBvZiBndWVzcyBwcm92aWRlZAQAAAAFaXNXaW4JAAAAAAAAAgkAAMoAAAACBQAAAAVndWVzcwAAAAAAAAAAAQUAAAAHdmFsUmVhbAQAAAASaXNNb25leVN0aWxsRW5vdWdoCQAAZgAAAAIJAABkAAAAAgkAAGgAAAACCQAAZQAAAAIIBQAAAAlwYXltZW50VHgAAAAGYW1vdW50BQAAABByZWdpc3RlckJldFR4RmVlBQAAAAVrb2VmZgUAAAAObWluV2l0aGRyYXdGZWUFAAAAB25ld0ZlZXMDAwUAAAAFaXNXaW4GCQAAAgAAAAECAAAAEFlvdSBkaWRuJ3QgZ3Vlc3MDBQAAABJpc01vbmV5U3RpbGxFbm91Z2gGCQAAAgAAAAECAAAAHU5vdCBlbm91Z2ggbW9uZXkgZm9yIHdpdGhkcmF3BwcHBwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnNTQ9C", "chainId": 84, "height": 602833, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 2 #-}
2+{-# CONTENT_TYPE EXPRESSION #-}
3+let me = tx.sender
4+let oracle = extract(addressFromString("3NCzaYTNDGtR8zf9yfcqePFjCqFx9S5zhs4"))
5+let minWithdrawFee = 500000
6+let registerBetTxFee = 500000
7+match tx {
8+ case withdrawTx: TransferTransaction =>
9+ let txId = extract(getString(me, (toBase58String(tx.proofs[1]) + "_withdraw")))
10+ match transactionById(tx.proofs[1]) {
11+ case paymentTx: TransferTransaction =>
12+ let isPaymentTookPlace = if ((txId == toBase58String(tx.id)))
13+ then sigVerify(tx.bodyBytes, tx.proofs[0], paymentTx.senderPublicKey)
14+ else false
15+ let feesKey = (toBase58String(tx.proofs[1]) + "_withdraw_fees")
16+ let dataTxsFees = extract(getInteger(me, feesKey))
17+ let guessUnit = getBinary(me, toBase58String(tx.proofs[1]))
18+ let correctAmount = if (!(isDefined(guessUnit)))
19+ then ((paymentTx.amount - dataTxsFees) - withdrawTx.fee)
20+ else {
21+ let guess = extract(guessUnit)
22+ let type = take(guess, 1)
23+ let val = drop(guess, 1)
24+ let key = extract(getString(me, (toBase58String(tx.proofs[1]) + "_round")))
25+ let valComplex = extract(getBinary(oracle, key))
26+ let koeff = if ((type == drop(toBytes(0), 7)))
27+ then 36
28+ else if ((type == drop(toBytes(1), 7)))
29+ then 2
30+ else if ((type == drop(toBytes(2), 7)))
31+ then 2
32+ else if ((type == drop(toBytes(3), 7)))
33+ then 2
34+ else if ((type == drop(toBytes(4), 7)))
35+ then 3
36+ else if ((type == drop(toBytes(5), 7)))
37+ then 3
38+ else 0
39+ ((((paymentTx.amount - registerBetTxFee) * koeff) - dataTxsFees) - withdrawTx.fee)
40+ }
41+ if (if (if (isPaymentTookPlace)
42+ then true
43+ else throw("There was no bet"))
44+ then if ((withdrawTx.amount == correctAmount))
45+ then true
46+ else throw(("Amount is incorrect. Correct amount is " + toString(correctAmount)))
47+ else false)
48+ then if (if (!(isDefined(withdrawTx.feeAssetId)))
49+ then !(isDefined(withdrawTx.assetId))
50+ else false)
51+ then true
52+ else throw("Withdraw and fee must be in WAVES")
53+ else false
54+ case _ =>
55+ false
56+ }
57+ case dtx: DataTransaction =>
58+ if ((size(dtx.data) == 3))
59+ then {
60+ let minBet = 50000000
61+ let maxSumBet = 1000000000
62+ let paymentTxIdStr = extract(dtx.data[0].key)
63+ let guessStr = extract(getString(dtx.data, paymentTxIdStr))
64+ let paymentRoundKey = (paymentTxIdStr + "_round")
65+ let paymentRound = extract(getString(dtx.data, paymentRoundKey))
66+ let sumBetsOld = if (isDefined(getInteger(me, (paymentRound + "_betsSum"))))
67+ then extract(getInteger(me, (paymentRound + "_betsSum")))
68+ else 0
69+ let sumBetsNew = extract(getInteger(dtx.data, (paymentRound + "_betsSum")))
70+ let itsTooLate = isDefined(getString(me, (paymentRound + "_stop")))
71+ let isPaymentAlreadyMentioned = isDefined(getString(me, paymentTxIdStr))
72+ let paymentTx = transactionById(fromBase58String(paymentTxIdStr))
73+ match paymentTx {
74+ case paymentTx: TransferTransaction =>
75+ let isDtxSignedByPayer = sigVerify(dtx.bodyBytes, dtx.proofs[0], paymentTx.senderPublicKey)
76+ let correctSumBets = ((sumBetsOld + paymentTx.amount) - dtx.fee)
77+ if (if (if (if (if (if (if (if ((addressFromRecipient(paymentTx.recipient) == me))
78+ then true
79+ else throw("Incorrect recipient of the payment"))
80+ then if (!(isPaymentAlreadyMentioned))
81+ then true
82+ else throw("This transfer is already used as a bet")
83+ else false)
84+ then if ((sumBetsNew == correctSumBets))
85+ then true
86+ else throw(("Wrong value for Sum of Bets. Must be " + toString(correctSumBets)))
87+ else false)
88+ then if ((maxSumBet > sumBetsNew))
89+ then true
90+ else throw(((("Maximum amount of bets for round " + toString(maxSumBet)) + ". With your bet it's ") + toString(sumBetsNew)))
91+ else false)
92+ then if ((dtx.fee == registerBetTxFee))
93+ then true
94+ else throw(("Fee of bet registration data transaction must be " + toString(registerBetTxFee)))
95+ else false)
96+ then if (((paymentTx.amount - registerBetTxFee) >= minBet))
97+ then true
98+ else throw(((("Your Bet amount is less then minimal bet " + toString(minBet)) + ". Payment amount for such bet must be ") + toString((minBet + registerBetTxFee))))
99+ else false)
100+ then if (!(isDefined(paymentTx.feeAssetId)))
101+ then true
102+ else throw("Paymnet must be in WAVES")
103+ else false)
104+ then if (!(itsTooLate))
105+ then true
106+ else throw("It's too late to play this round. Try next one")
107+ else false
108+ case _ =>
109+ false
110+ }
111+ }
112+ else if ((size(dtx.data) == 2))
113+ then {
114+ let isDataCountOk = (size(dtx.data) == 2)
115+ let paymentTxIdStr = dropRight(extract(dtx.data[0].key), 9)
116+ let feesKey = (paymentTxIdStr + "_withdraw_fees")
117+ let paymentTx = transactionById(fromBase58String(paymentTxIdStr))
118+ let newFees = extract(getInteger(dtx.data, feesKey))
119+ let oldFeesUnit = getInteger(me, feesKey)
120+ let oldFees = if (isDefined(oldFeesUnit))
121+ then extract(oldFeesUnit)
122+ else 0
123+ let isFeeCorrect = (newFees == (oldFees + dtx.fee))
124+ let withdrawTxIdUnit = getString(me, paymentTxIdStr)
125+ let isPaymentAlreadyMentioned = isDefined(withdrawTxIdUnit)
126+ let withdrawTransactionId = fromBase58String(extract(withdrawTxIdUnit))
127+ match paymentTx {
128+ case paymentTx: TransferTransaction =>
129+ let isDtxSignedByPayer = sigVerify(dtx.bodyBytes, dtx.proofs[0], paymentTx.senderPublicKey)
130+ if (if (if (if (if ((addressFromRecipient(paymentTx.recipient) == me))
131+ then if (!(isPaymentAlreadyMentioned))
132+ then true
133+ else !(isDefined(transactionById(withdrawTransactionId)))
134+ else false)
135+ then isDtxSignedByPayer
136+ else false)
137+ then isFeeCorrect
138+ else false)
139+ then isDataCountOk
140+ else false)
141+ then {
142+ let guess = extract(getBinary(me, paymentTxIdStr))
143+ let type = take(guess, 1)
144+ let key = extract(getString(me, (paymentTxIdStr + "_round")))
145+ let valComplex = extract(getBinary(oracle, key))
146+ let koeff = if ((type == drop(toBytes(0), 7)))
147+ then 36
148+ else if ((type == drop(toBytes(1), 7)))
149+ then 2
150+ else if ((type == drop(toBytes(2), 7)))
151+ then 2
152+ else if ((type == drop(toBytes(3), 7)))
153+ then 2
154+ else if ((type == drop(toBytes(4), 7)))
155+ then 3
156+ else if ((type == drop(toBytes(5), 7)))
157+ then 3
158+ else 0
159+ let valReal = if ((type == drop(toBytes(0), 7)))
160+ then drop(take(valComplex, 2), 1)
161+ else if ((type == drop(toBytes(1), 7)))
162+ then drop(take(valComplex, 3), 2)
163+ else if ((type == drop(toBytes(2), 7)))
164+ then drop(take(valComplex, 4), 3)
165+ else if ((type == drop(toBytes(3), 7)))
166+ then drop(take(valComplex, 5), 4)
167+ else if ((type == drop(toBytes(4), 7)))
168+ then drop(take(valComplex, 6), 5)
169+ else if ((type == drop(toBytes(5), 7)))
170+ then drop(take(valComplex, 7), 6)
171+ else throw("Incorrect type of guess provided")
172+ let isWin = (drop(guess, 1) == valReal)
173+ let isMoneyStillEnough = ((((paymentTx.amount - registerBetTxFee) * koeff) + minWithdrawFee) > newFees)
174+ if (if (isWin)
175+ then true
176+ else throw("You didn't guess"))
177+ then if (isMoneyStillEnough)
178+ then true
179+ else throw("Not enough money for withdraw")
180+ else false
181+ }
182+ else false
183+ case _ =>
184+ false
185+ }
186+ }
187+ else false
188+ case _ =>
189+ sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
190+}

github/deemru/w8io/026f985 
18.84 ms