Adds instance support for composite enums (#1857)

Fixes https://github.com/paritytech/polkadot-sdk/issues/1839

Currently, `composite_enum`s do not support pallet instances. This PR
allows the following:
```rust
	#[pallet::composite_enum]
	pub enum HoldReason<I: 'static = ()> {
		SomeHoldReason
	}
```

### Todo

- [x]  UI Test
This commit is contained in:
gupnik
2023-10-13 07:48:51 +02:00
committed by GitHub
parent d2fc1d7c91
commit 6b27dad359
11 changed files with 264 additions and 93 deletions
+2 -2
View File
@@ -256,7 +256,7 @@ pub mod pallet {
/// The overarching hold reason.
#[pallet::no_default_bounds]
type RuntimeHoldReason: Parameter + Member + MaxEncodedLen + Ord + Copy;
type RuntimeHoldReason: Parameter + Member + MaxEncodedLen + Copy;
/// Weight information for extrinsics in this pallet.
type WeightInfo: WeightInfo;
@@ -300,7 +300,7 @@ pub mod pallet {
type ReserveIdentifier: Parameter + Member + MaxEncodedLen + Ord + Copy;
/// The ID type for freezes.
type FreezeIdentifier: Parameter + Member + MaxEncodedLen + Ord + Copy;
type FreezeIdentifier: Parameter + Member + MaxEncodedLen + Copy;
/// The maximum number of locks that should exist on an account.
/// Not strictly enforced, but used for weight estimation.