How do I set metadata for a Fungible Token on Hedera Token Service (HTS)?

I have successfully created a FungibleCommon token on Hedera Token Service (HTS), and I am able to set the memo field without any issues. However, when I attempt to set the metadata for the token, the memo field always appears to be empty when the token is created.

I do not see any errors output, so this appears to be failing silently.

What causes this?

I’m using the latest SDK, and I’m not seeing any errors in my terminal.
This is how I’m currently trying to do it:

const metadata = {
    "name": "My token name",
    "image": "http://path-to-my-image"
}
async function createFungibleToken() {
    let tokenCreateTx = await new TokenCreateTransaction()
        .setTokenName("Test")
        .setTokenSymbol("TEST")
        .setMetadata(metadata) // <--- HERE
        .setTokenType(TokenType.FungibleCommon)
        .setDecimals(2)
        .setInitialSupply(10000)
        .freezeWith(client);

    let tokenCreateSign = await tokenCreateTx.sign(privKey);
    let tokenCreateSubmit = await tokenCreateSign.execute(client);
    let tokenCreateRx = await tokenCreateSubmit.getReceipt(client);
    let tokenId = tokenCreateRx.tokenId;

    console.log(`Created token with ID: ${tokenId}`);
}

Is there a specific way to structure the metadata?
What am I missing in the process?

This is most probably related to how you are structuring your metadata.
If you’re creating a fungible token, make sure your metadata follows the guidelines specified in HIP-405. This standard outlines the proper structure for fungible token metadata to ensure it’s recognised and displayed properly across platforms.

So your metadata should be structured like this:

{
    "description": "description of token - RECOMMENDED - max. of 500 characters",
    "smallestUnitName" : "the name of the smallest denomination of these tokens, if the name exists - OPTIONAL",
    "smallestUnitSymbol" : "the nsymbol of the smallest denomination of these tokens, if the symbol exists - OPTIONAL",
    "creator": "creator(s) - RECOMMENDED",
    "creatorDID": "DID  - OPTIONAL ",
    "admin": "admin(s) - OPTIONAL",
    "lightLogo": "IPFS CID or path to the token's light background logo file - RECOMMENDED",
    "lightLogotype": "mime type - i.e. image/jpeg - CONDITIONALLY OPTIONAL ",
    "darkLogo": "IPFS CID or path to the token's dark background logo file - RECOMMENDED",
    "darkLogotype": "mime type - i.e. image/jpeg - CONDITIONALLY OPTIONAL ",
    "website": "link to website -  OPTIONAL", 
    "discussion": "link to discussion/discord -  OPTIONAL", 
    "whitepaper": "link to whitepaper -  OPTIONAL",
    "properties": "arbitrary additional data relevant to the token - OPTIONAL"
}

Following this standard, you could create a simple metadata.json file like this:

{
    "description": "TEST Tokens ($TEST) to test functionality."
}

And then upload this file to IPFS using a service like Pinata or web3.storage. After uploading, you will receive a CID (e.g., Qm7tgf6t8…). This CID will be used to reference your metadata in the token creation transaction.
Once you have your IPFS CID, you can use it in your token creation logic like this:

async function createFungibleToken() {
    let tokenCreateTx = await new TokenCreateTransaction()
        .setTokenName("Test")
        .setTokenSymbol("TEST")
        .setMetadata(Buffer.from("your IPFS CID")) // Replace with your IPFS CID
        .setTokenType(TokenType.FungibleCommon)
        .setDecimals(2)
        .setInitialSupply(10000)
        .setTreasuryAccountId("your-account-id")
        .freezeWith(client);

    let tokenCreateSign = await tokenCreateTx.sign("your-private-key");
    let tokenCreateSubmit = await tokenCreateSign.execute(client);
    let tokenCreateRx = await tokenCreateSubmit.getReceipt(client);
    let tokenId = tokenCreateRx.tokenId;

    console.log(`- Created token with ID: ${tokenId} n`);
}

Make sure to replace “your IPFS CID” with the actual CID obtained from IPFS.
Also please not that while it is optional to use a metadata key during token creation, if no key is specified then the metadata will be immutable, so you won’t be able to modify or add it later.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật