tx · 99UzVwfUhwPVpwA67PnxaE54BjLZEtLqp1jxPwRSU4rb
3N4mapsqVLDdiatjTF2rYB5KiLn2e6Y4eJb: -0.01400000 Waves
2019.01.30 02:08 [472194] smart account 3N4mapsqVLDdiatjTF2rYB5KiLn2e6Y4eJb > SELF 0.00000000 Waves
{
"type": 13,
"id": "99UzVwfUhwPVpwA67PnxaE54BjLZEtLqp1jxPwRSU4rb",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1548803330728,
"version": 1,
"sender": "3N4mapsqVLDdiatjTF2rYB5KiLn2e6Y4eJb",
"senderPublicKey": "BTdTmTBfL5TMXno6wjKmpDfg3m4L5A71Kaujb4kJtuYe",
"proofs": [
"5VwTXySW8BuiQNaEa2UtMPmseqKzTJ4KDwb7draiK7HjfeYxZGHaLqXKW4NZ3K5E6UNgjSY65L82VSxYbawZDcfU"
],
"script": "base64:AQQAAAAIdm90ZUJhbmsJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEJAAJZAAAAAQIAAAAsQlRkVG1UQmZMNVRNWG5vNndqS21wRGZnM200TDVBNzFLYXVqYjRrSnR1WWUEAAAAE21pbmltYWxWb3RpbmdIZWlnaHQAAAAAAAAAAAoEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDADCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWQAAAAEZGF0YQAAAAAAAAAAAwQAAAAOYXNzZXRUcmFuc2VySWQJAAPoAAAAAQkAAZEAAAACCAUAAAABZAAAAAZwcm9vZnMAAAAAAAAAAAEEAAAADWZlZVRyYW5zZmVySWQJAAPoAAAAAQkAAZEAAAACCAUAAAABZAAAAAZwcm9vZnMAAAAAAAAAAAAEAAAAByRtYXRjaDEFAAAADmFzc2V0VHJhbnNlcklkAwkAAAEAAAACBQAAAAckbWF0Y2gxAgAAABNUcmFuc2ZlclRyYW5zY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0Zyb21TdHJpbmcAAAABCQEAAAAHZXh0cmFjdAAAAAEJAAQdAAAAAgUAAAALdm90ZVN0YXJ0ZXICAAAAA1lFUwYJAAAAAAAAAgkABCQAAAABCAUAAAABdAAAAAlyZWNpcGllbnQJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAEJAQAAAAdleHRyYWN0AAAAAQkABB0AAAACBQAAAAt2b3RlU3RhcnRlcgIAAAACTk8HCQAAAAAAAAIIBQAAAAF0AAAAB2Fzc2V0SWQJAQAAAAdleHRyYWN0AAAAAQkABBwAAAACBQAAAAt2b3RlU3RhcnRlcgkAASwAAAACCQACWAAAAAEIBQAAAAF0AAAACmF0dGFjaG1lbnQCAAAABl9hc3NldAcJAAAAAAAAAggFAAAAAXQAAAAGYW1vdW50AAAAAAAAAAABBwkAAAAAAAACCAUAAAABdAAAAANmZWUAAAAAAAAGGoAHCQAAZgAAAAIJAQAAAAx3YXZlc0JhbGFuY2UAAAABCAUAAAABdAAAAAZzZW5kZXIAAAAAAAX14QAHCQAB9AAAAAMIBQAAAAF0AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAABdAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkHBwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAXMFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5BzOAw9M=",
"chainId": 84,
"height": 472194,
"spentComplexity": 0
}
View: original | compacted
Prev: Ed4yE311GpgKS8kpZnDZh2c8KNWpsbpcNbWdmxJ6knRF
Next: J3BugU7iC4NAtCtzNFzpkiz7KzQn9X5ZtoLy8hXiu6Vo
Diff:
Old | New | | Differences |
---|
4 | 4 | | let minimalVotingHeight = 10 |
---|
5 | 5 | | match tx { |
---|
6 | 6 | | case d: DataTransaction => |
---|
7 | | - | if ((size(d.data) == 2)) |
---|
| 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]) |
---|
|
12 | 12 | | case aT: TransferTransaction => |
---|
13 | 13 | | match feeTransferId { |
---|
14 | 14 | | case fT: TransferTransaction => |
---|
15 | | - | if (if (if (if (if (if (if (if (if (if (if (!(isDefined(getString(voteBank, d.data[0].key)))) |
---|
| 15 | + | if (if (if (if (if (if (if (if (if (if (if (if (if (!(isDefined(getString(voteBank, d.data[0].key)))) |
---|
16 | 16 | | then isDefined(getString(aT.sender, "YES")) |
---|
17 | 17 | | else false) |
---|
18 | 18 | | then isDefined(getString(aT.sender, "NO")) |
---|
|
29 | 29 | | else false) |
---|
30 | 30 | | then (d.data[0].key == toBase58String(fT.attachment)) |
---|
31 | 31 | | else false) |
---|
32 | | - | then (d.data[1].key == toBase58String(sha256(fT.attachment))) |
---|
| 32 | + | then (d.data[1].key == (toBase58String(fT.attachment) + "_height")) |
---|
| 33 | + | else false) |
---|
| 34 | + | then (d.data[2].key == (toBase58String(fT.attachment) + "_asset")) |
---|
33 | 35 | | else false) |
---|
34 | 36 | | then (extract(getInteger(aT.sender, d.data[1].key)) > height) |
---|
| 37 | + | else false) |
---|
| 38 | + | then (extract(getBinary(aT.sender, d.data[2].key)) == aT.assetId) |
---|
35 | 39 | | else false) |
---|
36 | 40 | | then sigVerify(d.bodyBytes, d.proofs[2], d.senderPublicKey) |
---|
37 | 41 | | else false |
---|
|
47 | 51 | | if (isDefined(getString(voteBank, toBase58String(t.attachment)))) |
---|
48 | 52 | | then { |
---|
49 | 53 | | let voteStarter = extract(addressFromString(extract(getString(voteBank, toBase58String(t.attachment))))) |
---|
50 | | - | if (if (if (if (if (if (if ((extract(getInteger(voteBank, toBase58String(sha256(t.attachment)))) > height)) |
---|
51 | | - | then isDefined(getString(voteStarter, "YES")) |
---|
| 54 | + | if (if (if (if (if (if ((extract(getInteger(voteBank, (toBase58String(t.attachment) + "_height"))) > height)) |
---|
| 55 | + | then if ((addressFromRecipient(t.recipient) == addressFromString(extract(getString(voteStarter, "YES"))))) |
---|
| 56 | + | then true |
---|
| 57 | + | else (addressFromRecipient(t.recipient) == addressFromString(extract(getString(voteStarter, "NO")))) |
---|
52 | 58 | | else false) |
---|
53 | | - | then isDefined(getString(voteStarter, "NO")) |
---|
54 | | - | else false) |
---|
55 | | - | then if ((extract(t.recipient) == addressFromString(extract(getString(voteStarter, "YES"))))) |
---|
56 | | - | then true |
---|
57 | | - | else (extract(t.recipient) == addressFromString(extract(getString(voteStarter, "NO")))) |
---|
| 59 | + | then (t.assetId == extract(getBinary(voteStarter, (toBase58String(t.attachment) + "_asset")))) |
---|
58 | 60 | | else false) |
---|
59 | 61 | | then (t.amount == 1) |
---|
60 | 62 | | else false) |
---|
Full:
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 | | - | if ((size(d.data) == 2)) |
---|
| 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 | | match feeTransferId { |
---|
14 | 14 | | case fT: TransferTransaction => |
---|
15 | | - | if (if (if (if (if (if (if (if (if (if (if (!(isDefined(getString(voteBank, d.data[0].key)))) |
---|
| 15 | + | if (if (if (if (if (if (if (if (if (if (if (if (if (!(isDefined(getString(voteBank, d.data[0].key)))) |
---|
16 | 16 | | then isDefined(getString(aT.sender, "YES")) |
---|
17 | 17 | | else false) |
---|
18 | 18 | | then isDefined(getString(aT.sender, "NO")) |
---|
19 | 19 | | else false) |
---|
20 | 20 | | then isDefined(getInteger(aT.sender, "height")) |
---|
21 | 21 | | else false) |
---|
22 | 22 | | then (aT.recipient == voteBank) |
---|
23 | 23 | | else false) |
---|
24 | 24 | | then (fT.recipient == voteBank) |
---|
25 | 25 | | else false) |
---|
26 | 26 | | then (fT.amount == (aT.amount * 300000)) |
---|
27 | 27 | | else false) |
---|
28 | 28 | | then (d.data[0].key == toBase58String(aT.attachment)) |
---|
29 | 29 | | else false) |
---|
30 | 30 | | then (d.data[0].key == toBase58String(fT.attachment)) |
---|
31 | 31 | | else false) |
---|
32 | | - | then (d.data[1].key == toBase58String(sha256(fT.attachment))) |
---|
| 32 | + | then (d.data[1].key == (toBase58String(fT.attachment) + "_height")) |
---|
| 33 | + | else false) |
---|
| 34 | + | then (d.data[2].key == (toBase58String(fT.attachment) + "_asset")) |
---|
33 | 35 | | else false) |
---|
34 | 36 | | then (extract(getInteger(aT.sender, d.data[1].key)) > height) |
---|
| 37 | + | else false) |
---|
| 38 | + | then (extract(getBinary(aT.sender, d.data[2].key)) == aT.assetId) |
---|
35 | 39 | | else false) |
---|
36 | 40 | | then sigVerify(d.bodyBytes, d.proofs[2], d.senderPublicKey) |
---|
37 | 41 | | else false |
---|
38 | 42 | | case _ => |
---|
39 | 43 | | false |
---|
40 | 44 | | } |
---|
41 | 45 | | case _ => |
---|
42 | 46 | | false |
---|
43 | 47 | | } |
---|
44 | 48 | | } |
---|
45 | 49 | | else false |
---|
46 | 50 | | case t: TransferTransaction => |
---|
47 | 51 | | if (isDefined(getString(voteBank, toBase58String(t.attachment)))) |
---|
48 | 52 | | then { |
---|
49 | 53 | | let voteStarter = extract(addressFromString(extract(getString(voteBank, toBase58String(t.attachment))))) |
---|
50 | | - | if (if (if (if (if (if (if ((extract(getInteger(voteBank, toBase58String(sha256(t.attachment)))) > height)) |
---|
51 | | - | then isDefined(getString(voteStarter, "YES")) |
---|
| 54 | + | if (if (if (if (if (if ((extract(getInteger(voteBank, (toBase58String(t.attachment) + "_height"))) > height)) |
---|
| 55 | + | then if ((addressFromRecipient(t.recipient) == addressFromString(extract(getString(voteStarter, "YES"))))) |
---|
| 56 | + | then true |
---|
| 57 | + | else (addressFromRecipient(t.recipient) == addressFromString(extract(getString(voteStarter, "NO")))) |
---|
52 | 58 | | else false) |
---|
53 | | - | then isDefined(getString(voteStarter, "NO")) |
---|
54 | | - | else false) |
---|
55 | | - | then if ((extract(t.recipient) == addressFromString(extract(getString(voteStarter, "YES"))))) |
---|
56 | | - | then true |
---|
57 | | - | else (extract(t.recipient) == addressFromString(extract(getString(voteStarter, "NO")))) |
---|
| 59 | + | then (t.assetId == extract(getBinary(voteStarter, (toBase58String(t.attachment) + "_asset")))) |
---|
58 | 60 | | else false) |
---|
59 | 61 | | then (t.amount == 1) |
---|
60 | 62 | | else false) |
---|
61 | 63 | | then (t.fee == 400000) |
---|
62 | 64 | | else false) |
---|
63 | 65 | | then (wavesBalance(t.sender) > 100000000) |
---|
64 | 66 | | else false) |
---|
65 | 67 | | then sigVerify(t.bodyBytes, t.proofs[0], tx.senderPublicKey) |
---|
66 | 68 | | else false |
---|
67 | 69 | | } |
---|
68 | 70 | | else false |
---|
69 | 71 | | case s: SetScriptTransaction => |
---|
70 | 72 | | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
71 | 73 | | case _ => |
---|
72 | 74 | | false |
---|
73 | 75 | | } |
---|