Quantcast
Channel: Recent Questions - Solana Stack Exchange
Viewing all articles
Browse latest Browse all 7869

Solana.py error: Invalid account data from instruction

$
0
0
from spl.token.instructions import transfer, TransferParamsfrom spl.token.constants import TOKEN_PROGRAM_IDfrom solana.rpc.api import Clientfrom solders.pubkey import Pubkeyfrom solana.transaction import Transactiontoken = 'wbUyCKSNwbeeEXoaMDCk4rNqKXeH36Nt9A1FBnQbiiB'http_provider='https://api.devnet.solana.com'burn_address =  "11111111111111111111111111111111"token_pub = Pubkey.from_string(token)client = Client(http_provider)transaction = Transaction().add(    transfer(TransferParams(        source=token_pub,        dest=Pubkey.from_string(burn_address),        owner=my_wallet,        amount=10,        program_id=TOKEN_PROGRAM_ID    )))client.send_transaction(transaction, wallet_key_pair)

I want to send my USDC mock coin to burn address

and

It results

"Program log: Error: InvalidAccountData", "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 1270 of 200000 compute units", "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA failed: invalid account data for instruction"

I can't understand which account is wrong


Viewing all articles
Browse latest Browse all 7869

Trending Articles