I am a beginner learning the substrate framework, So am actually following the documentation on the substrate website where it references the use of macros in a custom pallet, after implementing all the code, am facing some import errors, due to the lines posted below.
pub use pallet::*;
#[frame_support::pallet]
pub mod pallet {
use frame_support::pallet_prelude::*;
use frame_system::pallet_prelude::*;
Below is the complete error trace
Compiling pallet-template v4.0.0-dev (/Users/mac/Desktop/pallet-identity/pallets/template)
error: Invalid usage of RuntimeEvent, `Config` contains no associated type `RuntimeEvent`, but enum `Event` is declared (in use of `#[pallet::event]`). An RuntimeEvent associated type must be declare on trait `Config`.
--> /Users/mac/Desktop/pallet-identity/pallets/template/src/lib.rs:11:1
|
11 | #[frame_support::pallet]
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0432]: unresolved import `pallet`
--> /Users/mac/Desktop/pallet-identity/pallets/template/src/lib.rs:7:9
|
7 | pub use pallet::*;
| ^^^^^^ help: a similar path exists: `frame_system::pallet`
For more information about this error, try `rustc --explain E0432`.
error: could not compile `pallet-template` due to 2 previous errors