tx · DQ4QHApfJAsdefLPNzudLuvaTjCvJPDbENJrtK5FqCWm

3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu:  -0.01400000 Waves

2019.02.02 01:20 [476512] smart account 3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu > SELF 0.00000000 Waves

{ "type": 13, "id": "DQ4QHApfJAsdefLPNzudLuvaTjCvJPDbENJrtK5FqCWm", "fee": 1400000, "feeAssetId": null, "timestamp": 1549059640106, "version": 1, "sender": "3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu", "senderPublicKey": "F3DbYSfYZz6arcD6Mst8HdWScxTeWvTvatC7jp4DGryX", "proofs": [ "5Dkz9hpT9faHtmY5asHSq4ShBX35Zxzeywi3khETF2r9FGWK1yK7ue8in1WBoHZh1FPfeE2ntovtpTfHA68PRTYa" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAABm9yYWNsZQkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTkN6YVlUTkRHdFI4emY5eWZjcWVQRmpDcUZ4OVM1emhzNAQAAAAJZGF0YVR4RmVlAAAAAAAAD0JABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAAKd2l0aGRyYXdUeAUAAAAHJG1hdGNoMAQAAAAEdHhJZAkBAAAAB2V4dHJhY3QAAAABCQAEHQAAAAIFAAAAAm1lCQACWAAAAAEJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQQAAAAHJG1hdGNoMQkAA+gAAAABCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEDCQAAAQAAAAIFAAAAByRtYXRjaDECAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAACXBheW1lbnRUeAUAAAAHJG1hdGNoMQQ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gAAAAPc2VuZGVyUHVibGljS2V5cKkLJg==", "chainId": 84, "height": 476512, "spentComplexity": 0 } View: original | compacted Prev: CrMbxbC5ZF3uB87eZAM4dZai2P98PLPZFqm7oUUxGRgh Next: 2UYZfMmuvrT9jit8XetQaUtxzKZvkdosZmSt5F1ZGba2 Diff:
OldNewDifferences
1212 then sigVerify(tx.bodyBytes, tx.proofs[0], paymentTx.senderPublicKey)
1313 else false
1414 let att = paymentTx.attachment
15+ let feesKey = (txId + "_fees")
16+ let dataTxsFees = extract(getInteger(me, feesKey))
1517 let type = dropRightBytes(takeRightBytes(att, 2), 1)
1618 let val = takeRightBytes(att, 1)
1719 let key = dropRightBytes(att, 2)
2931 else if ((type == drop(toBytes(5), 7)))
3032 then 2
3133 else 0
32- let isAmountOk = (withdrawTx.amount == (((paymentTx.amount * koeff) - dataTxFee) - withdrawTx.fee))
34+ let isAmountOk = (withdrawTx.amount == (((paymentTx.amount * koeff) - dataTxsFees) - withdrawTx.fee))
3335 let isInWaves = if (!(isDefined(withdrawTx.feeAssetId)))
3436 then !(isDefined(withdrawTx.assetId))
3537 else false
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
15+ let feesKey = (txId + "_fees")
16+ let dataTxsFees = extract(getInteger(me, feesKey))
1517 let type = dropRightBytes(takeRightBytes(att, 2), 1)
1618 let val = takeRightBytes(att, 1)
1719 let key = dropRightBytes(att, 2)
1820 let valComplex = extract(getBinary(oracle, toBase58String(key)))
1921 let koeff = if ((type == drop(toBytes(0), 7)))
2022 then 35
2123 else if ((type == drop(toBytes(1), 7)))
2224 then 1
2325 else if ((type == drop(toBytes(2), 7)))
2426 then 1
2527 else if ((type == drop(toBytes(3), 7)))
2628 then 1
2729 else if ((type == drop(toBytes(4), 7)))
2830 then 2
2931 else if ((type == drop(toBytes(5), 7)))
3032 then 2
3133 else 0
32- let isAmountOk = (withdrawTx.amount == (((paymentTx.amount * koeff) - dataTxFee) - withdrawTx.fee))
34+ let isAmountOk = (withdrawTx.amount == (((paymentTx.amount * koeff) - dataTxsFees) - withdrawTx.fee))
3335 let isInWaves = if (!(isDefined(withdrawTx.feeAssetId)))
3436 then !(isDefined(withdrawTx.assetId))
3537 else false
3638 if (if (isPaymentTookPlace)
3739 then isAmountOk
3840 else false)
3941 then isInWaves
4042 else false
4143 case _ =>
4244 false
4345 }
4446 case dtx: DataTransaction =>
4547 let paymentTxIdStr = extract(dtx.data[0].key)
4648 let feesKey = (paymentTxIdStr + "_fees")
4749 let paymentTx = transactionById(fromBase58String(paymentTxIdStr))
4850 let newFees = extract(getInteger(dtx.data, feesKey))
4951 let oldFees = if (isDefined(getInteger(me, feesKey)))
5052 then extract(getInteger(me, feesKey))
5153 else 0
5254 let isFeeCorrect = (newFees == (oldFees + dtx.fee))
5355 let isPaymentAlreadyMentioned = isDefined(getString(me, paymentTxIdStr))
5456 let withdrawTransactionId = fromBase58String(extract(getString(me, paymentTxIdStr)))
5557 let isWithdrawExist = isDefined(transactionById(withdrawTransactionId))
5658 match paymentTx {
5759 case paymentTx: TransferTransaction =>
5860 let isDtxSignedByPayer = sigVerify(dtx.bodyBytes, dtx.proofs[0], paymentTx.senderPublicKey)
5961 if (if (if (if (!(isPaymentAlreadyMentioned))
6062 then true
6163 else !(isWithdrawExist))
6264 then isDtxSignedByPayer
6365 else false)
6466 then isFeeCorrect
6567 else false)
6668 then {
6769 let att = paymentTx.attachment
6870 let type = dropRightBytes(takeRightBytes(att, 2), 1)
6971 let val = takeRightBytes(att, 1)
7072 let key = dropRightBytes(att, 2)
7173 let heightRes = extract(getInteger(oracle, (toBase58String(key) + "height")))
7274 let isCheater = (extract(transactionHeightById(paymentTx.id)) >= heightRes)
7375 let valComplex = extract(getBinary(oracle, toBase58String(key)))
7476 let koeff = if ((type == drop(toBytes(0), 7)))
7577 then 35
7678 else if ((type == drop(toBytes(1), 7)))
7779 then 1
7880 else if ((type == drop(toBytes(2), 7)))
7981 then 1
8082 else if ((type == drop(toBytes(3), 7)))
8183 then 1
8284 else if ((type == drop(toBytes(4), 7)))
8385 then 2
8486 else if ((type == drop(toBytes(5), 7)))
8587 then 2
8688 else 0
8789 let ver = take(valComplex, 1)
8890 let valReal = if ((type == drop(toBytes(0), 7)))
8991 then drop(take(valComplex, 2), 1)
9092 else if ((type == drop(toBytes(1), 7)))
9193 then drop(take(valComplex, 3), 2)
9294 else if ((type == drop(toBytes(2), 7)))
9395 then drop(take(valComplex, 4), 3)
9496 else if ((type == drop(toBytes(3), 7)))
9597 then drop(take(valComplex, 5), 4)
9698 else if ((type == drop(toBytes(4), 7)))
9799 then drop(take(valComplex, 6), 5)
98100 else if ((type == drop(toBytes(5), 7)))
99101 then drop(take(valComplex, 7), 5)
100102 else toBytes(38)
101103 let isWin = if ((val == valReal))
102104 then (val != toBytes(38))
103105 else false
104106 isWin
105107 }
106108 else false
107109 case _ =>
108110 false
109111 }
110112 case _ =>
111113 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
112114 }

github/deemru/w8io/169f3d6 
24.08 ms