I have two custom pallets pallet1
and pallet2
. In pallet1
I have a bunch of calls with assigned weights declared under pallet call macro like this
#[pallet::call]
impl<T: Config> Pallet<T> {
dispatchables
}
In pallet1
I also have a bunch of public helper functions outside of call macro, they are at the bottom of my pallets code
impl<T: Config> Pallet<T> {
pub fn do_things(args) -> DispatchResult {}
}
Now pallet2
can call these helper functions from pallet1
through coupling mechanism
pallet1::Pallet::<T>::do_things(args)
Is there a way to call these functions externally/directly by submitting some extrinsic or other means like state_call
rpc or something
or the only way to invoke them outside pallet1 is hardcoding calls to these functions in other custom pallets
pallet-1
twice. Please correct that.pallet1::Pallet::<T>::do_things(args)
inside new palletX when I'm writing it. Are there other ways to dispatch do_things()?