tx · Ahgcgrv6xA77UeTn2q4xiYAcaYezRYsPXq9JaiXocDgQ

3N4mapsqVLDdiatjTF2rYB5KiLn2e6Y4eJb:  -0.01400000 Waves

2019.01.30 12:02 [472786] smart account 3N4mapsqVLDdiatjTF2rYB5KiLn2e6Y4eJb > SELF 0.00000000 Waves

{ "type": 13, "id": "Ahgcgrv6xA77UeTn2q4xiYAcaYezRYsPXq9JaiXocDgQ", "fee": 1400000, "feeAssetId": null, "timestamp": 1548838951148, "version": 1, "sender": "3N4mapsqVLDdiatjTF2rYB5KiLn2e6Y4eJb", "senderPublicKey": "BTdTmTBfL5TMXno6wjKmpDfg3m4L5A71Kaujb4kJtuYe", "proofs": [ "BYAMBRft8Fq7rCDFh1w789G8yfBLRRwLjDozVeSgRtz17pbxjrKoKcjSm9hdNitmHtEx5p42V3so27atUbTYnYt" ], "script": "base64:AQQAAAAIdm90ZUJhbmsJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEJAAJZAAAAAQIAAAAsQlRkVG1UQmZMNVRNWG5vNndqS21wRGZnM200TDVBNzFLYXVqYjRrSnR1WWUEAAAAE21pbmltYWxWb3RpbmdIZWlnaHQAAAAAAAAAAAoEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDADCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWQAAAAEZGF0YQAAAAAAAAAAAwQAAAANZmVlVHJhbnNmZXJJZAkAA+gAAAABCQABkQAAAAIIBQAAAAFkAAAABnByb29mcwAAAAAAAAAAAAQAAAAOYXNzZXRUcmFuc2VySWQJAAPoAAAAAQkAAZEAAAACCAUAAAABZAAAAAZwcm9vZnMAAAAAAAAAAAEEAAAAByRtYXRjaDEFAAAADmFzc2V0VHJhbnNlcklkAwkAAAEAAAACBQAAAAckbWF0Y2gxAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAA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c3NGcm9tU3RyaW5nAAAAAQkBAAAAB2V4dHJhY3QAAAABCQAEHQAAAAIFAAAAC3ZvdGVTdGFydGVyAgAAAANZRVMGCQAAAAAAAAIJAAQkAAAAAQgFAAAAAXQAAAAJcmVjaXBpZW50CQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABCQEAAAAHZXh0cmFjdAAAAAEJAAQdAAAAAgUAAAALdm90ZVN0YXJ0ZXICAAAAAk5PBwkAAAAAAAACCAUAAAABdAAAAAdhc3NldElkCQEAAAAHZXh0cmFjdAAAAAEJAAQcAAAAAgUAAAALdm90ZVN0YXJ0ZXIJAAEsAAAAAgUAAAAKdm90ZVNlY3JldAIAAAAGX2Fzc2V0BwkAAAAAAAACCAUAAAABdAAAAAZhbW91bnQAAAAAAAAAAAEHCQAAAAAAAAIIBQAAAAF0AAAAA2ZlZQAAAAAAAAehIAcJAABmAAAAAgkBAAAADHdhdmVzQmFsYW5jZQAAAAEIBQAAAAF0AAAABnNlbmRlcgAAAAAABfXhAAcJAAH0AAAAAwgFAAAAAXQAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAF0AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQcHAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAABcwUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkH424wnw==", "chainId": 84, "height": 472786, "spentComplexity": 0 } View: original | compacted Prev: 8m22ijE61eyUXU5U48SYvdvyVaPTY5gQnJWrPDsDLQ7R Next: EoFAeJfo4QtCm9uZQnZcrEdkFkCPGBfw9kZ5PrhEcQMp Diff:
OldNewDifferences
5252 }
5353 else false
5454 case t: TransferTransaction =>
55- if (isDefined(getString(voteBank, toBase58String(t.attachment))))
55+ let voteSecret = toBase58String(sha256(t.attachment))
56+ if (isDefined(getString(voteBank, voteSecret)))
5657 then {
57- let voteStarter = extract(addressFromString(extract(getString(voteBank, toBase58String(sha256(t.attachment))))))
58- if (if (if (if (if (if ((extract(getInteger(voteBank, (toBase58String(sha256(t.attachment)) + "_height"))) > height))
58+ let voteStarter = extract(addressFromString(extract(getString(voteBank, voteSecret))))
59+ if (if (if (if (if (if ((extract(getInteger(voteBank, (voteSecret + "_height"))) > height))
5960 then if ((addressFromRecipient(t.recipient) == addressFromString(extract(getString(voteStarter, "YES")))))
6061 then true
6162 else (addressFromRecipient(t.recipient) == addressFromString(extract(getString(voteStarter, "NO"))))
6263 else false)
63- then (t.assetId == extract(getBinary(voteStarter, (toBase58String(t.attachment) + "_asset"))))
64+ then (t.assetId == extract(getBinary(voteStarter, (voteSecret + "_asset"))))
6465 else false)
6566 then (t.amount == 1)
6667 else false)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 1 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
33 let voteBank = addressFromPublicKey(fromBase58String("BTdTmTBfL5TMXno6wjKmpDfg3m4L5A71Kaujb4kJtuYe"))
44 let minimalVotingHeight = 10
55 match tx {
66 case d: DataTransaction =>
77 if ((size(d.data) == 3))
88 then {
99 let feeTransferId = transactionById(d.proofs[0])
1010 let assetTranserId = transactionById(d.proofs[1])
1111 match assetTranserId {
1212 case aT: TransferTransaction =>
1313 match feeTransferId {
1414 case fT: TransferTransaction =>
1515 let votingHeight = d.data[1].value
1616 if (if (if (if (if (if (if (if (if (if (if (if (!(isDefined(getString(voteBank, d.data[0].key))))
1717 then isDefined(getString(aT.sender, "YES"))
1818 else false)
1919 then isDefined(getString(aT.sender, "NO"))
2020 else false)
2121 then (aT.recipient == voteBank)
2222 else false)
2323 then (fT.recipient == voteBank)
2424 else false)
2525 then (fT.amount >= (aT.amount * 500000))
2626 else false)
2727 then (d.data[0].key == toBase58String(sha256(aT.attachment)))
2828 else false)
2929 then (d.data[0].key == toBase58String(sha256(fT.attachment)))
3030 else false)
3131 then (d.data[1].key == (toBase58String(sha256(fT.attachment)) + "_height"))
3232 else false)
3333 then (d.data[2].key == (toBase58String(sha256(fT.attachment)) + "_asset"))
3434 else false)
3535 then match votingHeight {
3636 case h: Int =>
3737 (h > height)
3838 case _ =>
3939 false
4040 }
4141 else false)
4242 then (d.data[2].value == aT.assetId)
4343 else false)
4444 then sigVerify(d.bodyBytes, d.proofs[3], d.proofs[2])
4545 else false
4646 case _ =>
4747 false
4848 }
4949 case _ =>
5050 false
5151 }
5252 }
5353 else false
5454 case t: TransferTransaction =>
55- if (isDefined(getString(voteBank, toBase58String(t.attachment))))
55+ let voteSecret = toBase58String(sha256(t.attachment))
56+ if (isDefined(getString(voteBank, voteSecret)))
5657 then {
57- let voteStarter = extract(addressFromString(extract(getString(voteBank, toBase58String(sha256(t.attachment))))))
58- if (if (if (if (if (if ((extract(getInteger(voteBank, (toBase58String(sha256(t.attachment)) + "_height"))) > height))
58+ let voteStarter = extract(addressFromString(extract(getString(voteBank, voteSecret))))
59+ if (if (if (if (if (if ((extract(getInteger(voteBank, (voteSecret + "_height"))) > height))
5960 then if ((addressFromRecipient(t.recipient) == addressFromString(extract(getString(voteStarter, "YES")))))
6061 then true
6162 else (addressFromRecipient(t.recipient) == addressFromString(extract(getString(voteStarter, "NO"))))
6263 else false)
63- then (t.assetId == extract(getBinary(voteStarter, (toBase58String(t.attachment) + "_asset"))))
64+ then (t.assetId == extract(getBinary(voteStarter, (voteSecret + "_asset"))))
6465 else false)
6566 then (t.amount == 1)
6667 else false)
6768 then (t.fee == 500000)
6869 else false)
6970 then (wavesBalance(t.sender) > 100000000)
7071 else false)
7172 then sigVerify(t.bodyBytes, t.proofs[0], tx.senderPublicKey)
7273 else false
7374 }
7475 else false
7576 case s: SetScriptTransaction =>
7677 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
7778 case _ =>
7879 false
7980 }

github/deemru/w8io/026f985 
38.91 ms