github.com/dim4egster/coreth@v0.10.2/plugin/evm/ext_data_hashes.go (about)

     1  package evm
     2  
     3  import (
     4  	_ "embed"
     5  	"encoding/json"
     6  
     7  	"github.com/ethereum/go-ethereum/common"
     8  )
     9  
    10  var (
    11  	//go:embed fuji_ext_data_hashes.json
    12  	rawFujiExtDataHashes []byte
    13  	fujiExtDataHashes    map[common.Hash]common.Hash
    14  
    15  	//go:embed mainnet_ext_data_hashes.json
    16  	rawMainnetExtDataHashes []byte
    17  	mainnetExtDataHashes    map[common.Hash]common.Hash
    18  )
    19  
    20  func init() {
    21  	if err := json.Unmarshal(rawFujiExtDataHashes, &fujiExtDataHashes); err != nil {
    22  		panic(err)
    23  	}
    24  	rawFujiExtDataHashes = nil
    25  	if err := json.Unmarshal(rawMainnetExtDataHashes, &mainnetExtDataHashes); err != nil {
    26  		panic(err)
    27  	}
    28  	rawMainnetExtDataHashes = nil
    29  }