tx · GZtQJk8qAGdHdxxiYso5xNx91MSy9JzMfvrnXPvFbEkc

3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu:  -0.01400000 Waves

2019.01.30 21:48 [473383] smart account 3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu > SELF 0.00000000 Waves

{ "type": 13, "id": "GZtQJk8qAGdHdxxiYso5xNx91MSy9JzMfvrnXPvFbEkc", "fee": 1400000, "feeAssetId": null, "timestamp": 1548874153749, "version": 1, "sender": "3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu", "senderPublicKey": "F3DbYSfYZz6arcD6Mst8HdWScxTeWvTvatC7jp4DGryX", "proofs": [ "4ucwsgoUoiqhDWozhQmQLi8hqF3kvZ1T8oT1zRLZrMgCRf9haELNaPzvoyef4DD3qK9baKT44jB863wob6vx9fWD" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAABm9yYWNsZQkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTkN6YVlUTkRHdFI4emY5eWZjcWVQRmpDcUZ4OVM1emhzNAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAACndpdGhkcmF3VHgFAAAAByRtYXRjaDAEAAAABHR4SWQJAQAAAAdleHRyYWN0AAAAAQkABB0AAAACBQAAAAJtZQkAAlgAAAABCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEEAAAAByRtYXRjaDEJAAPoAAAAAQkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAABAwkAAAEAAAACBQAAAAckbWF0Y2gxAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAlwYXltZW50VHgFAAAAByRtYXRjaDEEAAAAEmlzUGF5bWVudFRvb2tQbGFjZQMJAAAAA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kAAZEAAAACCAUAAAADZHR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAACXBheW1lbnRUeAAAAA9zZW5kZXJQdWJsaWNLZXkDAwkBAAAAASEAAAABBQAAABlpc1BheW1lbnRBbHJlYWR5TWVudGlvbmVkBgkBAAAAASEAAAABBQAAAA9pc1dpdGhkcmF3RXhpc3QFAAAAEmlzRHR4U2lnbmVkQnlQYXllcgcHCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleWpTIiE=", "chainId": 84, "height": 473383, "spentComplexity": 0 } View: original | compacted Prev: 2RpydtZWdxHjte6HUjmmgfw5D7ZV2wVyLeBfEfsc8vwt Next: BEyjMqmf2jP4wGfkGyariSJHa3Hn259BmZxndhJUhWwY Diff:
OldNewDifferences
1111 then sigVerify(tx.bodyBytes, tx.proofs[0], paymentTx.senderPublicKey)
1212 else false
1313 let att = paymentTx.attachment
14+ let kkk = take(att, 1)
1415 let key = take(att, 18)
1516 let type = drop(take(att, 19), 18)
1617 let val = drop(take(att, 20), 19)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 1 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
33 let me = tx.sender
44 let oracle = extract(addressFromString("3NCzaYTNDGtR8zf9yfcqePFjCqFx9S5zhs4"))
55 match tx {
66 case withdrawTx: TransferTransaction =>
77 let txId = extract(getString(me, toBase58String(tx.proofs[1])))
88 match transactionById(tx.proofs[1]) {
99 case paymentTx: TransferTransaction =>
1010 let isPaymentTookPlace = if ((txId == toBase58String(tx.id)))
1111 then sigVerify(tx.bodyBytes, tx.proofs[0], paymentTx.senderPublicKey)
1212 else false
1313 let att = paymentTx.attachment
14+ let kkk = take(att, 1)
1415 let key = take(att, 18)
1516 let type = drop(take(att, 19), 18)
1617 let val = drop(take(att, 20), 19)
1718 let valComplex = extract(getBinary(oracle, toBase58String(key)))
1819 let koeff = if ((type == drop(toBytes(0), 7)))
1920 then 35
2021 else if ((type == drop(toBytes(1), 7)))
2122 then 1
2223 else if ((type == drop(toBytes(2), 7)))
2324 then 1
2425 else if ((type == drop(toBytes(3), 7)))
2526 then 1
2627 else if ((type == drop(toBytes(4), 7)))
2728 then 2
2829 else if ((type == drop(toBytes(5), 7)))
2930 then 2
3031 else if ((type == drop(toBytes(6), 7)))
3132 then 2
3233 else 0
3334 let ver = take(valComplex, 1)
3435 let valReal = if ((type == drop(toBytes(0), 7)))
3536 then drop(take(valComplex, 2), 1)
3637 else if ((type == drop(toBytes(1), 7)))
3738 then drop(take(valComplex, 3), 2)
3839 else if ((type == drop(toBytes(2), 7)))
3940 then drop(take(valComplex, 4), 3)
4041 else if ((type == drop(toBytes(3), 7)))
4142 then drop(take(valComplex, 5), 4)
4243 else if ((type == drop(toBytes(4), 7)))
4344 then drop(take(valComplex, 6), 5)
4445 else if ((type == drop(toBytes(5), 7)))
4546 then drop(take(valComplex, 7), 5)
4647 else if ((type == drop(toBytes(6), 7)))
4748 then drop(take(valComplex, 8), 6)
4849 else toBytes(38)
4950 let isWin = if ((val == valReal))
5051 then (val != toBytes(38))
5152 else false
5253 let isAmountOk = (withdrawTx.amount == (paymentTx.amount * koeff))
5354 if (if (isPaymentTookPlace)
5455 then isWin
5556 else false)
5657 then isAmountOk
5758 else false
5859 case _ =>
5960 false
6061 }
6162 case dtx: DataTransaction =>
6263 let paymentTxIdStr = extract(dtx.data[0].key)
6364 let paymentTx = transactionById(fromBase58String(paymentTxIdStr))
6465 let isPaymentAlreadyMentioned = isDefined(getString(me, paymentTxIdStr))
6566 let withdrawTransactionId = fromBase58String(extract(getString(me, paymentTxIdStr)))
6667 let isWithdrawExist = isDefined(transactionById(withdrawTransactionId))
6768 match paymentTx {
6869 case paymentTx: TransferTransaction =>
6970 let isDtxSignedByPayer = sigVerify(dtx.bodyBytes, dtx.proofs[0], paymentTx.senderPublicKey)
7071 if (if (!(isPaymentAlreadyMentioned))
7172 then true
7273 else !(isWithdrawExist))
7374 then isDtxSignedByPayer
7475 else false
7576 case _ =>
7677 false
7778 }
7879 case _ =>
7980 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
8081 }

github/deemru/w8io/169f3d6 
25.49 ms