pub struct NominationPools(/* private fields */);Expand description
Builds extrinsics for the nomination_pools pallet.
Many helpers accept MultiAddressLike values and will panic if those cannot be converted into
on-chain account identifiers. Constructing the SubmittableTransaction itself does not hit the
network; signing or submitting it will.
Implementations§
Source§impl NominationPools
impl NominationPools
Sourcepub fn bond_extra(&self, value: BondExtraValue) -> SubmittableTransaction
pub fn bond_extra(&self, value: BondExtraValue) -> SubmittableTransaction
Contributes additional stake from the pool’s bonded account.
§Arguments
value- Amount to bond, expressed as aBondExtraValue.
§Returns
Returns a SubmittableTransaction that bonds the extra amount for the pool.
§Errors
Does not perform network calls; transaction construction never fails.
Sourcepub fn bond_extra_other(
&self,
member: impl Into<MultiAddressLike>,
value: BondExtraValue,
) -> SubmittableTransaction
pub fn bond_extra_other( &self, member: impl Into<MultiAddressLike>, value: BondExtraValue, ) -> SubmittableTransaction
Bonds additional stake on behalf of another member.
§Panics
Panics if member cannot be converted into a MultiAddress.
§Arguments
member- Account that receives the increased bonded amount.value- Amount to bond, expressed as aBondExtraValue.
§Returns
Returns a SubmittableTransaction that bonds extra stake for the specified member.
§Errors
Does not perform network calls; transaction construction never fails.
Sourcepub fn chill(&self, pool_id: u32) -> SubmittableTransaction
pub fn chill(&self, pool_id: u32) -> SubmittableTransaction
Requests the pool to chill its nominations.
§Arguments
pool_id- Identifier of the pool that should chill.
§Returns
Returns a SubmittableTransaction that issues the chill request.
§Errors
Does not perform network calls; transaction construction never fails.
Sourcepub fn claim_commission(&self, pool_id: u32) -> SubmittableTransaction
pub fn claim_commission(&self, pool_id: u32) -> SubmittableTransaction
Claims pending commission for the given pool.
§Arguments
pool_id- Identifier of the pool that should pay out commission.
§Returns
Returns a SubmittableTransaction that claims the commission.
§Errors
Does not perform network calls; transaction construction never fails.
Sourcepub fn claim_payout(&self) -> SubmittableTransaction
pub fn claim_payout(&self) -> SubmittableTransaction
Claims a pending payout for the caller.
§Returns
Returns a SubmittableTransaction that claims unpaid rewards for the signer.
§Errors
Does not perform network calls; transaction construction never fails.
Sourcepub fn claim_payout_other(
&self,
owner: impl Into<AccountIdLike>,
) -> SubmittableTransaction
pub fn claim_payout_other( &self, owner: impl Into<AccountIdLike>, ) -> SubmittableTransaction
Claims a pending payout for another pool member.
§Panics
Panics if owner cannot be converted into an AccountId.
§Arguments
owner- Account that receives the payout.
§Returns
Returns a SubmittableTransaction that claims unpaid rewards on behalf of owner.
§Errors
Does not perform network calls; transaction construction never fails.
Sourcepub fn create(
&self,
amount: u128,
root: impl Into<MultiAddressLike>,
nominator: impl Into<MultiAddressLike>,
bouncer: impl Into<MultiAddressLike>,
) -> SubmittableTransaction
pub fn create( &self, amount: u128, root: impl Into<MultiAddressLike>, nominator: impl Into<MultiAddressLike>, bouncer: impl Into<MultiAddressLike>, ) -> SubmittableTransaction
Creates a new nomination pool with freshly provided roles.
§Panics
Panics if any of root, nominator, or bouncer cannot be converted into a MultiAddress.
§Arguments
amount- Initial bonded amount for the pool.root- Root account controlling pool administration.nominator- Account authorised to nominate validators.bouncer- Account that manages membership access.
§Returns
Returns a SubmittableTransaction that creates the pool with the supplied roles.
§Errors
Does not perform network calls; transaction construction never fails.
Sourcepub fn create_with_pool_id(
&self,
amount: u128,
root: impl Into<MultiAddressLike>,
nominator: impl Into<MultiAddressLike>,
bouncer: impl Into<MultiAddressLike>,
pool_id: u32,
) -> SubmittableTransaction
pub fn create_with_pool_id( &self, amount: u128, root: impl Into<MultiAddressLike>, nominator: impl Into<MultiAddressLike>, bouncer: impl Into<MultiAddressLike>, pool_id: u32, ) -> SubmittableTransaction
Creates a new nomination pool using a specific pool identifier.
§Panics
Panics if any of root, nominator, or bouncer cannot be converted into a MultiAddress.
§Arguments
amount- Initial bonded amount for the pool.root- Root account controlling pool administration.nominator- Account authorised to nominate validators.bouncer- Account that manages membership access.pool_id- Identifier to assign to the new pool.
§Returns
Returns a SubmittableTransaction that creates the pool with an explicit identifier.
§Errors
Does not perform network calls; transaction construction never fails.
Sourcepub fn join(&self, amount: u128, pool_id: u32) -> SubmittableTransaction
pub fn join(&self, amount: u128, pool_id: u32) -> SubmittableTransaction
Joins an existing pool by contributing the requested amount.
§Arguments
amount- Amount of stake contributed by the caller.pool_id- Identifier of the pool to join.
§Returns
Returns a SubmittableTransaction that adds the caller to the pool.
§Errors
Does not perform network calls; transaction construction never fails.
Sourcepub fn nominate(
&self,
pool_id: u32,
validators: Vec<impl Into<AccountIdLike>>,
) -> SubmittableTransaction
pub fn nominate( &self, pool_id: u32, validators: Vec<impl Into<AccountIdLike>>, ) -> SubmittableTransaction
Sets nominations for the pool to a new validator set.
§Panics
Panics if any validator identifier cannot be converted into an AccountId.
§Arguments
pool_id- Identifier of the pool whose nominations are updated.validators- Validators that the pool should nominate.
§Returns
Returns a SubmittableTransaction that updates the pool’s nominations.
§Errors
Does not perform network calls; transaction construction never fails.
Sourcepub fn set_claim_permission(
&self,
permission: ClaimPermission,
) -> SubmittableTransaction
pub fn set_claim_permission( &self, permission: ClaimPermission, ) -> SubmittableTransaction
Updates who is allowed to claim rewards for the pool.
§Arguments
permission- Claim policy applied to the pool.
§Returns
Returns a SubmittableTransaction that adjusts the pool’s claim permission.
§Errors
Does not perform network calls; transaction construction never fails.
Sourcepub fn set_commission(
&self,
pool_id: u32,
new_commission: Option<(u32, AccountIdLike)>,
) -> SubmittableTransaction
pub fn set_commission( &self, pool_id: u32, new_commission: Option<(u32, AccountIdLike)>, ) -> SubmittableTransaction
Updates the commission settings for the pool, optionally setting a payee.
§Panics
Panics if the payee provided in new_commission cannot be converted into an AccountId.
§Arguments
pool_id- Identifier of the pool whose commission is updated.new_commission- Optional tuple of(commission, payee)describing the new rate and payee.
§Returns
Returns a SubmittableTransaction that updates commission settings.
§Errors
Does not perform network calls; transaction construction never fails.
Sourcepub fn set_commission_change_rate(
&self,
pool_id: u32,
max_increase: u32,
min_delay: u32,
) -> SubmittableTransaction
pub fn set_commission_change_rate( &self, pool_id: u32, max_increase: u32, min_delay: u32, ) -> SubmittableTransaction
Configures how frequently pool commission may change.
§Arguments
pool_id- Identifier of the pool being updated.max_increase- Maximum commission increase allowed per change.min_delay- Minimum number of eras between commission updates.
§Returns
Returns a SubmittableTransaction that applies the new change rate.
§Errors
Does not perform network calls; transaction construction never fails.
Sourcepub fn set_commission_max(
&self,
pool_id: u32,
max_commission: u32,
) -> SubmittableTransaction
pub fn set_commission_max( &self, pool_id: u32, max_commission: u32, ) -> SubmittableTransaction
Caps commission at the provided maximum percentage.
§Arguments
pool_id- Identifier of the pool being updated.max_commission- Maximum commission percentage allowed.
§Returns
Returns a SubmittableTransaction that stores the new commission cap.
§Errors
Does not perform network calls; transaction construction never fails.
Sourcepub fn set_metadata<'a>(
&self,
pool_id: u32,
metadata: impl Into<StringOrBytes<'a>>,
) -> SubmittableTransaction
pub fn set_metadata<'a>( &self, pool_id: u32, metadata: impl Into<StringOrBytes<'a>>, ) -> SubmittableTransaction
Updates pool metadata stored on chain.
§Arguments
pool_id- Identifier of the pool being updated.metadata- Metadata payload encoded as bytes or string.
§Returns
Returns a SubmittableTransaction that writes the metadata to storage.
§Errors
Does not perform network calls; transaction construction never fails.
Sourcepub fn set_state(
&self,
pool_id: u32,
state: PoolState,
) -> SubmittableTransaction
pub fn set_state( &self, pool_id: u32, state: PoolState, ) -> SubmittableTransaction
Transitions the pool into a new lifecycle state.
§Arguments
pool_id- Identifier of the pool being updated.state- New lifecycle state to apply.
§Returns
Returns a SubmittableTransaction that updates the pool state.
§Errors
Does not perform network calls; transaction construction never fails.
Sourcepub fn unbond(
&self,
member_account: impl Into<MultiAddressLike>,
unbonding_points: u128,
) -> SubmittableTransaction
pub fn unbond( &self, member_account: impl Into<MultiAddressLike>, unbonding_points: u128, ) -> SubmittableTransaction
Starts the unbonding process for the specified member account.
§Panics
Panics if member_account cannot be converted into a MultiAddress.
§Arguments
member_account- Account leaving the pool.unbonding_points- Amount of stake to unbond, expressed in pool points.
§Returns
Returns a SubmittableTransaction that schedules the unbonding.
§Errors
Does not perform network calls; transaction construction never fails.
Sourcepub fn update_roles(
&self,
pool_id: u32,
new_root: ConfigOpAccount,
new_nominator: ConfigOpAccount,
new_bouncer: ConfigOpAccount,
) -> SubmittableTransaction
pub fn update_roles( &self, pool_id: u32, new_root: ConfigOpAccount, new_nominator: ConfigOpAccount, new_bouncer: ConfigOpAccount, ) -> SubmittableTransaction
Updates the pool’s root, nominator, and bouncer roles.
§Arguments
pool_id- Identifier of the pool being updated.new_root- Operation describing how to update the root account.new_nominator- Operation describing how to update the nominator account.new_bouncer- Operation describing how to update the bouncer account.
§Returns
Returns a SubmittableTransaction that applies the new role assignments.
§Errors
Does not perform network calls; transaction construction never fails.
Sourcepub fn withdraw_unbonded(
&self,
member_account: impl Into<MultiAddressLike>,
num_slashing_spans: u32,
) -> SubmittableTransaction
pub fn withdraw_unbonded( &self, member_account: impl Into<MultiAddressLike>, num_slashing_spans: u32, ) -> SubmittableTransaction
Withdraws fully unbonded funds for the given member account.
§Panics
Panics if member_account cannot be converted into a MultiAddress.
§Arguments
member_account- Account withdrawing previously unbonded funds.num_slashing_spans- Number of slashing spans to consider when finalising the withdrawal.
§Returns
Returns a SubmittableTransaction that withdraws the unbonded amount.
§Errors
Does not perform network calls; transaction construction never fails.
Auto Trait Implementations§
impl Freeze for NominationPools
impl !RefUnwindSafe for NominationPools
impl Send for NominationPools
impl Sync for NominationPools
impl Unpin for NominationPools
impl !UnwindSafe for NominationPools
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.