-
Notifications
You must be signed in to change notification settings - Fork 173
Closed
Labels
Milestone
Description
We currently have information about chains in:
https://github.com/zeta-chain/node-private/blob/develop/common/chain.go
https://github.com/zeta-chain/node-private/blob/develop/common/chains.go
The current way to represent information is IMO a bit messy, we define chain IDs for the different network, then. we define functions to determine if the chain ID is Ethereum, support EVM, is external, is testnet, etc...
It would be clearer I think to add the information in the Chain object itself, and directly retrieve the information from it.
Example of structure:
type Chain struct{
ChainID int64 // identifier
ChainName string
IsExternal bool // external or zetachain
Network [ZETACHAIN|BITCOIN|ETHEREUM|BSC|...] // the actual network
NetworkType [PRIVNET|TESTNET|MAINNET]
VM [NO_VM|EVM|COSMWASM] // vm of smart contract platform if any
Consensus [BITCOIN|ETHEREUM||TENDERMINT] // the underlying consensus, this allow to reuse a specific header/proof system
}
Reactions are currently unavailable