Struct solana_test_utils::spl::Spl
source · [−]pub struct Spl<'a> {
pub program_test: &'a mut ProgramTest,
}Fields
program_test: &'a mut ProgramTestImplementations
sourceimpl<'a> Spl<'a>
impl<'a> Spl<'a>
pub fn new(program_test: &'a mut ProgramTest) -> Self
pub async fn get_token_account(&mut self, token_account: Pubkey) -> TokenAccount
pub async fn mint_tokens(
&mut self,
token_mint: &Pubkey,
token_mint_authority: &Keypair,
token_account: &Pubkey,
amount: u64
)
pub async fn transfer(
&mut self,
from: &Pubkey,
to: &Pubkey,
authority: &Keypair,
amount: u64
)
pub async fn create_mint(
&mut self,
mint_keypair: &Keypair,
mint_authority: &Pubkey,
freeze_authority: Option<&Pubkey>,
decimals: u8
)
pub async fn create_associated_account(
&mut self,
wallet_address: &Pubkey,
spl_token_mint_address: &Pubkey
)
pub fn get_associated_token_address(
wallet_address: &Pubkey,
spl_token_mint_address: &Pubkey
) -> Pubkey
pub async fn create_nft(
&mut self,
mint_keypair: &Keypair,
mint_authority: &Keypair,
recipient: &Pubkey
)
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Spl<'a>
impl<'a> Send for Spl<'a>
impl<'a> Sync for Spl<'a>
impl<'a> Unpin for Spl<'a>
impl<'a> !UnwindSafe for Spl<'a>
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
pub default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more