Introduce `ConstUint` to make dependent types in `DefaultConfig` more adaptable (#6425)
# Description Resolves #6193 This PR introduces `ConstUint` as a replacement for existing constant getter types like `ConstU8`, `ConstU16`, etc., providing a more flexible and unified approach. ## Integration This update is backward compatible, so developers can choose to adopt `ConstUint` in new implementations or continue using the existing types as needed. ## Review Notes `ConstUint` is a convenient alternative to `ConstU8`, `ConstU16`, and similar types, particularly useful for configuring `DefaultConfig` in pallets. It enables configuring the underlying integer for a specific type without the need to update all dependent types, offering enhanced flexibility in type management. # Checklist * [x] My PR includes a detailed description as outlined in the "Description" and its two subsections above. * [ ] My PR follows the [labeling requirements]( https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md#Process ) of this project (at minimum one label for `T` required) * External contributors: ask maintainers to put the right label on your PR. * [ ] I have made corresponding changes to the documentation (if applicable) * [ ] I have added tests that prove my fix is effective or that my feature works (if applicable)
Showing
- Cargo.lock 2 additions, 2 deletionsCargo.lock
- Cargo.toml 1 addition, 1 deletionCargo.toml
- prdoc/pr_6425.prdoc 27 additions, 0 deletionsprdoc/pr_6425.prdoc
- substrate/frame/assets/src/lib.rs 6 additions, 6 deletionssubstrate/frame/assets/src/lib.rs
- substrate/frame/balances/src/lib.rs 2 additions, 2 deletionssubstrate/frame/balances/src/lib.rs
- substrate/frame/support/src/lib.rs 3 additions, 2 deletionssubstrate/frame/support/src/lib.rs
- substrate/frame/support/src/traits.rs 7 additions, 7 deletionssubstrate/frame/support/src/traits.rs
- substrate/frame/support/src/traits/misc.rs 2 additions, 2 deletionssubstrate/frame/support/src/traits/misc.rs
- substrate/frame/system/src/lib.rs 1 addition, 1 deletionsubstrate/frame/system/src/lib.rs
- substrate/frame/timestamp/src/lib.rs 1 addition, 1 deletionsubstrate/frame/timestamp/src/lib.rs
- substrate/primitives/core/src/lib.rs 3 additions, 2 deletionssubstrate/primitives/core/src/lib.rs
- substrate/primitives/runtime/src/traits/mod.rs 3 additions, 2 deletionssubstrate/primitives/runtime/src/traits/mod.rs
Please register or sign in to comment