// Code generated by github.com/fjl/gencodec. DO NOT EDIT.packagecoreimport("encoding/json""errors""math/big""github.com/ava-labs/coreth/params""github.com/ethereum/go-ethereum/common""github.com/ethereum/go-ethereum/common/hexutil""github.com/ethereum/go-ethereum/common/math")var_=(*genesisSpecMarshaling)(nil)// MarshalJSON marshals as JSON.func(gGenesis)MarshalJSON()([]byte,error){typeGenesisstruct{Config*params.ChainConfig`json:"config"`Noncemath.HexOrDecimal64`json:"nonce"`Timestampmath.HexOrDecimal64`json:"timestamp"`ExtraDatahexutil.Bytes`json:"extraData"`GasLimitmath.HexOrDecimal64`json:"gasLimit" gencodec:"required"`Difficulty*math.HexOrDecimal256`json:"difficulty" gencodec:"required"`Mixhashcommon.Hash`json:"mixHash"`Coinbasecommon.Address`json:"coinbase"`Allocmap[common.UnprefixedAddress]GenesisAccount`json:"alloc" gencodec:"required"`Numbermath.HexOrDecimal64`json:"number"`GasUsedmath.HexOrDecimal64`json:"gasUsed"`ParentHashcommon.Hash`json:"parentHash"`}varencGenesisenc.Config=g.Configenc.Nonce=math.HexOrDecimal64(g.Nonce)enc.Timestamp=math.HexOrDecimal64(g.Timestamp)enc.ExtraData=g.ExtraDataenc.GasLimit=math.HexOrDecimal64(g.GasLimit)enc.Difficulty=(*math.HexOrDecimal256)(g.Difficulty)enc.Mixhash=g.Mixhashenc.Coinbase=g.Coinbaseifg.Alloc!=nil{enc.Alloc=make(map[common.UnprefixedAddress]GenesisAccount,len(g.Alloc))fork,v:=rangeg.Alloc{enc.Alloc[common.UnprefixedAddress(k)]=v}}enc.Number=math.HexOrDecimal64(g.Number)enc.GasUsed=math.HexOrDecimal64(g.GasUsed)enc.ParentHash=g.ParentHashreturnjson.Marshal(&enc)}// UnmarshalJSON unmarshals from JSON.func(g*Genesis)UnmarshalJSON(input[]byte)error{typeGenesisstruct{Config*params.ChainConfig`json:"config"`Nonce*math.HexOrDecimal64`json:"nonce"`Timestamp*math.HexOrDecimal64`json:"timestamp"`ExtraData*hexutil.Bytes`json:"extraData"`GasLimit*math.HexOrDecimal64`json:"gasLimit" gencodec:"required"`Difficulty*math.HexOrDecimal256`json:"difficulty" gencodec:"required"`Mixhash*common.Hash`json:"mixHash"`Coinbase*common.Address`json:"coinbase"`Allocmap[common.UnprefixedAddress]GenesisAccount`json:"alloc" gencodec:"required"`Number*math.HexOrDecimal64`json:"number"`GasUsed*math.HexOrDecimal64`json:"gasUsed"`ParentHash*common.Hash`json:"parentHash"`}vardecGenesisiferr:=json.Unmarshal(input,&dec);err!=nil{returnerr}ifdec.Config!=nil{g.Config=dec.Config}ifdec.Nonce!=nil{g.Nonce=uint64(*dec.Nonce)}ifdec.Timestamp!=nil{g.Timestamp=uint64(*dec.Timestamp)}ifdec.ExtraData!=nil{g.ExtraData=*dec.ExtraData}ifdec.GasLimit==nil{returnerrors.New("missing required field 'gasLimit' for Genesis")}g.GasLimit=uint64(*dec.GasLimit)ifdec.Difficulty==nil{returnerrors.New("missing required field 'difficulty' for Genesis")}g.Difficulty=(*big.Int)(dec.Difficulty)ifdec.Mixhash!=nil{g.Mixhash=*dec.Mixhash}ifdec.Coinbase!=nil{g.Coinbase=*dec.Coinbase}ifdec.Alloc==nil{returnerrors.New("missing required field 'alloc' for Genesis")}g.Alloc=make(GenesisAlloc,len(dec.Alloc))fork,v:=rangedec.Alloc{g.Alloc[common.Address(k)]=v}ifdec.Number!=nil{g.Number=uint64(*dec.Number)}ifdec.GasUsed!=nil{g.GasUsed=uint64(*dec.GasUsed)}ifdec.ParentHash!=nil{g.ParentHash=*dec.ParentHash}returnnil}