Skip to main content
3 votes

(FIXED) Substrate forkless upgrade tutorial: pallet_scheduler has breaking changes

Indeed, there is a new version for the Scheduler pallet and the tutorial needs to be updated according to it. This pull request mentions the necessary changes. In the meantime, just set the following ...
Iker's user avatar
  • 1,471
3 votes

Explanation on this syntax: pub trait Config<I: 'static = ()>: frame_system::Config

Let's break it down: pub trait Config<I: 'static = ()>: frame_system::Config ---------------- +++++++++++++++ xxxxxxxxxxxxxxxxxxxx Every pallet has a trait Config which allows you to ...
Shawn Tabrizi's user avatar
  • 16.3k
2 votes
Accepted

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

I think the best option you have here is using a SignExtension. There, you can filter by who (checking a whitelisted list in storage), for those signed call that match with pallet_democracy::Call::...
NachoPal's user avatar
  • 514
2 votes

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

One easy way to do this without needing to change the pallet code too much, as you said, is using signed extensions. Here's one that does a similar thing: https://github.com/paritytech/substrate/pull/...
kianenigma's user avatar
  • 2,864
2 votes
Accepted

How can I convert an account of type sp_runtime::traits::IdentifyAccount::AccountId to sp_runtime::AccountId32?

You can add a trait to do this. #[pallet::config] trait Config: frame_system::Config { AccountIdConvertor: AccountIdConvertor<Self::AccountId>; } trait AccountIdConvertor<A> { fn ...
aurexav's user avatar
  • 11.2k
2 votes
Accepted

how to implement Config of a pallet for runtime

It is not really about "estimation" about most of these types! I think the general thing that is lacking here is documentation and a fundamental understanding of what Config and all these ...
bkchr's user avatar
  • 11.8k
1 vote

EnsureOriginBy using an account set on a pallet's storage

type Who in EnsureSignedBy<Who, AccountId> is bounded by SortedMembers trait. Implement this either for your pallet or for a custom struct: pub struct AuthorityProvider<T: crate::Config>(...
dastansam's user avatar
  • 619
1 vote
Accepted

Customizing AccountId

Outdated The error message is still unclear. It appears that the error originated from the runtime instead of the pallet. When passing AccountId = YourImplementation, YourImplementation must meet all ...
aurexav's user avatar
  • 11.2k
1 vote
Accepted

Trait item implementation is missing: `reserve_withdraw_assets`

I applied a temporary fix which was to rename the pallet-xcm dependency to astar-xcm in astar-frame and Astar to avoid dependency conflicts with the pallet-xcm subdependency from polkadot-runtime.
Snowmead's user avatar
  • 625
1 vote

how to implement Config of a pallet for runtime

It's arbitrary. You'd better start from the node-template's parameters. https://github.com/substrate-developer-hub/substrate-node-template Or you can take a look at the Polkadot/Kusama's. https://...
aurexav's user avatar
  • 11.2k
1 vote

Help configuring the democracy pallet and referenda proposal

Looks like it is in the referenda config: /// The **minimum** amount to be used as a deposit for a public referendum proposal. #[pallet::constant] type SubmissionDeposit: Get<BalanceOf<Self, I&...
Bruno's user avatar
  • 8,455
1 vote
Accepted

What is the most standard pallet structure in Substrate?

aside from the outer #[pallet] mod pallet {} and the fact that everything needs to be inside of this, internals of a pallet are almost entirely normal Rust and the mentioned items can appear anywhere ...
kianenigma's user avatar
  • 2,864
1 vote
Accepted

How to get the call `authorize_upgrade` from `cumulus_pallet_parachain_system` inside another pallet?

cumulus_pallet_parachain_system::Call::<T>::authorize_upgrade { code_hash } This gives you access in your pallet to the parachain system Call. T needs to implement ...
bkchr's user avatar
  • 11.8k
1 vote

How to loose couple trait with config?

Rather than making your trait generic over T: Config, you should make it generic over AccountId, and you probably should not include Origin anywhere in your interface. Then, rather than passing Self, ...
Shawn Tabrizi's user avatar
  • 16.3k
1 vote
Accepted

Raw specs not building, unknown field

Look here: https://github.com/Kylin-Network/kylin-collator/blob/d21e1db3511f4536cf234c30d4081da1f4ea1230/node/src/command.rs#L39 impl IdentifyChain for dyn sc_service::ChainSpec { fn identify(&...
Bruno's user avatar
  • 8,455
1 vote

Can't reach DemocracyConfig import

I think you have not implemented DemocracyConfig in runtime.
Deepak Chaudhary's user avatar
1 vote

Expose StorageItems to other pallets whose types are bound on an instance of my pallet

As far as I understand your trait approach is correct. The only way of how Pallets are supposed to interact with each other, be it storage or calls, is through traits. So you cannot use a storage Item ...
Oliver Tale-Yazdi's user avatar
1 vote

Add scheduler pallet in substrate

The error is saying you have not implemented the frame_system::Config for your runtime. So you are missing some code block like: impl frame_system::Config for Runtime { type BaseCallFilter = ...
Shawn Tabrizi's user avatar
  • 16.3k

Only top scored, non community-wiki answers of a minimum length are eligible