Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

Adding priority fees to collection creation so there's higher chance of landing on chain #548

@iamladi

Description

@iamladi

Hi team,

This is our code for creating collection with Metaplex foundation JS SDK:

export async function createCollection(
  metaplex: Metaplex,
  metadataUri: string,
  name: string,
  sellerFee: number,
  creators: { address: PublicKey; share: number }[],
  symbol?: string
) {
  const createNftBuilder = await metaplex.nfts().builders().create({
    uri: metadataUri,
    name: name,
    sellerFeeBasisPoints: sellerFee,
    symbol: symbol,
    creators: creators,
    isCollection: true,
    tokenStandard: TokenStandard.NonFungible,
  })

  const resp = await createNftBuilder.sendAndConfirm(metaplex, {
    commitment: "finalized",
  })
  return {
    mint: resp.mintAddress,
    metadataAccount: resp.metadataAddress,
    masterEditionAccount: resp.masterEditionAddress,
  }
}

How do I modify this code to add priority fees for Solana? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions