mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-28 07:36:44 +00:00
24 lines
416 B
Go
24 lines
416 B
Go
package chains
|
|
|
|
import (
|
|
"github.com/ethereum/go-ethereum/common"
|
|
"github.com/ethereum/go-ethereum/core"
|
|
)
|
|
|
|
type Chain struct {
|
|
Hash common.Hash
|
|
Genesis *core.Genesis
|
|
Bootnodes []string
|
|
NetworkId uint64
|
|
DNS []string
|
|
}
|
|
|
|
var chains = map[string]*Chain{
|
|
"mainnet": mainnetBor,
|
|
"mumbai": mumbaiTestnet,
|
|
}
|
|
|
|
func GetChain(name string) (*Chain, bool) {
|
|
chain, ok := chains[name]
|
|
return chain, ok
|
|
}
|