Quantcast
Channel: Recent Questions - Solana Stack Exchange
Viewing all articles
Browse latest Browse all 7939

Error: memory allocation failed, out of memory. When using dynamic seed in anchor

$
0
0

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>,}

On chain I see this error:enter image description here


Viewing all articles
Browse latest Browse all 7939

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>