Skip to main content

with_token_amount

Function with_token_amount 

Source
pub fn with_token_amount(
    account: &Account,
    amount: u64,
) -> Result<AccountData, TokenAccountError>
Expand description

account with its balance set to amount and every other byte kept. A native account’s lamports become its stored reserve plus amount.

Errors when the owner is not a token program, or the data is not an initialized token account with a valid is_native tag.