-
Notifications
You must be signed in to change notification settings - Fork 810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FRAME] Storage derive macro #[frame_support::stored]
#4079
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
#[scale_info(skip_type_params(Total))] | ||
#[codec(mel_bound(Votes: MaxEncodedLen))] | ||
#[derive(CloneNoBound, PartialEqNoBound, EqNoBound, RuntimeDebugNoBound)] | ||
#[frame_support::stored(skip(Total), mel(Votes))] | ||
pub struct Tally<Votes: Clone + PartialEq + Eq + Debug + TypeInfo + Codec, Total> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The difficult part about this was to re-add the Clone
etc. bounds for all parameters that are not skipped.
And that requires some changes to all of our *NoBound
derives. Writing all these bounds like in this case is not so nice... ideally it would do it automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if I read it right, mel(Votes)
here means do not generate anything for Votes
and use whatever is set for it below? wonder why MaxEncodedLen
is not needed then?
The CI pipeline was cancelled due to failure one of the required jobs. |
WIP DNM
Some examples: