如何在ERC20代币中添加徽标?

发布于 2025-01-31 22:50:27 字数 331 浏览 5 评论 0原文

我是区块链的新手。我真的不明白如何在Polygon上的ERC20加密代币中添加徽标,然后再在任何硬币市场上列出它。

我想将自己的自定义图像添加到圆形部分。如何将此当前徽标更改为新事物,如果将令牌传输到其他帐户,将显示我的自定义徽标? 请帮忙。

I am new to blockchain. I really couldn't understand how to add logo to my erc20 crypto token on polygon before listing it on any coin market.

I want to add my own custom image to the circular portion

I want to add my own custom image to the circular portion. How can I change this current logo to something new and If I transfer the token to some other account, my custom logo will be displayed?
Please help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

路还长,别太狂 2025-02-07 22:50:27

metAmask实现 eip-747 标准> Wallet_watchasset 显示自定义令牌徽标的方法。

请注意,这不是每个令牌地址徽标的集中式数据库,因此每个MetAmask实例理论上可以在同一令牌上显示一个不同的徽标。并且用户需要手动或通过确认网络应用程序片段打开的元掩体弹出窗口明确添加徽标。

来自 metAmask docs

const wasAdded = await ethereum.request({
    method: 'wallet_watchAsset',
    params: {
        type: 'ERC20', // Initially only supports ERC20, but eventually more!
        options: {
            address: tokenAddress, // The address that the token is at.
            symbol: tokenSymbol, // A ticker symbol or shorthand, up to 5 chars.
            decimals: tokenDecimals, // The number of decimals in the token
            image: tokenImage, // A string url of the token logo
        },
    },
});

MetaMask implements the EIP-747 standard (currently unfinished in May 2022) and its wallet_watchAsset method to display custom token logo.

Mind that this is not a centralized database of logos per token address, so each MetaMask instance can theoretically display a different logo for the same token. And that users need to explicitly add the logo either manually or by confirming a MetaMask popup opened by a snippet from your web app.

Code example from MetaMask docs:

const wasAdded = await ethereum.request({
    method: 'wallet_watchAsset',
    params: {
        type: 'ERC20', // Initially only supports ERC20, but eventually more!
        options: {
            address: tokenAddress, // The address that the token is at.
            symbol: tokenSymbol, // A ticker symbol or shorthand, up to 5 chars.
            decimals: tokenDecimals, // The number of decimals in the token
            image: tokenImage, // A string url of the token logo
        },
    },
});
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文