-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: map ics20 denoms to erc20 #23
Conversation
And don't revert on unknown denom
// Deploy an ERC20 contract for each (sink zone) denom seen. | ||
if (address(denomTokenContract[denom]) == address(0)) { | ||
string memory name = string.concat("IBC/", hexEncode(abi.encodePacked(sha256(bytes(denom))))); | ||
denomTokenContract[denom] = new ERC20PresetMinterPauser(name, ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how to associate this non-human-readable token name with a human-readable token name, like ETC, BTC, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a concern for UI/explorer etc. Cosmos uses https://github.com/cosmos/chain-registry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or the allowlist version allows setting custom token name, symbol and decimal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do not set symbol for the ERC20?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What should the symbol be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am no sure if we can use denom
as the symbol, but use an empty string is strange
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am no sure if we can use
denom
as the symbol, but use an empty string is strange
it's not an empty string, but just an encoded string which isn't recognized for human-beings and differs from symbol of ERC20, like BTC, ETH, and so on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand the first arg.
denomTokenContract[denom] = new ERC20PresetMinterPauser(name, "");
I am discussing the second one here
// Deploy an ERC20 contract for each (sink zone) denom seen. | ||
if (address(denomTokenContract[denom]) == address(0)) { | ||
string memory name = string.concat("IBC/", hexEncode(abi.encodePacked(sha256(bytes(denom))))); | ||
denomTokenContract[denom] = new ERC20PresetMinterPauser(name, ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do not set symbol for the ERC20?
No description provided.