I'm a newcomer to Rust and have been working with the Substrate-Parachain-Template
. So far, I've managed to get everything to compile and run without issue, which is a good start.
However, I've come across a part of the code that I'm struggling to understand, specifically the RuntimeEvent type resolution. Here's a snippet of the code in question:
impl pallet_nicks::Config for Runtime {
.....
// The ubiquitous event type.
type Event = RuntimeEvent;
}
I'm confused about the RuntimeEvent type because there isn't an explicit import statement for it, and yet it doesn't seem to be causing any issues. It feels like magic, but I know that's not how programming works.
Could anyone kindly explain how Rust is resolving this type? I've checked the documentation but I couldn't find a clear explanation on this matter.
Any insight would be greatly appreciated. Thank you in advance!
Best Regards, AnonDao