tx · 6MDdQpzBLoHzBxAfej8fSKzrshwdCB781wS4mxR7hUCd

3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu:  -0.01400000 Waves

2019.01.30 23:22 [473475] smart account 3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu > SELF 0.00000000 Waves

{ "type": 13, "id": "6MDdQpzBLoHzBxAfej8fSKzrshwdCB781wS4mxR7hUCd", "fee": 1400000, "feeAssetId": null, "timestamp": 1548879738064, "version": 1, "sender": "3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu", "senderPublicKey": "F3DbYSfYZz6arcD6Mst8HdWScxTeWvTvatC7jp4DGryX", "proofs": [ "XgNKe5MeP3PKHJfSCEp2sVXJFwm4WvLo1fYtHS747Xf6dUydg19FdDjQ92BLcH8vLY1zzrGCDipoZRRfLZ5f1Ek" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAABm9yYWNsZQkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTkN6YVlUTkRHdFI4emY5eWZjcWVQRmpDcUZ4OVM1emhzNAQAAAAJZGF0YVR4RmVlAAAAAAAAD0JABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAAKd2l0aGRyYXdUeAUAAAAHJG1hdGNoMAQAAAAEdHhJZAkBAAAAB2V4dHJhY3QAAAABCQAEHQAAAAIFAAAAAm1lCQACWAAAAAEJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQQAAAAHJG1hdGNoMQkAA+gAAAABCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEDCQAAAQAAAAIFAAAAByRtYXRjaDECAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAACXBheW1lbnRUeAUAAAAHJG1hdGNo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0 } View: original | compacted Prev: GkVfWHNu7Y41a5wwvMojUAPkBZSkfrYcT4RbJ58Sh1NE Next: GgkZ4iKbKtGhRKWLo8owD1EMbenWKp2hihHHFp2zjXmm Diff:
OldNewDifferences
7070 case dtx: DataTransaction =>
7171 let paymentTxIdStr = extract(dtx.data[0].key)
7272 let paymentTx = transactionById(fromBase58String(paymentTxIdStr))
73- let isFeeCorrect = (dtx.fee == dataTxFee)
73+ let isFeeCorrect = (dataTxFee >= dtx.fee)
7474 let isPaymentAlreadyMentioned = isDefined(getString(me, paymentTxIdStr))
7575 let withdrawTransactionId = fromBase58String(extract(getString(me, paymentTxIdStr)))
7676 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)
1818 let keyforHeight = (key + fromBase58String("height"))
1919 let heightRes = extract(getInteger(oracle, toBase58String(key)))
2020 let isCheater = (extract(transactionHeightById(paymentTx.id)) >= heightRes)
2121 let valComplex = extract(getBinary(oracle, toBase58String(key)))
2222 let koeff = if ((type == drop(toBytes(0), 7)))
2323 then 35
2424 else if ((type == drop(toBytes(1), 7)))
2525 then 1
2626 else if ((type == drop(toBytes(2), 7)))
2727 then 1
2828 else if ((type == drop(toBytes(3), 7)))
2929 then 1
3030 else if ((type == drop(toBytes(4), 7)))
3131 then 2
3232 else if ((type == drop(toBytes(5), 7)))
3333 then 2
3434 else if ((type == drop(toBytes(6), 7)))
3535 then 2
3636 else 0
3737 let ver = take(valComplex, 1)
3838 let valReal = if ((type == drop(toBytes(0), 7)))
3939 then drop(take(valComplex, 2), 1)
4040 else if ((type == drop(toBytes(1), 7)))
4141 then drop(take(valComplex, 3), 2)
4242 else if ((type == drop(toBytes(2), 7)))
4343 then drop(take(valComplex, 4), 3)
4444 else if ((type == drop(toBytes(3), 7)))
4545 then drop(take(valComplex, 5), 4)
4646 else if ((type == drop(toBytes(4), 7)))
4747 then drop(take(valComplex, 6), 5)
4848 else if ((type == drop(toBytes(5), 7)))
4949 then drop(take(valComplex, 7), 5)
5050 else if ((type == drop(toBytes(6), 7)))
5151 then drop(take(valComplex, 8), 6)
5252 else toBytes(38)
5353 let isWin = if ((val == valReal))
5454 then (val != toBytes(38))
5555 else false
5656 let isAmountOk = (withdrawTx.amount == (((paymentTx.amount * koeff) - dataTxFee) - withdrawTx.fee))
5757 let isFeeInWaves = !(isDefined(withdrawTx.feeAssetId))
5858 if (if (if (if (isPaymentTookPlace)
5959 then isWin
6060 else false)
6161 then isAmountOk
6262 else false)
6363 then isFeeInWaves
6464 else false)
6565 then !(isCheater)
6666 else false
6767 case _ =>
6868 false
6969 }
7070 case dtx: DataTransaction =>
7171 let paymentTxIdStr = extract(dtx.data[0].key)
7272 let paymentTx = transactionById(fromBase58String(paymentTxIdStr))
73- let isFeeCorrect = (dtx.fee == dataTxFee)
73+ let isFeeCorrect = (dataTxFee >= dtx.fee)
7474 let isPaymentAlreadyMentioned = isDefined(getString(me, paymentTxIdStr))
7575 let withdrawTransactionId = fromBase58String(extract(getString(me, paymentTxIdStr)))
7676 let isWithdrawExist = isDefined(transactionById(withdrawTransactionId))
7777 match paymentTx {
7878 case paymentTx: TransferTransaction =>
7979 let isDtxSignedByPayer = sigVerify(dtx.bodyBytes, dtx.proofs[0], paymentTx.senderPublicKey)
8080 if (if (if (!(isPaymentAlreadyMentioned))
8181 then true
8282 else !(isWithdrawExist))
8383 then isDtxSignedByPayer
8484 else false)
8585 then isFeeCorrect
8686 else false
8787 case _ =>
8888 false
8989 }
9090 case _ =>
9191 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
9292 }

github/deemru/w8io/169f3d6 
100.26 ms