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.
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
.
Sourcepub fn chill(&self, pool_id: u32) -> SubmittableTransaction
pub fn chill(&self, pool_id: u32) -> SubmittableTransaction
Requests the pool to chill its nominations.
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.
Sourcepub fn claim_payout(&self) -> SubmittableTransaction
pub fn claim_payout(&self) -> SubmittableTransaction
Claims a pending payout for the caller.
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
.
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
.
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
.
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.
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
.
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.
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
.
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.
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.
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.
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.
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
.
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.
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
.
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.