Open fedekunze opened 4 years ago
you could maybe use a hash of the coin denom with a prefix for a reserved namespace that can be used as contract addresses and a reverse lookup table so that if someone does an eth_call with one of those contract addresses it directs the query to the bank module instead?
this would treat cosmos assets as ERC-20s which would need to be manually added to metamask still. Is that what you're asking about?
yeah that was what I was asking about. I would want to return photon
instead of ETH
ideally
Metamask will most likely not distinguish the fact that the ethermint gas token is called photon
instead of ETH
. Similarly Koven Ether (KETH) is still called ETH in metamask. You do have options with accessing other SDK Coins as ERC-20s which metamask can handle. But Metamask most likely won't keep track of them automatically. Adding them manually will be on the user unless some coordination of namespacing takes place with Metamask's ERC-20 data source.
In general tho, having a generic ERC-20 interface to wrap around SDK Coins would be a clever way to give MM users access.
Might be worth checking in with the https://github.com/ChainAgnostic/CAIPs folks about asset types? Ethermint occupies a unique instance where an asset might be represented as a SDK Coin or an ERC-20 while located on the same chain.
This issue is stale because it has been open 30 days with no activity. Remove stale
label or comment or this will be closed in 7 days.
Proposal: [Description of the feature]
Tokens in Metamask are represented as
ETH
because there's no token contract for eachsdk.Coin
in the account balances (for not only photon).We could write a token contract for the
photon
andara
but ideally, we should have a generic contact for cosmos coin representation in Solidity. Alternatively, a tool for deploying the contract from the available supply of coins would be valuable.I'm not super familiar with Ethereum so any help or input would be appreciated.
cc: @okwme