0

Error: Failed to send transaction: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x1. Getting this error when transferring the NFT token. After looking up the error code 0x1 from here, got to know that the error is due to insufficient funds in the sender account. But I have some 8 SOL which I guess should be enough for the transaction.

I am implementing the transfer NFT logic using the first answer over here

What am I missing here?

Any help is appreciated. Thanks in advance.

1 Answers1

-1

I can help more if you specify the code you wrote. But I guess the balance of the account you sent may be low (or zero), so you need to send NFT with fund-recipient.

If the receiver does not yet have an associated token account, the sender need to fund to create associated token account for receiver's solana account.

I usually create associated token account (here you need to create it for your NFT account for recipient) then transfer token or NFT

for python coding

token_pda_address = get_associated_token_address(sender_account, mint_account)

mint_account = get_associated_token_address(destination_account, mint_account)

associated_token_account = create_associated_token_account_instruction(
    associated_token_account=mint_account,
    payer=source_account.public_key,  # signer
    wallet_address=destination_account,
    token_mint_address=mint_account,
)

spl_transfer = spl_transfer(
    SPLTransferParams(
        program_id=token_account,
        source=token_pda_address,
        dest=associated_token_account,
        owner=sender_account,
        signers=[],
        amount=1,
)

in this example token_pda_address and associated_token_account must be the same type of account.