tx · 9hkaeyuZ6CQ6dKEDhmgeiSk6XPhqmQBMXGFMmt3MkGHS

3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu:  -0.01400000 Waves

2019.02.02 00:12 [476437] smart account 3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu > SELF 0.00000000 Waves

{ "type": 13, "id": "9hkaeyuZ6CQ6dKEDhmgeiSk6XPhqmQBMXGFMmt3MkGHS", "fee": 1400000, "feeAssetId": null, "timestamp": 1549055626079, "version": 1, "sender": "3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu", "senderPublicKey": "F3DbYSfYZz6arcD6Mst8HdWScxTeWvTvatC7jp4DGryX", "proofs": [ "3mDJVfqA4uYEr6BfEJCoRzDoVkNStHBcjtUvv993rpnTqdC13RDeLT6iBxAkytzjAzzr4ytoTqGpjREj9HS1FvHk" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAABm9yYWNsZQkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTkN6YVlUTkRHdFI4emY5eWZjcWVQRmpDcUZ4OVM1emhzNAQAAAAJZGF0YVR4RmVlAAAAAAAAD0JABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAAKd2l0aGRyYXdUeAUAAAAHJG1hdGNoMAQAAAAEdHhJZAkBAAAAB2V4dHJhY3QAAAABCQAEHQAAAAIFAAAAAm1lCQACWAAAAAEJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQQAAAAHJG1hdGNoMQkAA+gAAAABCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEDCQAAAQAAAAIFAAAAByRtYXRjaDECAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAACXBheW1lbnRUeAUAAAA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BlCQAAygAAAAIJAAGaAAAAAQAAAAAAAAAAAwAAAAAAAAAABwkAAMoAAAACCQAAyQAAAAIFAAAACnZhbENvbXBsZXgAAAAAAAAAAAUAAAAAAAAAAAQDCQAAAAAAAAIFAAAABHR5cGUJAADKAAAAAgkAAZoAAAABAAAAAAAAAAAEAAAAAAAAAAAHCQAAygAAAAIJAADJAAAAAgUAAAAKdmFsQ29tcGxleAAAAAAAAAAABgAAAAAAAAAABQMJAAAAAAAAAgUAAAAEdHlwZQkAAMoAAAACCQABmgAAAAEAAAAAAAAAAAUAAAAAAAAAAAcJAADKAAAAAgkAAMkAAAACBQAAAAp2YWxDb21wbGV4AAAAAAAAAAAHAAAAAAAAAAAFCQABmgAAAAEAAAAAAAAAACYEAAAABWlzV2luAwkAAAAAAAACBQAAAAN2YWwFAAAAB3ZhbFJlYWwJAQAAAAIhPQAAAAIFAAAAA3ZhbAkAAZoAAAABAAAAAAAAAAAmBwMFAAAABWlzV2luCQEAAAABIQAAAAEFAAAACWlzQ2hlYXRlcgcHBwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXllFxiX", "chainId": 84, "height": 476437, "spentComplexity": 0 } View: original | compacted Prev: 2HsLi6t1YSD2MJAq7BEw6G3NFXFR1nuTVvUHMwdUSGFT Next: FKijJZ8t9Uj2oeKWxazm8eNFp8umZoFEfkCMFr4cxW2P Diff:
OldNewDifferences
9696 let isWin = if ((val == valReal))
9797 then (val != toBytes(38))
9898 else false
99- isWin
99+ if (isWin)
100+ then !(isCheater)
101+ else false
100102 }
101103 else false
102104 case _ =>
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 paymentTx = transactionById(fromBase58String(paymentTxIdStr))
4747 let isFeeCorrect = (dataTxFee >= dtx.fee)
4848 let isPaymentAlreadyMentioned = isDefined(getString(me, paymentTxIdStr))
4949 let withdrawTransactionId = fromBase58String(extract(getString(me, paymentTxIdStr)))
5050 let isWithdrawExist = isDefined(transactionById(withdrawTransactionId))
5151 match paymentTx {
5252 case paymentTx: TransferTransaction =>
5353 let isDtxSignedByPayer = sigVerify(dtx.bodyBytes, dtx.proofs[0], paymentTx.senderPublicKey)
5454 if (if (if (if (!(isPaymentAlreadyMentioned))
5555 then true
5656 else !(isWithdrawExist))
5757 then isDtxSignedByPayer
5858 else false)
5959 then isFeeCorrect
6060 else false)
6161 then {
6262 let att = paymentTx.attachment
6363 let type = dropRightBytes(takeRightBytes(att, 2), 1)
6464 let val = takeRightBytes(att, 1)
6565 let key = dropRightBytes(att, 2)
6666 let heightRes = extract(getInteger(oracle, (toBase58String(key) + "height")))
6767 let isCheater = (extract(transactionHeightById(paymentTx.id)) >= heightRes)
6868 let valComplex = extract(getBinary(oracle, toBase58String(key)))
6969 let koeff = if ((type == drop(toBytes(0), 7)))
7070 then 35
7171 else if ((type == drop(toBytes(1), 7)))
7272 then 1
7373 else if ((type == drop(toBytes(2), 7)))
7474 then 1
7575 else if ((type == drop(toBytes(3), 7)))
7676 then 1
7777 else if ((type == drop(toBytes(4), 7)))
7878 then 2
7979 else if ((type == drop(toBytes(5), 7)))
8080 then 2
8181 else 0
8282 let ver = take(valComplex, 1)
8383 let valReal = if ((type == drop(toBytes(0), 7)))
8484 then drop(take(valComplex, 2), 1)
8585 else if ((type == drop(toBytes(1), 7)))
8686 then drop(take(valComplex, 3), 2)
8787 else if ((type == drop(toBytes(2), 7)))
8888 then drop(take(valComplex, 4), 3)
8989 else if ((type == drop(toBytes(3), 7)))
9090 then drop(take(valComplex, 5), 4)
9191 else if ((type == drop(toBytes(4), 7)))
9292 then drop(take(valComplex, 6), 5)
9393 else if ((type == drop(toBytes(5), 7)))
9494 then drop(take(valComplex, 7), 5)
9595 else toBytes(38)
9696 let isWin = if ((val == valReal))
9797 then (val != toBytes(38))
9898 else false
99- isWin
99+ if (isWin)
100+ then !(isCheater)
101+ else false
100102 }
101103 else false
102104 case _ =>
103105 false
104106 }
105107 case _ =>
106108 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
107109 }

github/deemru/w8io/169f3d6 
27.60 ms