pub struct Cancel<'info> {Show 13 fields
pub authority: Signer<'info>,
pub sender: AccountInfo<'info>,
pub sender_tokens: Account<'info, TokenAccount>,
pub recipient: AccountInfo<'info>,
pub recipient_tokens: Account<'info, TokenAccount>,
pub metadata: AccountInfo<'info>,
pub escrow_tokens: Account<'info, TokenAccount>,
pub streamflow_treasury: AccountInfo<'info>,
pub streamflow_treasury_tokens: AccountInfo<'info>,
pub partner: AccountInfo<'info>,
pub partner_tokens: AccountInfo<'info>,
pub mint: Account<'info, Mint>,
pub token_program: Program<'info, Token>,
}
Expand description
Accounts expected in cancel instruction
Fields§
Wallet that initiates contract cancel.
sender: AccountInfo<'info>
Wallet of the contract creator.
sender_tokens: Account<'info, TokenAccount>
Associated token account address of sender
.
recipient: AccountInfo<'info>
Wallet address of the recipient.
recipient_tokens: Account<'info, TokenAccount>
Associated token account address of recipient
.
metadata: AccountInfo<'info>
The account holding the contract parameters. Expects initialized account.
escrow_tokens: Account<'info, TokenAccount>
The escrow account holding the funds.
Should be a PDA, use streamflow_sdk::state::find_escrow_account
to derive
Expects initialized account.
streamflow_treasury: AccountInfo<'info>
Streamflow treasury account.
Use constant streamflow_sdk::state::STRM_TREASURY
streamflow_treasury_tokens: AccountInfo<'info>
Associated token account address of streamflow_treasury
.
partner: AccountInfo<'info>
Partner treasury account. If no partner fees are expected on behalf of the program
integrating with streamflow, streamflow_treasury
can be passed in here. Must match partner
account in contract metadata.
partner_tokens: AccountInfo<'info>
Associated token account address of partner
. If no partner fees are expected on behalf of the
program integrating with streamflow, streamflow_treasury_tokens
can be passed in here.
Must match partner token account in contract metadata.
mint: Account<'info, Mint>
The SPL token mint account.
token_program: Program<'info, Token>
The SPL program needed in case an associated account for the new recipient is being created.
Trait Implementations§
Source§impl<'info> Accounts<'info, CancelBumps> for Cancel<'info>where
'info: 'info,
impl<'info> Accounts<'info, CancelBumps> for Cancel<'info>where
'info: 'info,
Source§fn try_accounts(
__program_id: &Pubkey,
__accounts: &mut &'info [AccountInfo<'info>],
__ix_data: &[u8],
__bumps: &mut CancelBumps,
__reallocs: &mut BTreeSet<Pubkey>,
) -> Result<Self>
fn try_accounts( __program_id: &Pubkey, __accounts: &mut &'info [AccountInfo<'info>], __ix_data: &[u8], __bumps: &mut CancelBumps, __reallocs: &mut BTreeSet<Pubkey>, ) -> Result<Self>
Mint
account from the SPL token program in a particular
field, then it should be impossible for this method to return Ok
if
any other account type is given–from the SPL token program or elsewhere. Read moreSource§impl<'info> AccountsExit<'info> for Cancel<'info>where
'info: 'info,
impl<'info> AccountsExit<'info> for Cancel<'info>where
'info: 'info,
Source§impl<'info> Bumps for Cancel<'info>where
'info: 'info,
impl<'info> Bumps for Cancel<'info>where
'info: 'info,
Source§type Bumps = CancelBumps
type Bumps = CancelBumps
Source§impl<'info> ToAccountInfos<'info> for Cancel<'info>where
'info: 'info,
impl<'info> ToAccountInfos<'info> for Cancel<'info>where
'info: 'info,
fn to_account_infos(&self) -> Vec<AccountInfo<'info>>
Source§impl<'info> ToAccountMetas for Cancel<'info>
impl<'info> ToAccountMetas for Cancel<'info>
Source§fn to_account_metas(&self, is_signer: Option<bool>) -> Vec<AccountMeta>
fn to_account_metas(&self, is_signer: Option<bool>) -> Vec<AccountMeta>
is_signer
is given as an optional override for the signer meta field.
This covers the edge case when a program-derived-address needs to relay
a transaction from a client to another program but sign the transaction
before the relay. The client cannot mark the field as a signer, and so
we have to override the is_signer meta field given by the client.Auto Trait Implementations§
impl<'info> Freeze for Cancel<'info>
impl<'info> !RefUnwindSafe for Cancel<'info>
impl<'info> !Send for Cancel<'info>
impl<'info> !Sync for Cancel<'info>
impl<'info> Unpin for Cancel<'info>
impl<'info> !UnwindSafe for Cancel<'info>
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> 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