tx · 5kVbkb7GuosvuYAM87cS61pgndEiiscWmx8M9ovoPESE

3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu:  -0.01400000 Waves

2019.02.02 09:14 [476988] smart account 3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu > SELF 0.00000000 Waves

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

github/deemru/w8io/169f3d6 
29.19 ms