Rug-Zombie / rug-zombie-frontend

3 stars 4 forks source link

refactor: Type-enforce chain id mappings against enum #107

Closed santraji closed 2 years ago

santraji commented 2 years ago

Creates ChainId enum containing entries for BSC mainnet (56) and testnet (97) chain ids. Adjusts type definitions for Id and Address to enforce entries in these structures include all chain ids in the new enum and only those chain ids.

Should help catch bugs ahead of time for future additions, especially upon supporting additional chains.