Skip to content
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

Change EVM compatible chains to use convertEVMChainIdToCoinType(chainId) instead of coinType #318

Closed
makoto opened this issue Nov 26, 2021 · 5 comments

Comments

@makoto
Copy link
Member

makoto commented Nov 26, 2021

Currently ARB1 is the only EVM compatible chain that uses convertEVMChainIdToCoinType(chainId).

Convert all other evm compatible chains (listed below) as well as add other prominent EVM chains.

makoto@makoto-1:~/work/address-encoder$ grep hexCheck src/index.ts 
const hexChecksumChain = (name: string, coinType: number, chainId?: number) => ({
  hexChecksumChain('ETH', 60),
  hexChecksumChain('ETC', 61),
  hexChecksumChain('RSK', 137, 30),
  hexChecksumChain('POA', 178),
  hexChecksumChain('EWT', 246),
  hexChecksumChain('THETA', 500),
  hexChecksumChain('BSC', 519),
  hexChecksumChain('TFUEL', 589),
  hexChecksumChain('OPT', 614),
  hexChecksumChain('XDAI', 700),
  hexChecksumChain('VET', 703),
  hexChecksumChain('CLO', 820),
  hexChecksumChain('TOMO', 889),
  hexChecksumChain('MATIC', 966),
  hexChecksumChain('TT', 1001),
  hexChecksumChain('FTM', 1007),
  hexChecksumChain('GO', 6060),
  hexChecksumChain('NRG', 9797),
  hexChecksumChain('CELO', 52752),
@briansoule
Copy link
Contributor

briansoule commented Nov 27, 2021

+ AVAX chainId: 43114

@makoto makoto closed this as completed Nov 27, 2021
@makoto
Copy link
Member Author

makoto commented Nov 27, 2021

closing the issue as the earlier version had a bug. Will reopen once fixed

@makoto
Copy link
Member Author

makoto commented Nov 27, 2021

AVAX (and Harmony) are tricky ones as it allows multiple formats and EVM compatible ones are one of the accepted format. Currently AVAX is set as hex32 and already in the repo

@briansoule
Copy link
Contributor

Yeah I'd assume that AVAX C-Chain would be treated as it's own network?

@briansoule
Copy link
Contributor

We have a similar situation with Binance Chain and Binance Smart Chain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants