You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In createFunTokenFromERC20(), the bank metadata for the new funtoken coin is created with a single DenomUnit, with Denom set to "erc20/{erc20}" and Exponent set to 0.
This can be improved in the following way by using two DenomUnits:
The smallest possible unit with Exponent = 0, universally called wei (i.e. Denom = "wei") for all such ERC-20 funtokens
The regular unit which uses the ERC-20 token's decimals, i.e. { Denom: bankDenom, Exponent: info.Decimals }
This first wei unit will be used as the coin's Base and the second unit as Display.
Additionally, the metadata Name could be set to the retrieved ERC-20 metadata info.Name.
Recommendation:
Consider using two DenomUnits for the new funtoken coin metadata and setting the Name to the ERC-20 token's name. This would bring parity between EVM wallets, such as MetaMask, and Cosmos wallets, such as Keplr/Leap when displaying the coins/tokens.
In the context of
FunToken
mapping creation:I'm wondering why the retrieved erc20 metadata is not used here to set
Name
to the erc20 token's name?Originally posted by @berndartmueller in https://github.com/code-423n4/2024-10-nibiru-zenith/pull/21#discussion_r1794845372
The text was updated successfully, but these errors were encountered: