pub struct CreateUserRewardDebtCpiBuilder<'a, 'b> { /* private fields */ }Expand description
Instruction builder for CreateUserRewardDebt via CPI.
§Accounts:
[]user[writable, signer]payer[]staking_mint[]reward_mint[]staking_config[]reward_state[writable]user_stake_position[writable]user_reward_debt[]system_program
Implementations§
Source§impl<'a, 'b> CreateUserRewardDebtCpiBuilder<'a, 'b>
impl<'a, 'b> CreateUserRewardDebtCpiBuilder<'a, 'b>
pub fn new( __program: &'b AccountInfo<'a>, user: &'b AccountInfo<'a>, payer: &'b AccountInfo<'a>, staking_mint: &'b AccountInfo<'a>, reward_mint: &'b AccountInfo<'a>, staking_config: &'b AccountInfo<'a>, reward_state: &'b AccountInfo<'a>, user_stake_position: &'b AccountInfo<'a>, user_reward_debt: &'b AccountInfo<'a>, system_program: &'b AccountInfo<'a>, ) -> Self
Sourcepub fn add_remaining_account(
&mut self,
account: &'b AccountInfo<'a>,
is_writable: bool,
is_signer: bool,
) -> &mut Self
pub fn add_remaining_account( &mut self, account: &'b AccountInfo<'a>, is_writable: bool, is_signer: bool, ) -> &mut Self
Add an additional account to the instruction.
Sourcepub fn add_remaining_accounts(
&mut self,
accounts: &[(&'b AccountInfo<'a>, bool, bool)],
) -> &mut Self
pub fn add_remaining_accounts( &mut self, accounts: &[(&'b AccountInfo<'a>, bool, bool)], ) -> &mut Self
Add additional accounts to the instruction.
Each account is represented by a tuple of the AccountInfo, a bool indicating whether the account is writable or not,
and a bool indicating whether the account is a signer or not.
pub fn invoke(&self) -> ProgramResult
pub fn invoke_signed(&self, signers_seeds: &[&[&[u8]]]) -> ProgramResult
Trait Implementations§
Source§impl<'a, 'b> Clone for CreateUserRewardDebtCpiBuilder<'a, 'b>
impl<'a, 'b> Clone for CreateUserRewardDebtCpiBuilder<'a, 'b>
Auto Trait Implementations§
impl<'a, 'b> !RefUnwindSafe for CreateUserRewardDebtCpiBuilder<'a, 'b>
impl<'a, 'b> !Send for CreateUserRewardDebtCpiBuilder<'a, 'b>
impl<'a, 'b> !Sync for CreateUserRewardDebtCpiBuilder<'a, 'b>
impl<'a, 'b> !UnwindSafe for CreateUserRewardDebtCpiBuilder<'a, 'b>
impl<'a, 'b> Freeze for CreateUserRewardDebtCpiBuilder<'a, 'b>
impl<'a, 'b> Unpin for CreateUserRewardDebtCpiBuilder<'a, 'b>
impl<'a, 'b> UnsafeUnpin for CreateUserRewardDebtCpiBuilder<'a, 'b>
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