You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
decl_event! should generate only one struct/type #4288
Currently decl_event! creates enum RawEvent and type Event = when you have a generic event, but for none-generic events it just generates enum Event.
This needs to be unified, aka just generate enum Event.
As rust automatic trait derives are somewhat broken, the macro will need to implementClone, PartialEq, Eq and RuntimeDebug on it's own. It is required that trait bound will not be put onto the generic parameter itself and instead it needs to be put onto the associated types, so something like this:
enum Event<T> {
SomeEvent(T::Data),
}
has the following PartialEq bounds:
impl<T: Trait> PartialEq for Event<T> where T::Data: PartialEq
and not:
impl<T: Trait> PartialEq for Event<T> where T: PartialEq
parity-scale-codec does this already automatic and so derive(Encode, Decode) should work without any problems.
Activity
herou commentedon Sep 3, 2020
@bkchr Can I work on this ticket?
bkchr commentedon Sep 3, 2020
@herou theoretically yes, but this will probably be solved by #6877 anyway.
herou commentedon Sep 3, 2020
@bkchr any other issue which you offer mentorship?
bkchr commentedon Sep 3, 2020
@herou what is your background? What kind of tasks are you searching for?
herou commentedon Sep 3, 2020
@bkchr I am a mobile developer (Java), recently (6 months) learning rust, substrate, and blockchain to get my feet into.
bkchr commentedon Sep 4, 2020
Maybe this one: paritytech/polkadot-sdk#369 ?
gui1117 commentedon Dec 24, 2020
Fixed by #6877