// Code generated by tinyjson for marshaling/unmarshaling. DO NOT EDIT.

package types

import (
	std "github.com/CosmWasm/cosmwasm-go/std"
	types "github.com/CosmWasm/cosmwasm-go/std/types"
	tinyjson "github.com/CosmWasm/tinyjson"
	jlexer "github.com/CosmWasm/tinyjson/jlexer"
	jwriter "github.com/CosmWasm/tinyjson/jwriter"
	custom "github.com/archway-network/voter/src/pkg/archway/custom"
	state "github.com/archway-network/voter/src/state"
)

// suppress unused package warning
var (
	_ *jlexer.Lexer
	_ *jwriter.Writer
	_ tinyjson.Marshaler
)

func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes(in *jlexer.Lexer, out *VoteTally) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "option":
			out.Option = string(in.String())
		case "total_yes":
			out.TotalYes = uint32(in.Uint32())
		case "total_no":
			out.TotalNo = uint32(in.Uint32())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes(out *jwriter.Writer, in VoteTally) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"option\":"
		out.RawString(prefix[1:])
		out.String(string(in.Option))
	}
	{
		const prefix string = ",\"total_yes\":"
		out.RawString(prefix)
		out.Uint32(uint32(in.TotalYes))
	}
	{
		const prefix string = ",\"total_no\":"
		out.RawString(prefix)
		out.Uint32(uint32(in.TotalNo))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v VoteTally) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v VoteTally) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *VoteTally) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *VoteTally) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes1(in *jlexer.Lexer, out *QueryWithdrawStatsResponse) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "count":
			out.Count = uint64(in.Uint64())
		case "total_amount":
			if in.IsNull() {
				in.Skip()
				out.TotalAmount = nil
			} else {
				in.Delim('[')
				if out.TotalAmount == nil {
					if !in.IsDelim(']') {
						out.TotalAmount = make([]types.Coin, 0, 2)
					} else {
						out.TotalAmount = []types.Coin{}
					}
				} else {
					out.TotalAmount = (out.TotalAmount)[:0]
				}
				for !in.IsDelim(']') {
					var v1 types.Coin
					(v1).UnmarshalTinyJSON(in)
					out.TotalAmount = append(out.TotalAmount, v1)
					in.WantComma()
				}
				in.Delim(']')
			}
		case "total_records_used":
			out.TotalRecordsUsed = uint64(in.Uint64())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes1(out *jwriter.Writer, in QueryWithdrawStatsResponse) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"count\":"
		out.RawString(prefix[1:])
		out.Uint64(uint64(in.Count))
	}
	{
		const prefix string = ",\"total_amount\":"
		out.RawString(prefix)
		if in.TotalAmount == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v2, v3 := range in.TotalAmount {
				if v2 > 0 {
					out.RawByte(',')
				}
				(v3).MarshalTinyJSON(out)
			}
			out.RawByte(']')
		}
	}
	{
		const prefix string = ",\"total_records_used\":"
		out.RawString(prefix)
		out.Uint64(uint64(in.TotalRecordsUsed))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v QueryWithdrawStatsResponse) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes1(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v QueryWithdrawStatsResponse) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes1(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *QueryWithdrawStatsResponse) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes1(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *QueryWithdrawStatsResponse) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes1(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes2(in *jlexer.Lexer, out *QueryVotingResponse) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "id":
			out.ID = uint64(in.Uint64())
		case "name":
			out.Name = string(in.String())
		case "creator_addr":
			out.CreatorAddr = string(in.String())
		case "start_time":
			out.StartTime = uint64(in.Uint64())
		case "end_time":
			out.EndTime = uint64(in.Uint64())
		case "tallies":
			if in.IsNull() {
				in.Skip()
				out.Tallies = nil
			} else {
				in.Delim('[')
				if out.Tallies == nil {
					if !in.IsDelim(']') {
						out.Tallies = make([]state.Tally, 0, 1)
					} else {
						out.Tallies = []state.Tally{}
					}
				} else {
					out.Tallies = (out.Tallies)[:0]
				}
				for !in.IsDelim(']') {
					var v4 state.Tally
					(v4).UnmarshalTinyJSON(in)
					out.Tallies = append(out.Tallies, v4)
					in.WantComma()
				}
				in.Delim(']')
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes2(out *jwriter.Writer, in QueryVotingResponse) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"id\":"
		out.RawString(prefix[1:])
		out.Uint64(uint64(in.ID))
	}
	{
		const prefix string = ",\"name\":"
		out.RawString(prefix)
		out.String(string(in.Name))
	}
	{
		const prefix string = ",\"creator_addr\":"
		out.RawString(prefix)
		out.String(string(in.CreatorAddr))
	}
	{
		const prefix string = ",\"start_time\":"
		out.RawString(prefix)
		out.Uint64(uint64(in.StartTime))
	}
	{
		const prefix string = ",\"end_time\":"
		out.RawString(prefix)
		out.Uint64(uint64(in.EndTime))
	}
	{
		const prefix string = ",\"tallies\":"
		out.RawString(prefix)
		if in.Tallies == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v5, v6 := range in.Tallies {
				if v5 > 0 {
					out.RawByte(',')
				}
				(v6).MarshalTinyJSON(out)
			}
			out.RawByte(']')
		}
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v QueryVotingResponse) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes2(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v QueryVotingResponse) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes2(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *QueryVotingResponse) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes2(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *QueryVotingResponse) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes2(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes3(in *jlexer.Lexer, out *QueryVotingRequest) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "id":
			out.ID = uint64(in.Uint64())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes3(out *jwriter.Writer, in QueryVotingRequest) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"id\":"
		out.RawString(prefix[1:])
		out.Uint64(uint64(in.ID))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v QueryVotingRequest) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes3(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v QueryVotingRequest) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes3(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *QueryVotingRequest) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes3(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *QueryVotingRequest) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes3(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes4(in *jlexer.Lexer, out *QueryTallyResponse) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "open":
			out.Open = bool(in.Bool())
		case "votes":
			if in.IsNull() {
				in.Skip()
				out.Votes = nil
			} else {
				in.Delim('[')
				if out.Votes == nil {
					if !in.IsDelim(']') {
						out.Votes = make([]VoteTally, 0, 2)
					} else {
						out.Votes = []VoteTally{}
					}
				} else {
					out.Votes = (out.Votes)[:0]
				}
				for !in.IsDelim(']') {
					var v7 VoteTally
					(v7).UnmarshalTinyJSON(in)
					out.Votes = append(out.Votes, v7)
					in.WantComma()
				}
				in.Delim(']')
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes4(out *jwriter.Writer, in QueryTallyResponse) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"open\":"
		out.RawString(prefix[1:])
		out.Bool(bool(in.Open))
	}
	{
		const prefix string = ",\"votes\":"
		out.RawString(prefix)
		if in.Votes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v8, v9 := range in.Votes {
				if v8 > 0 {
					out.RawByte(',')
				}
				(v9).MarshalTinyJSON(out)
			}
			out.RawByte(']')
		}
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v QueryTallyResponse) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes4(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v QueryTallyResponse) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes4(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *QueryTallyResponse) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes4(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *QueryTallyResponse) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes4(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes5(in *jlexer.Lexer, out *QueryTallyRequest) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "id":
			out.ID = uint64(in.Uint64())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes5(out *jwriter.Writer, in QueryTallyRequest) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"id\":"
		out.RawString(prefix[1:])
		out.Uint64(uint64(in.ID))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v QueryTallyRequest) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes5(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v QueryTallyRequest) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes5(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *QueryTallyRequest) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes5(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *QueryTallyRequest) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes5(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes6(in *jlexer.Lexer, out *QueryReleaseStatsResponse) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "count":
			out.Count = uint64(in.Uint64())
		case "total_amount":
			if in.IsNull() {
				in.Skip()
				out.TotalAmount = nil
			} else {
				in.Delim('[')
				if out.TotalAmount == nil {
					if !in.IsDelim(']') {
						out.TotalAmount = make([]types.Coin, 0, 2)
					} else {
						out.TotalAmount = []types.Coin{}
					}
				} else {
					out.TotalAmount = (out.TotalAmount)[:0]
				}
				for !in.IsDelim(']') {
					var v10 types.Coin
					(v10).UnmarshalTinyJSON(in)
					out.TotalAmount = append(out.TotalAmount, v10)
					in.WantComma()
				}
				in.Delim(']')
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes6(out *jwriter.Writer, in QueryReleaseStatsResponse) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"count\":"
		out.RawString(prefix[1:])
		out.Uint64(uint64(in.Count))
	}
	{
		const prefix string = ",\"total_amount\":"
		out.RawString(prefix)
		if in.TotalAmount == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v11, v12 := range in.TotalAmount {
				if v11 > 0 {
					out.RawByte(',')
				}
				(v12).MarshalTinyJSON(out)
			}
			out.RawByte(']')
		}
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v QueryReleaseStatsResponse) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes6(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v QueryReleaseStatsResponse) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes6(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *QueryReleaseStatsResponse) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes6(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *QueryReleaseStatsResponse) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes6(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes7(in *jlexer.Lexer, out *QueryParamsResponse) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "owner_addr":
			out.OwnerAddr = string(in.String())
		case "new_voting_cost":
			out.NewVotingCost = string(in.String())
		case "vote_cost":
			out.VoteCost = string(in.String())
		case "ibc_send_timeout":
			out.IBCSendTimeout = uint64(in.Uint64())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes7(out *jwriter.Writer, in QueryParamsResponse) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"owner_addr\":"
		out.RawString(prefix[1:])
		out.String(string(in.OwnerAddr))
	}
	{
		const prefix string = ",\"new_voting_cost\":"
		out.RawString(prefix)
		out.String(string(in.NewVotingCost))
	}
	{
		const prefix string = ",\"vote_cost\":"
		out.RawString(prefix)
		out.String(string(in.VoteCost))
	}
	{
		const prefix string = ",\"ibc_send_timeout\":"
		out.RawString(prefix)
		out.Uint64(uint64(in.IBCSendTimeout))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v QueryParamsResponse) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes7(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v QueryParamsResponse) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes7(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *QueryParamsResponse) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes7(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *QueryParamsResponse) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes7(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes8(in *jlexer.Lexer, out *QueryOpenResponse) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "ids":
			if in.IsNull() {
				in.Skip()
				out.Ids = nil
			} else {
				in.Delim('[')
				if out.Ids == nil {
					if !in.IsDelim(']') {
						out.Ids = make([]uint64, 0, 8)
					} else {
						out.Ids = []uint64{}
					}
				} else {
					out.Ids = (out.Ids)[:0]
				}
				for !in.IsDelim(']') {
					var v13 uint64
					v13 = uint64(in.Uint64())
					out.Ids = append(out.Ids, v13)
					in.WantComma()
				}
				in.Delim(']')
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes8(out *jwriter.Writer, in QueryOpenResponse) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"ids\":"
		out.RawString(prefix[1:])
		if in.Ids == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v14, v15 := range in.Ids {
				if v14 > 0 {
					out.RawByte(',')
				}
				out.Uint64(uint64(v15))
			}
			out.RawByte(']')
		}
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v QueryOpenResponse) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes8(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v QueryOpenResponse) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes8(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *QueryOpenResponse) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes8(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *QueryOpenResponse) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes8(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes9(in *jlexer.Lexer, out *QueryIBCStatsResponse) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "stats":
			if in.IsNull() {
				in.Skip()
				out.Stats = nil
			} else {
				in.Delim('[')
				if out.Stats == nil {
					if !in.IsDelim(']') {
						out.Stats = make([]state.IBCStats, 0, 1)
					} else {
						out.Stats = []state.IBCStats{}
					}
				} else {
					out.Stats = (out.Stats)[:0]
				}
				for !in.IsDelim(']') {
					var v16 state.IBCStats
					(v16).UnmarshalTinyJSON(in)
					out.Stats = append(out.Stats, v16)
					in.WantComma()
				}
				in.Delim(']')
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes9(out *jwriter.Writer, in QueryIBCStatsResponse) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"stats\":"
		out.RawString(prefix[1:])
		if in.Stats == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v17, v18 := range in.Stats {
				if v17 > 0 {
					out.RawByte(',')
				}
				(v18).MarshalTinyJSON(out)
			}
			out.RawByte(']')
		}
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v QueryIBCStatsResponse) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes9(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v QueryIBCStatsResponse) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes9(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *QueryIBCStatsResponse) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes9(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *QueryIBCStatsResponse) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes9(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes10(in *jlexer.Lexer, out *QueryIBCStatsRequest) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "from":
			out.From = string(in.String())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes10(out *jwriter.Writer, in QueryIBCStatsRequest) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"from\":"
		out.RawString(prefix[1:])
		out.String(string(in.From))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v QueryIBCStatsRequest) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes10(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v QueryIBCStatsRequest) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes10(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *QueryIBCStatsRequest) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes10(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *QueryIBCStatsRequest) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes10(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes11(in *jlexer.Lexer, out *QueryAPIVerifySecp256k1SignatureResponse) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "valid":
			out.Valid = bool(in.Bool())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes11(out *jwriter.Writer, in QueryAPIVerifySecp256k1SignatureResponse) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"valid\":"
		out.RawString(prefix[1:])
		out.Bool(bool(in.Valid))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v QueryAPIVerifySecp256k1SignatureResponse) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes11(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v QueryAPIVerifySecp256k1SignatureResponse) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes11(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *QueryAPIVerifySecp256k1SignatureResponse) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes11(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *QueryAPIVerifySecp256k1SignatureResponse) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes11(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes12(in *jlexer.Lexer, out *QueryAPIVerifySecp256k1SignatureRequest) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "hash":
			if in.IsNull() {
				in.Skip()
				out.Hash = nil
			} else {
				out.Hash = in.Bytes()
			}
		case "signature":
			if in.IsNull() {
				in.Skip()
				out.Signature = nil
			} else {
				out.Signature = in.Bytes()
			}
		case "pub_key":
			if in.IsNull() {
				in.Skip()
				out.PubKey = nil
			} else {
				out.PubKey = in.Bytes()
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes12(out *jwriter.Writer, in QueryAPIVerifySecp256k1SignatureRequest) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"hash\":"
		out.RawString(prefix[1:])
		out.Base64Bytes(in.Hash)
	}
	{
		const prefix string = ",\"signature\":"
		out.RawString(prefix)
		out.Base64Bytes(in.Signature)
	}
	{
		const prefix string = ",\"pub_key\":"
		out.RawString(prefix)
		out.Base64Bytes(in.PubKey)
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v QueryAPIVerifySecp256k1SignatureRequest) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes12(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v QueryAPIVerifySecp256k1SignatureRequest) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes12(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *QueryAPIVerifySecp256k1SignatureRequest) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes12(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *QueryAPIVerifySecp256k1SignatureRequest) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes12(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes13(in *jlexer.Lexer, out *QueryAPIVerifyEd25519SignaturesResponse) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "valid":
			out.Valid = bool(in.Bool())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes13(out *jwriter.Writer, in QueryAPIVerifyEd25519SignaturesResponse) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"valid\":"
		out.RawString(prefix[1:])
		out.Bool(bool(in.Valid))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v QueryAPIVerifyEd25519SignaturesResponse) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes13(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v QueryAPIVerifyEd25519SignaturesResponse) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes13(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *QueryAPIVerifyEd25519SignaturesResponse) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes13(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *QueryAPIVerifyEd25519SignaturesResponse) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes13(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes14(in *jlexer.Lexer, out *QueryAPIVerifyEd25519SignaturesRequest) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "messages":
			if in.IsNull() {
				in.Skip()
				out.Messages = nil
			} else {
				in.Delim('[')
				if out.Messages == nil {
					if !in.IsDelim(']') {
						out.Messages = make([][]uint8, 0, 2)
					} else {
						out.Messages = [][]uint8{}
					}
				} else {
					out.Messages = (out.Messages)[:0]
				}
				for !in.IsDelim(']') {
					var v28 []uint8
					if in.IsNull() {
						in.Skip()
						v28 = nil
					} else {
						v28 = in.Bytes()
					}
					out.Messages = append(out.Messages, v28)
					in.WantComma()
				}
				in.Delim(']')
			}
		case "signatures":
			if in.IsNull() {
				in.Skip()
				out.Signatures = nil
			} else {
				in.Delim('[')
				if out.Signatures == nil {
					if !in.IsDelim(']') {
						out.Signatures = make([][]uint8, 0, 2)
					} else {
						out.Signatures = [][]uint8{}
					}
				} else {
					out.Signatures = (out.Signatures)[:0]
				}
				for !in.IsDelim(']') {
					var v30 []uint8
					if in.IsNull() {
						in.Skip()
						v30 = nil
					} else {
						v30 = in.Bytes()
					}
					out.Signatures = append(out.Signatures, v30)
					in.WantComma()
				}
				in.Delim(']')
			}
		case "pub_keys":
			if in.IsNull() {
				in.Skip()
				out.PubKeys = nil
			} else {
				in.Delim('[')
				if out.PubKeys == nil {
					if !in.IsDelim(']') {
						out.PubKeys = make([][]uint8, 0, 2)
					} else {
						out.PubKeys = [][]uint8{}
					}
				} else {
					out.PubKeys = (out.PubKeys)[:0]
				}
				for !in.IsDelim(']') {
					var v32 []uint8
					if in.IsNull() {
						in.Skip()
						v32 = nil
					} else {
						v32 = in.Bytes()
					}
					out.PubKeys = append(out.PubKeys, v32)
					in.WantComma()
				}
				in.Delim(']')
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes14(out *jwriter.Writer, in QueryAPIVerifyEd25519SignaturesRequest) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"messages\":"
		out.RawString(prefix[1:])
		if in.Messages == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v34, v35 := range in.Messages {
				if v34 > 0 {
					out.RawByte(',')
				}
				out.Base64Bytes(v35)
			}
			out.RawByte(']')
		}
	}
	{
		const prefix string = ",\"signatures\":"
		out.RawString(prefix)
		if in.Signatures == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v38, v39 := range in.Signatures {
				if v38 > 0 {
					out.RawByte(',')
				}
				out.Base64Bytes(v39)
			}
			out.RawByte(']')
		}
	}
	{
		const prefix string = ",\"pub_keys\":"
		out.RawString(prefix)
		if in.PubKeys == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v42, v43 := range in.PubKeys {
				if v42 > 0 {
					out.RawByte(',')
				}
				out.Base64Bytes(v43)
			}
			out.RawByte(']')
		}
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v QueryAPIVerifyEd25519SignaturesRequest) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes14(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v QueryAPIVerifyEd25519SignaturesRequest) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes14(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *QueryAPIVerifyEd25519SignaturesRequest) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes14(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *QueryAPIVerifyEd25519SignaturesRequest) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes14(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes15(in *jlexer.Lexer, out *QueryAPIVerifyEd25519SignatureResponse) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "valid":
			out.Valid = bool(in.Bool())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes15(out *jwriter.Writer, in QueryAPIVerifyEd25519SignatureResponse) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"valid\":"
		out.RawString(prefix[1:])
		out.Bool(bool(in.Valid))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v QueryAPIVerifyEd25519SignatureResponse) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes15(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v QueryAPIVerifyEd25519SignatureResponse) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes15(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *QueryAPIVerifyEd25519SignatureResponse) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes15(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *QueryAPIVerifyEd25519SignatureResponse) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes15(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes16(in *jlexer.Lexer, out *QueryAPIVerifyEd25519SignatureRequest) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "message":
			if in.IsNull() {
				in.Skip()
				out.Message = nil
			} else {
				out.Message = in.Bytes()
			}
		case "signature":
			if in.IsNull() {
				in.Skip()
				out.Signature = nil
			} else {
				out.Signature = in.Bytes()
			}
		case "pub_key":
			if in.IsNull() {
				in.Skip()
				out.PubKey = nil
			} else {
				out.PubKey = in.Bytes()
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes16(out *jwriter.Writer, in QueryAPIVerifyEd25519SignatureRequest) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"message\":"
		out.RawString(prefix[1:])
		out.Base64Bytes(in.Message)
	}
	{
		const prefix string = ",\"signature\":"
		out.RawString(prefix)
		out.Base64Bytes(in.Signature)
	}
	{
		const prefix string = ",\"pub_key\":"
		out.RawString(prefix)
		out.Base64Bytes(in.PubKey)
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v QueryAPIVerifyEd25519SignatureRequest) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes16(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v QueryAPIVerifyEd25519SignatureRequest) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes16(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *QueryAPIVerifyEd25519SignatureRequest) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes16(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *QueryAPIVerifyEd25519SignatureRequest) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes16(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes17(in *jlexer.Lexer, out *QueryAPIRecoverSecp256k1PubKeyResponse) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "pub_key":
			if in.IsNull() {
				in.Skip()
				out.PubKey = nil
			} else {
				out.PubKey = in.Bytes()
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes17(out *jwriter.Writer, in QueryAPIRecoverSecp256k1PubKeyResponse) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"pub_key\":"
		out.RawString(prefix[1:])
		out.Base64Bytes(in.PubKey)
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v QueryAPIRecoverSecp256k1PubKeyResponse) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes17(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v QueryAPIRecoverSecp256k1PubKeyResponse) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes17(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *QueryAPIRecoverSecp256k1PubKeyResponse) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes17(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *QueryAPIRecoverSecp256k1PubKeyResponse) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes17(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes18(in *jlexer.Lexer, out *QueryAPIRecoverSecp256k1PubKeyRequest) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "hash":
			if in.IsNull() {
				in.Skip()
				out.Hash = nil
			} else {
				out.Hash = in.Bytes()
			}
		case "signature":
			if in.IsNull() {
				in.Skip()
				out.Signature = nil
			} else {
				out.Signature = in.Bytes()
			}
		case "recovery_param":
			out.RecoveryParam = std.Secp256k1RecoveryParam(in.Uint8())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes18(out *jwriter.Writer, in QueryAPIRecoverSecp256k1PubKeyRequest) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"hash\":"
		out.RawString(prefix[1:])
		out.Base64Bytes(in.Hash)
	}
	{
		const prefix string = ",\"signature\":"
		out.RawString(prefix)
		out.Base64Bytes(in.Signature)
	}
	{
		const prefix string = ",\"recovery_param\":"
		out.RawString(prefix)
		out.Uint8(uint8(in.RecoveryParam))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v QueryAPIRecoverSecp256k1PubKeyRequest) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes18(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v QueryAPIRecoverSecp256k1PubKeyRequest) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes18(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *QueryAPIRecoverSecp256k1PubKeyRequest) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes18(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *QueryAPIRecoverSecp256k1PubKeyRequest) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes18(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes19(in *jlexer.Lexer, out *MsgQuery) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "params":
			if in.IsNull() {
				in.Skip()
				out.Params = nil
			} else {
				if out.Params == nil {
					out.Params = new(struct{})
				}
				tinyjson8354aa0cDecode(in, out.Params)
			}
		case "voting":
			if in.IsNull() {
				in.Skip()
				out.Voting = nil
			} else {
				if out.Voting == nil {
					out.Voting = new(QueryVotingRequest)
				}
				(*out.Voting).UnmarshalTinyJSON(in)
			}
		case "tally":
			if in.IsNull() {
				in.Skip()
				out.Tally = nil
			} else {
				if out.Tally == nil {
					out.Tally = new(QueryTallyRequest)
				}
				(*out.Tally).UnmarshalTinyJSON(in)
			}
		case "open":
			if in.IsNull() {
				in.Skip()
				out.Open = nil
			} else {
				if out.Open == nil {
					out.Open = new(struct{})
				}
				tinyjson8354aa0cDecode(in, out.Open)
			}
		case "release_stats":
			if in.IsNull() {
				in.Skip()
				out.ReleaseStats = nil
			} else {
				if out.ReleaseStats == nil {
					out.ReleaseStats = new(struct{})
				}
				tinyjson8354aa0cDecode(in, out.ReleaseStats)
			}
		case "ibc_stats":
			if in.IsNull() {
				in.Skip()
				out.IBCStats = nil
			} else {
				if out.IBCStats == nil {
					out.IBCStats = new(QueryIBCStatsRequest)
				}
				(*out.IBCStats).UnmarshalTinyJSON(in)
			}
		case "withdraw_stats":
			if in.IsNull() {
				in.Skip()
				out.WithdrawStats = nil
			} else {
				if out.WithdrawStats == nil {
					out.WithdrawStats = new(struct{})
				}
				tinyjson8354aa0cDecode(in, out.WithdrawStats)
			}
		case "api_verify_secp256k1_signature":
			if in.IsNull() {
				in.Skip()
				out.APIVerifySecp256k1Signature = nil
			} else {
				if out.APIVerifySecp256k1Signature == nil {
					out.APIVerifySecp256k1Signature = new(QueryAPIVerifySecp256k1SignatureRequest)
				}
				(*out.APIVerifySecp256k1Signature).UnmarshalTinyJSON(in)
			}
		case "api_recover_secp256k1_pub_key":
			if in.IsNull() {
				in.Skip()
				out.APIRecoverSecp256k1PubKey = nil
			} else {
				if out.APIRecoverSecp256k1PubKey == nil {
					out.APIRecoverSecp256k1PubKey = new(QueryAPIRecoverSecp256k1PubKeyRequest)
				}
				(*out.APIRecoverSecp256k1PubKey).UnmarshalTinyJSON(in)
			}
		case "api_verify_ed25519_signature":
			if in.IsNull() {
				in.Skip()
				out.APIVerifyEd25519Signature = nil
			} else {
				if out.APIVerifyEd25519Signature == nil {
					out.APIVerifyEd25519Signature = new(QueryAPIVerifyEd25519SignatureRequest)
				}
				(*out.APIVerifyEd25519Signature).UnmarshalTinyJSON(in)
			}
		case "api_verify_ed25519_signatures":
			if in.IsNull() {
				in.Skip()
				out.APIVerifyEd25519Signatures = nil
			} else {
				if out.APIVerifyEd25519Signatures == nil {
					out.APIVerifyEd25519Signatures = new(QueryAPIVerifyEd25519SignaturesRequest)
				}
				(*out.APIVerifyEd25519Signatures).UnmarshalTinyJSON(in)
			}
		case "custom_custom":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.CustomCustom).UnmarshalJSON(data))
			}
		case "custom_metadata":
			if in.IsNull() {
				in.Skip()
				out.CustomMetadata = nil
			} else {
				if out.CustomMetadata == nil {
					out.CustomMetadata = new(CustomMetadataRequest)
				}
				(*out.CustomMetadata).UnmarshalTinyJSON(in)
			}
		case "custom_rewards_records":
			if in.IsNull() {
				in.Skip()
				out.CustomRewardsRecords = nil
			} else {
				if out.CustomRewardsRecords == nil {
					out.CustomRewardsRecords = new(CustomRewardsRecordsRequest)
				}
				(*out.CustomRewardsRecords).UnmarshalTinyJSON(in)
			}
		case "custom_gov_vote_request":
			if in.IsNull() {
				in.Skip()
				out.CustomGovVoteRequest = nil
			} else {
				if out.CustomGovVoteRequest == nil {
					out.CustomGovVoteRequest = new(CustomGovVoteRequest)
				}
				(*out.CustomGovVoteRequest).UnmarshalTinyJSON(in)
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes19(out *jwriter.Writer, in MsgQuery) {
	out.RawByte('{')
	first := true
	_ = first
	if in.Params != nil {
		const prefix string = ",\"params\":"
		first = false
		out.RawString(prefix[1:])
		tinyjson8354aa0cEncode(out, *in.Params)
	}
	if in.Voting != nil {
		const prefix string = ",\"voting\":"
		if first {
			first = false
			out.RawString(prefix[1:])
		} else {
			out.RawString(prefix)
		}
		(*in.Voting).MarshalTinyJSON(out)
	}
	if in.Tally != nil {
		const prefix string = ",\"tally\":"
		if first {
			first = false
			out.RawString(prefix[1:])
		} else {
			out.RawString(prefix)
		}
		(*in.Tally).MarshalTinyJSON(out)
	}
	if in.Open != nil {
		const prefix string = ",\"open\":"
		if first {
			first = false
			out.RawString(prefix[1:])
		} else {
			out.RawString(prefix)
		}
		tinyjson8354aa0cEncode(out, *in.Open)
	}
	if in.ReleaseStats != nil {
		const prefix string = ",\"release_stats\":"
		if first {
			first = false
			out.RawString(prefix[1:])
		} else {
			out.RawString(prefix)
		}
		tinyjson8354aa0cEncode(out, *in.ReleaseStats)
	}
	if in.IBCStats != nil {
		const prefix string = ",\"ibc_stats\":"
		if first {
			first = false
			out.RawString(prefix[1:])
		} else {
			out.RawString(prefix)
		}
		(*in.IBCStats).MarshalTinyJSON(out)
	}
	if in.WithdrawStats != nil {
		const prefix string = ",\"withdraw_stats\":"
		if first {
			first = false
			out.RawString(prefix[1:])
		} else {
			out.RawString(prefix)
		}
		tinyjson8354aa0cEncode(out, *in.WithdrawStats)
	}
	if in.APIVerifySecp256k1Signature != nil {
		const prefix string = ",\"api_verify_secp256k1_signature\":"
		if first {
			first = false
			out.RawString(prefix[1:])
		} else {
			out.RawString(prefix)
		}
		(*in.APIVerifySecp256k1Signature).MarshalTinyJSON(out)
	}
	if in.APIRecoverSecp256k1PubKey != nil {
		const prefix string = ",\"api_recover_secp256k1_pub_key\":"
		if first {
			first = false
			out.RawString(prefix[1:])
		} else {
			out.RawString(prefix)
		}
		(*in.APIRecoverSecp256k1PubKey).MarshalTinyJSON(out)
	}
	if in.APIVerifyEd25519Signature != nil {
		const prefix string = ",\"api_verify_ed25519_signature\":"
		if first {
			first = false
			out.RawString(prefix[1:])
		} else {
			out.RawString(prefix)
		}
		(*in.APIVerifyEd25519Signature).MarshalTinyJSON(out)
	}
	if in.APIVerifyEd25519Signatures != nil {
		const prefix string = ",\"api_verify_ed25519_signatures\":"
		if first {
			first = false
			out.RawString(prefix[1:])
		} else {
			out.RawString(prefix)
		}
		(*in.APIVerifyEd25519Signatures).MarshalTinyJSON(out)
	}
	{
		const prefix string = ",\"custom_custom\":"
		if first {
			first = false
			out.RawString(prefix[1:])
		} else {
			out.RawString(prefix)
		}
		out.Raw((in.CustomCustom).MarshalJSON())
	}
	if in.CustomMetadata != nil {
		const prefix string = ",\"custom_metadata\":"
		out.RawString(prefix)
		(*in.CustomMetadata).MarshalTinyJSON(out)
	}
	if in.CustomRewardsRecords != nil {
		const prefix string = ",\"custom_rewards_records\":"
		out.RawString(prefix)
		(*in.CustomRewardsRecords).MarshalTinyJSON(out)
	}
	if in.CustomGovVoteRequest != nil {
		const prefix string = ",\"custom_gov_vote_request\":"
		out.RawString(prefix)
		(*in.CustomGovVoteRequest).MarshalTinyJSON(out)
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v MsgQuery) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes19(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v MsgQuery) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes19(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *MsgQuery) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes19(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *MsgQuery) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes19(l, v)
}
func tinyjson8354aa0cDecode(in *jlexer.Lexer, out *struct{}) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncode(out *jwriter.Writer, in struct{}) {
	out.RawByte('{')
	first := true
	_ = first
	out.RawByte('}')
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes20(in *jlexer.Lexer, out *CustomRewardsRecordsResponse) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "records":
			if in.IsNull() {
				in.Skip()
				out.Records = nil
			} else {
				in.Delim('[')
				if out.Records == nil {
					if !in.IsDelim(']') {
						out.Records = make([]custom.RewardsRecord, 0, 0)
					} else {
						out.Records = []custom.RewardsRecord{}
					}
				} else {
					out.Records = (out.Records)[:0]
				}
				for !in.IsDelim(']') {
					var v64 custom.RewardsRecord
					(v64).UnmarshalTinyJSON(in)
					out.Records = append(out.Records, v64)
					in.WantComma()
				}
				in.Delim(']')
			}
		case "pagination":
			(out.Pagination).UnmarshalTinyJSON(in)
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes20(out *jwriter.Writer, in CustomRewardsRecordsResponse) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"records\":"
		out.RawString(prefix[1:])
		if in.Records == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v65, v66 := range in.Records {
				if v65 > 0 {
					out.RawByte(',')
				}
				(v66).MarshalTinyJSON(out)
			}
			out.RawByte(']')
		}
	}
	{
		const prefix string = ",\"pagination\":"
		out.RawString(prefix)
		(in.Pagination).MarshalTinyJSON(out)
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v CustomRewardsRecordsResponse) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes20(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v CustomRewardsRecordsResponse) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes20(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *CustomRewardsRecordsResponse) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes20(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *CustomRewardsRecordsResponse) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes20(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes21(in *jlexer.Lexer, out *CustomRewardsRecordsRequest) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "pagination":
			if in.IsNull() {
				in.Skip()
				out.Pagination = nil
			} else {
				if out.Pagination == nil {
					out.Pagination = new(custom.PageRequest)
				}
				(*out.Pagination).UnmarshalTinyJSON(in)
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes21(out *jwriter.Writer, in CustomRewardsRecordsRequest) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"pagination\":"
		out.RawString(prefix[1:])
		if in.Pagination == nil {
			out.RawString("null")
		} else {
			(*in.Pagination).MarshalTinyJSON(out)
		}
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v CustomRewardsRecordsRequest) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes21(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v CustomRewardsRecordsRequest) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes21(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *CustomRewardsRecordsRequest) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes21(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *CustomRewardsRecordsRequest) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes21(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes22(in *jlexer.Lexer, out *CustomMetadataResponse) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "owner_address":
			out.OwnerAddress = string(in.String())
		case "rewards_address":
			out.RewardsAddress = string(in.String())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes22(out *jwriter.Writer, in CustomMetadataResponse) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"owner_address\":"
		out.RawString(prefix[1:])
		out.String(string(in.OwnerAddress))
	}
	{
		const prefix string = ",\"rewards_address\":"
		out.RawString(prefix)
		out.String(string(in.RewardsAddress))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v CustomMetadataResponse) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes22(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v CustomMetadataResponse) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes22(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *CustomMetadataResponse) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes22(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *CustomMetadataResponse) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes22(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes23(in *jlexer.Lexer, out *CustomMetadataRequest) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "use_stargate_query":
			out.UseStargateQuery = bool(in.Bool())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes23(out *jwriter.Writer, in CustomMetadataRequest) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"use_stargate_query\":"
		out.RawString(prefix[1:])
		out.Bool(bool(in.UseStargateQuery))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v CustomMetadataRequest) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes23(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v CustomMetadataRequest) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes23(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *CustomMetadataRequest) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes23(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *CustomMetadataRequest) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes23(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes24(in *jlexer.Lexer, out *CustomGovVoteRequest) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "proposal_id":
			out.ProposalID = uint64(in.Uint64())
		case "voter":
			out.Voter = string(in.String())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes24(out *jwriter.Writer, in CustomGovVoteRequest) {
	out.RawByte('{')
	first := true
	_ = first
	if in.ProposalID != 0 {
		const prefix string = ",\"proposal_id\":"
		first = false
		out.RawString(prefix[1:])
		out.Uint64(uint64(in.ProposalID))
	}
	if in.Voter != "" {
		const prefix string = ",\"voter\":"
		if first {
			first = false
			out.RawString(prefix[1:])
		} else {
			out.RawString(prefix)
		}
		out.String(string(in.Voter))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v CustomGovVoteRequest) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes24(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v CustomGovVoteRequest) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes24(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *CustomGovVoteRequest) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes24(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *CustomGovVoteRequest) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes24(l, v)
}
func tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes25(in *jlexer.Lexer, out *CustomCustomResponse) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "response":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.Response).UnmarshalJSON(data))
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes25(out *jwriter.Writer, in CustomCustomResponse) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"response\":"
		out.RawString(prefix[1:])
		out.Raw((in.Response).MarshalJSON())
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v CustomCustomResponse) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes25(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalTinyJSON supports tinyjson.Marshaler interface
func (v CustomCustomResponse) MarshalTinyJSON(w *jwriter.Writer) {
	tinyjson8354aa0cEncodeGithubComArchwayNetworkVoterSrcTypes25(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *CustomCustomResponse) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes25(&r, v)
	return r.Error()
}

// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
func (v *CustomCustomResponse) UnmarshalTinyJSON(l *jlexer.Lexer) {
	tinyjson8354aa0cDecodeGithubComArchwayNetworkVoterSrcTypes25(l, v)
}
