tx · jQGes27Y89FanxPnpL8YqEcCSyTCcmPf4rELBuYP8rD

3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu:  -0.01400000 Waves

2019.02.08 19:09 [486333] smart account 3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu > SELF 0.00000000 Waves

{ "type": 13, "id": "jQGes27Y89FanxPnpL8YqEcCSyTCcmPf4rELBuYP8rD", "fee": 1400000, "feeAssetId": null, "timestamp": 1549642231285, "version": 1, "sender": "3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu", "senderPublicKey": "F3DbYSfYZz6arcD6Mst8HdWScxTeWvTvatC7jp4DGryX", "proofs": [ "3Vki3gvpsuJKywhivCcJymuzrZVixUY2uR1zVFkSAw92UWfj4QRUTf6qNdbtANTW7Uc97qhcFgQJ3HPB8kYdxvcf" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAABm9yYWNsZQkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTkN6YVlUTkRHdFI4emY5eWZjcWVQRmpDcUZ4OVM1emhzNAQAAAAObWluV2l0aGRyYXdGZWUAAAAAAAAGGoAEAAAABm1pbkJldAAAAAAAAvrwgAQAAAAGbWF4QmV0AAAAAAAdzWUABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAAKd2l0aGRyYXdUeAUAAAAHJG1hdGNoMAQAAAAEdHhJZAkBAAAAB2V4dHJhY3QAAAABCQAEHQAAAAIFAAAAAm1lCQACWAAAAAEJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQQAAAAHJG1hdGNoMQkAA+gAAAABCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEDCQAAAQAAAAIFAAAAByRtYXRjaDECAAAAE1RyYW5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AAZoAAAABAAAAAAAAAAAEAAAAAAAAAAAHCQAAygAAAAIJAADJAAAAAgUAAAAKdmFsQ29tcGxleAAAAAAAAAAABgAAAAAAAAAABQMJAAAAAAAAAgUAAAAEdHlwZQkAAMoAAAACCQABmgAAAAEAAAAAAAAAAAUAAAAAAAAAAAcJAADKAAAAAgkAAMkAAAACBQAAAAp2YWxDb21wbGV4AAAAAAAAAAAHAAAAAAAAAAAGCQABmgAAAAEAAAAAAAAAACYEAAAABWlzV2luAwkAAAAAAAACBQAAAAN2YWwFAAAAB3ZhbFJlYWwJAQAAAAIhPQAAAAIFAAAAA3ZhbAkAAZoAAAABAAAAAAAAAAAmBwMDBQAAAAVpc1dpbgkBAAAAASEAAAABBQAAAAlpc0NoZWF0ZXIHBQAAABJpc01vbmV5U3RpbGxFbm91Z2gHBwcJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5B5ooPQ==", "chainId": 84, "height": 486333, "spentComplexity": 0 } View: original | compacted Prev: 5kVbkb7GuosvuYAM87cS61pgndEiiscWmx8M9ovoPESE Next: none Diff:
OldNewDifferences
22 {-# CONTENT_TYPE EXPRESSION #-}
33 let me = tx.sender
44 let oracle = extract(addressFromString("3NCzaYTNDGtR8zf9yfcqePFjCqFx9S5zhs4"))
5-let dataTxFee = 1000000
5+let minWithdrawFee = 400000
6+let minBet = 50000000
7+let maxBet = 500000000
68 match tx {
79 case withdrawTx: TransferTransaction =>
810 let txId = extract(getString(me, toBase58String(tx.proofs[1])))
1921 let key = dropRightBytes(att, 2)
2022 let valComplex = extract(getBinary(oracle, toBase58String(key)))
2123 let koeff = if ((type == drop(toBytes(0), 7)))
22- then 35
24+ then 36
2325 else if ((type == drop(toBytes(1), 7)))
24- then 1
26+ then 2
2527 else if ((type == drop(toBytes(2), 7)))
26- then 1
28+ then 2
2729 else if ((type == drop(toBytes(3), 7)))
28- then 1
30+ then 2
2931 else if ((type == drop(toBytes(4), 7)))
30- then 2
32+ then 3
3133 else if ((type == drop(toBytes(5), 7)))
32- then 2
34+ then 3
3335 else 0
34- let correctAmount = (((paymentTx.amount * koeff) - dataTxsFees) - withdrawTx.fee)
36+ let paymentAmount = if ((maxBet >= paymentTx.amount))
37+ then paymentTx.amount
38+ else maxBet
39+ let correctAmount = (((paymentAmount * koeff) - dataTxsFees) - withdrawTx.fee)
3540 let isAmountOk = (withdrawTx.amount == correctAmount)
3641 let isInWaves = if (!(isDefined(withdrawTx.feeAssetId)))
3742 then !(isDefined(withdrawTx.assetId))
3843 else false
39- if (if (isPaymentTookPlace)
44+ if (if (if (isPaymentTookPlace)
4045 then isAmountOk
4146 else false)
4247 then isInWaves
48+ else false)
49+ then (paymentAmount >= minBet)
4350 else false
4451 case _ =>
4552 false
7582 let isCheater = (extract(transactionHeightById(paymentTx.id)) >= heightRes)
7683 let valComplex = extract(getBinary(oracle, toBase58String(key)))
7784 let koeff = if ((type == drop(toBytes(0), 7)))
78- then 35
85+ then 36
7986 else if ((type == drop(toBytes(1), 7)))
80- then 1
87+ then 2
8188 else if ((type == drop(toBytes(2), 7)))
82- then 1
89+ then 2
8390 else if ((type == drop(toBytes(3), 7)))
84- then 1
91+ then 2
8592 else if ((type == drop(toBytes(4), 7)))
86- then 2
93+ then 3
8794 else if ((type == drop(toBytes(5), 7)))
88- then 2
95+ then 3
8996 else 0
97+ let isMoneyStillEnough = (((paymentTx.amount * koeff) + minWithdrawFee) > newFees)
9098 let ver = take(valComplex, 1)
9199 let valReal = if ((type == drop(toBytes(0), 7)))
92100 then drop(take(valComplex, 2), 1)
99107 else if ((type == drop(toBytes(4), 7)))
100108 then drop(take(valComplex, 6), 5)
101109 else if ((type == drop(toBytes(5), 7)))
102- then drop(take(valComplex, 7), 5)
110+ then drop(take(valComplex, 7), 6)
103111 else toBytes(38)
104112 let isWin = if ((val == valReal))
105113 then (val != toBytes(38))
106114 else false
107- isWin
115+ if (if (isWin)
116+ then !(isCheater)
117+ else false)
118+ then isMoneyStillEnough
119+ else false
108120 }
109121 else false
110122 case _ =>
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 1 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
33 let me = tx.sender
44 let oracle = extract(addressFromString("3NCzaYTNDGtR8zf9yfcqePFjCqFx9S5zhs4"))
5-let dataTxFee = 1000000
5+let minWithdrawFee = 400000
6+let minBet = 50000000
7+let maxBet = 500000000
68 match tx {
79 case withdrawTx: TransferTransaction =>
810 let txId = extract(getString(me, toBase58String(tx.proofs[1])))
911 match transactionById(tx.proofs[1]) {
1012 case paymentTx: TransferTransaction =>
1113 let isPaymentTookPlace = if ((txId == toBase58String(tx.id)))
1214 then sigVerify(tx.bodyBytes, tx.proofs[0], paymentTx.senderPublicKey)
1315 else false
1416 let att = paymentTx.attachment
1517 let feesKey = (toBase58String(tx.proofs[1]) + "_fees")
1618 let dataTxsFees = extract(getInteger(me, feesKey))
1719 let type = dropRightBytes(takeRightBytes(att, 2), 1)
1820 let val = takeRightBytes(att, 1)
1921 let key = dropRightBytes(att, 2)
2022 let valComplex = extract(getBinary(oracle, toBase58String(key)))
2123 let koeff = if ((type == drop(toBytes(0), 7)))
22- then 35
24+ then 36
2325 else if ((type == drop(toBytes(1), 7)))
24- then 1
26+ then 2
2527 else if ((type == drop(toBytes(2), 7)))
26- then 1
28+ then 2
2729 else if ((type == drop(toBytes(3), 7)))
28- then 1
30+ then 2
2931 else if ((type == drop(toBytes(4), 7)))
30- then 2
32+ then 3
3133 else if ((type == drop(toBytes(5), 7)))
32- then 2
34+ then 3
3335 else 0
34- let correctAmount = (((paymentTx.amount * koeff) - dataTxsFees) - withdrawTx.fee)
36+ let paymentAmount = if ((maxBet >= paymentTx.amount))
37+ then paymentTx.amount
38+ else maxBet
39+ let correctAmount = (((paymentAmount * koeff) - dataTxsFees) - withdrawTx.fee)
3540 let isAmountOk = (withdrawTx.amount == correctAmount)
3641 let isInWaves = if (!(isDefined(withdrawTx.feeAssetId)))
3742 then !(isDefined(withdrawTx.assetId))
3843 else false
39- if (if (isPaymentTookPlace)
44+ if (if (if (isPaymentTookPlace)
4045 then isAmountOk
4146 else false)
4247 then isInWaves
48+ else false)
49+ then (paymentAmount >= minBet)
4350 else false
4451 case _ =>
4552 false
4653 }
4754 case dtx: DataTransaction =>
4855 let paymentTxIdStr = extract(dtx.data[0].key)
4956 let feesKey = (paymentTxIdStr + "_fees")
5057 let paymentTx = transactionById(fromBase58String(paymentTxIdStr))
5158 let newFees = extract(getInteger(dtx.data, feesKey))
5259 let oldFees = if (isDefined(getInteger(me, feesKey)))
5360 then extract(getInteger(me, feesKey))
5461 else 0
5562 let isFeeCorrect = (newFees == (oldFees + dtx.fee))
5663 let isPaymentAlreadyMentioned = isDefined(getString(me, paymentTxIdStr))
5764 let withdrawTransactionId = fromBase58String(extract(getString(me, paymentTxIdStr)))
5865 let isWithdrawExist = isDefined(transactionById(withdrawTransactionId))
5966 match paymentTx {
6067 case paymentTx: TransferTransaction =>
6168 let isDtxSignedByPayer = sigVerify(dtx.bodyBytes, dtx.proofs[0], paymentTx.senderPublicKey)
6269 if (if (if (if (!(isPaymentAlreadyMentioned))
6370 then true
6471 else !(isWithdrawExist))
6572 then isDtxSignedByPayer
6673 else false)
6774 then isFeeCorrect
6875 else false)
6976 then {
7077 let att = paymentTx.attachment
7178 let type = dropRightBytes(takeRightBytes(att, 2), 1)
7279 let val = takeRightBytes(att, 1)
7380 let key = dropRightBytes(att, 2)
7481 let heightRes = extract(getInteger(oracle, (toBase58String(key) + "height")))
7582 let isCheater = (extract(transactionHeightById(paymentTx.id)) >= heightRes)
7683 let valComplex = extract(getBinary(oracle, toBase58String(key)))
7784 let koeff = if ((type == drop(toBytes(0), 7)))
78- then 35
85+ then 36
7986 else if ((type == drop(toBytes(1), 7)))
80- then 1
87+ then 2
8188 else if ((type == drop(toBytes(2), 7)))
82- then 1
89+ then 2
8390 else if ((type == drop(toBytes(3), 7)))
84- then 1
91+ then 2
8592 else if ((type == drop(toBytes(4), 7)))
86- then 2
93+ then 3
8794 else if ((type == drop(toBytes(5), 7)))
88- then 2
95+ then 3
8996 else 0
97+ let isMoneyStillEnough = (((paymentTx.amount * koeff) + minWithdrawFee) > newFees)
9098 let ver = take(valComplex, 1)
9199 let valReal = if ((type == drop(toBytes(0), 7)))
92100 then drop(take(valComplex, 2), 1)
93101 else if ((type == drop(toBytes(1), 7)))
94102 then drop(take(valComplex, 3), 2)
95103 else if ((type == drop(toBytes(2), 7)))
96104 then drop(take(valComplex, 4), 3)
97105 else if ((type == drop(toBytes(3), 7)))
98106 then drop(take(valComplex, 5), 4)
99107 else if ((type == drop(toBytes(4), 7)))
100108 then drop(take(valComplex, 6), 5)
101109 else if ((type == drop(toBytes(5), 7)))
102- then drop(take(valComplex, 7), 5)
110+ then drop(take(valComplex, 7), 6)
103111 else toBytes(38)
104112 let isWin = if ((val == valReal))
105113 then (val != toBytes(38))
106114 else false
107- isWin
115+ if (if (isWin)
116+ then !(isCheater)
117+ else false)
118+ then isMoneyStillEnough
119+ else false
108120 }
109121 else false
110122 case _ =>
111123 false
112124 }
113125 case _ =>
114126 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
115127 }

github/deemru/w8io/169f3d6 
36.46 ms