// Code generated by github.com/fjl/gencodec. DO NOT EDIT. package vm import ( "encoding/json" "github.com/XinFinOrg/XDPoSChain/common" "github.com/holiman/uint256" ) // MarshalJSON marshals as JSON. func (s StructLog) MarshalJSON() ([]byte, error) { type StructLog struct { Pc uint64 `json:"pc"` Op OpCode `json:"op"` Gas uint64 `json:"gas"` GasCost uint64 `json:"gasCost"` Memory []byte `json:"memory"` MemorySize int `json:"memSize"` Stack []uint256.Int `json:"stack"` ReturnData []byte `json:"returnData"` Storage map[common.Hash]common.Hash `json:"-"` Depth int `json:"depth"` RefundCounter uint64 `json:"refund"` Err error `json:"-"` } var enc StructLog enc.Pc = s.Pc enc.Op = s.Op enc.Gas = s.Gas enc.GasCost = s.GasCost enc.Memory = s.Memory enc.MemorySize = s.MemorySize enc.Stack = s.Stack enc.ReturnData = s.ReturnData enc.Storage = s.Storage enc.Depth = s.Depth enc.RefundCounter = s.RefundCounter enc.Err = s.Err return json.Marshal(&enc) } // UnmarshalJSON unmarshals from JSON. func (s *StructLog) UnmarshalJSON(input []byte) error { type StructLog struct { Pc *uint64 `json:"pc"` Op *OpCode `json:"op"` Gas *uint64 `json:"gas"` GasCost *uint64 `json:"gasCost"` Memory []byte `json:"memory"` MemorySize *int `json:"memSize"` Stack []uint256.Int `json:"stack"` ReturnData []byte `json:"returnData"` Storage map[common.Hash]common.Hash `json:"-"` Depth *int `json:"depth"` RefundCounter *uint64 `json:"refund"` Err error `json:"-"` } var dec StructLog if err := json.Unmarshal(input, &dec); err != nil { return err } if dec.Pc != nil { s.Pc = *dec.Pc } if dec.Op != nil { s.Op = *dec.Op } if dec.Gas != nil { s.Gas = *dec.Gas } if dec.GasCost != nil { s.GasCost = *dec.GasCost } if dec.Memory != nil { s.Memory = dec.Memory } if dec.MemorySize != nil { s.MemorySize = *dec.MemorySize } if dec.Stack != nil { s.Stack = dec.Stack } if dec.ReturnData != nil { s.ReturnData = dec.ReturnData } if dec.Storage != nil { s.Storage = dec.Storage } if dec.Depth != nil { s.Depth = *dec.Depth } if dec.RefundCounter != nil { s.RefundCounter = *dec.RefundCounter } if dec.Err != nil { s.Err = dec.Err } return nil }