pub struct CreateDistributionCpiBuilder<'a, 'b> { /* private fields */ }Expand description
Instruction builder for CreateDistribution via CPI.
§Accounts:
[writable]distribution[]mint[writable, signer]payer[signer, optional]authority[writable]fee_wallet[signer]seed[]system_program
Implementations§
Source§impl<'a, 'b> CreateDistributionCpiBuilder<'a, 'b>
impl<'a, 'b> CreateDistributionCpiBuilder<'a, 'b>
pub fn new(program: &'b AccountInfo<'a>) -> Self
Sourcepub fn distribution(&mut self, distribution: &'b AccountInfo<'a>) -> &mut Self
pub fn distribution(&mut self, distribution: &'b AccountInfo<'a>) -> &mut Self
The address of the new distribution
Sourcepub fn mint(&mut self, mint: &'b AccountInfo<'a>) -> &mut Self
pub fn mint(&mut self, mint: &'b AccountInfo<'a>) -> &mut Self
The address of the mint account
Sourcepub fn payer(&mut self, payer: &'b AccountInfo<'a>) -> &mut Self
pub fn payer(&mut self, payer: &'b AccountInfo<'a>) -> &mut Self
The account paying for the storage fees
[optional account]
The authority of the distribution
Sourcepub fn fee_wallet(&mut self, fee_wallet: &'b AccountInfo<'a>) -> &mut Self
pub fn fee_wallet(&mut self, fee_wallet: &'b AccountInfo<'a>) -> &mut Self
The wallet where fees are sent
Sourcepub fn seed(&mut self, seed: &'b AccountInfo<'a>) -> &mut Self
pub fn seed(&mut self, seed: &'b AccountInfo<'a>) -> &mut Self
The seed for the distribution
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 system program
pub fn merkle_root(&mut self, merkle_root: [u8; 32]) -> &mut Self
pub fn tree_height(&mut self, tree_height: u8) -> &mut Self
pub fn start_time(&mut self, start_time: i64) -> &mut Self
pub fn end_time(&mut self, end_time: i64) -> &mut Self
pub fn total_claimants(&mut self, total_claimants: u64) -> &mut Self
pub fn name(&mut self, name: String) -> &mut Self
Sourcepub fn distribution_type(
&mut self,
distribution_type: DistributionType,
) -> &mut Self
pub fn distribution_type( &mut self, distribution_type: DistributionType, ) -> &mut Self
[optional argument, defaults to 'DistributionType::Wallet']
Sourcepub fn subsidize_receipts(&mut self, subsidize_receipts: bool) -> &mut Self
pub fn subsidize_receipts(&mut self, subsidize_receipts: bool) -> &mut Self
[optional argument, defaults to 'false']
Sourcepub fn allowed_distributor(
&mut self,
allowed_distributor: AllowedDistributor,
) -> &mut Self
pub fn allowed_distributor( &mut self, allowed_distributor: AllowedDistributor, ) -> &mut Self
[optional argument, defaults to 'AllowedDistributor::Permissionless']
Sourcepub fn permissioned_distributor(
&mut self,
permissioned_distributor: Pubkey,
) -> &mut Self
pub fn permissioned_distributor( &mut self, permissioned_distributor: Pubkey, ) -> &mut Self
[optional argument, defaults to 'pubkey!("11111111111111111111111111111111")']
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
Auto Trait Implementations§
impl<'a, 'b> !RefUnwindSafe for CreateDistributionCpiBuilder<'a, 'b>
impl<'a, 'b> !Send for CreateDistributionCpiBuilder<'a, 'b>
impl<'a, 'b> !Sync for CreateDistributionCpiBuilder<'a, 'b>
impl<'a, 'b> !UnwindSafe for CreateDistributionCpiBuilder<'a, 'b>
impl<'a, 'b> Freeze for CreateDistributionCpiBuilder<'a, 'b>
impl<'a, 'b> Unpin for CreateDistributionCpiBuilder<'a, 'b>
impl<'a, 'b> UnsafeUnpin for CreateDistributionCpiBuilder<'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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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