Questions tagged [origin]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
21 views

EnsureOriginBy using an account set on a pallet's storage

I'm working on a feature that requires pallet-nfts ForceOrigin to only be callable by an account configured inside a separated pallet's storage. For example in pallet-A I have the following #[pallet::...
Valentin Fernandez's user avatar
0 votes
0 answers
19 views

Referenda function call after passsing

I want to pass a proposal then have it called once passed after x blocks I set it up like this: pub struct TracksInfo; impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo { ...
bobby dy's user avatar
1 vote
1 answer
20 views

Ensure that a call is dispatched from a specific pallet

So I want my instance of the pallet membership to be managed only by a specific pallet, and not even the Root origin. Is there anyway to create an EnsureOrigin object that can verify that a specific ...
SailorSnoW's user avatar
0 votes
0 answers
19 views

What's `Morph`? Why do we need this type?

See https://paritytech.github.io/polkadot-sdk/master/sp_runtime/traits/trait.Morph.html. What's the purpose of having this type? Any example?
AurevoirXavier's user avatar
3 votes
0 answers
46 views

Filter pallet call by origin

Is there a way to access the call origin when using BaseCallFilter from frame_system::Config? Something like: // Disallow any call to a given pallet pub struct CallFilter; impl frame_support::traits::...
Rodrigo Quelhas's user avatar
5 votes
1 answer
51 views

frame-benchmarking::v2 doesn't work for force_origin

In Config of my pallet I have: type FilteredOrigin: EnsureOriginWithArg< Self::RuntimeOrigin, SomeEnum, Success = Self::AccountId >; And there is an ...
Данила Алексеев's user avatar
3 votes
1 answer
65 views

How to filter extrinsics senders?

Let's imagine that we have some blacklist pallet that stores accounts that are restricted to make some calls. How do we implement origins filtering based on that blacklist for other pallets? We could ...
Данила Алексеев's user avatar
2 votes
1 answer
51 views

How to get Runtime types and Runtime (PalletCustomOrigins) from subxt metadata.scale

The main aim is to get Governance Origins using subxt from the encoded metadata
Mrisho Lukamba's user avatar
2 votes
2 answers
69 views

can someone provide a clear example on #[pallet::origin]

what are the use cases for this macro? what does it mean to specify an origin for the pallet? does it mean that all extrinsics defined within that pallet will be available only for origin? can someone ...
dadzerlaze's user avatar
  • 1,083
1 vote
0 answers
38 views

Using original origin's call filter for proxy pallet's proxy

In the proxy pallet's do_proxy function, a newly authenticated origin is constructed from the real account. This is explicitly done. Is there a particular reason for this? Can I just use the same ...
Shoeb Siddiqui's user avatar
2 votes
1 answer
134 views

Transfer from asset pallets with generated pallet account

I want to create a pallet account and then store assets using pallet assets in it, but I have a problem withdrawing assets from the pallet account because you can't transfer from pallet assets unless ...
Mohamad Al Zohbie's user avatar
5 votes
2 answers
189 views

SignedExtension to mutate Origin

Please see edits 2 and beyond, as they reshape the question a lot. TLDR: I need a way to mutate an origin for all but some specific calls so that it's dispatched as RawOrigin::Signed to pass ...
Gabe's user avatar
  • 115
0 votes
2 answers
112 views

what happens if I leave out ensure_signed from extrinsic?

What are the attack vectors of leaving out ensured_signed in one of my extrinsic? It seems that SignedExtensions already checks if the transactions are signed. When I try to submit an unsigned ...
Yatusabes's user avatar
  • 766
6 votes
1 answer
208 views

How to avoid impersonation when using DescendOrigin XCM

I'm using Transact to execute an extrinsic from one parachain to another. This extrinsic requires the origin to be a signed account which I'm verifying with ensure_signed. The way I'm getting a signed ...
Juan Ignacio Rios's user avatar
3 votes
2 answers
113 views

How does one block specific accounts from calling extrinsics for a substrate pallet?

We want the ability to filter certain accounts from calling extrinsics in the democracy pallet. There are more details but basically we can't do this by reserving token balance or we would do that. ...
Shannon Wells's user avatar
0 votes
1 answer
54 views

Storage level Origin

We have a DAO factory, and the whole idea is to create councils dynamically on the pallet level. The best would be using the native approach of the council origin but having the possibility to change ...
vovacha's user avatar
  • 148
0 votes
1 answer
73 views

Is it possible to implement a custom root origin in substrate

I was looking through a way where there a possibility of implementing a custom root origin in substrate.
kroos47's user avatar
  • 59
3 votes
1 answer
98 views

How to create custom origin that executes abritrary code on transactions

How can I create a custom origin that executes some arbitrary logic on any transaction? The use case here is some identity check that fails a transaction, if the check fails. In addition, I want to ...
Justin Frevert's user avatar
0 votes
1 answer
100 views

Question about Raw Origin in Frame System Pallet

Inside mod pallet {}, there is code for RawOrigin, which is pub enum RawOrigin<AccountId> { Root, Signed(AccountId), None, } I don't know how we can use this AccountId type ...
coco_yoon's user avatar
  • 119
3 votes
1 answer
105 views

How do collective origins work?

I am trying to learn how to use the collective module and started my chain using just 1 council member. Then I create a proposal for some function like set_balance, and execute it with a threshold of ...
Purple_Turtle's user avatar
7 votes
2 answers
197 views

Is it possible to define a custom origin in my pallet?

The actors in my pallet are identified by the tuple (AccountId, CurrencyId) which requires most extrinsics to specify the CurrencyId enum as a separate argument. Example: #[pallet::weight(<T as ...
Gregory Hill's user avatar
3 votes
2 answers
188 views

Benchmarking: RawOrigin::Root as AccountId

One of benchmarked extrinsic of custom pallet requires Root sender (or Sudo), uses pallet_assets from runtime trait implementation (no coupling here). To verify I'm using balance() method to confirm ...
Ivan Temchenko's user avatar