func (t *transaction) UnmarshalJSON(input []byte) error {
	var transactionJSON transactionJSON
	var err error
	if err := json.Unmarshal(input, &transactionJSON); err != nil {
		return errors.Wrap(err, "invalid JSON")
	}
	if transactionJSON.GasPrice == "" {
		return errors.New("gas price missing")
	}
	t.GasPrice, err = strconv.ParseUint(strings.TrimPrefix(transactionJSON.GasPrice, "0x"), 16, 64)
	if err != nil {
		return errors.Wrap(err, "invalid format for gas price")
	}
	return nil
}
UnmarshalJSON implements json.Unmarshaler.
package getlogs
import (
	"encoding/json"
	"fmt"
	"strconv"
	"strings"
	"github.com/pkg/errors"
)
type transaction struct {
	GasPrice uint64
}
type transactionJSON struct {
	GasPrice string `json:"gasPrice"`
}