0

Thanks ATON for viewing the problem, I need URGENT help on this if possible. I have created a PDA and used the PDA to freeze an NFT.

#[account(init,
    payer=bidder,
    seeds = [
    bidder.key().as_ref(),
    bidding_amount_in_lamports.to_le_bytes().as_ref(),
    bidding_pool_pda.key().as_ref(),
    ],
    bump,
    space=BIDDING_MANAGER_SPACE)]
pub bidding_manager: Box<Account<'info, BidManager>>,

invoke_signed(
    &freeze_delegated_account(
        metadata_program.key(),
        bidding_escrow.key(),
        borrow_token_account.key(),
        nft_edition.key(),
        nft_mint.key(),
    )
    , &[
        metadata_program.to_account_info(),
        bidding_escrow.to_account_info(),
        borrow_token_account.to_account_info(),
        nft_edition.to_account_info(),
        nft_mint.to_account_info(),
    ], 
    &[&[
        bidding_escrow.bidder_pubkey.as_ref(),
        bidding_escrow.bidding_amount_in_lamports.clone().to_le_bytes().as_ref(),
        bidding_escrow.bidding_pool_address.as_ref(),
        &[bidding_escrow.bidding_manager_bump]]]
).expect("error");

Afterwards I am trying to thaw the delegated account

#[account(mut)]
pub bidding_manager:Box<Account<'info,BidManager>>,


invoke_signed(
    &thaw_delegated_account(
        ctx.accounts.metadata_program.key(),
        bidding_manager.key(),
        ctx.accounts.borrower_token_account.key(),
        ctx.accounts.nft_edition.key(),
        ctx.accounts.nft_mint.key(),
    )
    , &[
        ctx.accounts.metadata_program.to_account_info(),
        bidding_manager.to_account_info(),
        ctx.accounts.borrower_token_account.to_account_info(),
        ctx.accounts.nft_edition.to_account_info(),
        ctx.accounts.nft_mint.to_account_info(),
    ], 
    &[&[
        bidding_manager.bidder_pubkey.as_ref(),
        bidding_manager.bidding_amount_in_lamports.to_le_bytes().as_ref(),
        bidding_manager.bidding_pool_address.as_ref(),
        &[bidding_manager.bidding_manager_bump]]]
).expect("error");

PDA is both mutable and holds proper seeds, and getting the following error:

"He3UyupRCyiUJnPki7dCK4A2ZF1VW55k4LFYLLgGVobE's signer privilege escalated",
'Program GXEH3sDvJaE5xPRHEGvmaYqwS8k6ckDKzoNM34kVL47S consumed 14241 of 200000 compute units',
'Program GXEH3sDvJaE5xPRHEGvmaYqwS8k6ckDKzoNM34kVL47S failed: Cross-program invocation with unauthorized signer or writable account'
1
  • Log the accounts you're passing in. Which of them is being mentioned in the error message
    – Ademola
    Mar 12, 2023 at 21:54

0

Your Answer

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