在基板 2.0.1 中,它具有以下代码:
mod simple_event {
pub use crate::Event;
}
impl_outer_event! {
pub enum TestEvent for TestRuntime {
simple_event,
frame_system<T>,
}
}
https://github.com/substrate-developer-hub/recipes/blob/master/pallets/simple-event/src/tests.rs
但是添加 impl_outer_event 会在基板 3.0.0 中出现错误:
/ frame_support::construct_runtime!(
14 | | pub enum Test where
15 | | Block = Block,
16 | | NodeBlock = Block,
... |
21 | | }
22 | | );
| |__^ duplicate definitions for `outer_event_metadata`
...
58 | / impl_outer_event! {
59 | | pub enum TestEvent for Test {
60 | | simple_event<T>,
61 | | frame_system<T>,
62 | | }
63 | | }
| |_- other definition for `outer_event_metadata`
如何解决?