tx · 7D3XAuDPyMzVuwHjJizFhkcpg7cLKJo7x8JN7RVjYz6V

3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu:  -0.01400000 Waves

2019.01.30 10:29 [472696] smart account 3N4Z7j4oSNfJVUtP4kmMKbhZD5n4xPFpPAu > SELF 0.00000000 Waves

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

github/deemru/w8io/026f985 
37.95 ms