Files
pezkuwi-subxt/substrate/frame
Ross Bulat 75062717de Pools: Add ability to configure commission claiming permissions (#2474)
Addresses #409.

This request has been raised by multiple community members - the ability
for the nomination pool root role to configure permissionless commission
claiming:

> Would it be possible to have a claim_commission_other extrinsic for
claiming commission of nomination pools permissionless?

This PR does not quite introduce this additional call, but amends
`do_claim_commission` to check a new `claim_permission` field in the
`Commission` struct, configured by an enum:

```
enum CommissionClaimPermission {
   Permissionless,
   Account(AccountId),
}
```
This can be optionally set in a bonded pool's
`commission.claim_permission` field:

```
struct BondedPool {
   commission: {
      <snip>
      claim_permission: Option<CommissionClaimPermission<T::AccountId>>,
   },
   <snip>
}
```

This is a new field and requires a migration to add it to existing
pools. This will be `None` on pool creation, falling back to the `root`
role having sole access to claim commission if it is not set; this is
the behaviour as it is today. Once set, the field _can_ be set to `None`
again.

#### Changes
- [x] Add `commision.claim_permission` field.
- [x] Add `can_claim_commission` and amend `do_claim_commission`.
- [x] Add `set_commission_claim_permission` call.
- [x] Test to cover new configs and call.
- [x] Add and amend benchmarks.
- [x] Generate new weights + slot into call
`set_commission_claim_permission`.
- [x] Add migration to introduce `commission.claim_permission`, bump
storage version.
- [x] Update Westend weights.
- [x] Migration working.

---------

Co-authored-by: command-bot <>
2023-11-28 09:19:49 +02:00
..
2023-11-06 12:54:37 +00:00
2023-10-26 21:55:49 +02:00
2023-11-05 23:35:40 +01:00
2023-10-24 17:59:38 +02:00
2023-10-24 17:59:38 +02:00
2023-11-17 09:20:09 +02:00
2023-11-07 15:20:36 +00:00
2023-11-07 13:11:06 +01:00
2023-10-27 21:43:51 +02:00
2023-10-27 11:38:16 +02:00
2023-10-24 17:59:38 +02:00
2023-11-08 13:59:55 +02:00
2023-10-27 21:43:51 +02:00
2023-08-29 13:39:41 +02:00
2023-11-06 14:44:53 +02:00
2023-09-04 12:02:32 +03:00

FRAME

The FRAME development environment provides modules (called "pallets") and support libraries that you can use, modify, and extend to build the runtime logic to suit the needs of your blockchain.

Documentation

https://docs.substrate.io/reference/frame-pallets/

Issues

https://github.com/orgs/paritytech/projects/40