Skip to main content

Questions tagged [constants]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers

Update the way to limit a boundedvec

I've developing a pallet where I'm using the following custom data type to save a CID: pub type CID = BoundedVec<u8, ConstU32<100>>; I want to change the way I limit that ...
Didier M's user avatar
5 votes
0 answers

How can we expose a runtime constant?

I have a situation where I have a constant defined in my runtime (but not in any pallet) which I want to expose with the runtime itself in some way. Specifically, there is a constant used as a ...
notlesh's user avatar
  • 123
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
4 votes
1 answer

usage of `#[pallet::constant]` vs `const associated item`

I can have config of my pallet in two different ways: trait Config: frame_system::Config { // *--snip #[pallet::constant] SomeConstant: Get<u32>, const ANOTHER_CONSTANT: u32, } ...
Dev-il's user avatar
  • 69
5 votes
1 answer

How to get total issuance through

Not sure if I can add any more detail to the question! How to get total issuance through ? It would also be helpful to know the general way to access chain constants through ...
mork's user avatar
  • 141