tx · 3Q1CXEN7yJVzHMQMHDMvnTC5iM7uvvN4ZBhT5WaVwyUj

3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu:  -0.01400000 Waves

2019.02.02 01:07 [476500] smart account 3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu > SELF 0.00000000 Waves

{ "type": 13, "id": "3Q1CXEN7yJVzHMQMHDMvnTC5iM7uvvN4ZBhT5WaVwyUj", "fee": 1400000, "feeAssetId": null, "timestamp": 1549058872588, "version": 1, "sender": "3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu", "senderPublicKey": "F3DbYSfYZz6arcD6Mst8HdWScxTeWvTvatC7jp4DGryX", "proofs": [ "254Mz5SweBPinRkD6GHzojt55zUHNS8EPwG9FRPcvNVng9vwGZe8Tz7ht7Mzr7pg1PYDVQT466aWrDyxDqiNZEdR" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAABm9yYWNsZQkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTkN6YVlUTkRHdFI4emY5eWZjcWVQRmpDcUZ4OVM1emhzNAQAAAAJZGF0YVR4RmVlAAAAAAAAD0JABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAAKd2l0aGRyYXdUeAUAAAAHJG1hdGNoMAQAAAAEdHhJZAkBAAAAB2V4dHJhY3QAAAABCQAEHQAAAAIFAAAAAm1lCQACWAAAAAEJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQQAAAAHJG1hdGNoMQkAA+gAAAABCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEDCQAAAQAAAAIFAAAAByRtYXRjaDECAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAACXBheW1lbnRUeAUAAAA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wGyeGruTkHTk4ah3aJbDP2X 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 valComplex = extract(getBinary(oracle, toBase58String(key)))
1919 let koeff = if ((type == drop(toBytes(0), 7)))
2020 then 35
2121 else if ((type == drop(toBytes(1), 7)))
2222 then 1
2323 else if ((type == drop(toBytes(2), 7)))
2424 then 1
2525 else if ((type == drop(toBytes(3), 7)))
2626 then 1
2727 else if ((type == drop(toBytes(4), 7)))
2828 then 2
2929 else if ((type == drop(toBytes(5), 7)))
3030 then 2
3131 else 0
3232 let isAmountOk = (withdrawTx.amount == (((paymentTx.amount * koeff) - dataTxFee) - withdrawTx.fee))
3333 let isInWaves = if (!(isDefined(withdrawTx.feeAssetId)))
3434 then !(isDefined(withdrawTx.assetId))
3535 else false
3636 if (if (isPaymentTookPlace)
3737 then isAmountOk
3838 else false)
3939 then isInWaves
4040 else false
4141 case _ =>
4242 false
4343 }
4444 case dtx: DataTransaction =>
4545 let paymentTxIdStr = extract(dtx.data[0].key)
4646 let feesKey = (paymentTxIdStr + "_fees")
4747 let paymentTx = transactionById(fromBase58String(paymentTxIdStr))
4848 let newFees = extract(getInteger(dtx.data, feesKey))
4949 let oldFees = if (isDefined(getInteger(me, feesKey)))
5050 then extract(getInteger(me, feesKey))
5151 else 0
5252 let isFeeCorrect = (newFees == (oldFees + dtx.fee))
5353 let isPaymentAlreadyMentioned = isDefined(getString(me, paymentTxIdStr))
5454 let withdrawTransactionId = fromBase58String(extract(getString(me, paymentTxIdStr)))
5555 let isWithdrawExist = isDefined(transactionById(withdrawTransactionId))
5656 match paymentTx {
5757 case paymentTx: TransferTransaction =>
5858 let isDtxSignedByPayer = sigVerify(dtx.bodyBytes, dtx.proofs[0], paymentTx.senderPublicKey)
5959 if (if (if (if (!(isPaymentAlreadyMentioned))
6060 then true
6161 else !(isWithdrawExist))
6262 then isDtxSignedByPayer
6363 else false)
6464 then isFeeCorrect
6565 else false)
6666 then {
6767 let att = paymentTx.attachment
6868 let type = dropRightBytes(takeRightBytes(att, 2), 1)
6969 let val = takeRightBytes(att, 1)
7070 let key = dropRightBytes(att, 2)
7171 let heightRes = extract(getInteger(oracle, (toBase58String(key) + "height")))
7272 let isCheater = (extract(transactionHeightById(paymentTx.id)) >= heightRes)
7373 let valComplex = extract(getBinary(oracle, toBase58String(key)))
7474 let koeff = if ((type == drop(toBytes(0), 7)))
7575 then 35
7676 else if ((type == drop(toBytes(1), 7)))
7777 then 1
7878 else if ((type == drop(toBytes(2), 7)))
7979 then 1
8080 else if ((type == drop(toBytes(3), 7)))
8181 then 1
8282 else if ((type == drop(toBytes(4), 7)))
8383 then 2
8484 else if ((type == drop(toBytes(5), 7)))
8585 then 2
8686 else 0
8787 let ver = take(valComplex, 1)
8888 let valReal = if ((type == drop(toBytes(0), 7)))
8989 then drop(take(valComplex, 2), 1)
9090 else if ((type == drop(toBytes(1), 7)))
9191 then drop(take(valComplex, 3), 2)
9292 else if ((type == drop(toBytes(2), 7)))
9393 then drop(take(valComplex, 4), 3)
9494 else if ((type == drop(toBytes(3), 7)))
9595 then drop(take(valComplex, 5), 4)
9696 else if ((type == drop(toBytes(4), 7)))
9797 then drop(take(valComplex, 6), 5)
9898 else if ((type == drop(toBytes(5), 7)))
9999 then drop(take(valComplex, 7), 5)
100100 else toBytes(38)
101101 let isWin = if ((val == valReal))
102102 then (val != toBytes(38))
103103 else false
104104 isWin
105105 }
106106 else false
107107 case _ =>
108108 false
109109 }
110110 case _ =>
111111 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
112112 }

github/deemru/w8io/026f985 
34.09 ms