tx · Fw8m1VQy5M89cAUsRA26o4ZamH6aSpW1hmhxeG1zKPe6 3Ms2w9wW9gFGhvgfdFSHtro1Hfx7mPNoita: -0.01400000 Waves 2019.02.09 17:50 [487722] smart account 3Ms2w9wW9gFGhvgfdFSHtro1Hfx7mPNoita > SELF 0.00000000 Waves
{ "type": 13, "id": "Fw8m1VQy5M89cAUsRA26o4ZamH6aSpW1hmhxeG1zKPe6", "fee": 1400000, "feeAssetId": null, "timestamp": 1549723844098, "version": 1, "sender": "3Ms2w9wW9gFGhvgfdFSHtro1Hfx7mPNoita", "senderPublicKey": "H29vH3ZF7qgcLy8mZb3RU72EgJ55GBRcEmnMqEQX4JcQ", "proofs": [ "5UxhQLQ5PWF4avQxkhNRTFbm23gyzzbYPQV1bLxZ2LyBsXuoiptuBc3T6gAxQzqUX3cpvPAg7rt2NCK9veRiY8wo" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAABm9yYWNsZQkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTkN6YVlUTkRHdFI4emY5eWZjcWVQRmpDcUZ4OVM1emhzNAQAAAAObWluV2l0aGRyYXdGZWUAAAAAAAAGGoAEAAAABm1pbkJldAAAAAAAAvrwgAQAAAAGbWF4QmV0AAAAAAAdzWUABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAAKd2l0aGRyYXdUeAUAAAAHJG1hdGNoMAQAAAAEdHhJZAkBAAAAB2V4dHJhY3QAAAABCQAEHQAAAAIFAAAAAm1lCQACWAAAAAEJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQQAAAAHJG1hdGNoMQkAA+gAAAABCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEDCQAAAQAAAAIFAAAAByRtYXRjaDECAAA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AAAAAAAAADAAAAAAAAAAAHCQAAygAAAAIJAADJAAAAAgUAAAAKdmFsQ29tcGxleAAAAAAAAAAABQAAAAAAAAAABAMJAAAAAAAAAgUAAAAEdHlwZQkAAMoAAAACCQABmgAAAAEAAAAAAAAAAAQAAAAAAAAAAAcJAADKAAAAAgkAAMkAAAACBQAAAAp2YWxDb21wbGV4AAAAAAAAAAAGAAAAAAAAAAAFAwkAAAAAAAACBQAAAAR0eXBlCQAAygAAAAIJAAGaAAAAAQAAAAAAAAAABQAAAAAAAAAABwkAAMoAAAACCQAAyQAAAAIFAAAACnZhbENvbXBsZXgAAAAAAAAAAAcAAAAAAAAAAAYJAAGaAAAAAQAAAAAAAAAAJgQAAAAFaXNXaW4DCQAAAAAAAAIFAAAAA3ZhbAUAAAAHdmFsUmVhbAkBAAAAAiE9AAAAAgUAAAADdmFsCQABmgAAAAEAAAAAAAAAACYHAwUAAAAFaXNXaW4FAAAAEmlzTW9uZXlTdGlsbEVub3VnaAcHBwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnpp9Tk", "chainId": 84, "height": 487722, "spentComplexity": 0 } View: original | compacted Prev: HCCSELSvGrC7sQhDFqS6YhjAJwbnBuJspjN5fM46sf9h Next: 4KwgyXgaaMvZfcZTk6cfv9MSF7szbydm8ni3az6SYSuR Diff:
Old | New | Differences | |
---|---|---|---|
52 | 52 | false | |
53 | 53 | } | |
54 | 54 | case dtx: DataTransaction => | |
55 | + | let isDataCountOk = (size(dtx.data) == 2) | |
55 | 56 | let paymentTxIdStr = extract(dtx.data[0].key) | |
56 | 57 | let feesKey = (paymentTxIdStr + "_fees") | |
57 | 58 | let paymentTx = transactionById(fromBase58String(paymentTxIdStr)) | |
66 | 67 | match paymentTx { | |
67 | 68 | case paymentTx: TransferTransaction => | |
68 | 69 | let isDtxSignedByPayer = sigVerify(dtx.bodyBytes, dtx.proofs[0], paymentTx.senderPublicKey) | |
69 | - | if (if (if (if (!(isPaymentAlreadyMentioned)) | |
70 | + | if (if (if (if (if (!(isPaymentAlreadyMentioned)) | |
70 | 71 | then true | |
71 | 72 | else !(isWithdrawExist)) | |
72 | 73 | then isDtxSignedByPayer | |
73 | 74 | else false) | |
74 | 75 | then isFeeCorrect | |
76 | + | else false) | |
77 | + | then isDataCountOk | |
75 | 78 | else false) | |
76 | 79 | then { | |
77 | 80 | let att = paymentTx.attachment |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 1 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let me = tx.sender | |
4 | 4 | let oracle = extract(addressFromString("3NCzaYTNDGtR8zf9yfcqePFjCqFx9S5zhs4")) | |
5 | 5 | let minWithdrawFee = 400000 | |
6 | 6 | let minBet = 50000000 | |
7 | 7 | let maxBet = 500000000 | |
8 | 8 | match tx { | |
9 | 9 | case withdrawTx: TransferTransaction => | |
10 | 10 | let txId = extract(getString(me, toBase58String(tx.proofs[1]))) | |
11 | 11 | match transactionById(tx.proofs[1]) { | |
12 | 12 | case paymentTx: TransferTransaction => | |
13 | 13 | let isPaymentTookPlace = if ((txId == toBase58String(tx.id))) | |
14 | 14 | then sigVerify(tx.bodyBytes, tx.proofs[0], paymentTx.senderPublicKey) | |
15 | 15 | else false | |
16 | 16 | let att = paymentTx.attachment | |
17 | 17 | let feesKey = (toBase58String(tx.proofs[1]) + "_fees") | |
18 | 18 | let dataTxsFees = extract(getInteger(me, feesKey)) | |
19 | 19 | let type = dropRightBytes(takeRightBytes(att, 2), 1) | |
20 | 20 | let val = takeRightBytes(att, 1) | |
21 | 21 | let key = dropRightBytes(att, 2) | |
22 | 22 | let valComplex = extract(getBinary(oracle, toBase58String(key))) | |
23 | 23 | let koeff = if ((type == drop(toBytes(0), 7))) | |
24 | 24 | then 36 | |
25 | 25 | else if ((type == drop(toBytes(1), 7))) | |
26 | 26 | then 2 | |
27 | 27 | else if ((type == drop(toBytes(2), 7))) | |
28 | 28 | then 2 | |
29 | 29 | else if ((type == drop(toBytes(3), 7))) | |
30 | 30 | then 2 | |
31 | 31 | else if ((type == drop(toBytes(4), 7))) | |
32 | 32 | then 3 | |
33 | 33 | else if ((type == drop(toBytes(5), 7))) | |
34 | 34 | then 3 | |
35 | 35 | else 0 | |
36 | 36 | let paymentAmount = if ((maxBet >= paymentTx.amount)) | |
37 | 37 | then paymentTx.amount | |
38 | 38 | else maxBet | |
39 | 39 | let correctAmount = (((paymentAmount * koeff) - dataTxsFees) - withdrawTx.fee) | |
40 | 40 | let isAmountOk = (withdrawTx.amount == correctAmount) | |
41 | 41 | let isInWaves = if (!(isDefined(withdrawTx.feeAssetId))) | |
42 | 42 | then !(isDefined(withdrawTx.assetId)) | |
43 | 43 | else false | |
44 | 44 | if (if (if (isPaymentTookPlace) | |
45 | 45 | then isAmountOk | |
46 | 46 | else false) | |
47 | 47 | then isInWaves | |
48 | 48 | else false) | |
49 | 49 | then (paymentAmount >= minBet) | |
50 | 50 | else false | |
51 | 51 | case _ => | |
52 | 52 | false | |
53 | 53 | } | |
54 | 54 | case dtx: DataTransaction => | |
55 | + | let isDataCountOk = (size(dtx.data) == 2) | |
55 | 56 | let paymentTxIdStr = extract(dtx.data[0].key) | |
56 | 57 | let feesKey = (paymentTxIdStr + "_fees") | |
57 | 58 | let paymentTx = transactionById(fromBase58String(paymentTxIdStr)) | |
58 | 59 | let newFees = extract(getInteger(dtx.data, feesKey)) | |
59 | 60 | let oldFees = if (isDefined(getInteger(me, feesKey))) | |
60 | 61 | then extract(getInteger(me, feesKey)) | |
61 | 62 | else 0 | |
62 | 63 | let isFeeCorrect = (newFees == (oldFees + dtx.fee)) | |
63 | 64 | let isPaymentAlreadyMentioned = isDefined(getString(me, paymentTxIdStr)) | |
64 | 65 | let withdrawTransactionId = fromBase58String(extract(getString(me, paymentTxIdStr))) | |
65 | 66 | let isWithdrawExist = isDefined(transactionById(withdrawTransactionId)) | |
66 | 67 | match paymentTx { | |
67 | 68 | case paymentTx: TransferTransaction => | |
68 | 69 | let isDtxSignedByPayer = sigVerify(dtx.bodyBytes, dtx.proofs[0], paymentTx.senderPublicKey) | |
69 | - | if (if (if (if (!(isPaymentAlreadyMentioned)) | |
70 | + | if (if (if (if (if (!(isPaymentAlreadyMentioned)) | |
70 | 71 | then true | |
71 | 72 | else !(isWithdrawExist)) | |
72 | 73 | then isDtxSignedByPayer | |
73 | 74 | else false) | |
74 | 75 | then isFeeCorrect | |
76 | + | else false) | |
77 | + | then isDataCountOk | |
75 | 78 | else false) | |
76 | 79 | then { | |
77 | 80 | let att = paymentTx.attachment | |
78 | 81 | let type = dropRightBytes(takeRightBytes(att, 2), 1) | |
79 | 82 | let val = takeRightBytes(att, 1) | |
80 | 83 | let key = dropRightBytes(att, 2) | |
81 | 84 | let heightRes = extract(getInteger(oracle, (toBase58String(key) + "height"))) | |
82 | 85 | let isCheater = (extract(transactionHeightById(paymentTx.id)) >= heightRes) | |
83 | 86 | let valComplex = extract(getBinary(oracle, toBase58String(key))) | |
84 | 87 | let koeff = if ((type == drop(toBytes(0), 7))) | |
85 | 88 | then 36 | |
86 | 89 | else if ((type == drop(toBytes(1), 7))) | |
87 | 90 | then 2 | |
88 | 91 | else if ((type == drop(toBytes(2), 7))) | |
89 | 92 | then 2 | |
90 | 93 | else if ((type == drop(toBytes(3), 7))) | |
91 | 94 | then 2 | |
92 | 95 | else if ((type == drop(toBytes(4), 7))) | |
93 | 96 | then 3 | |
94 | 97 | else if ((type == drop(toBytes(5), 7))) | |
95 | 98 | then 3 | |
96 | 99 | else 0 | |
97 | 100 | let isMoneyStillEnough = (((paymentTx.amount * koeff) + minWithdrawFee) > newFees) | |
98 | 101 | let ver = take(valComplex, 1) | |
99 | 102 | let valReal = if ((type == drop(toBytes(0), 7))) | |
100 | 103 | then drop(take(valComplex, 2), 1) | |
101 | 104 | else if ((type == drop(toBytes(1), 7))) | |
102 | 105 | then drop(take(valComplex, 3), 2) | |
103 | 106 | else if ((type == drop(toBytes(2), 7))) | |
104 | 107 | then drop(take(valComplex, 4), 3) | |
105 | 108 | else if ((type == drop(toBytes(3), 7))) | |
106 | 109 | then drop(take(valComplex, 5), 4) | |
107 | 110 | else if ((type == drop(toBytes(4), 7))) | |
108 | 111 | then drop(take(valComplex, 6), 5) | |
109 | 112 | else if ((type == drop(toBytes(5), 7))) | |
110 | 113 | then drop(take(valComplex, 7), 6) | |
111 | 114 | else toBytes(38) | |
112 | 115 | let isWin = if ((val == valReal)) | |
113 | 116 | then (val != toBytes(38)) | |
114 | 117 | else false | |
115 | 118 | if (isWin) | |
116 | 119 | then isMoneyStillEnough | |
117 | 120 | else false | |
118 | 121 | } | |
119 | 122 | else false | |
120 | 123 | case _ => | |
121 | 124 | false | |
122 | 125 | } | |
123 | 126 | case _ => | |
124 | 127 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
125 | 128 | } |
github/deemru/w8io/169f3d6 41.61 ms ◑