Probably a dumb question, but is it possible to do something like this?

impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
    fn on_initialize(now: BlockNumberFor<T>) -> Weight {
        Self::some_extrinsic(origin, now); // what would the origin be here?

1 Answer 1


Not a good idea. You can just put the functionality into a new private function and then call that instead. Then you wont need an origin.
If the functionality can be injected then use a trait. Everything in frame-support/traits basically.
For example the Currency trait which is implemented by other pallets to allow for re-usability without the need to dispatch another call.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.