1

I built a project on Solana by following this youtube tutorial by CleverProgrammer.

It is basically Decentralized Spotify. I completed the tutorial successfully. The project was working as expected. Suddenly without doing any changes in my code, I am getting this error "Signature Verification Failed". I am unable to perform any transactions. (I guess it is because of Phantom Wallet Update, as they have provided the multichain support. But I am not sure about it.)

I tried the following things:- 1. Rebuilding & Redeploying the Smart Contract. (Platform used beta.solpg.io ) 2. Changing the RPC ( Quicknode) Still, the error remains.

I redeveloped the entire project by following the tutorial from the start to track down the error. On closely observing the code, I noticed that when I tried to track my 'PayerSigner' on Solana Explorer it shows 'Account does not exist'.

enter image description here This is the function that gives an error.

enter image description here payerSigner

(Both the above code snippets are from Payment.js file)

anchor.web3.PublicKey.findProgramAddress() just returns 'Derived Address'. This function requires Deployed Smart Contract Address & an array of inputs. Here the array contains "payer" word & Address of the connected Phantom Account.

If you follow the tutorial you face the error at 1Hr 25mins. enter image description here

This is my Github repository. (This contains code only till 1Hr 25 mins).

You can also refer to the Instructor's GitHub repository.

If you find any solution please let me know.

Thank you.

1
  • 1
    It would be useful if you could provide code snippets instead of screenshots, as well as details of the errors your are seeing. Most people won't have time to look through your repo or follow a tutorial for over an hour in order to replicate your issue.
    – Muckee
    Commented May 31, 2023 at 7:12

1 Answer 1

1
#[account(
    init, 
    seeds = [b"payer".as_ref() , authority.key().as_ref()],                   // It creates a Unique hash based on what you put into the array.
    bump,                                                                     // If unique hash created by 'seeds' already exists then 'bump' will increment it to make sure it is 100% unique.
    payer = authority, 
    space = size_of::<PayerAccount>() + 8 
)]


pub payer_wallet: Account<'info, PayerAccount>,

#[account(mut)]
pub receiver: AccountInfo<'info>,                   // The one who recieves the money.

#[account(mut)]
pub authority: Signer<'info>,                       // 'Authority' is the 'Signer' who paid transaction fee.


pub system_program: UncheckedAccount<'info>,

//Token program
#[account(constraint = token_program.key == &token::ID)]
pub token_program: Program<'info , Token>,
    
// Clock to save time
pub clock : Sysvar<'info , Clock>,

As you can see, the PayerContext contains more accounts than your instruction's accounts. Your instruction must contain the system_program and the token_program and the clock accounts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.