Questions tagged [frame-system]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer

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 ...
Sebastian's user avatar
  • 163
1 vote
1 answer

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 ...
Immanuel John's user avatar
2 votes
1 answer

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 ...
Juan Ignacio Rios's user avatar
1 vote
1 answer

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) ...
mkl's user avatar
  • 420
4 votes
2 answers

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 ...
Artur Gontijo's user avatar
4 votes
1 answer

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 ...
Mathis Wellmann's user avatar
1 vote
1 answer

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 ...
Victor Mezrin's user avatar
1 vote
1 answer

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 ...
dadzerlaze's user avatar
  • 1,073
1 vote
1 answer

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 ...
Chralt's user avatar
  • 523
1 vote
1 answer

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, ...
Bedeho Mender's user avatar
1 vote
1 answer

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 ...
Burak's user avatar
  • 893
2 votes
1 answer

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
Abel's user avatar
  • 61
1 vote
3 answers

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 ...
Bedeho Mender's user avatar
0 votes
1 answer

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
10 votes
1 answer

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 ...
Santiago Balaguer's user avatar
3 votes
1 answer

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:...
Cindita's user avatar
  • 105