Questions tagged [origin]
The origin tag has no usage guidance.
18
questions
3
votes
0
answers
32
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::...
5
votes
1
answer
39
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 ...
3
votes
1
answer
43
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 ...
2
votes
1
answer
39
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
2
votes
2
answers
63
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 ...
1
vote
0
answers
32
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 ...
2
votes
1
answer
106
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 ...
5
votes
2
answers
175
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 ...
0
votes
2
answers
82
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 ...
6
votes
1
answer
194
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 ...
2
votes
2
answers
89
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.
...
0
votes
1
answer
52
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 ...
0
votes
1
answer
66
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.
3
votes
1
answer
94
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 ...
0
votes
1
answer
86
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 ...
3
votes
1
answer
93
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 ...
7
votes
2
answers
168
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 ...
3
votes
2
answers
153
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 ...