Questions tagged [frame-system]
The frame-system tag has no usage guidance.
16
questions
1
vote
1
answer
29
views
How to migrate events from the frame_system pallet?
I am trying to migrate the events storage value of the frame_system pallet, this is required because the EventRecord is now a generic over RuntimeEvent instead of Event, but I am not sure of how to ...
1
vote
1
answer
46
views
No way to do a runtime-upgrade after we upgraded our mainnet chain to version 0.9.31 version
Recently in Ternoa mainnet we performed a RU(runtime upgrade) to upgrade our versions to polkato-v0.9.31. In system pallet substrate have introduced new extrinsic set_code in this version which ...
2
votes
1
answer
91
views
Are users only allowed to own 16 assets with pallet-assets?
Every new token a user holds in pallet_assets increases the consumer count for that user +1. And most chains set the MaxConsumers of frame_system to 16.
Both mint_into and transfer call at some point ...
1
vote
1
answer
72
views
Reaping vs. dusting and how to whitelist an account
The following test can be used in the test suite of pallet-balances:
#[test]
fn reap_fails_but_account_gets_dusted() {
ExtBuilder::default()
.existential_deposit(2)
.monied(true)
...
4
votes
2
answers
44
views
DispatchError::Other(_) always being mapped to DispatchError::Other("")
I'm trying to pass some custom error messages to the frame_system::note_applied_extrinsic() but it seems to be ignoring my message and always using an empty string "".
Adding this test to ...
4
votes
1
answer
85
views
Using `app_crypto!` `Public` type as `AccountId` in the runtime
In our project, we have on-chain storage items equivalent to the type AuthorityId which is the Public type coming out of the app_crypto! macro in sp-authority-discovery.
We would like to configure the ...
1
vote
1
answer
30
views
Why is the max number of consumers set to 16?
By default, the Substrate node is configured with a maximum number of "consumers" of the address equal to 16.
This means, for example, that a maximum of 16 different tokens (generated by the ...
1
vote
1
answer
197
views
how to get the current block author?
I am creating a new pallet, i have a simple task, get the current block author, i want to check whether I am the current one that is proposing the block or not by comparing the current block author ...
1
vote
1
answer
44
views
How to query the current consumed weight in an extrinsic?
Hi Substrate Community,
is there any way to get the current block weight? This is especially useful, when deciding in on_finalize if there is space left to put in some logic. I know, that on_finalize ...
1
vote
1
answer
64
views
Are pallet:constants really constant?
The docs say that the benefit of this macro is that the "value is included in the metadata", but from what I can gather, there is nothing which pins down this value at compile time? That is, ...
1
vote
1
answer
94
views
Get BlockNumber from Pallet
I have struct that holds when it's created as BlockNumber.
#[derive(Encode, Decode, Default, Clone, PartialEq, RuntimeDebug, TypeInfo)]
#[scale_info(skip_type_params(BlockTime, MaxContentLength))]
pub ...
2
votes
1
answer
40
views
How use Metadata deocde Vec::<EventRecord<Event, H256>>
first get the system eventData state_getStorage api
now i need to decode the system eventData by metadata
is there some example how to decode it ?
for some reaseon ,only rust worker it ,thanks
1
vote
3
answers
37
views
Mixing FRAME macros in a single runtime or pallet
There has been an evolution in how one defines pallets in the Substrate framework over time, and this has left the ecosystem in a state where useful pallets exist in different versions.
This begs the ...
0
votes
1
answer
95
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 ...
10
votes
1
answer
112
views
How to manually remove storage items using Sudo?
I'm trying to remove a storage item on the relay chain, specifically a futureCode entry for a parachain.
I've seen that there's an extrinsic I can call system.killStorage(keys), however I have some ...
3
votes
1
answer
51
views
Basics > Runtime > Core primitives > frame_system / node_primitives vs core primitives / Docu of a Pallet configuration trait [closed]
My questions relate to Core Primitives for setting up a node with FRAME.
Do I include the Core Primitives by using the Crate frame_system or Crate node_primitives?
The core primitives mentioned here:...