tx · 2uWPCLfkgk55VnknGmHf93kJZeaktfk8Ke43BQZTDRx1

3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu:  -0.01400000 Waves

2019.02.01 23:30 [476393] smart account 3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu > SELF 0.00000000 Waves

{ "type": 13, "id": "2uWPCLfkgk55VnknGmHf93kJZeaktfk8Ke43BQZTDRx1", "fee": 1400000, "feeAssetId": null, "timestamp": 1549053005058, "version": 1, "sender": "3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu", "senderPublicKey": "F3DbYSfYZz6arcD6Mst8HdWScxTeWvTvatC7jp4DGryX", "proofs": [ "3kkcLZj4hU3etjj3rhuMzrKGMmG3cBKsfrWiqhRtorKt7jXTExe29fZhoMmzaxdzKgUWs1ARvjLJ8tngY52CEtJp" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAABm9yYWNsZQkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTkN6YVlUTkRHdFI4emY5eWZjcWVQRmpDcUZ4OVM1emhzNAQAAAAJZGF0YVR4RmVlAAAAAAAAD0JABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAAKd2l0aGRyYXdUeAUAAAAHJG1hdGNoMAQAAAAEdHhJZAkBAAAAB2V4dHJhY3QAAAABCQAEHQAAAAIFAAAAAm1lCQACWAAAAAEJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQQAAAAHJG1hdGNoMQkAA+gAAAABCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEDCQAAAQAAAAIFAAAAByRtYXRjaDECAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAACXBheW1lbnRUeAUAAAAHJG1hdGNoMQ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bnNhY3Rpb25JZAQAAAAHJG1hdGNoMQUAAAAJcGF5bWVudFR4AwkAAAEAAAACBQAAAAckbWF0Y2gxAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAlwYXltZW50VHgFAAAAByRtYXRjaDEEAAAAEmlzRHR4U2lnbmVkQnlQYXllcgkAAfQAAAADCAUAAAADZHR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAADZHR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAACXBheW1lbnRUeAAAAA9zZW5kZXJQdWJsaWNLZXkDAwMJAQAAAAEhAAAAAQUAAAAZaXNQYXltZW50QWxyZWFkeU1lbnRpb25lZAYJAQAAAAEhAAAAAQUAAAAPaXNXaXRoZHJhd0V4aXN0BQAAABJpc0R0eFNpZ25lZEJ5UGF5ZXIHBQAAAAxpc0ZlZUNvcnJlY3QHBwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXlYG4XN", "chainId": 84, "height": 476393, "spentComplexity": 0 } View: original | compacted Prev: 5Ebva9wjZm6ErQxwyc8LX56yXtPhzx8SJoYe8aRdL99o Next: AfFQiWZ5pDBD1dnvjmvv4dJ4wE4Zo7MrcJCzBoC8kDhk Full:
OldNewDifferences
11 {-# STDLIB_VERSION 1 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
3-true
3+let me = tx.sender
4+let oracle = extract(addressFromString("3NCzaYTNDGtR8zf9yfcqePFjCqFx9S5zhs4"))
5+let dataTxFee = 1000000
6+match tx {
7+ case withdrawTx: TransferTransaction =>
8+ let txId = extract(getString(me, toBase58String(tx.proofs[1])))
9+ match transactionById(tx.proofs[1]) {
10+ case paymentTx: TransferTransaction =>
11+ let isPaymentTookPlace = if ((txId == toBase58String(tx.id)))
12+ then sigVerify(tx.bodyBytes, tx.proofs[0], paymentTx.senderPublicKey)
13+ else false
14+ let att = paymentTx.attachment
15+ let type = dropRightBytes(takeRightBytes(att, 2), 1)
16+ let val = takeRightBytes(att, 1)
17+ let key = dropRightBytes(att, 2)
18+ let valComplex = extract(getBinary(oracle, toBase58String(key)))
19+ let koeff = if ((type == drop(toBytes(0), 7)))
20+ then 35
21+ else if ((type == drop(toBytes(1), 7)))
22+ then 1
23+ else if ((type == drop(toBytes(2), 7)))
24+ then 1
25+ else if ((type == drop(toBytes(3), 7)))
26+ then 1
27+ else if ((type == drop(toBytes(4), 7)))
28+ then 2
29+ else if ((type == drop(toBytes(5), 7)))
30+ then 2
31+ else 0
32+ let ver = take(valComplex, 1)
33+ let valReal = if ((type == drop(toBytes(0), 7)))
34+ then drop(take(valComplex, 2), 1)
35+ else if ((type == drop(toBytes(1), 7)))
36+ then drop(take(valComplex, 3), 2)
37+ else if ((type == drop(toBytes(2), 7)))
38+ then drop(take(valComplex, 4), 3)
39+ else if ((type == drop(toBytes(3), 7)))
40+ then drop(take(valComplex, 5), 4)
41+ else if ((type == drop(toBytes(4), 7)))
42+ then drop(take(valComplex, 6), 5)
43+ else if ((type == drop(toBytes(5), 7)))
44+ then drop(take(valComplex, 7), 5)
45+ else toBytes(38)
46+ let isWin = if ((val == valReal))
47+ then (val != toBytes(38))
48+ else false
49+ let isAmountOk = (withdrawTx.amount == (((paymentTx.amount * koeff) - dataTxFee) - withdrawTx.fee))
50+ let isInWaves = if (!(isDefined(withdrawTx.feeAssetId)))
51+ then !(isDefined(withdrawTx.assetId))
52+ else false
53+ if (if (if (isPaymentTookPlace)
54+ then isWin
55+ else false)
56+ then isAmountOk
57+ else false)
58+ then isInWaves
59+ else false
60+ case _ =>
61+ false
62+ }
63+ case dtx: DataTransaction =>
64+ let paymentTxIdStr = extract(dtx.data[0].key)
65+ let paymentTx = transactionById(fromBase58String(paymentTxIdStr))
66+ let isFeeCorrect = (dataTxFee >= dtx.fee)
67+ let isPaymentAlreadyMentioned = isDefined(getString(me, paymentTxIdStr))
68+ let withdrawTransactionId = fromBase58String(extract(getString(me, paymentTxIdStr)))
69+ let isWithdrawExist = isDefined(transactionById(withdrawTransactionId))
70+ match paymentTx {
71+ case paymentTx: TransferTransaction =>
72+ let isDtxSignedByPayer = sigVerify(dtx.bodyBytes, dtx.proofs[0], paymentTx.senderPublicKey)
73+ if (if (if (!(isPaymentAlreadyMentioned))
74+ then true
75+ else !(isWithdrawExist))
76+ then isDtxSignedByPayer
77+ else false)
78+ then isFeeCorrect
79+ else false
80+ case _ =>
81+ false
82+ }
83+ case _ =>
84+ sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
85+}

github/deemru/w8io/169f3d6 
34.42 ms