Skip to content
Snippets Groups Projects
Unverified Commit f7e98b40 authored by Ankan's avatar Ankan Committed by GitHub
Browse files

[Nomination Pool] Make staking restrictions configurable (#7685)

closes https://github.com/paritytech/polkadot-sdk/issues/5742

Need to be backported to stable2503 release.

With the migration of staking accounts to [fungible
currency](https://github.com/paritytech/polkadot-sdk/pull/5501), we can
now allow pool users to stake directly and vice versa. This update
introduces a configurable filter mechanism to determine which accounts
can join a nomination pool.

## Example Usage  

### 1. Allow any account to join a pool  
To permit all accounts to join a nomination pool, use the `Nothing`
filter:

```rust
impl pallet_nomination_pools::Config for Runtime {
    ...
    type Filter = Nothing;
}
```

### 2. Restrict direct stakers from joining a pool

To prevent direct stakers from joining a nomination pool, use
`pallet_staking::AllStakers`:
```rust
impl pallet_nomination_pools::Config for Runtime {
    ...
    type Filter = pallet_staking::AllStakers<Runtime>;
}
```

### 3. Define a custom filter
For more gra...
parent c29e72a8
Branches
No related merge requests found
Pipeline #517161 waiting for manual action with stages
in 1 hour, 20 minutes, and 29 seconds
Showing
with 398 additions and 75 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment