pub struct DepositNftT22CpiBuilder<'a, 'b> { /* private fields */ }Expand description
Instruction builder for DepositNftT22 via CPI.
§Accounts:
[writable, signer]owner[writable]pool[]whitelist[optional]mint_proof[]mint[writable]nft_receipt[writable]owner_ta[writable]pool_ta[]token_program[]associated_token_program[]system_program
Implementations§
Source§impl<'a, 'b> DepositNftT22CpiBuilder<'a, 'b>
impl<'a, 'b> DepositNftT22CpiBuilder<'a, 'b>
pub fn new(program: &'b AccountInfo<'a>) -> Self
Sourcepub fn owner(&mut self, owner: &'b AccountInfo<'a>) -> &mut Self
pub fn owner(&mut self, owner: &'b AccountInfo<'a>) -> &mut Self
The owner of the pool and the NFT.
Sourcepub fn pool(&mut self, pool: &'b AccountInfo<'a>) -> &mut Self
pub fn pool(&mut self, pool: &'b AccountInfo<'a>) -> &mut Self
The pool the NFT is being transferred to/from.
Sourcepub fn whitelist(&mut self, whitelist: &'b AccountInfo<'a>) -> &mut Self
pub fn whitelist(&mut self, whitelist: &'b AccountInfo<'a>) -> &mut Self
The whitelist that gatekeeps which NFTs can be deposited into the pool. Must match the whitelist stored in the pool state.
Sourcepub fn mint_proof(
&mut self,
mint_proof: Option<&'b AccountInfo<'a>>,
) -> &mut Self
pub fn mint_proof( &mut self, mint_proof: Option<&'b AccountInfo<'a>>, ) -> &mut Self
[optional account]
Optional account which must be passed in if the NFT must be verified against a
merkle proof condition in the whitelist.
Sourcepub fn mint(&mut self, mint: &'b AccountInfo<'a>) -> &mut Self
pub fn mint(&mut self, mint: &'b AccountInfo<'a>) -> &mut Self
The mint account of the NFT.
Sourcepub fn nft_receipt(&mut self, nft_receipt: &'b AccountInfo<'a>) -> &mut Self
pub fn nft_receipt(&mut self, nft_receipt: &'b AccountInfo<'a>) -> &mut Self
The NFT deposit receipt, which ties an NFT to the pool it was deposited to.
Sourcepub fn owner_ta(&mut self, owner_ta: &'b AccountInfo<'a>) -> &mut Self
pub fn owner_ta(&mut self, owner_ta: &'b AccountInfo<'a>) -> &mut Self
The TA of the owner, where the NFT will be transferred from.
Sourcepub fn pool_ta(&mut self, pool_ta: &'b AccountInfo<'a>) -> &mut Self
pub fn pool_ta(&mut self, pool_ta: &'b AccountInfo<'a>) -> &mut Self
The TA of the pool, where the NFT will be escrowed.
Sourcepub fn token_program(&mut self, token_program: &'b AccountInfo<'a>) -> &mut Self
pub fn token_program(&mut self, token_program: &'b AccountInfo<'a>) -> &mut Self
The SPL Token program for the Mint and ATAs.
Sourcepub fn associated_token_program(
&mut self,
associated_token_program: &'b AccountInfo<'a>,
) -> &mut Self
pub fn associated_token_program( &mut self, associated_token_program: &'b AccountInfo<'a>, ) -> &mut Self
The SPL associated token program.
Sourcepub fn system_program(
&mut self,
system_program: &'b AccountInfo<'a>,
) -> &mut Self
pub fn system_program( &mut self, system_program: &'b AccountInfo<'a>, ) -> &mut Self
The Solana system program.
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 DepositNftT22CpiBuilder<'a, 'b>
impl<'a, 'b> Clone for DepositNftT22CpiBuilder<'a, 'b>
Source§fn clone(&self) -> DepositNftT22CpiBuilder<'a, 'b>
fn clone(&self) -> DepositNftT22CpiBuilder<'a, 'b>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a, 'b> Freeze for DepositNftT22CpiBuilder<'a, 'b>
impl<'a, 'b> !RefUnwindSafe for DepositNftT22CpiBuilder<'a, 'b>
impl<'a, 'b> !Send for DepositNftT22CpiBuilder<'a, 'b>
impl<'a, 'b> !Sync for DepositNftT22CpiBuilder<'a, 'b>
impl<'a, 'b> Unpin for DepositNftT22CpiBuilder<'a, 'b>
impl<'a, 'b> !UnwindSafe for DepositNftT22CpiBuilder<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more