tx · AqboryjPuMKwuz8FHq3mFcxmSXSQPeSKJMfaMATChE5C 3N4mapsqVLDdiatjTF2rYB5KiLn2e6Y4eJb: -0.01400000 Waves 2019.01.30 12:31 [472817] smart account 3N4mapsqVLDdiatjTF2rYB5KiLn2e6Y4eJb > SELF 0.00000000 Waves
{ "type": 13, "id": "AqboryjPuMKwuz8FHq3mFcxmSXSQPeSKJMfaMATChE5C", "fee": 1400000, "feeAssetId": null, "timestamp": 1548840728200, "version": 1, "sender": "3N4mapsqVLDdiatjTF2rYB5KiLn2e6Y4eJb", "senderPublicKey": "BTdTmTBfL5TMXno6wjKmpDfg3m4L5A71Kaujb4kJtuYe", "proofs": [ "3PYg5jd1BCyHvvTKQwAiEXPDu6V7YyE68wyNmnDYRhGRH2m4ibQwYJn6U8Zo7B4cxuAMHeTooN6L7DM5EB48Vons" ], "script": "base64:AQQAAAAIdm90ZUJhbmsJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEJAAJZAAAAAQIAAAAsQlRkVG1UQmZMNVRNWG5vNndqS21wRGZnM200TDVBNzFLYXVqYjRrSnR1WWUEAAAAE21pbmltYWxWb3RpbmdIZWlnaHQAAAAAAAAAAAoEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDADCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWQAAAAEZGF0YQAAAAAAAAAAAwQAAAANZmVlVHJhbnNmZXJJZAkAA+gAAAABCQABkQAAAAIIBQAAAAFkAAAABnByb29mcwAAAAAAAAAAAAQAAAAOYXNzZXRUcmFuc2VySWQJAAPoAAAAAQkAAZEAAAACCAUAAAABZAAAAAZwcm9vZnMAAAAAAAAAAAEEAAAAByRtYXRjaDEFAAAADmFzc2V0VHJhbnNlcklkAwkAAAEAAAACBQAAAAckbWF0Y2gxAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAA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wAAAAEJAQAAAAdleHRyYWN0AAAAAQkABB0AAAACBQAAAAt2b3RlU3RhcnRlcgIAAAADWUVTBgkAAAAAAAACCQAEJAAAAAEIBQAAAAF0AAAACXJlY2lwaWVudAkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQkBAAAAB2V4dHJhY3QAAAABCQAEHQAAAAIFAAAAC3ZvdGVTdGFydGVyAgAAAAJOTwcHAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAABcwUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkH3uA7xA==", "chainId": 84, "height": 472817, "spentComplexity": 0 } View: original | compacted Prev: 9TDSf81VdWU9q6rkhNnHJP3uMH96Ua7WV9ZA2bdEJmF4 Next: 6gYUEjNgTAnBGdfU57VE3kW6rbovu3FKh2zUHbVfvGMf Diff:
Old | New | Differences | |
---|---|---|---|
54 | 54 | case t: TransferTransaction => | |
55 | 55 | let voteSecret = toBase58String(sha256(t.attachment)) | |
56 | 56 | if (isDefined(getString(voteBank, voteSecret))) | |
57 | - | then true | |
57 | + | then { | |
58 | + | let voteStarter = extract(addressFromString(extract(getString(voteBank, voteSecret)))) | |
59 | + | if ((extract(getInteger(voteBank, (voteSecret + "_height"))) > height)) | |
60 | + | then if ((addressFromRecipient(t.recipient) == addressFromString(extract(getString(voteStarter, "YES"))))) | |
61 | + | then true | |
62 | + | else (addressFromRecipient(t.recipient) == addressFromString(extract(getString(voteStarter, "NO")))) | |
63 | + | else false | |
64 | + | } | |
58 | 65 | else false | |
59 | 66 | case s: SetScriptTransaction => | |
60 | 67 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
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 feeTransferId = transactionById(d.proofs[0]) | |
10 | 10 | let assetTranserId = transactionById(d.proofs[1]) | |
11 | 11 | match assetTranserId { | |
12 | 12 | case aT: TransferTransaction => | |
13 | 13 | match feeTransferId { | |
14 | 14 | case fT: TransferTransaction => | |
15 | 15 | let votingHeight = d.data[1].value | |
16 | 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 | 21 | then (aT.recipient == voteBank) | |
22 | 22 | else false) | |
23 | 23 | then (fT.recipient == voteBank) | |
24 | 24 | else false) | |
25 | 25 | then (fT.amount >= (aT.amount * 500000)) | |
26 | 26 | else false) | |
27 | 27 | then (d.data[0].key == toBase58String(sha256(aT.attachment))) | |
28 | 28 | else false) | |
29 | 29 | then (d.data[0].key == toBase58String(sha256(fT.attachment))) | |
30 | 30 | else false) | |
31 | 31 | then (d.data[1].key == (toBase58String(sha256(fT.attachment)) + "_height")) | |
32 | 32 | else false) | |
33 | 33 | then (d.data[2].key == (toBase58String(sha256(fT.attachment)) + "_asset")) | |
34 | 34 | else false) | |
35 | 35 | then match votingHeight { | |
36 | 36 | case h: Int => | |
37 | 37 | (h > height) | |
38 | 38 | case _ => | |
39 | 39 | false | |
40 | 40 | } | |
41 | 41 | else false) | |
42 | 42 | then (d.data[2].value == aT.assetId) | |
43 | 43 | else false) | |
44 | 44 | then sigVerify(d.bodyBytes, d.proofs[3], d.proofs[2]) | |
45 | 45 | else false | |
46 | 46 | case _ => | |
47 | 47 | false | |
48 | 48 | } | |
49 | 49 | case _ => | |
50 | 50 | false | |
51 | 51 | } | |
52 | 52 | } | |
53 | 53 | else false | |
54 | 54 | case t: TransferTransaction => | |
55 | 55 | let voteSecret = toBase58String(sha256(t.attachment)) | |
56 | 56 | if (isDefined(getString(voteBank, voteSecret))) | |
57 | - | then true | |
57 | + | then { | |
58 | + | let voteStarter = extract(addressFromString(extract(getString(voteBank, voteSecret)))) | |
59 | + | if ((extract(getInteger(voteBank, (voteSecret + "_height"))) > height)) | |
60 | + | then if ((addressFromRecipient(t.recipient) == addressFromString(extract(getString(voteStarter, "YES"))))) | |
61 | + | then true | |
62 | + | else (addressFromRecipient(t.recipient) == addressFromString(extract(getString(voteStarter, "NO")))) | |
63 | + | else false | |
64 | + | } | |
58 | 65 | else false | |
59 | 66 | case s: SetScriptTransaction => | |
60 | 67 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
61 | 68 | case _ => | |
62 | 69 | false | |
63 | 70 | } |
github/deemru/w8io/026f985 26.84 ms ◑