tx · GkVfWHNu7Y41a5wwvMojUAPkBZSkfrYcT4RbJ58Sh1NE

3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu:  -0.01400000 Waves

2019.01.30 23:19 [473473] smart account 3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu > SELF 0.00000000 Waves

{ "type": 13, "id": "GkVfWHNu7Y41a5wwvMojUAPkBZSkfrYcT4RbJ58Sh1NE", "fee": 1400000, "feeAssetId": null, "timestamp": 1548879671200, "version": 1, "sender": "3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu", "senderPublicKey": "F3DbYSfYZz6arcD6Mst8HdWScxTeWvTvatC7jp4DGryX", "proofs": [ "2nBsjYHDCaBVbr4fazP41M2hzuDbJ6t3oMMMnVWAi6Nrfz7HsL1UXSpzwxJAnM97SiTzMQphCTsysTRrNKVDoPGN" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAABm9yYWNsZQkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTkN6YVlUTkRHdFI4emY5eWZjcWVQRmpDcUZ4OVM1emhzNAQAAAAJZGF0YVR4RmVlAAAAAAAAD0JABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAAKd2l0aGRyYXdUeAUAAAAHJG1hdGNoMAQAAAAEdHhJZAkBAAAAB2V4dHJhY3QAAAABCQAEHQAAAAIFAAAAAm1lCQACWAAAAAEJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQQAAAAHJG1hdGNoMQkAA+gAAAABCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEDCQAAAQAAAAIFAAAAByRtYXRjaDECAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAACXBheW1lbnRUeAUAAAAHJ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"spentComplexity": 0 } View: original | compacted Prev: C8Q1Cqnh9DEx3YJyS7EQb6nTstYohniV8H6tPvK3S9NL Next: 6MDdQpzBLoHzBxAfej8fSKzrshwdCB781wS4mxR7hUCd Diff:
OldNewDifferences
1515 let type = dropRightBytes(takeRightBytes(att, 2), 1)
1616 let val = takeRightBytes(att, 1)
1717 let key = dropRightBytes(att, 2)
18+ let keyforHeight = (key + fromBase58String("height"))
19+ let heightRes = extract(getInteger(oracle, toBase58String(key)))
20+ let isCheater = (extract(transactionHeightById(paymentTx.id)) >= heightRes)
1821 let valComplex = extract(getBinary(oracle, toBase58String(key)))
1922 let koeff = if ((type == drop(toBytes(0), 7)))
2023 then 35
5255 else false
5356 let isAmountOk = (withdrawTx.amount == (((paymentTx.amount * koeff) - dataTxFee) - withdrawTx.fee))
5457 let isFeeInWaves = !(isDefined(withdrawTx.feeAssetId))
55- if (if (if (isPaymentTookPlace)
58+ if (if (if (if (isPaymentTookPlace)
5659 then isWin
5760 else false)
5861 then isAmountOk
5962 else false)
6063 then isFeeInWaves
64+ else false)
65+ then !(isCheater)
6166 else false
6267 case _ =>
6368 false
6570 case dtx: DataTransaction =>
6671 let paymentTxIdStr = extract(dtx.data[0].key)
6772 let paymentTx = transactionById(fromBase58String(paymentTxIdStr))
68- let isFeeCorrect = (dataTxFee >= dtx.fee)
73+ let isFeeCorrect = (dtx.fee == dataTxFee)
6974 let isPaymentAlreadyMentioned = isDefined(getString(me, paymentTxIdStr))
7075 let withdrawTransactionId = fromBase58String(extract(getString(me, paymentTxIdStr)))
7176 let isWithdrawExist = isDefined(transactionById(withdrawTransactionId))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 1 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
33 let me = tx.sender
44 let oracle = extract(addressFromString("3NCzaYTNDGtR8zf9yfcqePFjCqFx9S5zhs4"))
55 let dataTxFee = 1000000
66 match tx {
77 case withdrawTx: TransferTransaction =>
88 let txId = extract(getString(me, toBase58String(tx.proofs[1])))
99 match transactionById(tx.proofs[1]) {
1010 case paymentTx: TransferTransaction =>
1111 let isPaymentTookPlace = if ((txId == toBase58String(tx.id)))
1212 then sigVerify(tx.bodyBytes, tx.proofs[0], paymentTx.senderPublicKey)
1313 else false
1414 let att = paymentTx.attachment
1515 let type = dropRightBytes(takeRightBytes(att, 2), 1)
1616 let val = takeRightBytes(att, 1)
1717 let key = dropRightBytes(att, 2)
18+ let keyforHeight = (key + fromBase58String("height"))
19+ let heightRes = extract(getInteger(oracle, toBase58String(key)))
20+ let isCheater = (extract(transactionHeightById(paymentTx.id)) >= heightRes)
1821 let valComplex = extract(getBinary(oracle, toBase58String(key)))
1922 let koeff = if ((type == drop(toBytes(0), 7)))
2023 then 35
2124 else if ((type == drop(toBytes(1), 7)))
2225 then 1
2326 else if ((type == drop(toBytes(2), 7)))
2427 then 1
2528 else if ((type == drop(toBytes(3), 7)))
2629 then 1
2730 else if ((type == drop(toBytes(4), 7)))
2831 then 2
2932 else if ((type == drop(toBytes(5), 7)))
3033 then 2
3134 else if ((type == drop(toBytes(6), 7)))
3235 then 2
3336 else 0
3437 let ver = take(valComplex, 1)
3538 let valReal = if ((type == drop(toBytes(0), 7)))
3639 then drop(take(valComplex, 2), 1)
3740 else if ((type == drop(toBytes(1), 7)))
3841 then drop(take(valComplex, 3), 2)
3942 else if ((type == drop(toBytes(2), 7)))
4043 then drop(take(valComplex, 4), 3)
4144 else if ((type == drop(toBytes(3), 7)))
4245 then drop(take(valComplex, 5), 4)
4346 else if ((type == drop(toBytes(4), 7)))
4447 then drop(take(valComplex, 6), 5)
4548 else if ((type == drop(toBytes(5), 7)))
4649 then drop(take(valComplex, 7), 5)
4750 else if ((type == drop(toBytes(6), 7)))
4851 then drop(take(valComplex, 8), 6)
4952 else toBytes(38)
5053 let isWin = if ((val == valReal))
5154 then (val != toBytes(38))
5255 else false
5356 let isAmountOk = (withdrawTx.amount == (((paymentTx.amount * koeff) - dataTxFee) - withdrawTx.fee))
5457 let isFeeInWaves = !(isDefined(withdrawTx.feeAssetId))
55- if (if (if (isPaymentTookPlace)
58+ if (if (if (if (isPaymentTookPlace)
5659 then isWin
5760 else false)
5861 then isAmountOk
5962 else false)
6063 then isFeeInWaves
64+ else false)
65+ then !(isCheater)
6166 else false
6267 case _ =>
6368 false
6469 }
6570 case dtx: DataTransaction =>
6671 let paymentTxIdStr = extract(dtx.data[0].key)
6772 let paymentTx = transactionById(fromBase58String(paymentTxIdStr))
68- let isFeeCorrect = (dataTxFee >= dtx.fee)
73+ let isFeeCorrect = (dtx.fee == dataTxFee)
6974 let isPaymentAlreadyMentioned = isDefined(getString(me, paymentTxIdStr))
7075 let withdrawTransactionId = fromBase58String(extract(getString(me, paymentTxIdStr)))
7176 let isWithdrawExist = isDefined(transactionById(withdrawTransactionId))
7277 match paymentTx {
7378 case paymentTx: TransferTransaction =>
7479 let isDtxSignedByPayer = sigVerify(dtx.bodyBytes, dtx.proofs[0], paymentTx.senderPublicKey)
7580 if (if (if (!(isPaymentAlreadyMentioned))
7681 then true
7782 else !(isWithdrawExist))
7883 then isDtxSignedByPayer
7984 else false)
8085 then isFeeCorrect
8186 else false
8287 case _ =>
8388 false
8489 }
8590 case _ =>
8691 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
8792 }

github/deemru/w8io/169f3d6 
67.39 ms