0

i'm trying to set and verify a collection for a compressed nft already minted. i'm using the exact same code as written in the docs : https://developers.metaplex.com/bubblegum/verify-collections

However, i get the following error : SendTransactionError: failed to send transaction: base64 encoded solana_sdk::transaction::versioned::VersionedTransaction too large: 1708 bytes (max: encoded/raw 1644/1232)

which is pretty weird because i'm using the code from the docs, and i guess it should work as it is ?

does anyone know how to solve that ?

1 Answer 1

3

Try passing asset proofs after the removing the proof already stored with canopy. You can set canopyDepth while creating merkle tree, which basically caches some proofs so that you don't have to pass all proofs and your transaction size remain in limit.

const CANOPY_DEPTH = 8;

await createTree(umi, {
    merkleTree,
    maxDepth: 14,
    maxBufferSize: 64,
    canopyDepth: CANOPY_DEPTH,
    public: true,
  });
const proof = assetWithProof.proof;

await setAndVerifyCollection(umi, {
  ...assetWithProof,
  proof: proof.slice(0, proof.length - CANOPY_DEPTH),
  treeCreatorOrDelegate,
  collectionMint,
  collectionAuthority,
}).sendAndConfirm(umi)

You can learn more about here: https://www.helius.dev/blog/all-you-need-to-know-about-compression-on-solana

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.