tx · 6LBUpv5H64uHhfz4Ao2oLoUcGj2EgQuV2zmVh6faJeWT

3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu:  -0.01400000 Waves

2019.01.31 19:09 [474649] smart account 3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu > SELF 0.00000000 Waves

{ "type": 13, "id": "6LBUpv5H64uHhfz4Ao2oLoUcGj2EgQuV2zmVh6faJeWT", "fee": 1400000, "feeAssetId": null, "timestamp": 1548951017245, "version": 1, "sender": "3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu", "senderPublicKey": "F3DbYSfYZz6arcD6Mst8HdWScxTeWvTvatC7jp4DGryX", "proofs": [ "5tLXMSjVD4vU7NokNJM8tux9G3sX77smMFzNTSXtJTh4vQHTjoEAePR9x4MgA4gzwQJQqjmtRDizHFVyu1gG2xu9" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAABm9yYWNsZQkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTkN6YVlUTkRHdFI4emY5eWZjcWVQRmpDcUZ4OVM1emhzNAQAAAAJZGF0YVR4RmVlAAAAAAAAD0JABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAAKd2l0aGRyYXdUeAUAAAAHJG1hdGNoMAQAAAAEdHhJZAkBAAAAB2V4dHJhY3QAAAABCQAEHQAAAAIFAAAAAm1lCQACWAAAAAEJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQQAAAAHJG1hdGNoMQkAA+gAAAABCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEDCQAAAQAAAAIFAAAAByRtYXRjaDECAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAACXBheW1lbnRUeAUAAAAHJG1hd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AAABCQAEHQAAAAIFAAAAAm1lBQAAAA5wYXltZW50VHhJZFN0cgQAAAAVd2l0aGRyYXdUcmFuc2FjdGlvbklkCQACWQAAAAEJAQAAAAdleHRyYWN0AAAAAQkABB0AAAACBQAAAAJtZQUAAAAOcGF5bWVudFR4SWRTdHIEAAAAD2lzV2l0aGRyYXdFeGlzdAkBAAAACWlzRGVmaW5lZAAAAAEJAAPoAAAAAQUAAAAVd2l0aGRyYXdUcmFuc2FjdGlvbklkBAAAAAckbWF0Y2gxBQAAAAlwYXltZW50VHgDCQAAAQAAAAIFAAAAByRtYXRjaDECAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAACXBheW1lbnRUeAUAAAAHJG1hdGNoMQQAAAASaXNEdHhTaWduZWRCeVBheWVyCQAB9AAAAAMIBQAAAANkdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAANkdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAAJcGF5bWVudFR4AAAAD3NlbmRlclB1YmxpY0tleQMDAwkBAAAAASEAAAABBQAAABlpc1BheW1lbnRBbHJlYWR5TWVudGlvbmVkBgkBAAAAASEAAAABBQAAAA9pc1dpdGhkcmF3RXhpc3QFAAAAEmlzRHR4U2lnbmVkQnlQYXllcgcFAAAADGlzRmVlQ29ycmVjdAcHCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tlefUnURw=", "chainId": 84, "height": 474649, "spentComplexity": 0 } View: original | compacted Prev: CJ5H8aSojr6ZKk8vb1M9zK4r1eTvboWvEAJn43kYc6nt Next: 4VECnfzwwYjZbvy7jKxX22mMATqE61XyPM7R9TsxtYmS Diff:
OldNewDifferences
1515 let type = dropRightBytes(takeRightBytes(att, 2), 1)
1616 let val = takeRightBytes(att, 1)
1717 let key = dropRightBytes(att, 2)
18+ let heightRes = extract(getInteger(oracle, (toBase58String(key) + "height")))
19+ let isCheater = (extract(transactionHeightById(paymentTx.id)) >= heightRes)
1820 let valComplex = extract(getBinary(oracle, toBase58String(key)))
1921 let koeff = if ((type == drop(toBytes(0), 7)))
2022 then 35
5052 let isInWaves = if (!(isDefined(withdrawTx.feeAssetId)))
5153 then !(isDefined(withdrawTx.assetId))
5254 else false
53- if (if (if (isPaymentTookPlace)
55+ if (if (if (if (isPaymentTookPlace)
5456 then isWin
5557 else false)
5658 then isAmountOk
5759 else false)
5860 then isInWaves
61+ else false)
62+ then !(isCheater)
5963 else false
6064 case _ =>
6165 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
1515 let type = dropRightBytes(takeRightBytes(att, 2), 1)
1616 let val = takeRightBytes(att, 1)
1717 let key = dropRightBytes(att, 2)
18+ let heightRes = extract(getInteger(oracle, (toBase58String(key) + "height")))
19+ let isCheater = (extract(transactionHeightById(paymentTx.id)) >= heightRes)
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
3234 let ver = take(valComplex, 1)
3335 let valReal = if ((type == drop(toBytes(0), 7)))
3436 then drop(take(valComplex, 2), 1)
3537 else if ((type == drop(toBytes(1), 7)))
3638 then drop(take(valComplex, 3), 2)
3739 else if ((type == drop(toBytes(2), 7)))
3840 then drop(take(valComplex, 4), 3)
3941 else if ((type == drop(toBytes(3), 7)))
4042 then drop(take(valComplex, 5), 4)
4143 else if ((type == drop(toBytes(4), 7)))
4244 then drop(take(valComplex, 6), 5)
4345 else if ((type == drop(toBytes(5), 7)))
4446 then drop(take(valComplex, 7), 5)
4547 else toBytes(38)
4648 let isWin = if ((val == valReal))
4749 then (val != toBytes(38))
4850 else false
4951 let isAmountOk = (withdrawTx.amount == (((paymentTx.amount * koeff) - dataTxFee) - withdrawTx.fee))
5052 let isInWaves = if (!(isDefined(withdrawTx.feeAssetId)))
5153 then !(isDefined(withdrawTx.assetId))
5254 else false
53- if (if (if (isPaymentTookPlace)
55+ if (if (if (if (isPaymentTookPlace)
5456 then isWin
5557 else false)
5658 then isAmountOk
5759 else false)
5860 then isInWaves
61+ else false)
62+ then !(isCheater)
5963 else false
6064 case _ =>
6165 false
6266 }
6367 case dtx: DataTransaction =>
6468 let paymentTxIdStr = extract(dtx.data[0].key)
6569 let paymentTx = transactionById(fromBase58String(paymentTxIdStr))
6670 let isFeeCorrect = (dataTxFee >= dtx.fee)
6771 let isPaymentAlreadyMentioned = isDefined(getString(me, paymentTxIdStr))
6872 let withdrawTransactionId = fromBase58String(extract(getString(me, paymentTxIdStr)))
6973 let isWithdrawExist = isDefined(transactionById(withdrawTransactionId))
7074 match paymentTx {
7175 case paymentTx: TransferTransaction =>
7276 let isDtxSignedByPayer = sigVerify(dtx.bodyBytes, dtx.proofs[0], paymentTx.senderPublicKey)
7377 if (if (if (!(isPaymentAlreadyMentioned))
7478 then true
7579 else !(isWithdrawExist))
7680 then isDtxSignedByPayer
7781 else false)
7882 then isFeeCorrect
7983 else false
8084 case _ =>
8185 false
8286 }
8387 case _ =>
8488 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
8589 }

github/deemru/w8io/169f3d6 
40.99 ms