You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implementing this example(cp-swap-cpi) locally I ran into errors where seed constraints for accounts like authority are violated, probably since the account::seeds macro checks if the account passed mathches the seed discriminator + the calling programm:id. But it should be seed desicriminator + raydium_cp_swap:programId.
Omitting the seeds and the bump fixes the problem for me and I am able to cpi into the raydium contract and init a pool.
/// CHECK: pool vault and lp mint authority#[account(mut)]pub authority:UncheckedAccount<'info>,
I think this is fine since the underlying raydium contract enforces the correct seed?
The text was updated successfully, but these errors were encountered:
#[derive(Accounts)]
pub struct ProxyInitialize<'info> {
pub cp_swap_program: Program<'info, RaydiumCpSwap>,
/// Address paying to create the pool. Can be anyone
#[account(mut)]
pub creator: Signer<'info>,
/// Which config the pool belongs to.
pub amm_config: Box<Account<'info, AmmConfig>>,
/// CHECK: pool vault and lp mint authority
#[account(
seeds = [
raydium_cp_swap::AUTH_SEED.as_bytes(),
],
seeds::program = cp_swap_program,
bump,
)]
pub authority: UncheckedAccount<'info>,
.....
}
Implementing this example(cp-swap-cpi) locally I ran into errors where seed constraints for accounts like authority are violated, probably since the account::seeds macro checks if the account passed mathches the seed discriminator + the calling programm:id. But it should be seed desicriminator + raydium_cp_swap:programId.
Omitting the seeds and the bump fixes the problem for me and I am able to cpi into the raydium contract and init a pool.
I think this is fine since the underlying raydium contract enforces the correct seed?
The text was updated successfully, but these errors were encountered: