github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/fvm/evm/types/chainIDs.go (about)

     1  package types
     2  
     3  import (
     4  	"math/big"
     5  
     6  	"github.com/onflow/flow-go/model/flow"
     7  )
     8  
     9  var (
    10  	FlowEVMPreviewNetChainID = big.NewInt(646)
    11  	FlowEVMTestNetChainID    = big.NewInt(545)
    12  	FlowEVMMainNetChainID    = big.NewInt(747)
    13  )
    14  
    15  func EVMChainIDFromFlowChainID(flowChainID flow.ChainID) *big.Int {
    16  	// default evm chain ID is previewNet
    17  	switch flowChainID {
    18  	case flow.Mainnet:
    19  		return FlowEVMMainNetChainID
    20  	case flow.Testnet:
    21  		return FlowEVMTestNetChainID
    22  	default:
    23  		return FlowEVMPreviewNetChainID
    24  	}
    25  }