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
Auto 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