polkascan / py-scale-codec

Python SCALE-Codec
https://polkascan.github.io/py-scale-codec/
Apache License 2.0
55 stars 54 forks source link

GenericVote not available for all pallets #87

Closed arjanz closed 2 years ago

arjanz commented 2 years ago

Substrate type Vote (https://github.com/paritytech/substrate/blob/70351393fd632317124f35ab8b24ef7134e08864/frame/conviction-voting/src/vote.rs#L32) is a struct stored as an u8 with a certain bitmask.

This requires a special decoding class GenericVote, which is currently only available for the democracy pallet and not other pallets like conviction-voting. Here a vote is still being encoded/decoded as a u8.