# Representing pallet's origins as System-like origins

**URL:** <https://forum.polkadot.network/t/representing-pallets-origins-as-system-like-origins/4313>\
**Category:** Tech Talk\
**Tags:** frame\
**Created:** [October 17, 2023, 9:18pm UTC](https://forum.polkadot.network/t/representing-pallets-origins-as-system-like-origins/4313 "2023-10-17T21:18:23Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![shawntabrizi](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/shawntabrizi/32/14_2.png) [@shawntabrizi](https://forum.polkadot.network/u/shawntabrizi)\
**Post date:** [October 18, 2023, 12:20am UTC](https://forum.polkadot.network/t/representing-pallets-origins-as-system-like-origins/4313/5 "2023-10-18T00:20:12Z")

</div>

Why must this overhead be brought into frame system.

If you intend to have the logic which is:

```auto
let community_account_id = Pallet::<T>::get_community_account_id(&self.community_id);
Ok(frame_system::Origin::Signed(community_account_id))

```

What is the concern with just dispatching from this pallet with `Signed(community_account_id)`?

It seems to me all of this could be solved by adding a single extrinsic into your pallet:

```auto
#[pallet::call]
pub fn convert_community_to_signed_call(origin: OriginFor<T>, call: Box<RuntimeCall>) -> DispatchResult {
    let community_account_id = ensure_community_and_get_account(origin)?;
    call.dispatch(frame_system::RawOrigin::Signed(community_account_id)?
}

```

Then users simply can dispatch their `community` origin calls through this function to generate a signed origin call. In this case, there is less “magic” and you are not pushing further requirements or complexity up the FRAME stack.

For example, from a types perspective, it is not obvious to me that most origins should be convertible to a `frame_system::RawOrigin`. This is probably why I didn’t understand your post to begin with. Having the origin represent a community, and that community having an account id seems very specific to certain scenarios, and ones you can support directly in your pallet.

---

_[View the full topic](https://forum.polkadot.network/t/representing-pallets-origins-as-system-like-origins/4313)._
