tx · 3DDhoRpj5SPYa3m3WLZ2hKB4QUi6HVFpKXpivrCskYNp 3N4mapsqVLDdiatjTF2rYB5KiLn2e6Y4eJb: -0.01400000 Waves 2019.01.30 11:23 [472743] smart account 3N4mapsqVLDdiatjTF2rYB5KiLn2e6Y4eJb > SELF 0.00000000 Waves
{ "type": 13, "id": "3DDhoRpj5SPYa3m3WLZ2hKB4QUi6HVFpKXpivrCskYNp", "fee": 1400000, "feeAssetId": null, "timestamp": 1548836610585, "version": 1, "sender": "3N4mapsqVLDdiatjTF2rYB5KiLn2e6Y4eJb", "senderPublicKey": "BTdTmTBfL5TMXno6wjKmpDfg3m4L5A71Kaujb4kJtuYe", "proofs": [ "4qxkJN1ZwjQHwx4bPRWrAr3spbYyj4iGAXQmaiCR1HbRHRHy6si921z9UPpRfCJTPewR8a62HRHwiXZC64k5qhv4" ], "script": "base64:AQQAAAAIdm90ZUJhbmsJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEJAAJZAAAAAQIAAAAsQlRkVG1UQmZMNVRNWG5vNndqS21wRGZnM200TDVBNzFLYXVqYjRrSnR1WWUEAAAAE21pbmltYWxWb3RpbmdIZWlnaHQAAAAAAAAAAAoEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDADCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWQAAAAEZGF0YQAAAAAAAAAAAwQAAAAOYXNzZXRUcmFuc2VySWQJAAPoAAAAAQkAAZEAAAACCAUAAAABZAAAAAZwcm9vZnMAAAAAAAAAAAEEAAAADWZlZVRyYW5zZmVySWQJAAPoAAAAAQkAAZEAAAACCAUAAAABZAAAAAZwcm9vZnMAAAAAAAAAAAAEAAAAByRtYXRjaDEFAAAADmFzc2V0VHJhbnNlcklkAwkAAAEAAAACBQAAAAckbWF0Y2gxAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9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SYSE3VDCHz9Hs Diff:
Old | New | Differences | |
---|---|---|---|
13 | 13 | let attach = toBase58String(sha256(aT.attachment)) | |
14 | 14 | match feeTransferId { | |
15 | 15 | case fT: TransferTransaction => | |
16 | - | if (if (if (!(isDefined(getString(voteBank, d.data[0].key)))) | |
16 | + | if (if (if (if (if (if (if (if (if (if (if (if (!(isDefined(getString(voteBank, d.data[0].key)))) | |
17 | 17 | then isDefined(getString(aT.sender, "YES")) | |
18 | 18 | else false) | |
19 | 19 | then isDefined(getString(aT.sender, "NO")) | |
20 | 20 | else false) | |
21 | + | then (aT.recipient == voteBank) | |
22 | + | else false) | |
23 | + | then (fT.recipient == voteBank) | |
24 | + | else false) | |
25 | + | then (fT.amount >= (aT.amount * 500000)) | |
26 | + | else false) | |
21 | 27 | then (d.data[0].key == toBase58String(sha256(aT.attachment))) | |
28 | + | else false) | |
29 | + | then (d.data[0].key == toBase58String(sha256(fT.attachment))) | |
30 | + | else false) | |
31 | + | then (d.data[1].key == (toBase58String(sha256(fT.attachment)) + "_height")) | |
32 | + | else false) | |
33 | + | then (d.data[2].key == (toBase58String(sha256(fT.attachment)) + "_asset")) | |
34 | + | else false) | |
35 | + | then (extract(getInteger(aT.sender, d.data[1].key)) > height) | |
36 | + | else false) | |
37 | + | then (extract(getBinary(aT.sender, d.data[2].key)) == aT.assetId) | |
38 | + | else false) | |
39 | + | then sigVerify(d.bodyBytes, d.proofs[3], d.proofs[2]) | |
22 | 40 | else false | |
23 | 41 | case _ => | |
24 | 42 | false |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 1 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let voteBank = addressFromPublicKey(fromBase58String("BTdTmTBfL5TMXno6wjKmpDfg3m4L5A71Kaujb4kJtuYe")) | |
4 | 4 | let minimalVotingHeight = 10 | |
5 | 5 | match tx { | |
6 | 6 | case d: DataTransaction => | |
7 | 7 | if ((size(d.data) == 3)) | |
8 | 8 | then { | |
9 | 9 | let assetTranserId = transactionById(d.proofs[1]) | |
10 | 10 | let feeTransferId = transactionById(d.proofs[0]) | |
11 | 11 | match assetTranserId { | |
12 | 12 | case aT: TransferTransaction => | |
13 | 13 | let attach = toBase58String(sha256(aT.attachment)) | |
14 | 14 | match feeTransferId { | |
15 | 15 | case fT: TransferTransaction => | |
16 | - | if (if (if (!(isDefined(getString(voteBank, d.data[0].key)))) | |
16 | + | if (if (if (if (if (if (if (if (if (if (if (if (!(isDefined(getString(voteBank, d.data[0].key)))) | |
17 | 17 | then isDefined(getString(aT.sender, "YES")) | |
18 | 18 | else false) | |
19 | 19 | then isDefined(getString(aT.sender, "NO")) | |
20 | 20 | else false) | |
21 | + | then (aT.recipient == voteBank) | |
22 | + | else false) | |
23 | + | then (fT.recipient == voteBank) | |
24 | + | else false) | |
25 | + | then (fT.amount >= (aT.amount * 500000)) | |
26 | + | else false) | |
21 | 27 | then (d.data[0].key == toBase58String(sha256(aT.attachment))) | |
28 | + | else false) | |
29 | + | then (d.data[0].key == toBase58String(sha256(fT.attachment))) | |
30 | + | else false) | |
31 | + | then (d.data[1].key == (toBase58String(sha256(fT.attachment)) + "_height")) | |
32 | + | else false) | |
33 | + | then (d.data[2].key == (toBase58String(sha256(fT.attachment)) + "_asset")) | |
34 | + | else false) | |
35 | + | then (extract(getInteger(aT.sender, d.data[1].key)) > height) | |
36 | + | else false) | |
37 | + | then (extract(getBinary(aT.sender, d.data[2].key)) == aT.assetId) | |
38 | + | else false) | |
39 | + | then sigVerify(d.bodyBytes, d.proofs[3], d.proofs[2]) | |
22 | 40 | else false | |
23 | 41 | case _ => | |
24 | 42 | false | |
25 | 43 | } | |
26 | 44 | case _ => | |
27 | 45 | false | |
28 | 46 | } | |
29 | 47 | } | |
30 | 48 | else false | |
31 | 49 | case t: TransferTransaction => | |
32 | 50 | if (isDefined(getString(voteBank, toBase58String(t.attachment)))) | |
33 | 51 | then { | |
34 | 52 | let voteStarter = extract(addressFromString(extract(getString(voteBank, toBase58String(sha256(t.attachment)))))) | |
35 | 53 | if (if (if (if (if (if ((extract(getInteger(voteBank, (toBase58String(sha256(t.attachment)) + "_height"))) > height)) | |
36 | 54 | then if ((addressFromRecipient(t.recipient) == addressFromString(extract(getString(voteStarter, "YES"))))) | |
37 | 55 | then true | |
38 | 56 | else (addressFromRecipient(t.recipient) == addressFromString(extract(getString(voteStarter, "NO")))) | |
39 | 57 | else false) | |
40 | 58 | then (t.assetId == extract(getBinary(voteStarter, (toBase58String(t.attachment) + "_asset")))) | |
41 | 59 | else false) | |
42 | 60 | then (t.amount == 1) | |
43 | 61 | else false) | |
44 | 62 | then (t.fee == 500000) | |
45 | 63 | else false) | |
46 | 64 | then (wavesBalance(t.sender) > 100000000) | |
47 | 65 | else false) | |
48 | 66 | then sigVerify(t.bodyBytes, t.proofs[0], tx.senderPublicKey) | |
49 | 67 | else false | |
50 | 68 | } | |
51 | 69 | else false | |
52 | 70 | case s: SetScriptTransaction => | |
53 | 71 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
54 | 72 | case _ => | |
55 | 73 | false | |
56 | 74 | } |
github/deemru/w8io/026f985 23.04 ms ◑