abstract_sdk/base/features/module_identification.rs
1use crate::{base::Handler, std::objects::module::ModuleId};
2
3/// Return the identifier for this module.
4pub trait ModuleIdentification: Sized {
5 /// Get the module identifier.
6 fn module_id(&self) -> ModuleId<'static>;
7}
8
9impl<T: Handler> ModuleIdentification for T {
10 fn module_id(&self) -> ModuleId<'static> {
11 self.contract().info().0
12 }
13}