code: func (r Receipt) MarshalJSON() ([]byte, error) {
  	type Receipt struct {
  		PostState         hexutil.Bytes  `json:"root"`
  		Status            hexutil.Uint64 `json:"status"`
  		CumulativeGasUsed hexutil.Uint64 `json:"cumulativeGasUsed" gencodec:"required"`
  		Bloom             Bloom          `json:"logsBloom"         gencodec:"required"`
  		Logs              []*Log         `json:"logs"              gencodec:"required"`
  		TxHash            common.Hash    `json:"transactionHash" gencodec:"required"`
  		ContractAddress   common.Address `json:"contractAddress"`
  		GasUsed           hexutil.Uint64 `json:"gasUsed" gencodec:"required"`
  		BlockHash         common.Hash    `json:"blockHash,omitempty"`
  		BlockNumber       *hexutil.Big   `json:"blockNumber,omitempty"`
  		TransactionIndex  hexutil.Uint   `json:"transactionIndex"`
  	}
  	var enc Receipt
  	enc.PostState = r.PostState
  	enc.Status = hexutil.Uint64(r.Status)
  	enc.CumulativeGasUsed = hexutil.Uint64(r.CumulativeGasUsed)
  	enc.Bloom = r.Bloom
  	enc.Logs = r.Logs
  	enc.TxHash = r.TxHash
  	enc.ContractAddress = r.ContractAddress
  	enc.GasUsed = hexutil.Uint64(r.GasUsed)
  	enc.BlockHash = r.BlockHash
  	enc.BlockNumber = (*hexutil.Big)(r.BlockNumber)
  	enc.TransactionIndex = hexutil.Uint(r.TransactionIndex)
  	return json.Marshal(&enc)
  }
docs: // MarshalJSON marshals as JSON.