tx · CkETaYwxxA5wN8B22aPtyCBTW6gAHwwiNDAATb1VoJEo

3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu:  -0.01400000 Waves

2019.01.30 22:32 [473423] smart account 3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu > SELF 0.00000000 Waves

{ "type": 13, "id": "CkETaYwxxA5wN8B22aPtyCBTW6gAHwwiNDAATb1VoJEo", "fee": 1400000, "feeAssetId": null, "timestamp": 1548876755160, "version": 1, "sender": "3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu", "senderPublicKey": "F3DbYSfYZz6arcD6Mst8HdWScxTeWvTvatC7jp4DGryX", "proofs": [ "43ixfAvhuxHUg1cffwBPKrmeBFDDeMFiicR8fPHM9M8v5wi9Nzcw2izHejDQKUfjqGHc6Ma58H9cbLuEvXoUnbk9" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAABm9yYWNsZQkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTkN6YVlUTkRHdFI4emY5eWZjcWVQRmpDcUZ4OVM1emhzNAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAACndpdGhkcmF3VHgFAAAAByRtYXRjaDAEAAAABHR4SWQJAQAAAAdleHRyYWN0AAAAAQkABB0AAAACBQAAAAJtZQkAAlgAAAABCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEEAAAAByRtYXRjaDEJAAPoAAAAAQkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAABAwkAAAEAAAACBQAAAAckbWF0Y2gxAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAlwYXltZW50VHgFAAAAByRtYXRjaDEEAAAAEmlzUGF5bWVudFRvb2tQbGFjZQMJAAA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QAB9AAAAAMIBQAAAANkdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAANkdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAAJcGF5bWVudFR4AAAAD3NlbmRlclB1YmxpY0tleQMDCQEAAAABIQAAAAEFAAAAGWlzUGF5bWVudEFscmVhZHlNZW50aW9uZWQGCQEAAAABIQAAAAEFAAAAD2lzV2l0aGRyYXdFeGlzdAUAAAASaXNEdHhTaWduZWRCeVBheWVyBwcJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5KrsUcw==", "chainId": 84, "height": 473423, "spentComplexity": 0 } View: original | compacted Prev: Dk7MRqMQMn2b6K9pLQgJXuhU7bvnYuzBkiiHPesa9oYf Next: 5HEksdH47jo1ju1ejzHCVJhfA5kLwxDoCxaDM5z9A6Gn Diff:
OldNewDifferences
1010 let isPaymentTookPlace = if ((txId == toBase58String(tx.id)))
1111 then sigVerify(tx.bodyBytes, tx.proofs[0], paymentTx.senderPublicKey)
1212 else false
13- let keyLen = 19
1413 let att = paymentTx.attachment
15- let key = take(att, keyLen)
16- let type = drop(take(att, (keyLen + 1)), keyLen)
17- let val = drop(take(att, (keyLen + 2)), (keyLen + 1))
14+ let type = dropRightBytes(takeRightBytes(att, 2), 1)
15+ let val = takeRightBytes(att, 1)
16+ let key = dropRightBytes(att, 2)
1817 let valComplex = extract(getBinary(oracle, toBase58String(key)))
1918 let koeff = if ((type == drop(toBytes(0), 7)))
2019 then 35
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
13- let keyLen = 19
1413 let att = paymentTx.attachment
15- let key = take(att, keyLen)
16- let type = drop(take(att, (keyLen + 1)), keyLen)
17- let val = drop(take(att, (keyLen + 2)), (keyLen + 1))
14+ let type = dropRightBytes(takeRightBytes(att, 2), 1)
15+ let val = takeRightBytes(att, 1)
16+ let key = dropRightBytes(att, 2)
1817 let valComplex = extract(getBinary(oracle, toBase58String(key)))
1918 let koeff = if ((type == drop(toBytes(0), 7)))
2019 then 35
2120 else if ((type == drop(toBytes(1), 7)))
2221 then 1
2322 else if ((type == drop(toBytes(2), 7)))
2423 then 1
2524 else if ((type == drop(toBytes(3), 7)))
2625 then 1
2726 else if ((type == drop(toBytes(4), 7)))
2827 then 2
2928 else if ((type == drop(toBytes(5), 7)))
3029 then 2
3130 else if ((type == drop(toBytes(6), 7)))
3231 then 2
3332 else 0
3433 let ver = take(valComplex, 1)
3534 let valReal = if ((type == drop(toBytes(0), 7)))
3635 then drop(take(valComplex, 2), 1)
3736 else if ((type == drop(toBytes(1), 7)))
3837 then drop(take(valComplex, 3), 2)
3938 else if ((type == drop(toBytes(2), 7)))
4039 then drop(take(valComplex, 4), 3)
4140 else if ((type == drop(toBytes(3), 7)))
4241 then drop(take(valComplex, 5), 4)
4342 else if ((type == drop(toBytes(4), 7)))
4443 then drop(take(valComplex, 6), 5)
4544 else if ((type == drop(toBytes(5), 7)))
4645 then drop(take(valComplex, 7), 5)
4746 else if ((type == drop(toBytes(6), 7)))
4847 then drop(take(valComplex, 8), 6)
4948 else toBytes(38)
5049 let isWin = if ((val == valReal))
5150 then (val != toBytes(38))
5251 else false
5352 let isAmountOk = (withdrawTx.amount == (paymentTx.amount * koeff))
5453 if (if (isPaymentTookPlace)
5554 then isWin
5655 else false)
5756 then isAmountOk
5857 else false
5958 case _ =>
6059 false
6160 }
6261 case dtx: DataTransaction =>
6362 let paymentTxIdStr = extract(dtx.data[0].key)
6463 let paymentTx = transactionById(fromBase58String(paymentTxIdStr))
6564 let isPaymentAlreadyMentioned = isDefined(getString(me, paymentTxIdStr))
6665 let withdrawTransactionId = fromBase58String(extract(getString(me, paymentTxIdStr)))
6766 let isWithdrawExist = isDefined(transactionById(withdrawTransactionId))
6867 match paymentTx {
6968 case paymentTx: TransferTransaction =>
7069 let isDtxSignedByPayer = sigVerify(dtx.bodyBytes, dtx.proofs[0], paymentTx.senderPublicKey)
7170 if (if (!(isPaymentAlreadyMentioned))
7271 then true
7372 else !(isWithdrawExist))
7473 then isDtxSignedByPayer
7574 else false
7675 case _ =>
7776 false
7877 }
7978 case _ =>
8079 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
8180 }

github/deemru/w8io/169f3d6 
49.67 ms