tx · HVL3VfRyCGrA7Da4M4bnwFKMUfPaA2q41SaAp4DNVb56

3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu:  -0.01400000 Waves

2019.02.01 23:59 [476422] smart account 3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu > SELF 0.00000000 Waves

{ "type": 13, "id": "HVL3VfRyCGrA7Da4M4bnwFKMUfPaA2q41SaAp4DNVb56", "fee": 1400000, "feeAssetId": null, "timestamp": 1549054771654, "version": 1, "sender": "3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu", "senderPublicKey": "F3DbYSfYZz6arcD6Mst8HdWScxTeWvTvatC7jp4DGryX", "proofs": [ "36kN11Mb7yyNswYRS1hhsdAiUUghcbUNrbXZhKoZJ7m6qFU3fnYiqttybxcDVGtgVAj43A83PrNaY3WgHr6i3Ffx" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAABm9yYWNsZQkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTkN6YVlUTkRHdFI4emY5eWZjcWVQRmpDcUZ4OVM1emhzNAQAAAAJZGF0YVR4RmVlAAAAAAAAD0JABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAAKd2l0aGRyYXdUeAUAAAAHJG1hdGNoMAQAAAAEdHhJZAkBAAAAB2V4dHJhY3QAAAABCQAEHQAAAAIFAAAAAm1lCQACWAAAAAEJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQQAAAAHJG1hdGNoMQkAA+gAAAABCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEDCQAAAQAAAAIFAAAAByRtYXRjaDECAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAACXBheW1lbnRUeAUAAAAHJG1hdGN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HJhbnNhY3Rpb25JZAQAAAAHJG1hdGNoMQUAAAAJcGF5bWVudFR4AwkAAAEAAAACBQAAAAckbWF0Y2gxAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAlwYXltZW50VHgFAAAAByRtYXRjaDEEAAAAEmlzRHR4U2lnbmVkQnlQYXllcgkAAfQAAAADCAUAAAADZHR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAADZHR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAACXBheW1lbnRUeAAAAA9zZW5kZXJQdWJsaWNLZXkDAwMJAQAAAAEhAAAAAQUAAAAZaXNQYXltZW50QWxyZWFkeU1lbnRpb25lZAYJAQAAAAEhAAAAAQUAAAAPaXNXaXRoZHJhd0V4aXN0BQAAABJpc0R0eFNpZ25lZEJ5UGF5ZXIHBQAAAAxpc0ZlZUNvcnJlY3QHBwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXlYG4XN", "chainId": 84, "height": 476422, "spentComplexity": 0 } View: original | compacted Prev: 6x5ShNHEhdW4QCFRuZEtxPz5FutpaFTLZZ1oY8K1CdEs Next: 84UYSDFTQw5sEj23w7SVcMBtoTmm6SKXC5ifGkzPnRiX 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 ver = take(valComplex, 1)
3333 let valReal = if ((type == drop(toBytes(0), 7)))
3434 then drop(take(valComplex, 2), 1)
3535 else if ((type == drop(toBytes(1), 7)))
3636 then drop(take(valComplex, 3), 2)
3737 else if ((type == drop(toBytes(2), 7)))
3838 then drop(take(valComplex, 4), 3)
3939 else if ((type == drop(toBytes(3), 7)))
4040 then drop(take(valComplex, 5), 4)
4141 else if ((type == drop(toBytes(4), 7)))
4242 then drop(take(valComplex, 6), 5)
4343 else if ((type == drop(toBytes(5), 7)))
4444 then drop(take(valComplex, 7), 5)
4545 else toBytes(38)
4646 let isWin = if ((val == valReal))
4747 then (val != toBytes(38))
4848 else false
4949 let isAmountOk = (withdrawTx.amount == (((paymentTx.amount * koeff) - dataTxFee) - withdrawTx.fee))
5050 let isInWaves = if (!(isDefined(withdrawTx.feeAssetId)))
5151 then !(isDefined(withdrawTx.assetId))
5252 else false
5353 if (if (if (isPaymentTookPlace)
5454 then isWin
5555 else false)
5656 then isAmountOk
5757 else false)
5858 then isInWaves
5959 else false
6060 case _ =>
6161 false
6262 }
6363 case dtx: DataTransaction =>
6464 let paymentTxIdStr = extract(dtx.data[0].key)
6565 let paymentTx = transactionById(fromBase58String(paymentTxIdStr))
6666 let isFeeCorrect = (dataTxFee >= dtx.fee)
6767 let isPaymentAlreadyMentioned = isDefined(getString(me, paymentTxIdStr))
6868 let withdrawTransactionId = fromBase58String(extract(getString(me, paymentTxIdStr)))
6969 let isWithdrawExist = isDefined(transactionById(withdrawTransactionId))
7070 match paymentTx {
7171 case paymentTx: TransferTransaction =>
7272 let isDtxSignedByPayer = sigVerify(dtx.bodyBytes, dtx.proofs[0], paymentTx.senderPublicKey)
7373 if (if (if (!(isPaymentAlreadyMentioned))
7474 then true
7575 else !(isWithdrawExist))
7676 then isDtxSignedByPayer
7777 else false)
7878 then isFeeCorrect
7979 else false
8080 case _ =>
8181 false
8282 }
8383 case _ =>
8484 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
8585 }

github/deemru/w8io/169f3d6 
29.19 ms