I am getting and memory allocation failed error when I am passing in a dynamic seed for my account initialization.
This is how i use it:
pub fn chop_tree(ctx: Context<ChopTree>, counter: u16, levelSeed: String) -> Result<()> {
chop_tree::chop_tree(ctx, counter)
}
and this is the anchor part:
#[derive(Accounts, Session)]
#[instruction(levelSeed: String)]
pub struct ChopTree<'info> {
#[account(
init_if_needed,
payer = signer,
space = 1000,
seeds = [levelSeed.as_ref()],
bump,
)]
pub game_data: Account<'info, GameData>,
#[account(mut)]
pub signer: Signer<'info>,
pub system_program: Program<'info, System>,
}