'Fungible asset max supply?

Does anyone know how I can add a max supply to a Metaplex fungible asset ?

  const metadata = await Metadata.getPDA(mint.publicKey);
  
  const createMetadataTx = new CreateMetadataV2(
    { feePayer: mint_authority.publicKey },
    {
      metadata,
      metadataData: new DataV2({
        uri :'https://xxxx-88-81-106-161.ngrok.io/sample-uri',
        name: 'ttt',
        symbol: 'ttt',
        sellerFeeBasisPoints: 100,
        creators: null,
        collection: null,
        uses: null,
        tokenStandard: TokenStandard.Fungible
      }),
      updateAuthority: mint_authority.publicKey,
      mint: mint.publicKey,
      mintAuthority: mint_authority.publicKey,
    },
  );

  const sig = await connection.sendTransaction(createMetadataTx, [mint_authority],{
    skipPreflight: false,
  } )
    
  const txRpcResponse = await connection.confirmTransaction(sig)


Solution 1:[1]

According to the current Metadata Struct, there is no such field as max supply you can look more into the SPL token program it contains a field called supply to know more about it you can look here or checkout the Solana Program Library Repo

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1