Questions tagged [config]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
24 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
24 views

trait bound pallet::Config not satisfied even it is implemented

If more context is needed, it is available in commit b392cfa3, file mock.rs. I'm trying to add a mock for my pallet pallet_quotas in order to implement unit tests. My pallet depends on a certain ...
Hugo Trentesaux's user avatar
1 vote
1 answer
122 views

Customizing AccountId

In my runtime I'm using pub type AccountId = <<Signature as Verify>::Signer as IdentifyAccount>::AccountId;. Within my pallet I also need this type to implement From<SomeType>. I ...
magecnion's user avatar
  • 222
5 votes
1 answer
73 views

Trait item implementation is missing: `reserve_withdraw_assets`

I am running the Astar node locally and pointing to the astar-frame repository which is cloned on my local machine. In the Astar node repository, I added the paths-override method to the point all ...
Snowmead's user avatar
  • 625
2 votes
1 answer
75 views

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

I get the following error when trying to convert my frame_system::Config::AccountId to a MultiAddress. expected enum `MultiAddress<sp_runtime::AccountId32, ()>` found enum `MultiAddress<&...
Snowmead's user avatar
  • 625
3 votes
2 answers
75 views

how to implement Config of a pallet for runtime

I got through a lot of documentation and official examples, but I still cannot understand how you estimate what precisely the values should be when implementing a given pallet's Config (i.e. ...
munificent's user avatar
2 votes
1 answer
61 views

Help configuring the democracy pallet and referenda proposal

This is regarding the democracy pallet and referenda proposal: When submitting the proposal, a deposit needs to be defined where the MinimumDeposit config can be used to set the minimum amount to be ...
Josh's user avatar
  • 425
0 votes
1 answer
31 views

What is the most standard pallet structure in Substrate?

I wonder if there is a structure in pallets, which other projects should follow. We have the following elements: < Config trait > < Types > < Storage > < Genesis info> < ...
Chralt's user avatar
  • 543
2 votes
1 answer
28 views

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

I would like to schedule the dispatch call authorize_upgrade inside a custom pallet. For this I need the call enum variant of the cumulus_pallet_parachain_system pallet. How can I get this? Via the ...
Chralt's user avatar
  • 543
0 votes
1 answer
51 views

How to loose couple trait with config?

I want to loose couple my MultiToken pallet to new Dex pallet, so I created MultiToken trait for interface. Here I need Config to infer AccountId and OriginFor types In my Dex pallet I need to add ...
Nikita Chernega'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
2 votes
1 answer
79 views

Raw specs not building, unknown field

While building the raw specs: ./target/release/kylin-collator build-spec --chain=rococo_democracy.json --raw --disable-default-bootnode > rococo_raw_democracy.json I get 2022-07-08 16:00:00 ...
Sylvain Cormier's user avatar
1 vote
1 answer
30 views

Can't reach DemocracyConfig import

In the process of installing the democracy pallet in chain_spec.rs, I am importing like this: use pichiu_runtime::{ constants::currency::PCHU, DemocracyConfig}; } I cannot reach the imports and ...
Sylvain Cormier's user avatar
4 votes
1 answer
83 views

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

I have a pallet pallet-a whose StorageItem should be read/written by other pallets. Let's say that StorageItem is #[pallet::storage] #[pallet::getter(fn get_commitments)] pub type Commits&...
Justin Frevert's user avatar
-2 votes
2 answers
177 views

Add scheduler pallet in substrate

I am running into issues adding the scheduler pallet to my Substrate chain. Here are the steps I followed: Clone the repo git clone https://github.com/substrate-developer-hub/substrate-node-template ...
Mr_Amit's user avatar
  • 21
1 vote
1 answer
59 views

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

(This question was originally asked here: https://stackoverflow.com/questions/72056703/substrate-forkless-upgrade-tutorial-pallet-scheduler-has-breaking-changes) I am following the Substrate forkless ...
Iker's user avatar
  • 1,321
1 vote
1 answer
83 views

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

I was contributing on pallet-assets and I found it hard to understand this syntax: pub trait Config<I: 'static = ()>: frame_system::Config Care to explain in details and examples?
Mrisho Lukamba's user avatar