Unable to mint SPL 2022 token but able to create it using metaplex

26 Views Asked by At
const umi = createUmi(connection)
      .use(mplTokenMetadata())
      .use(walletAdapterIdentity(wallet));

    const mint = generateSigner(umi);
    await createFungible(umi, {
      mint,
      name: 'Name',
      symbol: '$Symbol',
      uri: '....',
      sellerFeeBasisPoints: percentAmount(5.5),
      decimals: 3,
      splTokenProgram: publicKey(TOKEN_2022_PROGRAM_ID),
    })
      .sendAndConfirm(umi)
      .then(() => {
        console.log(
          'token created (',
          mint.publicKey,
          ')',
        );
      });

here is mint code:

  await mintV1(umi, {
        mint: publicKey(mint.publicKey),
        tokenOwner: publicKey(wallet.publicKey),
        amount: 10000000,
        tokenStandard: TokenStandard.Fungible,
        splTokenProgram: publicKey(TOKEN_2022_PROGRAM_ID),
      }).sendAndConfirm(umi);
0

There are 0 best solutions below