0

I was working on a custom candy guard with the Candy guard program from Metaplex

After Changing the size of my guard, I get the following error

> Program logged: "Error: memory allocation failed, out of memory"
> Program consumed: 12029 of 742102 compute units
> Program returned error: "SBF program panicked"

explorer tx hash -> https://explorer.solana.com/tx/3hnFgsUNGVQjGZ1oWC8ePwtSmdKQoLdxfF4hjoxjRTJ4NkpVrBFJVDd8vsykuuabQmb2nbXhjTXKuB2wg7cQNQvk?cluster=devnet

2 Answers 2

1

This error is not about the amount of space in the account, but the heap space for the VM being exhausted. If you want more heap space, you'll need to:

0

It seems that the guards are tied to the space you initialize them with.

Meaning that if you allocate 32 bytes for your guard, you are stuck with that

    fn size() -> usize {
        32 // fee destination
    }

Solution I used when I needed moa space was to crate another guard custom_guard_v2 with the larger space requirements accounted for.

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.