pub struct CreateUserRewardDebtBuilder { /* private fields */ }Expand description
Instruction builder for CreateUserRewardDebt.
§Accounts:
[]user[writable, signer]payer[]staking_mint[]reward_mint[optional]staking_config (default to PDA derived from ‘stakingConfig’)[optional]reward_state (default to PDA derived from ‘rewardState’)[writable, optional]user_stake_position (default to PDA derived from ‘userStakePosition’)[writable, optional]user_reward_debt (default to PDA derived from ‘userRewardDebt’)[]system_program (fixed to ‘11111111111111111111111111111111’)
Implementations§
Source§impl CreateUserRewardDebtBuilder
impl CreateUserRewardDebtBuilder
pub fn new( user: Address, payer: Address, staking_mint: Address, reward_mint: Address, ) -> Self
Sourcepub fn staking_config(&mut self, staking_config: Address) -> &mut Self
pub fn staking_config(&mut self, staking_config: Address) -> &mut Self
[optional account, default to PDA derived from 'stakingConfig']
Sourcepub fn reward_state(&mut self, reward_state: Address) -> &mut Self
pub fn reward_state(&mut self, reward_state: Address) -> &mut Self
[optional account, default to PDA derived from 'rewardState']
Sourcepub fn user_stake_position(&mut self, user_stake_position: Address) -> &mut Self
pub fn user_stake_position(&mut self, user_stake_position: Address) -> &mut Self
[optional account, default to PDA derived from 'userStakePosition']
Sourcepub fn user_reward_debt(&mut self, user_reward_debt: Address) -> &mut Self
pub fn user_reward_debt(&mut self, user_reward_debt: Address) -> &mut Self
[optional account, default to PDA derived from 'userRewardDebt']
Sourcepub fn add_remaining_account(&mut self, account: AccountMeta) -> &mut Self
pub fn add_remaining_account(&mut self, account: AccountMeta) -> &mut Self
Add an additional account to the instruction.
Sourcepub fn add_remaining_accounts(&mut self, accounts: &[AccountMeta]) -> &mut Self
pub fn add_remaining_accounts(&mut self, accounts: &[AccountMeta]) -> &mut Self
Add additional accounts to the instruction.
pub fn instruction(&self) -> Instruction
Trait Implementations§
Source§impl Clone for CreateUserRewardDebtBuilder
impl Clone for CreateUserRewardDebtBuilder
Source§fn clone(&self) -> CreateUserRewardDebtBuilder
fn clone(&self) -> CreateUserRewardDebtBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CreateUserRewardDebtBuilder
impl RefUnwindSafe for CreateUserRewardDebtBuilder
impl Send for CreateUserRewardDebtBuilder
impl Sync for CreateUserRewardDebtBuilder
impl Unpin for CreateUserRewardDebtBuilder
impl UnsafeUnpin for CreateUserRewardDebtBuilder
impl UnwindSafe for CreateUserRewardDebtBuilder
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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 more