tx · Jidu4L7TWqYTkpc7pDqLWuhEYXLLVMEqrP7py47pVrw

3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu:  -0.01400000 Waves

2019.01.31 11:22 [474205] smart account 3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu > SELF 0.00000000 Waves

{ "type": 13, "id": "Jidu4L7TWqYTkpc7pDqLWuhEYXLLVMEqrP7py47pVrw", "fee": 1400000, "feeAssetId": null, "timestamp": 1548922937556, "version": 1, "sender": "3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu", "senderPublicKey": "F3DbYSfYZz6arcD6Mst8HdWScxTeWvTvatC7jp4DGryX", "proofs": [ "4fuiXNeJfsNxjCxRaqSSFyXfEENitkR4V5RdbSE31u1oR6pzJ5rHKHBCFTuSdLKGvunDhx5yCSmTnqPeEbb8azUH" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAABm9yYWNsZQkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTkN6YVlUTkRHdFI4emY5eWZjcWVQRmpDcUZ4OVM1emhzNAQAAAAJZGF0YVR4RmVlAAAAAAAAD0JABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAAKd2l0aGRyYXdUeAUAAAAHJG1hdGNoMAQAAAAEdHhJZAkBAAAAB2V4dHJhY3QAAAABCQAEHQAAAAIFAAAAAm1lCQACWAAAAAEJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQQAAAAHJG1hdGNoMQkAA+gAAAABCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEDCQAAAQAAAAIFAAAAByRtYXRjaDECAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAACXBheW1lbnRUeAUAAAAHJG1hdGNo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JhbnNhY3Rpb25JZAQAAAAHJG1hdGNoMQUAAAAJcGF5bWVudFR4AwkAAAEAAAACBQAAAAckbWF0Y2gxAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAlwYXltZW50VHgFAAAAByRtYXRjaDEEAAAAEmlzRHR4U2lnbmVkQnlQYXllcgkAAfQAAAADCAUAAAADZHR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAADZHR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAACXBheW1lbnRUeAAAAA9zZW5kZXJQdWJsaWNLZXkDAwMJAQAAAAEhAAAAAQUAAAAZaXNQYXltZW50QWxyZWFkeU1lbnRpb25lZAYJAQAAAAEhAAAAAQUAAAAPaXNXaXRoZHJhd0V4aXN0BQAAABJpc0R0eFNpZ25lZEJ5UGF5ZXIHBQAAAAxpc0ZlZUNvcnJlY3QHBwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXlYG4XN", "chainId": 84, "height": 474205, "spentComplexity": 0 } View: original | compacted Prev: At4DQiAJDLi6r9ef1yX3zFoC8E7AhUGFGjC3jDA1NNee Next: 9xaz1xWC42Uj6K6PEWD1bMtkvSdigFTRjSvQ4M76unJf Diff:
OldNewDifferences
1515 let type = dropRightBytes(takeRightBytes(att, 2), 1)
1616 let val = takeRightBytes(att, 1)
1717 let key = dropRightBytes(att, 2)
18- let keyforHeight = (key + fromBase58String("height"))
19- let heightRes = extract(getInteger(oracle, toBase58String(keyforHeight)))
20- let isCheater = (extract(transactionHeightById(paymentTx.id)) >= heightRes)
2118 let valComplex = extract(getBinary(oracle, toBase58String(key)))
2219 let koeff = if ((type == drop(toBytes(0), 7)))
2320 then 35
5350 let isInWaves = if (!(isDefined(withdrawTx.feeAssetId)))
5451 then !(isDefined(withdrawTx.assetId))
5552 else false
56- if (if (if (if (isPaymentTookPlace)
53+ if (if (if (isPaymentTookPlace)
5754 then isWin
5855 else false)
5956 then isAmountOk
6057 else false)
6158 then isInWaves
62- else false)
63- then !(isCheater)
6459 else false
6560 case _ =>
6661 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 keyforHeight = (key + fromBase58String("height"))
19- let heightRes = extract(getInteger(oracle, toBase58String(keyforHeight)))
20- let isCheater = (extract(transactionHeightById(paymentTx.id)) >= heightRes)
2118 let valComplex = extract(getBinary(oracle, toBase58String(key)))
2219 let koeff = if ((type == drop(toBytes(0), 7)))
2320 then 35
2421 else if ((type == drop(toBytes(1), 7)))
2522 then 1
2623 else if ((type == drop(toBytes(2), 7)))
2724 then 1
2825 else if ((type == drop(toBytes(3), 7)))
2926 then 1
3027 else if ((type == drop(toBytes(4), 7)))
3128 then 2
3229 else if ((type == drop(toBytes(5), 7)))
3330 then 2
3431 else 0
3532 let ver = take(valComplex, 1)
3633 let valReal = if ((type == drop(toBytes(0), 7)))
3734 then drop(take(valComplex, 2), 1)
3835 else if ((type == drop(toBytes(1), 7)))
3936 then drop(take(valComplex, 3), 2)
4037 else if ((type == drop(toBytes(2), 7)))
4138 then drop(take(valComplex, 4), 3)
4239 else if ((type == drop(toBytes(3), 7)))
4340 then drop(take(valComplex, 5), 4)
4441 else if ((type == drop(toBytes(4), 7)))
4542 then drop(take(valComplex, 6), 5)
4643 else if ((type == drop(toBytes(5), 7)))
4744 then drop(take(valComplex, 7), 5)
4845 else toBytes(38)
4946 let isWin = if ((val == valReal))
5047 then (val != toBytes(38))
5148 else false
5249 let isAmountOk = (withdrawTx.amount == (((paymentTx.amount * koeff) - dataTxFee) - withdrawTx.fee))
5350 let isInWaves = if (!(isDefined(withdrawTx.feeAssetId)))
5451 then !(isDefined(withdrawTx.assetId))
5552 else false
56- if (if (if (if (isPaymentTookPlace)
53+ if (if (if (isPaymentTookPlace)
5754 then isWin
5855 else false)
5956 then isAmountOk
6057 else false)
6158 then isInWaves
62- else false)
63- then !(isCheater)
6459 else false
6560 case _ =>
6661 false
6762 }
6863 case dtx: DataTransaction =>
6964 let paymentTxIdStr = extract(dtx.data[0].key)
7065 let paymentTx = transactionById(fromBase58String(paymentTxIdStr))
7166 let isFeeCorrect = (dataTxFee >= dtx.fee)
7267 let isPaymentAlreadyMentioned = isDefined(getString(me, paymentTxIdStr))
7368 let withdrawTransactionId = fromBase58String(extract(getString(me, paymentTxIdStr)))
7469 let isWithdrawExist = isDefined(transactionById(withdrawTransactionId))
7570 match paymentTx {
7671 case paymentTx: TransferTransaction =>
7772 let isDtxSignedByPayer = sigVerify(dtx.bodyBytes, dtx.proofs[0], paymentTx.senderPublicKey)
7873 if (if (if (!(isPaymentAlreadyMentioned))
7974 then true
8075 else !(isWithdrawExist))
8176 then isDtxSignedByPayer
8277 else false)
8378 then isFeeCorrect
8479 else false
8580 case _ =>
8681 false
8782 }
8883 case _ =>
8984 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
9085 }

github/deemru/w8io/169f3d6 
37.51 ms