tx · AxDjnmSDybdfFy5ywVwJQH3tvhvtcxzRo6dCcrK3pCZF 3N4mapsqVLDdiatjTF2rYB5KiLn2e6Y4eJb: -0.01400000 Waves 2019.01.30 11:36 [472760] smart account 3N4mapsqVLDdiatjTF2rYB5KiLn2e6Y4eJb > SELF 0.00000000 Waves
{ "type": 13, "id": "AxDjnmSDybdfFy5ywVwJQH3tvhvtcxzRo6dCcrK3pCZF", "fee": 1400000, "feeAssetId": null, "timestamp": 1548837428858, "version": 1, "sender": "3N4mapsqVLDdiatjTF2rYB5KiLn2e6Y4eJb", "senderPublicKey": "BTdTmTBfL5TMXno6wjKmpDfg3m4L5A71Kaujb4kJtuYe", "proofs": [ "5J1ELMbddTYn8cZ6nuLJqB8AcQ2VAz7s1NjTUtippgA6kfh4YCa7uvXSRYXFuKSZzvktjhi4zjq7gwoqDFPhJzct" ], "script": "base64:AQQAAAAIdm90ZUJhbmsJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEJAAJZAAAAAQIAAAAsQlRkVG1UQmZMNVRNWG5vNndqS21wRGZnM200TDVBNzFLYXVqYjRrSnR1WWUEAAAAE21pbmltYWxWb3RpbmdIZWlnaHQAAAAAAAAAAAoEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDADCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWQAAAAEZGF0YQAAAAAAAAAAAwQAAAAOYXNzZXRUcmFuc2VySWQJAAPoAAAAAQkAAZEAAAACCAUAAAABZAAAAAZwcm9vZnMAAAAAAAAAAAEEAAAADWZlZVRyYW5zZmVySWQJAAPoAAAAAQkAAZEAAAACCAUAAAABZAAAAAZwcm9vZnMAAAAAAAAAAAAEAAAAByRtYXRjaDEFAAAADmFzc2V0VHJhbnNlcklkAwkAAAEAAAACBQAAAAckbWF0Y2gxAgAAABNUcmFuc2ZlclRyYW5zYWN0a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B0AAAACBQAAAAt2b3RlU3RhcnRlcgIAAAACTk8HCQAAAAAAAAIIBQAAAAF0AAAAB2Fzc2V0SWQJAQAAAAdleHRyYWN0AAAAAQkABBwAAAACBQAAAAt2b3RlU3RhcnRlcgkAASwAAAACCQACWAAAAAEIBQAAAAF0AAAACmF0dGFjaG1lbnQCAAAABl9hc3NldAcJAAAAAAAAAggFAAAAAXQAAAAGYW1vdW50AAAAAAAAAAABBwkAAAAAAAACCAUAAAABdAAAAANmZWUAAAAAAAAHoSAHCQAAZgAAAAIJAQAAAAx3YXZlc0JhbGFuY2UAAAABCAUAAAABdAAAAAZzZW5kZXIAAAAAAAX14QAHCQAB9AAAAAMIBQAAAAF0AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAABdAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkHBwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAXMFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5B2Qj2Yo=", "chainId": 84, "height": 472760, "spentComplexity": 0 } View: original | compacted Prev: 7aN4BDTuyJaDvVgbo1HzVUuzCEYoD3af8wHKY9TXQpZJ Next: DSiYFWNYvR7RsNkooWDNKC6KnAqVnPa8Q2iQncX1RZH2 Diff:
Old | New | Differences | |
---|---|---|---|
10 | 10 | let feeTransferId = transactionById(d.proofs[0]) | |
11 | 11 | match assetTranserId { | |
12 | 12 | case aT: TransferTransaction => | |
13 | - | let attach = toBase58String(sha256(aT.attachment)) | |
14 | 13 | match feeTransferId { | |
15 | 14 | case fT: TransferTransaction => | |
15 | + | let votingHeight = d.data[1].value | |
16 | 16 | 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) | |
32 | 32 | else false) | |
33 | 33 | then (d.data[2].key == (toBase58String(sha256(fT.attachment)) + "_asset")) | |
34 | 34 | else false) | |
35 | - | then (extract(getInteger(tx.sender, d.data[1].key)) > height) | |
35 | + | then match votingHeight { | |
36 | + | case h: Int => | |
37 | + | (h > height) | |
38 | + | case _ => | |
39 | + | false | |
40 | + | } | |
36 | 41 | else false | |
37 | 42 | case _ => | |
38 | 43 | 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 | - | let attach = toBase58String(sha256(aT.attachment)) | |
14 | 13 | match feeTransferId { | |
15 | 14 | case fT: TransferTransaction => | |
15 | + | let votingHeight = d.data[1].value | |
16 | 16 | 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 | - | then (extract(getInteger(tx.sender, d.data[1].key)) > height) | |
35 | + | then match votingHeight { | |
36 | + | case h: Int => | |
37 | + | (h > height) | |
38 | + | case _ => | |
39 | + | false | |
40 | + | } | |
36 | 41 | else false | |
37 | 42 | case _ => | |
38 | 43 | false | |
39 | 44 | } | |
40 | 45 | case _ => | |
41 | 46 | false | |
42 | 47 | } | |
43 | 48 | } | |
44 | 49 | else false | |
45 | 50 | case t: TransferTransaction => | |
46 | 51 | if (isDefined(getString(voteBank, toBase58String(t.attachment)))) | |
47 | 52 | then { | |
48 | 53 | let voteStarter = extract(addressFromString(extract(getString(voteBank, toBase58String(sha256(t.attachment)))))) | |
49 | 54 | if (if (if (if (if (if ((extract(getInteger(voteBank, (toBase58String(sha256(t.attachment)) + "_height"))) > height)) | |
50 | 55 | then if ((addressFromRecipient(t.recipient) == addressFromString(extract(getString(voteStarter, "YES"))))) | |
51 | 56 | then true | |
52 | 57 | else (addressFromRecipient(t.recipient) == addressFromString(extract(getString(voteStarter, "NO")))) | |
53 | 58 | else false) | |
54 | 59 | then (t.assetId == extract(getBinary(voteStarter, (toBase58String(t.attachment) + "_asset")))) | |
55 | 60 | else false) | |
56 | 61 | then (t.amount == 1) | |
57 | 62 | else false) | |
58 | 63 | then (t.fee == 500000) | |
59 | 64 | else false) | |
60 | 65 | then (wavesBalance(t.sender) > 100000000) | |
61 | 66 | else false) | |
62 | 67 | then sigVerify(t.bodyBytes, t.proofs[0], tx.senderPublicKey) | |
63 | 68 | else false | |
64 | 69 | } | |
65 | 70 | else false | |
66 | 71 | case s: SetScriptTransaction => | |
67 | 72 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
68 | 73 | case _ => | |
69 | 74 | false | |
70 | 75 | } |
github/deemru/w8io/026f985 24.40 ms ◑