tx · BCQLfFh7cqhkDGJFHw8eBefQbaYLQYFb8zAygvTQFmLv

3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu:  -0.01400000 Waves

2019.01.30 22:48 [473440] smart account 3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu > SELF 0.00000000 Waves

{ "type": 13, "id": "BCQLfFh7cqhkDGJFHw8eBefQbaYLQYFb8zAygvTQFmLv", "fee": 1400000, "feeAssetId": null, "timestamp": 1548877744368, "version": 1, "sender": "3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu", "senderPublicKey": "F3DbYSfYZz6arcD6Mst8HdWScxTeWvTvatC7jp4DGryX", "proofs": [ "36nbXtQTm8WGJfBEpqVMdJko6ZP5mdh7zhFrcPxF5fzcrDLkp5MMUjL4qFhrmCV5Ukd3xxiq7sLCMnbQ568V7KFC" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAABm9yYWNsZQkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTkN6YVlUTkRHdFI4emY5eWZjcWVQRmpDcUZ4OVM1emhzNAQAAAAJZGF0YVR4RmVlAAAAAAAAD0JABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAAKd2l0aGRyYXdUeAUAAAAHJG1hdGNoMAQAAAAEdHhJZAkBAAAAB2V4dHJhY3QAAAABCQAEHQAAAAIFAAAAAm1lCQACWAAAAAEJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQQAAAAHJG1hdGNoMQkAA+gAAAABCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEDCQAAAQAAAAIFAAAAByRtYXRjaDECAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAACXBheW1lbnRUeAUAAAAHJG1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hY3QAAAABCQAEHQAAAAIFAAAAAm1lBQAAAA5wYXltZW50VHhJZFN0cgQAAAAPaXNXaXRoZHJhd0V4aXN0CQEAAAAJaXNEZWZpbmVkAAAAAQkAA+gAAAABBQAAABV3aXRoZHJhd1RyYW5zYWN0aW9uSWQEAAAAByRtYXRjaDEFAAAACXBheW1lbnRUeAMJAAABAAAAAgUAAAAHJG1hdGNoMQIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAAJcGF5bWVudFR4BQAAAAckbWF0Y2gxBAAAABJpc0R0eFNpZ25lZEJ5UGF5ZXIJAAH0AAAAAwgFAAAAA2R0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAA2R0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAlwYXltZW50VHgAAAAPc2VuZGVyUHVibGljS2V5AwMDCQEAAAABIQAAAAEFAAAAGWlzUGF5bWVudEFscmVhZHlNZW50aW9uZWQGCQEAAAABIQAAAAEFAAAAD2lzV2l0aGRyYXdFeGlzdAUAAAASaXNEdHhTaWduZWRCeVBheWVyBwUAAAAMaXNGZWVDb3JyZWN0BwcJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5HGBSVA==", "chainId": 84, "height": 473440, "spentComplexity": 0 } View: original | compacted Prev: Et5wC2vgp9NXw3Sy7nCMSvcy7Yo4N6VegS3PuG1qF6tA Next: DbRAXgFPLEaHxr9g4ALkkVFtJPbPMCLGWwCa1YfkevSv Diff:
OldNewDifferences
22 {-# CONTENT_TYPE EXPRESSION #-}
33 let me = tx.sender
44 let oracle = extract(addressFromString("3NCzaYTNDGtR8zf9yfcqePFjCqFx9S5zhs4"))
5+let dataTxFee = 1000000
56 match tx {
67 case withdrawTx: TransferTransaction =>
78 let txId = extract(getString(me, toBase58String(tx.proofs[1])))
4950 let isWin = if ((val == valReal))
5051 then (val != toBytes(38))
5152 else false
52- let isAmountOk = (withdrawTx.amount == (paymentTx.amount * koeff))
53- if (if (isPaymentTookPlace)
53+ let isAmountOk = (withdrawTx.amount == (((paymentTx.amount * koeff) - dataTxFee) - withdrawTx.fee))
54+ let isFeeInWaves = !(isDefined(withdrawTx.feeAssetId))
55+ if (if (if (isPaymentTookPlace)
5456 then isWin
5557 else false)
5658 then isAmountOk
59+ else false)
60+ then isFeeInWaves
5761 else false
5862 case _ =>
5963 false
6165 case dtx: DataTransaction =>
6266 let paymentTxIdStr = extract(dtx.data[0].key)
6367 let paymentTx = transactionById(fromBase58String(paymentTxIdStr))
68+ let isFeeCorrect = (dtx.fee == dataTxFee)
6469 let isPaymentAlreadyMentioned = isDefined(getString(me, paymentTxIdStr))
6570 let withdrawTransactionId = fromBase58String(extract(getString(me, paymentTxIdStr)))
6671 let isWithdrawExist = isDefined(transactionById(withdrawTransactionId))
6772 match paymentTx {
6873 case paymentTx: TransferTransaction =>
6974 let isDtxSignedByPayer = sigVerify(dtx.bodyBytes, dtx.proofs[0], paymentTx.senderPublicKey)
70- if (if (!(isPaymentAlreadyMentioned))
75+ if (if (if (!(isPaymentAlreadyMentioned))
7176 then true
7277 else !(isWithdrawExist))
7378 then isDtxSignedByPayer
79+ else false)
80+ then isFeeCorrect
7481 else false
7582 case _ =>
7683 false
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
56 match tx {
67 case withdrawTx: TransferTransaction =>
78 let txId = extract(getString(me, toBase58String(tx.proofs[1])))
89 match transactionById(tx.proofs[1]) {
910 case paymentTx: TransferTransaction =>
1011 let isPaymentTookPlace = if ((txId == toBase58String(tx.id)))
1112 then sigVerify(tx.bodyBytes, tx.proofs[0], paymentTx.senderPublicKey)
1213 else false
1314 let att = paymentTx.attachment
1415 let type = dropRightBytes(takeRightBytes(att, 2), 1)
1516 let val = takeRightBytes(att, 1)
1617 let key = dropRightBytes(att, 2)
1718 let valComplex = extract(getBinary(oracle, toBase58String(key)))
1819 let koeff = if ((type == drop(toBytes(0), 7)))
1920 then 35
2021 else if ((type == drop(toBytes(1), 7)))
2122 then 1
2223 else if ((type == drop(toBytes(2), 7)))
2324 then 1
2425 else if ((type == drop(toBytes(3), 7)))
2526 then 1
2627 else if ((type == drop(toBytes(4), 7)))
2728 then 2
2829 else if ((type == drop(toBytes(5), 7)))
2930 then 2
3031 else if ((type == drop(toBytes(6), 7)))
3132 then 2
3233 else 0
3334 let ver = take(valComplex, 1)
3435 let valReal = if ((type == drop(toBytes(0), 7)))
3536 then drop(take(valComplex, 2), 1)
3637 else if ((type == drop(toBytes(1), 7)))
3738 then drop(take(valComplex, 3), 2)
3839 else if ((type == drop(toBytes(2), 7)))
3940 then drop(take(valComplex, 4), 3)
4041 else if ((type == drop(toBytes(3), 7)))
4142 then drop(take(valComplex, 5), 4)
4243 else if ((type == drop(toBytes(4), 7)))
4344 then drop(take(valComplex, 6), 5)
4445 else if ((type == drop(toBytes(5), 7)))
4546 then drop(take(valComplex, 7), 5)
4647 else if ((type == drop(toBytes(6), 7)))
4748 then drop(take(valComplex, 8), 6)
4849 else toBytes(38)
4950 let isWin = if ((val == valReal))
5051 then (val != toBytes(38))
5152 else false
52- let isAmountOk = (withdrawTx.amount == (paymentTx.amount * koeff))
53- if (if (isPaymentTookPlace)
53+ let isAmountOk = (withdrawTx.amount == (((paymentTx.amount * koeff) - dataTxFee) - withdrawTx.fee))
54+ let isFeeInWaves = !(isDefined(withdrawTx.feeAssetId))
55+ if (if (if (isPaymentTookPlace)
5456 then isWin
5557 else false)
5658 then isAmountOk
59+ else false)
60+ then isFeeInWaves
5761 else false
5862 case _ =>
5963 false
6064 }
6165 case dtx: DataTransaction =>
6266 let paymentTxIdStr = extract(dtx.data[0].key)
6367 let paymentTx = transactionById(fromBase58String(paymentTxIdStr))
68+ let isFeeCorrect = (dtx.fee == dataTxFee)
6469 let isPaymentAlreadyMentioned = isDefined(getString(me, paymentTxIdStr))
6570 let withdrawTransactionId = fromBase58String(extract(getString(me, paymentTxIdStr)))
6671 let isWithdrawExist = isDefined(transactionById(withdrawTransactionId))
6772 match paymentTx {
6873 case paymentTx: TransferTransaction =>
6974 let isDtxSignedByPayer = sigVerify(dtx.bodyBytes, dtx.proofs[0], paymentTx.senderPublicKey)
70- if (if (!(isPaymentAlreadyMentioned))
75+ if (if (if (!(isPaymentAlreadyMentioned))
7176 then true
7277 else !(isWithdrawExist))
7378 then isDtxSignedByPayer
79+ else false)
80+ then isFeeCorrect
7481 else false
7582 case _ =>
7683 false
7784 }
7885 case _ =>
7986 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
8087 }

github/deemru/w8io/169f3d6 
23.84 ms