diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 32a2b49a4..101637324 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -344,9 +344,12 @@ func NewAppKeepers( appKeepers.StakingKeeper, appKeepers.DistrKeeper, &appKeepers.WasmKeeper, distrtypes.ModuleName, ) + appKeepers.TaxExemptionKeeper = taxexemptionkeeper.NewKeeper( appCodec, appKeepers.keys[taxexemptiontypes.StoreKey], appKeepers.GetSubspace(taxexemptiontypes.ModuleName), + appKeepers.AccountKeeper, + string(appKeepers.AccountKeeper.GetModuleAddress(govtypes.ModuleName)), ) wasmConfig, err := wasm.ReadWasmConfig(appOpts) diff --git a/app/keepers/routers.go b/app/keepers/routers.go index 5b51499d2..eb1edbf99 100644 --- a/app/keepers/routers.go +++ b/app/keepers/routers.go @@ -12,8 +12,6 @@ import ( ibcclienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" porttypes "github.com/cosmos/ibc-go/v6/modules/core/05-port/types" - "github.com/classic-terra/core/v2/x/taxexemption" - taxexemptiontypes "github.com/classic-terra/core/v2/x/taxexemption/types" "github.com/classic-terra/core/v2/x/treasury" treasurytypes "github.com/classic-terra/core/v2/x/treasury/types" distr "github.com/cosmos/cosmos-sdk/x/distribution" @@ -37,8 +35,7 @@ func (appKeepers *AppKeepers) newGovRouter() govv1beta1.Router { AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(appKeepers.UpgradeKeeper)). AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(appKeepers.IBCKeeper.ClientKeeper)). AddRoute(treasurytypes.RouterKey, treasury.NewProposalHandler(appKeepers.TreasuryKeeper)). - AddRoute(wasm.RouterKey, wasm.NewWasmProposalHandler(appKeepers.WasmKeeper, wasm.EnableAllProposals)). - AddRoute(taxexemptiontypes.RouterKey, taxexemption.NewProposalHandler(appKeepers.TaxExemptionKeeper)) + AddRoute(wasm.RouterKey, wasm.NewWasmProposalHandler(appKeepers.WasmKeeper, wasm.EnableAllProposals)) return govRouter } diff --git a/proto/terra/taxexemption/v1beta1/gov.proto b/proto/terra/taxexemption/v1beta1/gov.proto deleted file mode 100644 index cbc0a5bc2..000000000 --- a/proto/terra/taxexemption/v1beta1/gov.proto +++ /dev/null @@ -1,67 +0,0 @@ -syntax = "proto3"; -package terra.taxexemption.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/classic-terra/core/v2/x/taxexemption/types"; - -message AddTaxExemptionZoneProposal { - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - string title = 1; - string description = 2; - string zone = 3 [(gogoproto.moretags) = "yaml:\"zone\""]; - bool outgoing = 4 [(gogoproto.moretags) = "yaml:\"outgoing\""]; - bool incoming = 5 [(gogoproto.moretags) = "yaml:\"incoming\""]; - bool cross_zone = 6 [(gogoproto.moretags) = "yaml:\"cross_zone\""]; - repeated string addresses = 7 [(gogoproto.moretags) = "yaml:\"addresses\""]; -} - -message RemoveTaxExemptionZoneProposal { - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - string title = 1; - string description = 2; - string zone = 3 [(gogoproto.moretags) = "yaml:\"zone\""]; -} - -message ModifyTaxExemptionZoneProposal { - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - string title = 1; - string description = 2; - string zone = 3 [(gogoproto.moretags) = "yaml:\"zone\""]; - bool outgoing = 4 [(gogoproto.moretags) = "yaml:\"outgoing\""]; - bool incoming = 5 [(gogoproto.moretags) = "yaml:\"incoming\""]; - bool cross_zone = 6 [(gogoproto.moretags) = "yaml:\"cross_zone\""]; -} - -// proposal request structure for adding burn tax exemption address(es) -message AddTaxExemptionAddressProposal { - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - string title = 1; - string description = 2; - string zone = 3 [(gogoproto.moretags) = "yaml:\"zone\""]; - repeated string addresses = 4 [(gogoproto.moretags) = "yaml:\"addresses\""]; -} - -// proposal request structure for removing burn tax exemption address(es) -message RemoveTaxExemptionAddressProposal { - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - string title = 1; - string description = 2; - string zone = 3 [(gogoproto.moretags) = "yaml:\"zone\""]; - repeated string addresses = 4 [(gogoproto.moretags) = "yaml:\"addresses\""]; -} \ No newline at end of file diff --git a/proto/terra/taxexemption/v1beta1/taxexemption.proto b/proto/terra/taxexemption/v1beta1/taxexemption.proto index 150bfa9bc..7e74c6a77 100644 --- a/proto/terra/taxexemption/v1beta1/taxexemption.proto +++ b/proto/terra/taxexemption/v1beta1/taxexemption.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package terra.taxexemption.v1beta1; import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; option go_package = "github.com/classic-terra/core/v2/x/taxexemption/types"; @@ -14,4 +15,81 @@ message Zone { message ZoneList { repeated string zones = 1 [(gogoproto.moretags) = "yaml:\"zones\""]; -} \ No newline at end of file +} + +message ProposalMetadata { + string title = 1 [(gogoproto.moretags) = "yaml:\"title\""]; + string description = 2 [(gogoproto.moretags) = "yaml:\"description\""]; + string forum = 3 [(gogoproto.moretags) = "yaml:\"forum\""]; + string other = 4 [(gogoproto.moretags) = "yaml:\"other\""]; +} + +message AddTaxExemptionZoneProposal { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + string title = 1 [(gogoproto.moretags) = "yaml:\"title\""]; + string description = 2 [(gogoproto.moretags) = "yaml:\"description\""]; + string zone = 3 [(gogoproto.moretags) = "yaml:\"zone\""]; + bool outgoing = 4 [(gogoproto.moretags) = "yaml:\"outgoing\""]; + bool incoming = 5 [(gogoproto.moretags) = "yaml:\"incoming\""]; + bool cross_zone = 6 [(gogoproto.moretags) = "yaml:\"cross_zone\""]; + repeated string addresses = 7 [(gogoproto.moretags) = "yaml:\"addresses\""]; + string authority = 8 [(gogoproto.moretags) = "yaml:\"authority\""]; + +} + +message RemoveTaxExemptionZoneProposal { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + string title = 1 [(gogoproto.moretags) = "yaml:\"title\""]; + string description = 2 [(gogoproto.moretags) = "yaml:\"description\""]; + string zone = 3 [(gogoproto.moretags) = "yaml:\"zone\""]; + string authority = 4 [(gogoproto.moretags) = "yaml:\"authority\""]; + } + +message ModifyTaxExemptionZoneProposal { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + string title = 1 [(gogoproto.moretags) = "yaml:\"title\""]; + string description = 2 [(gogoproto.moretags) = "yaml:\"description\""]; + string zone = 3 [(gogoproto.moretags) = "yaml:\"zone\""]; + bool outgoing = 4 [(gogoproto.moretags) = "yaml:\"outgoing\""]; + bool incoming = 5 [(gogoproto.moretags) = "yaml:\"incoming\""]; + bool cross_zone = 6 [(gogoproto.moretags) = "yaml:\"cross_zone\""]; + string authority = 7 [(gogoproto.moretags) = "yaml:\"authority\""]; + } + + message AddTaxExemptionAddressProposal { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + string title = 1 [(gogoproto.moretags) = "yaml:\"title\""]; + string description = 2 [(gogoproto.moretags) = "yaml:\"description\""]; + string zone = 3 [(gogoproto.moretags) = "yaml:\"zone\""]; + repeated string addresses = 4 [(gogoproto.moretags) = "yaml:\"addresses\""]; + string authority = 5 [(gogoproto.moretags) = "yaml:\"authority\""]; + } + + message RemoveTaxExemptionAddressProposal { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + string title = 1 [(gogoproto.moretags) = "yaml:\"title\""]; + string description = 2 [(gogoproto.moretags) = "yaml:\"description\""]; + string zone = 3 [(gogoproto.moretags) = "yaml:\"zone\""]; + repeated string addresses = 4 [(gogoproto.moretags) = "yaml:\"addresses\""]; + string authority = 5 [(gogoproto.moretags) = "yaml:\"authority\""]; + } \ No newline at end of file diff --git a/proto/terra/taxexemption/v1beta1/tx.proto b/proto/terra/taxexemption/v1beta1/tx.proto new file mode 100644 index 000000000..f31983970 --- /dev/null +++ b/proto/terra/taxexemption/v1beta1/tx.proto @@ -0,0 +1,85 @@ +syntax = "proto3"; +package terra.taxexemption.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/classic-terra/core/v2/x/taxexemption/types"; + +// Msg defines the taxexemption Msg service. +service Msg { + rpc AddTaxExemptionZone(MsgAddTaxExemptionZone) returns (MsgAddTaxExemptionZoneResponse); + rpc RemoveTaxExemptionZone(MsgRemoveTaxExemptionZone) returns (MsgRemoveTaxExemptionZoneResponse); + rpc ModifyTaxExemptionZone(MsgModifyTaxExemptionZone) returns (MsgModifyTaxExemptionZoneResponse); + rpc AddTaxExemptionAddress(MsgAddTaxExemptionAddress) returns (MsgAddTaxExemptionAddressResponse); + rpc RemoveTaxExemptionAddress(MsgRemoveTaxExemptionAddress) returns (MsgRemoveTaxExemptionAddressResponse); +} + +// MsgAddTaxExemptionZone defines a message for adding a tax exemption zone. +message MsgAddTaxExemptionZone { + option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + string zone = 1 [(gogoproto.moretags) = "yaml:\"zone\""]; + bool outgoing = 2 [(gogoproto.moretags) = "yaml:\"outgoing\""]; + bool incoming = 3 [(gogoproto.moretags) = "yaml:\"incoming\""]; + bool cross_zone = 4 [(gogoproto.moretags) = "yaml:\"cross_zone\""]; + repeated string addresses = 5 [(gogoproto.moretags) = "yaml:\"addresses\""]; + string authority = 6 [(gogoproto.moretags) = "yaml:\"authority\""]; +} + +message MsgAddTaxExemptionZoneResponse {} + +// MsgRemoveTaxExemptionZone defines a message for removing a tax exemption zone. +message MsgRemoveTaxExemptionZone { + option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + string zone = 1 [(gogoproto.moretags) = "yaml:\"zone\""]; + string authority = 2 [(gogoproto.moretags) = "yaml:\"authority\""]; +} + +message MsgRemoveTaxExemptionZoneResponse {} + +// MsgModifyTaxExemptionZone defines a message for modifying a tax exemption zone. +message MsgModifyTaxExemptionZone { + option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + string zone = 1 [(gogoproto.moretags) = "yaml:\"zone\""]; + bool outgoing = 2 [(gogoproto.moretags) = "yaml:\"outgoing\""]; + bool incoming = 3 [(gogoproto.moretags) = "yaml:\"incoming\""]; + bool cross_zone = 4 [(gogoproto.moretags) = "yaml:\"cross_zone\""]; + string authority = 5 [(gogoproto.moretags) = "yaml:\"authority\""]; +} + +message MsgModifyTaxExemptionZoneResponse {} + +// MsgAddTaxExemptionAddress defines a message for adding tax exemption addresses. +message MsgAddTaxExemptionAddress { + option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + string zone = 1 [(gogoproto.moretags) = "yaml:\"zone\""]; + repeated string addresses = 2 [(gogoproto.moretags) = "yaml:\"addresses\""]; + string authority = 3 [(gogoproto.moretags) = "yaml:\"authority\""]; +} + +message MsgAddTaxExemptionAddressResponse {} + +// MsgRemoveTaxExemptionAddress defines a message for removing tax exemption addresses. +message MsgRemoveTaxExemptionAddress { + option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + string zone = 1 [(gogoproto.moretags) = "yaml:\"zone\""]; + repeated string addresses = 2 [(gogoproto.moretags) = "yaml:\"addresses\""]; + string authority = 3 [(gogoproto.moretags) = "yaml:\"authority\""]; +} + +message MsgRemoveTaxExemptionAddressResponse {} diff --git a/x/taxexemption/client/cli/gov_tx.go b/x/taxexemption/client/cli/gov_tx.go index 294b768e0..0eec1b3f5 100644 --- a/x/taxexemption/client/cli/gov_tx.go +++ b/x/taxexemption/client/cli/gov_tx.go @@ -1,6 +1,7 @@ package cli import ( + "encoding/json" "fmt" "strings" @@ -10,10 +11,12 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/gov/client/cli" - govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/spf13/cobra" ) +var govModuleAddr = "terra10d07y265gmmuvt4z0w9aw880jnsr700juxf95n" + func ProposalAddTaxExemptionZoneCmd() *cobra.Command { cmd := &cobra.Command{ Use: "add-tax-exemption-zone [zone] [addresses] [--exempt-incoming] [--exempt-outgoing] [--exempt-cross-zone] --title [text] --description [text]", @@ -64,25 +67,35 @@ $ %s tx gov submit-proposal add-tax-exemption-zone zonexyz terra1dczz24r33fwlj0q return err } - content := types.AddTaxExemptionZoneProposal{ + msg := types.MsgAddTaxExemptionZone{ + Authority: govModuleAddr, + Zone: zoneName, + Outgoing: exemptOutgoing, + Incoming: exemptIncoming, + CrossZone: exemptCrossZone, + Addresses: addresses, + } + + meta := types.ProposalMetadata{ Title: proposalTitle, Description: proposalDescr, - Zone: zoneName, - Outgoing: exemptOutgoing, - Incoming: exemptIncoming, - CrossZone: exemptCrossZone, - Addresses: addresses, + Forum: "", + Other: "", } - msg, err := govv1beta1.NewMsgSubmitProposal(&content, deposit, clientCtx.GetFromAddress()) + jsonMeta, err := json.Marshal(meta) if err != nil { return err } - if err = msg.ValidateBasic(); err != nil { + + sdkMsg := []sdk.Msg{&msg} + + submitMsg, err := govv1.NewMsgSubmitProposal(sdkMsg, deposit, clientCtx.GetFromAddress().String(), string(jsonMeta)) + if err != nil { return err } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), submitMsg) }, } @@ -131,21 +144,31 @@ $ %s tx gov submit-proposal remove-tax-exemption-zone zonexyz --title "remove ta return err } - content := types.RemoveTaxExemptionZoneProposal{ + msg := types.MsgRemoveTaxExemptionZone{ + Authority: govModuleAddr, + Zone: zoneName, + } + + meta := types.ProposalMetadata{ Title: proposalTitle, Description: proposalDescr, - Zone: zoneName, + Forum: "", + Other: "", } - msg, err := govv1beta1.NewMsgSubmitProposal(&content, deposit, clientCtx.GetFromAddress()) + jsonMeta, err := json.Marshal(meta) if err != nil { return err } - if err = msg.ValidateBasic(); err != nil { + + sdkMsg := []sdk.Msg{&msg} + + submitMsg, err := govv1.NewMsgSubmitProposal(sdkMsg, deposit, clientCtx.GetFromAddress().String(), string(jsonMeta)) + if err != nil { return err } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), submitMsg) }, } @@ -205,24 +228,34 @@ $ %s tx gov submit-proposal modify-tax-exemption-zone zonexyz --exempt-outgoing return err } - content := types.ModifyTaxExemptionZoneProposal{ + msg := types.MsgModifyTaxExemptionZone{ + Authority: govModuleAddr, + Zone: zoneName, + Outgoing: exemptOutgoing, + Incoming: exemptIncoming, + CrossZone: exemptCrossZone, + } + + meta := types.ProposalMetadata{ Title: proposalTitle, Description: proposalDescr, - Zone: zoneName, - Outgoing: exemptOutgoing, - Incoming: exemptIncoming, - CrossZone: exemptCrossZone, + Forum: "", + Other: "", } - msg, err := govv1beta1.NewMsgSubmitProposal(&content, deposit, clientCtx.GetFromAddress()) + jsonMeta, err := json.Marshal(meta) if err != nil { return err } - if err = msg.ValidateBasic(); err != nil { + + sdkMsg := []sdk.Msg{&msg} + + submitMsg, err := govv1.NewMsgSubmitProposal(sdkMsg, deposit, clientCtx.GetFromAddress().String(), string(jsonMeta)) + if err != nil { return err } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), submitMsg) }, } @@ -272,22 +305,32 @@ $ %s tx gov submit-proposal add-tax-exemption-address zonexyz terra1dczz24r33fwl return err } - content := types.AddTaxExemptionAddressProposal{ + msg := types.MsgAddTaxExemptionAddress{ + Authority: govModuleAddr, + Zone: zoneName, + Addresses: addresses, + } + + meta := types.ProposalMetadata{ Title: proposalTitle, Description: proposalDescr, - Zone: zoneName, - Addresses: addresses, + Forum: "", + Other: "", } - msg, err := govv1beta1.NewMsgSubmitProposal(&content, deposit, clientCtx.GetFromAddress()) + jsonMeta, err := json.Marshal(meta) if err != nil { return err } - if err = msg.ValidateBasic(); err != nil { + + sdkMsg := []sdk.Msg{&msg} + + submitMsg, err := govv1.NewMsgSubmitProposal(sdkMsg, deposit, clientCtx.GetFromAddress().String(), string(jsonMeta)) + if err != nil { return err } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), submitMsg) }, } @@ -333,22 +376,32 @@ $ %s tx gov submit-proposal remove-tax-exemption-address zonexyz terra1dczz24r33 return err } - content := types.RemoveTaxExemptionAddressProposal{ + msg := types.MsgRemoveTaxExemptionAddress{ + Authority: govModuleAddr, + Zone: zoneName, + Addresses: addresses, + } + + meta := types.ProposalMetadata{ Title: proposalTitle, Description: proposalDescr, - Zone: zoneName, - Addresses: addresses, + Forum: "", + Other: "", } - msg, err := govv1beta1.NewMsgSubmitProposal(&content, deposit, clientCtx.GetFromAddress()) + jsonMeta, err := json.Marshal(meta) if err != nil { return err } - if err = msg.ValidateBasic(); err != nil { + + sdkMsg := []sdk.Msg{&msg} + + submitMsg, err := govv1.NewMsgSubmitProposal(sdkMsg, deposit, clientCtx.GetFromAddress().String(), string(jsonMeta)) + if err != nil { return err } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), submitMsg) }, } diff --git a/x/taxexemption/handler.go b/x/taxexemption/handler.go new file mode 100644 index 000000000..f07f1ac73 --- /dev/null +++ b/x/taxexemption/handler.go @@ -0,0 +1,43 @@ +package taxexemption + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + "github.com/classic-terra/core/v2/x/taxexemption/keeper" + "github.com/classic-terra/core/v2/x/taxexemption/types" +) + +// NewHandler creates a new handler for all market type messages. +func NewHandler(k keeper.Keeper) sdk.Handler { + msgServer := keeper.NewMsgServerImpl(k) + + return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { + govModuleAddr := k.GetAuthority() + + if !msg.GetSigners()[0].Equals(govModuleAddr) { + return nil, sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "only governance can control exemption zones") + } + + ctx = ctx.WithEventManager(sdk.NewEventManager()) + switch msg := msg.(type) { + case *types.MsgAddTaxExemptionZone: + res, err := msgServer.AddTaxExemptionZone(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) + case *types.MsgRemoveTaxExemptionZone: + res, err := msgServer.RemoveTaxExemptionZone(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) + case *types.MsgModifyTaxExemptionZone: + res, err := msgServer.ModifyTaxExemptionZone(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) + case *types.MsgAddTaxExemptionAddress: + res, err := msgServer.AddTaxExemptionAddress(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) + case *types.MsgRemoveTaxExemptionAddress: + res, err := msgServer.RemoveTaxExemptionAddress(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) + default: + return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized taxexemption message type: %T", msg) + } + } +} diff --git a/x/taxexemption/keeper/gov.go b/x/taxexemption/keeper/gov.go deleted file mode 100644 index c54885879..000000000 --- a/x/taxexemption/keeper/gov.go +++ /dev/null @@ -1,54 +0,0 @@ -package keeper - -import ( - "github.com/classic-terra/core/v2/x/taxexemption/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func HandleAddTaxExemptionZoneProposal(ctx sdk.Context, k Keeper, p *types.AddTaxExemptionZoneProposal) error { - err := k.AddTaxExemptionZone(ctx, types.Zone{Name: p.Zone, Outgoing: p.Outgoing, Incoming: p.Incoming, CrossZone: p.CrossZone}) - if err != nil { - return err - } - - for _, address := range p.Addresses { - err := k.AddTaxExemptionAddress(ctx, p.Zone, address) - if err != nil { - return err - } - } - - return nil -} - -func HandleRemoveTaxExemptionZoneProposal(ctx sdk.Context, k Keeper, p *types.RemoveTaxExemptionZoneProposal) error { - return k.RemoveTaxExemptionZone(ctx, p.Zone) -} - -func HandleModifyTaxExemptionZoneProposal(ctx sdk.Context, k Keeper, p *types.ModifyTaxExemptionZoneProposal) error { - err := k.ModifyTaxExemptionZone(ctx, types.Zone{Name: p.Zone, Outgoing: p.Outgoing, Incoming: p.Incoming, CrossZone: p.CrossZone}) - - return err -} - -func HandleAddTaxExemptionAddressProposal(ctx sdk.Context, k Keeper, p *types.AddTaxExemptionAddressProposal) error { - for _, address := range p.Addresses { - err := k.AddTaxExemptionAddress(ctx, p.Zone, address) - if err != nil { - return err - } - } - - return nil -} - -func HandleRemoveTaxExemptionAddressProposal(ctx sdk.Context, k Keeper, p *types.RemoveTaxExemptionAddressProposal) error { - for _, address := range p.Addresses { - err := k.RemoveTaxExemptionAddress(ctx, p.Zone, address) - if err != nil { - return err - } - } - - return nil -} diff --git a/x/taxexemption/keeper/keeper.go b/x/taxexemption/keeper/keeper.go index 3b1c672e8..d7a3cb1f7 100644 --- a/x/taxexemption/keeper/keeper.go +++ b/x/taxexemption/keeper/keeper.go @@ -8,6 +8,7 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" + accountkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/tendermint/tendermint/libs/log" @@ -17,9 +18,11 @@ import ( // Keeper of the store type Keeper struct { - storeKey storetypes.StoreKey - cdc codec.BinaryCodec - paramSpace paramstypes.Subspace + storeKey storetypes.StoreKey + cdc codec.BinaryCodec + paramSpace paramstypes.Subspace + accountKeeper accountkeeper.AccountKeeper + authority string } // NewKeeper creates a new taxexemption Keeper instance @@ -27,12 +30,16 @@ func NewKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, paramSpace paramstypes.Subspace, + accountKeeper accountkeeper.AccountKeeper, + authority string, ) Keeper { // set KeyTable if it has not already been set return Keeper{ - cdc: cdc, - storeKey: storeKey, - paramSpace: paramSpace, + cdc: cdc, + storeKey: storeKey, + paramSpace: paramSpace, + accountKeeper: accountKeeper, + authority: authority, } } @@ -41,6 +48,10 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) } +func (k Keeper) GetAuthority() sdk.AccAddress { + return sdk.AccAddress(k.authority) +} + func (k Keeper) GetTaxExemptionZone(ctx sdk.Context, zoneName string) (types.Zone, error) { // Ensure the storeKey is properly set up in the Keeper store := prefix.NewStore(ctx.KVStore(k.storeKey), types.TaxExemptionZonePrefix) diff --git a/x/taxexemption/keeper/msg_server.go b/x/taxexemption/keeper/msg_server.go new file mode 100644 index 000000000..4760a5c52 --- /dev/null +++ b/x/taxexemption/keeper/msg_server.go @@ -0,0 +1,81 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/classic-terra/core/v2/x/taxexemption/types" +) + +type msgServer struct { + Keeper +} + +// NewMsgServerImpl returns an implementation of the market MsgServer interface +// for the provided Keeper. +func NewMsgServerImpl(keeper Keeper) types.MsgServer { + return &msgServer{Keeper: keeper} +} + +var _ types.MsgServer = msgServer{} + +func (k msgServer) AddTaxExemptionZone(goCtx context.Context, msg *types.MsgAddTaxExemptionZone) (*types.MsgAddTaxExemptionZoneResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + err := k.Keeper.AddTaxExemptionZone(ctx, types.Zone{Name: msg.Zone, Outgoing: msg.Outgoing, Incoming: msg.Incoming, CrossZone: msg.CrossZone}) + if err != nil { + return nil, err + } + + for _, address := range msg.Addresses { + err := k.Keeper.AddTaxExemptionAddress(ctx, msg.Zone, address) + if err != nil { + return nil, err + } + } + + return &types.MsgAddTaxExemptionZoneResponse{}, nil +} + +func (k msgServer) RemoveTaxExemptionZone(goCtx context.Context, msg *types.MsgRemoveTaxExemptionZone) (*types.MsgRemoveTaxExemptionZoneResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + err := k.Keeper.RemoveTaxExemptionZone(ctx, msg.Zone) + if err != nil { + return nil, err + } + + return &types.MsgRemoveTaxExemptionZoneResponse{}, nil +} + +func (k msgServer) ModifyTaxExemptionZone(goCtx context.Context, msg *types.MsgModifyTaxExemptionZone) (*types.MsgModifyTaxExemptionZoneResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + err := k.Keeper.ModifyTaxExemptionZone(ctx, types.Zone{Name: msg.Zone, Outgoing: msg.Outgoing, Incoming: msg.Incoming, CrossZone: msg.CrossZone}) + if err != nil { + return nil, err + } + + return &types.MsgModifyTaxExemptionZoneResponse{}, nil +} + +func (k msgServer) AddTaxExemptionAddress(goCtx context.Context, msg *types.MsgAddTaxExemptionAddress) (*types.MsgAddTaxExemptionAddressResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + for _, address := range msg.Addresses { + err := k.Keeper.AddTaxExemptionAddress(ctx, msg.Zone, address) + if err != nil { + return nil, err + } + } + return &types.MsgAddTaxExemptionAddressResponse{}, nil +} + +func (k msgServer) RemoveTaxExemptionAddress(goCtx context.Context, msg *types.MsgRemoveTaxExemptionAddress) (*types.MsgRemoveTaxExemptionAddressResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + for _, address := range msg.Addresses { + err := k.Keeper.RemoveTaxExemptionAddress(ctx, msg.Zone, address) + if err != nil { + return nil, err + } + } + + return &types.MsgRemoveTaxExemptionAddressResponse{}, nil +} diff --git a/x/taxexemption/keeper/test_utils.go b/x/taxexemption/keeper/test_utils.go index a350eb58e..cbbc1206f 100644 --- a/x/taxexemption/keeper/test_utils.go +++ b/x/taxexemption/keeper/test_utils.go @@ -4,6 +4,7 @@ import ( "testing" "time" + "github.com/CosmWasm/wasmd/x/wasm" "github.com/stretchr/testify/require" customauth "github.com/classic-terra/core/v2/custom/auth" @@ -15,6 +16,7 @@ import ( "github.com/classic-terra/core/v2/x/market" "github.com/classic-terra/core/v2/x/oracle" "github.com/classic-terra/core/v2/x/taxexemption/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/tendermint/tendermint/crypto" @@ -32,7 +34,9 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" "github.com/cosmos/cosmos-sdk/x/auth/tx" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" ) @@ -107,6 +111,7 @@ func CreateTestInput(t *testing.T) TestInput { keyTaxExemption := sdk.NewKVStoreKey(types.StoreKey) keyParams := sdk.NewKVStoreKey(paramstypes.StoreKey) tKeyParams := sdk.NewTransientStoreKey(paramstypes.TStoreKey) + aKeyParams := sdk.NewKVStoreKey(authtypes.StoreKey) db := dbm.NewMemDB() ms := store.NewCommitMultiStore(db) @@ -118,11 +123,22 @@ func CreateTestInput(t *testing.T) TestInput { require.NoError(t, ms.LoadLatestVersion()) + maccPerms := map[string][]string{ + authtypes.FeeCollectorName: nil, // just added to enable align fee + govtypes.ModuleName: {authtypes.Burner}, + wasm.ModuleName: {authtypes.Burner}, + } + paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, keyParams, tKeyParams) + accountKeeper := authkeeper.NewAccountKeeper(appCodec, aKeyParams, paramsKeeper.Subspace(authtypes.ModuleName), + authtypes.ProtoBaseAccount, + maccPerms, + sdk.GetConfig().GetBech32AccountAddrPrefix()) - taxexemptionKeeper := NewKeeper( - appCodec, + taxexemptionKeeper := NewKeeper(appCodec, keyTaxExemption, paramsKeeper.Subspace(types.ModuleName), + accountKeeper, + string(accountKeeper.GetModuleAddress(govtypes.ModuleName)), ) return TestInput{ctx, legacyAmino, taxexemptionKeeper} diff --git a/x/taxexemption/module.go b/x/taxexemption/module.go index 733379e1d..6c22e9b5a 100644 --- a/x/taxexemption/module.go +++ b/x/taxexemption/module.go @@ -32,6 +32,8 @@ type AppModuleBasic struct { cdc codec.Codec } +var _ module.AppModuleBasic = AppModuleBasic{} + // AppModule implements an application module for the taxexemption module. type AppModule struct { AppModuleBasic @@ -126,16 +128,12 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { // no msg server for this module querier := keeper.NewQuerier(am.keeper) types.RegisterQueryServer(cfg.QueryServer(), querier) -} - -// NewHandler returns an sdk.Handler for the taxexemption module. -func (am AppModule) NewHandler() sdk.Handler { - return nil + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) } // Route returns the message routing key for the taxexemption module. func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, nil) + return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) } // GenerateGenesisState creates a randomized GenState of the taxexemption module. diff --git a/x/taxexemption/proposal_handler.go b/x/taxexemption/proposal_handler.go deleted file mode 100644 index 339a33e88..000000000 --- a/x/taxexemption/proposal_handler.go +++ /dev/null @@ -1,48 +0,0 @@ -package taxexemption - -import ( - "github.com/classic-terra/core/v2/x/taxexemption/keeper" - "github.com/classic-terra/core/v2/x/taxexemption/types" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" -) - -func NewProposalHandler(k keeper.Keeper) govv1beta1.Handler { - return func(ctx sdk.Context, content govv1beta1.Content) error { - switch c := content.(type) { - case *types.AddTaxExemptionZoneProposal: - return handleAddTaxExemptionZoneProposal(ctx, k, c) - case *types.RemoveTaxExemptionZoneProposal: - return handleRemoveTaxExemptionZoneProposal(ctx, k, c) - case *types.ModifyTaxExemptionZoneProposal: - return handleModifyTaxExemptionZoneProposal(ctx, k, c) - case *types.AddTaxExemptionAddressProposal: - return handleAddTaxExemptionAddressProposal(ctx, k, c) - case *types.RemoveTaxExemptionAddressProposal: - return handleRemoveTaxExemptionAddressProposal(ctx, k, c) - default: - return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized treasury proposal content type: %T", c) - } - } -} - -func handleAddTaxExemptionZoneProposal(ctx sdk.Context, k keeper.Keeper, p *types.AddTaxExemptionZoneProposal) error { - return keeper.HandleAddTaxExemptionZoneProposal(ctx, k, p) -} - -func handleRemoveTaxExemptionZoneProposal(ctx sdk.Context, k keeper.Keeper, p *types.RemoveTaxExemptionZoneProposal) error { - return keeper.HandleRemoveTaxExemptionZoneProposal(ctx, k, p) -} - -func handleModifyTaxExemptionZoneProposal(ctx sdk.Context, k keeper.Keeper, p *types.ModifyTaxExemptionZoneProposal) error { - return keeper.HandleModifyTaxExemptionZoneProposal(ctx, k, p) -} - -func handleAddTaxExemptionAddressProposal(ctx sdk.Context, k keeper.Keeper, p *types.AddTaxExemptionAddressProposal) error { - return keeper.HandleAddTaxExemptionAddressProposal(ctx, k, p) -} - -func handleRemoveTaxExemptionAddressProposal(ctx sdk.Context, k keeper.Keeper, p *types.RemoveTaxExemptionAddressProposal) error { - return keeper.HandleRemoveTaxExemptionAddressProposal(ctx, k, p) -} diff --git a/x/taxexemption/types/codec.go b/x/taxexemption/types/codec.go index ecde40d98..f1ab4326f 100644 --- a/x/taxexemption/types/codec.go +++ b/x/taxexemption/types/codec.go @@ -4,22 +4,25 @@ import ( "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + + "github.com/cosmos/cosmos-sdk/codec/legacy" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" + authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) -// RegisterLegacyAminoCodec registers the account interfaces and concrete types on the -// provided LegacyAmino codec. These types are used for Amino JSON serialization -func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(&AddTaxExemptionZoneProposal{}, "taxexemption/AddTaxExemptionZoneProposal", nil) - cdc.RegisterConcrete(&RemoveTaxExemptionZoneProposal{}, "taxexemption/RemoveTaxExemptionZoneProposal", nil) - cdc.RegisterConcrete(&ModifyTaxExemptionZoneProposal{}, "taxexemption/ModifyTaxExemptionZoneProposal", nil) - cdc.RegisterConcrete(&AddTaxExemptionAddressProposal{}, "taxexemption/AddTaxExemptionAddressProposal", nil) - cdc.RegisterConcrete(&RemoveTaxExemptionAddressProposal{}, "taxexemption/RemoveTaxExemptionAddressProposal", nil) -} - -// RegisterInterfaces associates protoName with AccountI and VestingAccount -// Interfaces and creates a registry of it's concrete implementations +// RegisterInterfaces associates protoName with the new message types func RegisterInterfaces(registry codectypes.InterfaceRegistry) { + registry.RegisterImplementations( + (*sdk.Msg)(nil), + &MsgAddTaxExemptionZone{}, + &MsgRemoveTaxExemptionZone{}, + &MsgModifyTaxExemptionZone{}, + &MsgAddTaxExemptionAddress{}, + &MsgRemoveTaxExemptionAddress{}, + ) + registry.RegisterImplementations( (*govtypes.Content)(nil), &AddTaxExemptionZoneProposal{}, @@ -28,22 +31,30 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &AddTaxExemptionAddressProposal{}, &RemoveTaxExemptionAddressProposal{}, ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} + +// RegisterLegacyAminoCodec registers the concrete types on the Amino codec +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + legacy.RegisterAminoMsg(cdc, &MsgAddTaxExemptionZone{}, "taxexemption/AddTaxExemptionZone") + legacy.RegisterAminoMsg(cdc, &MsgRemoveTaxExemptionZone{}, "taxexemption/RemoveTaxExemptionZone") + legacy.RegisterAminoMsg(cdc, &MsgModifyTaxExemptionZone{}, "taxexemption/ModifyTaxExemptionZone") + legacy.RegisterAminoMsg(cdc, &MsgAddTaxExemptionAddress{}, "taxexemption/AddTaxExemptionAddress") + legacy.RegisterAminoMsg(cdc, &MsgRemoveTaxExemptionAddress{}, "taxexemption/RemoveTaxExemptionAddress") } var ( - amino = codec.NewLegacyAmino() - - // ModuleCdc references the global x/oracle module codec. Note, the codec should - // ONLY be used in certain instances of tests and for JSON encoding as Amino is - // still used for that purpose. - // - // The actual codec used for serialization should be provided to x/staking and - // defined at the application level. + amino = codec.NewLegacyAmino() ModuleCdc = codec.NewAminoCodec(amino) ) func init() { RegisterLegacyAminoCodec(amino) cryptocodec.RegisterCrypto(amino) - amino.Seal() + sdk.RegisterLegacyAminoCodec(amino) + + // Register all Amino interfaces and concrete types on the authz and gov Amino codec so that this can later be + // used to properly serialize MsgGrant, MsgExec and MsgSubmitProposal instances + RegisterLegacyAminoCodec(authzcodec.Amino) } diff --git a/x/taxexemption/types/gov.pb.go b/x/taxexemption/types/gov.pb.go deleted file mode 100644 index 4a221f908..000000000 --- a/x/taxexemption/types/gov.pb.go +++ /dev/null @@ -1,1957 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: terra/taxexemption/v1beta1/gov.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type AddTaxExemptionZoneProposal struct { - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Zone string `protobuf:"bytes,3,opt,name=zone,proto3" json:"zone,omitempty" yaml:"zone"` - Outgoing bool `protobuf:"varint,4,opt,name=outgoing,proto3" json:"outgoing,omitempty" yaml:"outgoing"` - Incoming bool `protobuf:"varint,5,opt,name=incoming,proto3" json:"incoming,omitempty" yaml:"incoming"` - CrossZone bool `protobuf:"varint,6,opt,name=cross_zone,json=crossZone,proto3" json:"cross_zone,omitempty" yaml:"cross_zone"` - Addresses []string `protobuf:"bytes,7,rep,name=addresses,proto3" json:"addresses,omitempty" yaml:"addresses"` -} - -func (m *AddTaxExemptionZoneProposal) Reset() { *m = AddTaxExemptionZoneProposal{} } -func (*AddTaxExemptionZoneProposal) ProtoMessage() {} -func (*AddTaxExemptionZoneProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_ecb087060fe78303, []int{0} -} -func (m *AddTaxExemptionZoneProposal) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AddTaxExemptionZoneProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AddTaxExemptionZoneProposal.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AddTaxExemptionZoneProposal) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddTaxExemptionZoneProposal.Merge(m, src) -} -func (m *AddTaxExemptionZoneProposal) XXX_Size() int { - return m.Size() -} -func (m *AddTaxExemptionZoneProposal) XXX_DiscardUnknown() { - xxx_messageInfo_AddTaxExemptionZoneProposal.DiscardUnknown(m) -} - -var xxx_messageInfo_AddTaxExemptionZoneProposal proto.InternalMessageInfo - -type RemoveTaxExemptionZoneProposal struct { - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Zone string `protobuf:"bytes,3,opt,name=zone,proto3" json:"zone,omitempty" yaml:"zone"` -} - -func (m *RemoveTaxExemptionZoneProposal) Reset() { *m = RemoveTaxExemptionZoneProposal{} } -func (*RemoveTaxExemptionZoneProposal) ProtoMessage() {} -func (*RemoveTaxExemptionZoneProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_ecb087060fe78303, []int{1} -} -func (m *RemoveTaxExemptionZoneProposal) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RemoveTaxExemptionZoneProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RemoveTaxExemptionZoneProposal.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RemoveTaxExemptionZoneProposal) XXX_Merge(src proto.Message) { - xxx_messageInfo_RemoveTaxExemptionZoneProposal.Merge(m, src) -} -func (m *RemoveTaxExemptionZoneProposal) XXX_Size() int { - return m.Size() -} -func (m *RemoveTaxExemptionZoneProposal) XXX_DiscardUnknown() { - xxx_messageInfo_RemoveTaxExemptionZoneProposal.DiscardUnknown(m) -} - -var xxx_messageInfo_RemoveTaxExemptionZoneProposal proto.InternalMessageInfo - -type ModifyTaxExemptionZoneProposal struct { - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Zone string `protobuf:"bytes,3,opt,name=zone,proto3" json:"zone,omitempty" yaml:"zone"` - Outgoing bool `protobuf:"varint,4,opt,name=outgoing,proto3" json:"outgoing,omitempty" yaml:"outgoing"` - Incoming bool `protobuf:"varint,5,opt,name=incoming,proto3" json:"incoming,omitempty" yaml:"incoming"` - CrossZone bool `protobuf:"varint,6,opt,name=cross_zone,json=crossZone,proto3" json:"cross_zone,omitempty" yaml:"cross_zone"` -} - -func (m *ModifyTaxExemptionZoneProposal) Reset() { *m = ModifyTaxExemptionZoneProposal{} } -func (*ModifyTaxExemptionZoneProposal) ProtoMessage() {} -func (*ModifyTaxExemptionZoneProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_ecb087060fe78303, []int{2} -} -func (m *ModifyTaxExemptionZoneProposal) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ModifyTaxExemptionZoneProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ModifyTaxExemptionZoneProposal.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ModifyTaxExemptionZoneProposal) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyTaxExemptionZoneProposal.Merge(m, src) -} -func (m *ModifyTaxExemptionZoneProposal) XXX_Size() int { - return m.Size() -} -func (m *ModifyTaxExemptionZoneProposal) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyTaxExemptionZoneProposal.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyTaxExemptionZoneProposal proto.InternalMessageInfo - -// proposal request structure for adding burn tax exemption address(es) -type AddTaxExemptionAddressProposal struct { - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Zone string `protobuf:"bytes,3,opt,name=zone,proto3" json:"zone,omitempty" yaml:"zone"` - Addresses []string `protobuf:"bytes,4,rep,name=addresses,proto3" json:"addresses,omitempty" yaml:"addresses"` -} - -func (m *AddTaxExemptionAddressProposal) Reset() { *m = AddTaxExemptionAddressProposal{} } -func (*AddTaxExemptionAddressProposal) ProtoMessage() {} -func (*AddTaxExemptionAddressProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_ecb087060fe78303, []int{3} -} -func (m *AddTaxExemptionAddressProposal) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AddTaxExemptionAddressProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AddTaxExemptionAddressProposal.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AddTaxExemptionAddressProposal) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddTaxExemptionAddressProposal.Merge(m, src) -} -func (m *AddTaxExemptionAddressProposal) XXX_Size() int { - return m.Size() -} -func (m *AddTaxExemptionAddressProposal) XXX_DiscardUnknown() { - xxx_messageInfo_AddTaxExemptionAddressProposal.DiscardUnknown(m) -} - -var xxx_messageInfo_AddTaxExemptionAddressProposal proto.InternalMessageInfo - -// proposal request structure for removing burn tax exemption address(es) -type RemoveTaxExemptionAddressProposal struct { - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Zone string `protobuf:"bytes,3,opt,name=zone,proto3" json:"zone,omitempty" yaml:"zone"` - Addresses []string `protobuf:"bytes,4,rep,name=addresses,proto3" json:"addresses,omitempty" yaml:"addresses"` -} - -func (m *RemoveTaxExemptionAddressProposal) Reset() { *m = RemoveTaxExemptionAddressProposal{} } -func (*RemoveTaxExemptionAddressProposal) ProtoMessage() {} -func (*RemoveTaxExemptionAddressProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_ecb087060fe78303, []int{4} -} -func (m *RemoveTaxExemptionAddressProposal) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RemoveTaxExemptionAddressProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RemoveTaxExemptionAddressProposal.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RemoveTaxExemptionAddressProposal) XXX_Merge(src proto.Message) { - xxx_messageInfo_RemoveTaxExemptionAddressProposal.Merge(m, src) -} -func (m *RemoveTaxExemptionAddressProposal) XXX_Size() int { - return m.Size() -} -func (m *RemoveTaxExemptionAddressProposal) XXX_DiscardUnknown() { - xxx_messageInfo_RemoveTaxExemptionAddressProposal.DiscardUnknown(m) -} - -var xxx_messageInfo_RemoveTaxExemptionAddressProposal proto.InternalMessageInfo - -func init() { - proto.RegisterType((*AddTaxExemptionZoneProposal)(nil), "terra.taxexemption.v1beta1.AddTaxExemptionZoneProposal") - proto.RegisterType((*RemoveTaxExemptionZoneProposal)(nil), "terra.taxexemption.v1beta1.RemoveTaxExemptionZoneProposal") - proto.RegisterType((*ModifyTaxExemptionZoneProposal)(nil), "terra.taxexemption.v1beta1.ModifyTaxExemptionZoneProposal") - proto.RegisterType((*AddTaxExemptionAddressProposal)(nil), "terra.taxexemption.v1beta1.AddTaxExemptionAddressProposal") - proto.RegisterType((*RemoveTaxExemptionAddressProposal)(nil), "terra.taxexemption.v1beta1.RemoveTaxExemptionAddressProposal") -} - -func init() { - proto.RegisterFile("terra/taxexemption/v1beta1/gov.proto", fileDescriptor_ecb087060fe78303) -} - -var fileDescriptor_ecb087060fe78303 = []byte{ - // 441 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x94, 0x3f, 0x6f, 0xd3, 0x40, - 0x18, 0xc6, 0x7d, 0x69, 0x5a, 0x9a, 0x2b, 0x52, 0xc1, 0x04, 0xc9, 0x2a, 0xd2, 0x39, 0x1c, 0x0c, - 0x59, 0xc8, 0xa9, 0x05, 0x96, 0x6e, 0x8d, 0xc4, 0x88, 0x40, 0x16, 0x53, 0x17, 0x74, 0xb1, 0x0f, - 0x73, 0x52, 0xec, 0xd7, 0xba, 0xbb, 0x5a, 0x0e, 0x9f, 0x00, 0x89, 0x85, 0x91, 0x31, 0x12, 0x1f, - 0x04, 0x89, 0x89, 0xb1, 0x03, 0x03, 0x93, 0x85, 0x92, 0x85, 0xd9, 0x9f, 0x00, 0xf9, 0x4c, 0xd2, - 0xd4, 0x6c, 0x0c, 0x20, 0xa4, 0x6e, 0xbe, 0xf7, 0x79, 0x7e, 0xd2, 0xfb, 0xcf, 0x2f, 0xbe, 0x6f, - 0x84, 0x52, 0x9c, 0x19, 0x5e, 0x88, 0x42, 0x24, 0x99, 0x91, 0x90, 0xb2, 0xfc, 0x70, 0x22, 0x0c, - 0x3f, 0x64, 0x31, 0xe4, 0xa3, 0x4c, 0x81, 0x01, 0xf7, 0xc0, 0xba, 0x46, 0x9b, 0xae, 0xd1, 0x2f, - 0xd7, 0x41, 0x3f, 0x86, 0x18, 0xac, 0x8d, 0xd5, 0x5f, 0x0d, 0x41, 0xbf, 0x76, 0xf0, 0x9d, 0x93, - 0x28, 0x7a, 0xc1, 0x8b, 0x27, 0x2b, 0xe2, 0x14, 0x52, 0xf1, 0x5c, 0x41, 0x06, 0x9a, 0x4f, 0xdd, - 0x3e, 0xde, 0x36, 0xd2, 0x4c, 0x85, 0x87, 0x06, 0x68, 0xd8, 0x0b, 0x9a, 0x87, 0x3b, 0xc0, 0x7b, - 0x91, 0xd0, 0xa1, 0x92, 0x16, 0xf0, 0x3a, 0x56, 0xdb, 0x0c, 0xb9, 0xf7, 0x70, 0xf7, 0x0d, 0xa4, - 0xc2, 0xdb, 0xaa, 0xa5, 0xf1, 0x7e, 0x55, 0xfa, 0x7b, 0x33, 0x9e, 0x4c, 0x8f, 0x69, 0x1d, 0xa5, - 0x81, 0x15, 0x5d, 0x86, 0x77, 0xe1, 0xcc, 0xc4, 0x20, 0xd3, 0xd8, 0xeb, 0x0e, 0xd0, 0x70, 0x77, - 0x7c, 0xab, 0x2a, 0xfd, 0xfd, 0xc6, 0xb8, 0x52, 0x68, 0xb0, 0x36, 0xd5, 0x80, 0x4c, 0x43, 0x48, - 0x6a, 0x60, 0xbb, 0x0d, 0xac, 0x14, 0x1a, 0xac, 0x4d, 0xee, 0x23, 0x8c, 0x43, 0x05, 0x5a, 0xbf, - 0xb4, 0xc9, 0xec, 0x58, 0xe4, 0x76, 0x55, 0xfa, 0x37, 0x1b, 0xe4, 0x42, 0xa3, 0x41, 0xcf, 0x3e, - 0xea, 0xe2, 0xdd, 0x23, 0xdc, 0xe3, 0x51, 0xa4, 0x84, 0xd6, 0x42, 0x7b, 0xd7, 0x06, 0x5b, 0xc3, - 0xde, 0xb8, 0x5f, 0x95, 0xfe, 0x8d, 0x06, 0x5a, 0x4b, 0x34, 0xb8, 0xb0, 0x1d, 0x5f, 0x7f, 0x3b, - 0xf7, 0x9d, 0x0f, 0x73, 0xdf, 0xf9, 0x31, 0xf7, 0x11, 0x7d, 0x87, 0x30, 0x09, 0x44, 0x02, 0xb9, - 0xf8, 0x27, 0x9d, 0x6d, 0x65, 0xf3, 0xb1, 0x83, 0xc9, 0x53, 0x88, 0xe4, 0xab, 0xd9, 0xd5, 0x9c, - 0x37, 0xe6, 0xdc, 0xea, 0xd2, 0x27, 0x84, 0x49, 0xeb, 0x57, 0x38, 0x69, 0xc6, 0xfb, 0x77, 0xba, - 0x74, 0x69, 0xeb, 0xba, 0x7f, 0xb2, 0x75, 0x9f, 0x11, 0xbe, 0xfb, 0xfb, 0xd6, 0xfd, 0x5f, 0x45, - 0x8c, 0x9f, 0x7d, 0x59, 0x10, 0x74, 0xbe, 0x20, 0xe8, 0xfb, 0x82, 0xa0, 0xf7, 0x4b, 0xe2, 0x9c, - 0x2f, 0x89, 0xf3, 0x6d, 0x49, 0x9c, 0xd3, 0xc7, 0xb1, 0x34, 0xaf, 0xcf, 0x26, 0xa3, 0x10, 0x12, - 0x16, 0x4e, 0xb9, 0xd6, 0x32, 0x7c, 0xd0, 0x9c, 0xc5, 0x10, 0x94, 0x60, 0xf9, 0x11, 0x2b, 0x2e, - 0x1f, 0x48, 0x33, 0xcb, 0x84, 0x9e, 0xec, 0xd8, 0x4b, 0xf7, 0xf0, 0x67, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x2e, 0xb0, 0xa8, 0x33, 0x43, 0x05, 0x00, 0x00, -} - -func (this *AddTaxExemptionZoneProposal) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*AddTaxExemptionZoneProposal) - if !ok { - that2, ok := that.(AddTaxExemptionZoneProposal) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Title != that1.Title { - return false - } - if this.Description != that1.Description { - return false - } - if this.Zone != that1.Zone { - return false - } - if this.Outgoing != that1.Outgoing { - return false - } - if this.Incoming != that1.Incoming { - return false - } - if this.CrossZone != that1.CrossZone { - return false - } - if len(this.Addresses) != len(that1.Addresses) { - return false - } - for i := range this.Addresses { - if this.Addresses[i] != that1.Addresses[i] { - return false - } - } - return true -} -func (this *RemoveTaxExemptionZoneProposal) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RemoveTaxExemptionZoneProposal) - if !ok { - that2, ok := that.(RemoveTaxExemptionZoneProposal) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Title != that1.Title { - return false - } - if this.Description != that1.Description { - return false - } - if this.Zone != that1.Zone { - return false - } - return true -} -func (this *ModifyTaxExemptionZoneProposal) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ModifyTaxExemptionZoneProposal) - if !ok { - that2, ok := that.(ModifyTaxExemptionZoneProposal) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Title != that1.Title { - return false - } - if this.Description != that1.Description { - return false - } - if this.Zone != that1.Zone { - return false - } - if this.Outgoing != that1.Outgoing { - return false - } - if this.Incoming != that1.Incoming { - return false - } - if this.CrossZone != that1.CrossZone { - return false - } - return true -} -func (this *AddTaxExemptionAddressProposal) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*AddTaxExemptionAddressProposal) - if !ok { - that2, ok := that.(AddTaxExemptionAddressProposal) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Title != that1.Title { - return false - } - if this.Description != that1.Description { - return false - } - if this.Zone != that1.Zone { - return false - } - if len(this.Addresses) != len(that1.Addresses) { - return false - } - for i := range this.Addresses { - if this.Addresses[i] != that1.Addresses[i] { - return false - } - } - return true -} -func (this *RemoveTaxExemptionAddressProposal) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RemoveTaxExemptionAddressProposal) - if !ok { - that2, ok := that.(RemoveTaxExemptionAddressProposal) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Title != that1.Title { - return false - } - if this.Description != that1.Description { - return false - } - if this.Zone != that1.Zone { - return false - } - if len(this.Addresses) != len(that1.Addresses) { - return false - } - for i := range this.Addresses { - if this.Addresses[i] != that1.Addresses[i] { - return false - } - } - return true -} -func (m *AddTaxExemptionZoneProposal) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AddTaxExemptionZoneProposal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AddTaxExemptionZoneProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Addresses) > 0 { - for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Addresses[iNdEx]) - copy(dAtA[i:], m.Addresses[iNdEx]) - i = encodeVarintGov(dAtA, i, uint64(len(m.Addresses[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if m.CrossZone { - i-- - if m.CrossZone { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if m.Incoming { - i-- - if m.Incoming { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.Outgoing { - i-- - if m.Outgoing { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.Zone) > 0 { - i -= len(m.Zone) - copy(dAtA[i:], m.Zone) - i = encodeVarintGov(dAtA, i, uint64(len(m.Zone))) - i-- - dAtA[i] = 0x1a - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintGov(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if len(m.Title) > 0 { - i -= len(m.Title) - copy(dAtA[i:], m.Title) - i = encodeVarintGov(dAtA, i, uint64(len(m.Title))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RemoveTaxExemptionZoneProposal) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RemoveTaxExemptionZoneProposal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RemoveTaxExemptionZoneProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Zone) > 0 { - i -= len(m.Zone) - copy(dAtA[i:], m.Zone) - i = encodeVarintGov(dAtA, i, uint64(len(m.Zone))) - i-- - dAtA[i] = 0x1a - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintGov(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if len(m.Title) > 0 { - i -= len(m.Title) - copy(dAtA[i:], m.Title) - i = encodeVarintGov(dAtA, i, uint64(len(m.Title))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ModifyTaxExemptionZoneProposal) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ModifyTaxExemptionZoneProposal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ModifyTaxExemptionZoneProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CrossZone { - i-- - if m.CrossZone { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if m.Incoming { - i-- - if m.Incoming { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.Outgoing { - i-- - if m.Outgoing { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.Zone) > 0 { - i -= len(m.Zone) - copy(dAtA[i:], m.Zone) - i = encodeVarintGov(dAtA, i, uint64(len(m.Zone))) - i-- - dAtA[i] = 0x1a - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintGov(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if len(m.Title) > 0 { - i -= len(m.Title) - copy(dAtA[i:], m.Title) - i = encodeVarintGov(dAtA, i, uint64(len(m.Title))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AddTaxExemptionAddressProposal) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AddTaxExemptionAddressProposal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AddTaxExemptionAddressProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Addresses) > 0 { - for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Addresses[iNdEx]) - copy(dAtA[i:], m.Addresses[iNdEx]) - i = encodeVarintGov(dAtA, i, uint64(len(m.Addresses[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Zone) > 0 { - i -= len(m.Zone) - copy(dAtA[i:], m.Zone) - i = encodeVarintGov(dAtA, i, uint64(len(m.Zone))) - i-- - dAtA[i] = 0x1a - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintGov(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if len(m.Title) > 0 { - i -= len(m.Title) - copy(dAtA[i:], m.Title) - i = encodeVarintGov(dAtA, i, uint64(len(m.Title))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RemoveTaxExemptionAddressProposal) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RemoveTaxExemptionAddressProposal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RemoveTaxExemptionAddressProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Addresses) > 0 { - for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Addresses[iNdEx]) - copy(dAtA[i:], m.Addresses[iNdEx]) - i = encodeVarintGov(dAtA, i, uint64(len(m.Addresses[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Zone) > 0 { - i -= len(m.Zone) - copy(dAtA[i:], m.Zone) - i = encodeVarintGov(dAtA, i, uint64(len(m.Zone))) - i-- - dAtA[i] = 0x1a - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintGov(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if len(m.Title) > 0 { - i -= len(m.Title) - copy(dAtA[i:], m.Title) - i = encodeVarintGov(dAtA, i, uint64(len(m.Title))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintGov(dAtA []byte, offset int, v uint64) int { - offset -= sovGov(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *AddTaxExemptionZoneProposal) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Title) - if l > 0 { - n += 1 + l + sovGov(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovGov(uint64(l)) - } - l = len(m.Zone) - if l > 0 { - n += 1 + l + sovGov(uint64(l)) - } - if m.Outgoing { - n += 2 - } - if m.Incoming { - n += 2 - } - if m.CrossZone { - n += 2 - } - if len(m.Addresses) > 0 { - for _, s := range m.Addresses { - l = len(s) - n += 1 + l + sovGov(uint64(l)) - } - } - return n -} - -func (m *RemoveTaxExemptionZoneProposal) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Title) - if l > 0 { - n += 1 + l + sovGov(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovGov(uint64(l)) - } - l = len(m.Zone) - if l > 0 { - n += 1 + l + sovGov(uint64(l)) - } - return n -} - -func (m *ModifyTaxExemptionZoneProposal) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Title) - if l > 0 { - n += 1 + l + sovGov(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovGov(uint64(l)) - } - l = len(m.Zone) - if l > 0 { - n += 1 + l + sovGov(uint64(l)) - } - if m.Outgoing { - n += 2 - } - if m.Incoming { - n += 2 - } - if m.CrossZone { - n += 2 - } - return n -} - -func (m *AddTaxExemptionAddressProposal) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Title) - if l > 0 { - n += 1 + l + sovGov(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovGov(uint64(l)) - } - l = len(m.Zone) - if l > 0 { - n += 1 + l + sovGov(uint64(l)) - } - if len(m.Addresses) > 0 { - for _, s := range m.Addresses { - l = len(s) - n += 1 + l + sovGov(uint64(l)) - } - } - return n -} - -func (m *RemoveTaxExemptionAddressProposal) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Title) - if l > 0 { - n += 1 + l + sovGov(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovGov(uint64(l)) - } - l = len(m.Zone) - if l > 0 { - n += 1 + l + sovGov(uint64(l)) - } - if len(m.Addresses) > 0 { - for _, s := range m.Addresses { - l = len(s) - n += 1 + l + sovGov(uint64(l)) - } - } - return n -} - -func sovGov(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGov(x uint64) (n int) { - return sovGov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *AddTaxExemptionZoneProposal) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AddTaxExemptionZoneProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AddTaxExemptionZoneProposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGov - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGov - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Title = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGov - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGov - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Zone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGov - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGov - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Zone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Outgoing", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Outgoing = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Incoming", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Incoming = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CrossZone", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CrossZone = bool(v != 0) - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGov - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGov - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGov(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGov - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RemoveTaxExemptionZoneProposal) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RemoveTaxExemptionZoneProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RemoveTaxExemptionZoneProposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGov - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGov - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Title = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGov - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGov - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Zone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGov - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGov - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Zone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGov(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGov - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ModifyTaxExemptionZoneProposal) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ModifyTaxExemptionZoneProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ModifyTaxExemptionZoneProposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGov - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGov - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Title = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGov - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGov - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Zone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGov - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGov - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Zone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Outgoing", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Outgoing = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Incoming", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Incoming = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CrossZone", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CrossZone = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGov(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGov - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AddTaxExemptionAddressProposal) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AddTaxExemptionAddressProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AddTaxExemptionAddressProposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGov - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGov - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Title = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGov - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGov - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Zone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGov - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGov - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Zone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGov - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGov - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGov(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGov - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RemoveTaxExemptionAddressProposal) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RemoveTaxExemptionAddressProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RemoveTaxExemptionAddressProposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGov - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGov - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Title = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGov - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGov - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Zone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGov - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGov - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Zone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGov - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGov - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGov(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGov - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGov(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGov - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGov - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGov - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGov - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGov - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGov - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGov = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGov = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGov = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/taxexemption/types/msgs.go b/x/taxexemption/types/msgs.go new file mode 100644 index 000000000..17fb7cd38 --- /dev/null +++ b/x/taxexemption/types/msgs.go @@ -0,0 +1,278 @@ +package types + +import ( + "encoding/json" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var ( + _ sdk.Msg = &MsgAddTaxExemptionZone{} + _ sdk.Msg = &MsgRemoveTaxExemptionZone{} + _ sdk.Msg = &MsgModifyTaxExemptionZone{} + _ sdk.Msg = &MsgAddTaxExemptionAddress{} + _ sdk.Msg = &MsgRemoveTaxExemptionAddress{} +) + +// ======MsgAddTaxExemptionZone====== + +func NewMsgAddTaxExemptionZone(title, description, zone string, outgoing, incoming, crossZone bool, addresses []string, authority sdk.AccAddress) *MsgAddTaxExemptionZone { + return &MsgAddTaxExemptionZone{ + Zone: zone, + Outgoing: outgoing, + Incoming: incoming, + CrossZone: crossZone, + Addresses: addresses, + Authority: authority.String(), + } +} + +func (msg MsgAddTaxExemptionZone) Type() string { return "AddTaxExemptionZone" } + +func (msg *MsgAddTaxExemptionZone) GetZone() string { return msg.Zone } + +func (msg *MsgAddTaxExemptionZone) Route() string { return RouterKey } + +func (msg MsgAddTaxExemptionZone) String() string { + return fmt.Sprintf(`MsgAddTaxExemptionZone: + Authority: %s + Zone: %s + Outgoing: %t + Incoming: %t + CrossZone: %t + Addresses: %s`, + msg.Authority, msg.Zone, msg.Outgoing, msg.Incoming, msg.CrossZone, msg.Addresses) +} + +func (msg MsgAddTaxExemptionZone) GetSigners() []sdk.AccAddress { + addr, err := sdk.AccAddressFromBech32(msg.Authority) + if err != nil { + return []sdk.AccAddress{} + } + + return []sdk.AccAddress{addr} +} + +func (msg MsgAddTaxExemptionZone) GetSignBytes() []byte { + b, err := json.Marshal(msg) + if err != nil { + panic(err) + } + return sdk.MustSortJSON(b) +} + +func (msg MsgAddTaxExemptionZone) ValidateBasic() error { + if len(msg.Zone) == 0 { + return fmt.Errorf("zone cannot be empty") + } + if len(msg.Addresses) == 0 { + return fmt.Errorf("addresses cannot be empty") + } + return nil +} + +// ======MsgRemoveTaxExemptionZone====== + +func NewMsgRemoveTaxExemptionZone(title, description, zone string, authority sdk.AccAddress) *MsgRemoveTaxExemptionZone { + return &MsgRemoveTaxExemptionZone{ + Zone: zone, + Authority: authority.String(), + } +} + +func (msg MsgRemoveTaxExemptionZone) Type() string { return "RemoveTaxExemptionZone" } + +func (msg *MsgRemoveTaxExemptionZone) GetZone() string { return msg.Zone } + +func (msg *MsgRemoveTaxExemptionZone) Route() string { return RouterKey } + +func (msg MsgRemoveTaxExemptionZone) String() string { + return fmt.Sprintf(`MsgRemoveTaxExemptionZone: + Authority: %s + Zone: %s`, + msg.Authority, msg.Zone) +} + +func (msg MsgRemoveTaxExemptionZone) GetSigners() []sdk.AccAddress { + addr, err := sdk.AccAddressFromBech32(msg.Authority) + if err != nil { + return []sdk.AccAddress{} + } + + return []sdk.AccAddress{addr} +} + +func (msg MsgRemoveTaxExemptionZone) GetSignBytes() []byte { + b, err := json.Marshal(msg) + if err != nil { + panic(err) + } + return sdk.MustSortJSON(b) +} + +func (msg MsgRemoveTaxExemptionZone) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", err) + } + + if len(msg.Zone) == 0 { + return fmt.Errorf("zone cannot be empty") + } + return nil +} + +// ======MsgModifyTaxExemptionZone====== + +func NewMsgModifyTaxExemptionZone(title, description, zone string, outgoing, incoming, crossZone bool, authority sdk.AccAddress) *MsgModifyTaxExemptionZone { + return &MsgModifyTaxExemptionZone{ + Zone: zone, + Outgoing: outgoing, + Incoming: incoming, + CrossZone: crossZone, + Authority: authority.String(), + } +} + +func (msg MsgModifyTaxExemptionZone) Type() string { return "ModifyTaxExemptionZone" } + +func (msg *MsgModifyTaxExemptionZone) GetZone() string { return msg.Zone } + +func (msg *MsgModifyTaxExemptionZone) Route() string { return RouterKey } + +func (msg MsgModifyTaxExemptionZone) String() string { + return fmt.Sprintf(`MsgModifyTaxExemptionZone: + Authority: %s + Zone: %s + Outgoing: %t + Incoming: %t + CrossZone: %t`, + msg.Authority, msg.Zone, msg.Outgoing, msg.Incoming, msg.CrossZone) +} + +func (msg MsgModifyTaxExemptionZone) GetSigners() []sdk.AccAddress { + addr, err := sdk.AccAddressFromBech32(msg.Authority) + if err != nil { + return []sdk.AccAddress{} + } + + return []sdk.AccAddress{addr} +} + +func (msg MsgModifyTaxExemptionZone) GetSignBytes() []byte { + b, err := json.Marshal(msg) + if err != nil { + panic(err) + } + return sdk.MustSortJSON(b) +} + +func (msg MsgModifyTaxExemptionZone) ValidateBasic() error { + if len(msg.Zone) == 0 { + return fmt.Errorf("zone cannot be empty") + } + return nil +} + +// ======MsgAddTaxExemptionAddress====== + +func NewMsgAddTaxExemptionAddress(title, description, zone string, addresses []string, authority sdk.AccAddress) *MsgAddTaxExemptionAddress { + return &MsgAddTaxExemptionAddress{ + Zone: zone, + Addresses: addresses, + Authority: authority.String(), + } +} + +func (msg MsgAddTaxExemptionAddress) Type() string { return "AddTaxExemptionAddress" } + +func (msg *MsgAddTaxExemptionAddress) GetZone() string { return msg.Zone } + +func (msg *MsgAddTaxExemptionAddress) Route() string { return RouterKey } + +func (msg MsgAddTaxExemptionAddress) String() string { + return fmt.Sprintf(`MsgAddTaxExemptionAddress: + Authority: %s + Zone: %s + Addresses: %s`, + msg.Authority, msg.Zone, msg.Addresses) +} + +func (msg MsgAddTaxExemptionAddress) GetSigners() []sdk.AccAddress { + addr, err := sdk.AccAddressFromBech32(msg.Authority) + if err != nil { + return []sdk.AccAddress{} + } + + return []sdk.AccAddress{addr} +} + +func (msg MsgAddTaxExemptionAddress) GetSignBytes() []byte { + b, err := json.Marshal(msg) + if err != nil { + panic(err) + } + return sdk.MustSortJSON(b) +} + +func (msg MsgAddTaxExemptionAddress) ValidateBasic() error { + if len(msg.Zone) == 0 { + return fmt.Errorf("zone cannot be empty") + } + if len(msg.Addresses) == 0 { + return fmt.Errorf("addresses cannot be empty") + } + return nil +} + +// ======MsgRemoveTaxExemptionAddress====== + +func NewMsgRemoveTaxExemptionAddress(title, description, zone string, addresses []string, authority sdk.AccAddress) *MsgRemoveTaxExemptionAddress { + return &MsgRemoveTaxExemptionAddress{ + Zone: zone, + Addresses: addresses, + Authority: authority.String(), + } +} + +func (msg MsgRemoveTaxExemptionAddress) Type() string { return "RemoveTaxExemptionAddress" } + +func (msg *MsgRemoveTaxExemptionAddress) GetZone() string { return msg.Zone } + +func (msg *MsgRemoveTaxExemptionAddress) Route() string { return RouterKey } + +func (msg MsgRemoveTaxExemptionAddress) String() string { + return fmt.Sprintf(`MsgRemoveTaxExemptionAddress: + Authority: %s + Zone: %s + Addresses: %s`, + msg.Authority, msg.Zone, msg.Addresses) +} + +func (msg MsgRemoveTaxExemptionAddress) GetSigners() []sdk.AccAddress { + addr, err := sdk.AccAddressFromBech32(msg.Authority) + if err != nil { + return []sdk.AccAddress{} + } + + return []sdk.AccAddress{addr} +} + +func (msg MsgRemoveTaxExemptionAddress) GetSignBytes() []byte { + b, err := json.Marshal(msg) + if err != nil { + panic(err) + } + return sdk.MustSortJSON(b) +} + +func (msg MsgRemoveTaxExemptionAddress) ValidateBasic() error { + if len(msg.Zone) == 0 { + return fmt.Errorf("zone cannot be empty") + } + if len(msg.Addresses) == 0 { + return fmt.Errorf("addresses cannot be empty") + } + return nil +} diff --git a/x/taxexemption/types/gov.go b/x/taxexemption/types/proposal.go similarity index 83% rename from x/taxexemption/types/gov.go rename to x/taxexemption/types/proposal.go index 0c5778f2d..d800c956f 100644 --- a/x/taxexemption/types/gov.go +++ b/x/taxexemption/types/proposal.go @@ -38,16 +38,6 @@ var ( ) // ======AddTaxExemptionZoneProposal====== -func NewAddTaxExemptionZoneProposal(title, description string, zone string, outgoing bool, incoming bool, crossZone bool) govv1beta1.Content { - return &AddTaxExemptionZoneProposal{ - Title: title, - Description: description, - Zone: zone, - Outgoing: outgoing, - Incoming: incoming, - CrossZone: crossZone, - } -} func (p *AddTaxExemptionZoneProposal) GetTitle() string { return p.Title } @@ -94,14 +84,6 @@ func (p *AddTaxExemptionZoneProposal) ValidateBasic() error { // ======RemoveTaxExemptionZoneProposal====== -func NewRemoveTaxExemptionZoneProposal(title, description string, zone string) govv1beta1.Content { - return &RemoveTaxExemptionZoneProposal{ - Title: title, - Description: description, - Zone: zone, - } -} - func (p *RemoveTaxExemptionZoneProposal) GetTitle() string { return p.Title } func (p *RemoveTaxExemptionZoneProposal) GetDescription() string { return p.Description } @@ -137,17 +119,6 @@ func (p *RemoveTaxExemptionZoneProposal) ValidateBasic() error { // ======ModifyTaxExemptionZoneProposal====== -func NewModifyTaxExemptionZoneProposal(title, description string, zone string, outgoing bool, incoming bool, crossZone bool) govv1beta1.Content { - return &ModifyTaxExemptionZoneProposal{ - Title: title, - Description: description, - Zone: zone, - Outgoing: outgoing, - Incoming: incoming, - CrossZone: crossZone, - } -} - func (p *ModifyTaxExemptionZoneProposal) GetTitle() string { return p.Title } func (p *ModifyTaxExemptionZoneProposal) GetDescription() string { return p.Description } @@ -186,15 +157,6 @@ func (p *ModifyTaxExemptionZoneProposal) ValidateBasic() error { // ======AddTaxExemptionAddressProposal====== -func NewAddTaxExemptionAddressProposal(title, description string, zone string, addresses []string) govv1beta1.Content { - return &AddTaxExemptionAddressProposal{ - Title: title, - Description: description, - Zone: zone, - Addresses: addresses, - } -} - func (p *AddTaxExemptionAddressProposal) GetTitle() string { return p.Title } func (p *AddTaxExemptionAddressProposal) GetDescription() string { return p.Description } @@ -234,15 +196,6 @@ func (p *AddTaxExemptionAddressProposal) ValidateBasic() error { // ======RemoveTaxExemptionAddressProposal====== -func NewRemoveTaxExemptionAddressProposal(title, description string, zone string, addresses []string) govv1beta1.Content { - return &RemoveTaxExemptionAddressProposal{ - Title: title, - Description: description, - Zone: zone, - Addresses: addresses, - } -} - func (p *RemoveTaxExemptionAddressProposal) GetTitle() string { return p.Title } func (p *RemoveTaxExemptionAddressProposal) GetDescription() string { return p.Description } diff --git a/x/taxexemption/types/taxexemption.pb.go b/x/taxexemption/types/taxexemption.pb.go index 97a4cc05d..dce390ad1 100644 --- a/x/taxexemption/types/taxexemption.pb.go +++ b/x/taxexemption/types/taxexemption.pb.go @@ -5,6 +5,7 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" @@ -135,9 +136,287 @@ func (m *ZoneList) GetZones() []string { return nil } +type ProposalMetadata struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty" yaml:"title"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` + Forum string `protobuf:"bytes,3,opt,name=forum,proto3" json:"forum,omitempty" yaml:"forum"` + Other string `protobuf:"bytes,4,opt,name=other,proto3" json:"other,omitempty" yaml:"other"` +} + +func (m *ProposalMetadata) Reset() { *m = ProposalMetadata{} } +func (m *ProposalMetadata) String() string { return proto.CompactTextString(m) } +func (*ProposalMetadata) ProtoMessage() {} +func (*ProposalMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_3ad47fbcb2a3f71e, []int{2} +} +func (m *ProposalMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProposalMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProposalMetadata.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ProposalMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProposalMetadata.Merge(m, src) +} +func (m *ProposalMetadata) XXX_Size() int { + return m.Size() +} +func (m *ProposalMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_ProposalMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_ProposalMetadata proto.InternalMessageInfo + +func (m *ProposalMetadata) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *ProposalMetadata) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *ProposalMetadata) GetForum() string { + if m != nil { + return m.Forum + } + return "" +} + +func (m *ProposalMetadata) GetOther() string { + if m != nil { + return m.Other + } + return "" +} + +type AddTaxExemptionZoneProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty" yaml:"title"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` + Zone string `protobuf:"bytes,3,opt,name=zone,proto3" json:"zone,omitempty" yaml:"zone"` + Outgoing bool `protobuf:"varint,4,opt,name=outgoing,proto3" json:"outgoing,omitempty" yaml:"outgoing"` + Incoming bool `protobuf:"varint,5,opt,name=incoming,proto3" json:"incoming,omitempty" yaml:"incoming"` + CrossZone bool `protobuf:"varint,6,opt,name=cross_zone,json=crossZone,proto3" json:"cross_zone,omitempty" yaml:"cross_zone"` + Addresses []string `protobuf:"bytes,7,rep,name=addresses,proto3" json:"addresses,omitempty" yaml:"addresses"` + Authority string `protobuf:"bytes,8,opt,name=authority,proto3" json:"authority,omitempty" yaml:"authority"` +} + +func (m *AddTaxExemptionZoneProposal) Reset() { *m = AddTaxExemptionZoneProposal{} } +func (*AddTaxExemptionZoneProposal) ProtoMessage() {} +func (*AddTaxExemptionZoneProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_3ad47fbcb2a3f71e, []int{3} +} +func (m *AddTaxExemptionZoneProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AddTaxExemptionZoneProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AddTaxExemptionZoneProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AddTaxExemptionZoneProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddTaxExemptionZoneProposal.Merge(m, src) +} +func (m *AddTaxExemptionZoneProposal) XXX_Size() int { + return m.Size() +} +func (m *AddTaxExemptionZoneProposal) XXX_DiscardUnknown() { + xxx_messageInfo_AddTaxExemptionZoneProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_AddTaxExemptionZoneProposal proto.InternalMessageInfo + +type RemoveTaxExemptionZoneProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty" yaml:"title"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` + Zone string `protobuf:"bytes,3,opt,name=zone,proto3" json:"zone,omitempty" yaml:"zone"` + Authority string `protobuf:"bytes,4,opt,name=authority,proto3" json:"authority,omitempty" yaml:"authority"` +} + +func (m *RemoveTaxExemptionZoneProposal) Reset() { *m = RemoveTaxExemptionZoneProposal{} } +func (*RemoveTaxExemptionZoneProposal) ProtoMessage() {} +func (*RemoveTaxExemptionZoneProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_3ad47fbcb2a3f71e, []int{4} +} +func (m *RemoveTaxExemptionZoneProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RemoveTaxExemptionZoneProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RemoveTaxExemptionZoneProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RemoveTaxExemptionZoneProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveTaxExemptionZoneProposal.Merge(m, src) +} +func (m *RemoveTaxExemptionZoneProposal) XXX_Size() int { + return m.Size() +} +func (m *RemoveTaxExemptionZoneProposal) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveTaxExemptionZoneProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_RemoveTaxExemptionZoneProposal proto.InternalMessageInfo + +type ModifyTaxExemptionZoneProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty" yaml:"title"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` + Zone string `protobuf:"bytes,3,opt,name=zone,proto3" json:"zone,omitempty" yaml:"zone"` + Outgoing bool `protobuf:"varint,4,opt,name=outgoing,proto3" json:"outgoing,omitempty" yaml:"outgoing"` + Incoming bool `protobuf:"varint,5,opt,name=incoming,proto3" json:"incoming,omitempty" yaml:"incoming"` + CrossZone bool `protobuf:"varint,6,opt,name=cross_zone,json=crossZone,proto3" json:"cross_zone,omitempty" yaml:"cross_zone"` + Authority string `protobuf:"bytes,7,opt,name=authority,proto3" json:"authority,omitempty" yaml:"authority"` +} + +func (m *ModifyTaxExemptionZoneProposal) Reset() { *m = ModifyTaxExemptionZoneProposal{} } +func (*ModifyTaxExemptionZoneProposal) ProtoMessage() {} +func (*ModifyTaxExemptionZoneProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_3ad47fbcb2a3f71e, []int{5} +} +func (m *ModifyTaxExemptionZoneProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModifyTaxExemptionZoneProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModifyTaxExemptionZoneProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModifyTaxExemptionZoneProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModifyTaxExemptionZoneProposal.Merge(m, src) +} +func (m *ModifyTaxExemptionZoneProposal) XXX_Size() int { + return m.Size() +} +func (m *ModifyTaxExemptionZoneProposal) XXX_DiscardUnknown() { + xxx_messageInfo_ModifyTaxExemptionZoneProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_ModifyTaxExemptionZoneProposal proto.InternalMessageInfo + +type AddTaxExemptionAddressProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty" yaml:"title"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` + Zone string `protobuf:"bytes,3,opt,name=zone,proto3" json:"zone,omitempty" yaml:"zone"` + Addresses []string `protobuf:"bytes,4,rep,name=addresses,proto3" json:"addresses,omitempty" yaml:"addresses"` + Authority string `protobuf:"bytes,5,opt,name=authority,proto3" json:"authority,omitempty" yaml:"authority"` +} + +func (m *AddTaxExemptionAddressProposal) Reset() { *m = AddTaxExemptionAddressProposal{} } +func (*AddTaxExemptionAddressProposal) ProtoMessage() {} +func (*AddTaxExemptionAddressProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_3ad47fbcb2a3f71e, []int{6} +} +func (m *AddTaxExemptionAddressProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AddTaxExemptionAddressProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AddTaxExemptionAddressProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AddTaxExemptionAddressProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddTaxExemptionAddressProposal.Merge(m, src) +} +func (m *AddTaxExemptionAddressProposal) XXX_Size() int { + return m.Size() +} +func (m *AddTaxExemptionAddressProposal) XXX_DiscardUnknown() { + xxx_messageInfo_AddTaxExemptionAddressProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_AddTaxExemptionAddressProposal proto.InternalMessageInfo + +type RemoveTaxExemptionAddressProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty" yaml:"title"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` + Zone string `protobuf:"bytes,3,opt,name=zone,proto3" json:"zone,omitempty" yaml:"zone"` + Addresses []string `protobuf:"bytes,4,rep,name=addresses,proto3" json:"addresses,omitempty" yaml:"addresses"` + Authority string `protobuf:"bytes,5,opt,name=authority,proto3" json:"authority,omitempty" yaml:"authority"` +} + +func (m *RemoveTaxExemptionAddressProposal) Reset() { *m = RemoveTaxExemptionAddressProposal{} } +func (*RemoveTaxExemptionAddressProposal) ProtoMessage() {} +func (*RemoveTaxExemptionAddressProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_3ad47fbcb2a3f71e, []int{7} +} +func (m *RemoveTaxExemptionAddressProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RemoveTaxExemptionAddressProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RemoveTaxExemptionAddressProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RemoveTaxExemptionAddressProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveTaxExemptionAddressProposal.Merge(m, src) +} +func (m *RemoveTaxExemptionAddressProposal) XXX_Size() int { + return m.Size() +} +func (m *RemoveTaxExemptionAddressProposal) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveTaxExemptionAddressProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_RemoveTaxExemptionAddressProposal proto.InternalMessageInfo + func init() { proto.RegisterType((*Zone)(nil), "terra.taxexemption.v1beta1.Zone") proto.RegisterType((*ZoneList)(nil), "terra.taxexemption.v1beta1.ZoneList") + proto.RegisterType((*ProposalMetadata)(nil), "terra.taxexemption.v1beta1.ProposalMetadata") + proto.RegisterType((*AddTaxExemptionZoneProposal)(nil), "terra.taxexemption.v1beta1.AddTaxExemptionZoneProposal") + proto.RegisterType((*RemoveTaxExemptionZoneProposal)(nil), "terra.taxexemption.v1beta1.RemoveTaxExemptionZoneProposal") + proto.RegisterType((*ModifyTaxExemptionZoneProposal)(nil), "terra.taxexemption.v1beta1.ModifyTaxExemptionZoneProposal") + proto.RegisterType((*AddTaxExemptionAddressProposal)(nil), "terra.taxexemption.v1beta1.AddTaxExemptionAddressProposal") + proto.RegisterType((*RemoveTaxExemptionAddressProposal)(nil), "terra.taxexemption.v1beta1.RemoveTaxExemptionAddressProposal") } func init() { @@ -145,27 +424,46 @@ func init() { } var fileDescriptor_3ad47fbcb2a3f71e = []byte{ - // 309 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0xc1, 0x4a, 0xc3, 0x30, - 0x18, 0x80, 0x17, 0x37, 0x65, 0x8b, 0xc2, 0xb4, 0x2a, 0x94, 0x1d, 0xd2, 0x11, 0x41, 0x76, 0x71, - 0x61, 0x53, 0x2f, 0x1e, 0x7b, 0x16, 0x84, 0x1e, 0x77, 0x91, 0x2c, 0x84, 0x1a, 0x58, 0xf3, 0x8f, - 0x26, 0x1b, 0x9b, 0x4f, 0xe1, 0x3b, 0x79, 0xf1, 0xb8, 0xa3, 0xa7, 0x22, 0xdb, 0x1b, 0xf4, 0x09, - 0x24, 0xe9, 0x36, 0x99, 0xa7, 0x36, 0xff, 0xf7, 0x7d, 0x10, 0xf2, 0xe3, 0x3b, 0x2b, 0xf3, 0x9c, - 0x33, 0xcb, 0x17, 0x72, 0x21, 0xb3, 0xa9, 0x55, 0xa0, 0xd9, 0x7c, 0x30, 0x96, 0x96, 0x0f, 0x0e, - 0x86, 0xfd, 0x69, 0x0e, 0x16, 0x82, 0x8e, 0xd7, 0xfb, 0x07, 0x64, 0xab, 0x77, 0xae, 0x52, 0x48, - 0xc1, 0x6b, 0xcc, 0xfd, 0x55, 0x05, 0xfd, 0x44, 0xb8, 0x31, 0x02, 0x2d, 0x83, 0x1b, 0xdc, 0xd0, - 0x3c, 0x93, 0x21, 0xea, 0xa2, 0x5e, 0x2b, 0x6e, 0x97, 0x45, 0x74, 0xba, 0xe4, 0xd9, 0xe4, 0x89, - 0xba, 0x29, 0x4d, 0x3c, 0x0c, 0x18, 0x6e, 0xc2, 0xcc, 0xa6, 0xa0, 0x74, 0x1a, 0x1e, 0x75, 0x51, - 0xaf, 0x19, 0x5f, 0x96, 0x45, 0xd4, 0xae, 0xc4, 0x1d, 0xa1, 0xc9, 0x5e, 0x72, 0x81, 0xd2, 0x02, - 0x32, 0x17, 0xd4, 0xff, 0x07, 0x3b, 0x42, 0x93, 0xbd, 0x14, 0x3c, 0x60, 0x2c, 0x72, 0x30, 0xe6, - 0xf5, 0x1d, 0xb4, 0x0c, 0x1b, 0x3e, 0xb9, 0x2e, 0x8b, 0xe8, 0xa2, 0x4a, 0xfe, 0x18, 0x4d, 0x5a, - 0xfe, 0xe0, 0x2e, 0x4f, 0x87, 0xb8, 0xe9, 0xbe, 0xcf, 0xca, 0xd8, 0xe0, 0x16, 0x1f, 0x3b, 0x6e, - 0x42, 0xd4, 0xad, 0xf7, 0x5a, 0xf1, 0x79, 0x59, 0x44, 0x67, 0x55, 0xec, 0xc7, 0x34, 0xa9, 0x70, - 0xfc, 0xf2, 0xb5, 0x26, 0x68, 0xb5, 0x26, 0xe8, 0x67, 0x4d, 0xd0, 0xc7, 0x86, 0xd4, 0x56, 0x1b, - 0x52, 0xfb, 0xde, 0x90, 0xda, 0xe8, 0x31, 0x55, 0xf6, 0x6d, 0x36, 0xee, 0x0b, 0xc8, 0x98, 0x98, - 0x70, 0x63, 0x94, 0xd8, 0xee, 0x41, 0x40, 0x2e, 0xd9, 0x7c, 0xc8, 0x16, 0x87, 0x1b, 0xb1, 0xcb, - 0xa9, 0x34, 0xe3, 0x13, 0xff, 0xa2, 0xf7, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x8d, 0x3e, 0x0c, - 0x57, 0xb4, 0x01, 0x00, 0x00, + // 620 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xb1, 0x6f, 0xd3, 0x4e, + 0x18, 0xb5, 0x13, 0xb7, 0x4d, 0xae, 0x3f, 0xa9, 0xfd, 0x99, 0x82, 0x4c, 0x90, 0xec, 0x72, 0x95, + 0x50, 0x85, 0xd4, 0x58, 0x2d, 0x20, 0xa1, 0x6e, 0x0d, 0x62, 0xa3, 0x02, 0x59, 0x4c, 0x5d, 0xaa, + 0xab, 0x7d, 0x75, 0x2d, 0xc5, 0xfe, 0x22, 0xdf, 0x25, 0x4a, 0xf8, 0x07, 0x60, 0x64, 0x64, 0xa3, + 0x7f, 0x04, 0x1b, 0x12, 0x0b, 0x0c, 0x88, 0xa9, 0x23, 0x93, 0x85, 0x92, 0x85, 0xd9, 0x7f, 0x01, + 0xba, 0xbb, 0x38, 0x8d, 0xc3, 0xd2, 0x56, 0x11, 0xea, 0xd0, 0x29, 0x77, 0xdf, 0x7b, 0x4f, 0x97, + 0x7b, 0xdf, 0xfb, 0xac, 0x43, 0x5b, 0x9c, 0xa6, 0x29, 0x71, 0x39, 0xe9, 0xd3, 0x3e, 0x8d, 0x3b, + 0x3c, 0x82, 0xc4, 0xed, 0x6d, 0x1f, 0x51, 0x4e, 0xb6, 0x4b, 0xc5, 0x66, 0x27, 0x05, 0x0e, 0x66, + 0x43, 0xd2, 0x9b, 0x25, 0x64, 0x4c, 0x6f, 0xac, 0x85, 0x10, 0x82, 0xa4, 0xb9, 0x62, 0xa5, 0x14, + 0x8d, 0xbb, 0x3e, 0xb0, 0x18, 0xd8, 0xa1, 0x02, 0xd4, 0x46, 0x41, 0xf8, 0xab, 0x8e, 0x8c, 0x03, + 0x48, 0xa8, 0xb9, 0x81, 0x8c, 0x84, 0xc4, 0xd4, 0xd2, 0xd7, 0xf5, 0xcd, 0x7a, 0x6b, 0x25, 0xcf, + 0x9c, 0xe5, 0x01, 0x89, 0xdb, 0xbb, 0x58, 0x54, 0xb1, 0x27, 0x41, 0xd3, 0x45, 0x35, 0xe8, 0xf2, + 0x10, 0xa2, 0x24, 0xb4, 0x2a, 0xeb, 0xfa, 0x66, 0xad, 0x75, 0x2b, 0xcf, 0x9c, 0x15, 0x45, 0x2c, + 0x10, 0xec, 0x4d, 0x48, 0x42, 0x10, 0x25, 0x3e, 0xc4, 0x42, 0x50, 0x9d, 0x15, 0x14, 0x08, 0xf6, + 0x26, 0x24, 0xf3, 0x31, 0x42, 0x7e, 0x0a, 0x8c, 0x1d, 0xbe, 0x81, 0x84, 0x5a, 0x86, 0x94, 0xdc, + 0xce, 0x33, 0xe7, 0x7f, 0x25, 0x39, 0xc7, 0xb0, 0x57, 0x97, 0x1b, 0xf1, 0xe7, 0xf1, 0x0e, 0xaa, + 0x89, 0xdf, 0x17, 0x11, 0xe3, 0xe6, 0x03, 0xb4, 0x20, 0x70, 0x66, 0xe9, 0xeb, 0xd5, 0xcd, 0x7a, + 0x6b, 0x35, 0xcf, 0x9c, 0xff, 0x94, 0x58, 0x96, 0xb1, 0xa7, 0x60, 0xfc, 0x4d, 0x47, 0xab, 0xaf, + 0x52, 0xe8, 0x00, 0x23, 0xed, 0x7d, 0xca, 0x49, 0x40, 0x38, 0x11, 0x62, 0x1e, 0xf1, 0x76, 0x61, + 0xc3, 0x94, 0x58, 0x96, 0xb1, 0xa7, 0x60, 0xf3, 0x29, 0x5a, 0x0e, 0x28, 0xf3, 0xd3, 0x48, 0xda, + 0x2f, 0xbd, 0xa8, 0xb7, 0xee, 0xe4, 0x99, 0x63, 0x2a, 0xf6, 0x14, 0x88, 0xbd, 0x69, 0xaa, 0x38, + 0xe1, 0x18, 0xd2, 0x6e, 0x2c, 0xed, 0x28, 0x9d, 0x20, 0xcb, 0xd8, 0x53, 0xb0, 0xe0, 0x01, 0x3f, + 0xa1, 0xa9, 0xf4, 0xa0, 0xc4, 0x93, 0x65, 0xec, 0x29, 0x18, 0x9f, 0x55, 0xd1, 0xbd, 0xbd, 0x20, + 0x78, 0x4d, 0xfa, 0xcf, 0x8b, 0x34, 0x08, 0x2b, 0x8a, 0x9b, 0xfd, 0x83, 0x1b, 0x6d, 0x20, 0x43, + 0x36, 0xab, 0x3a, 0x9b, 0x1c, 0xd5, 0x26, 0x09, 0x96, 0x92, 0x63, 0x5c, 0x36, 0x39, 0x0b, 0x97, + 0x4f, 0xce, 0xe2, 0xc5, 0x92, 0x63, 0xee, 0xa0, 0x3a, 0x09, 0x82, 0x94, 0x32, 0x46, 0x99, 0xb5, + 0x24, 0x13, 0xb3, 0x96, 0x67, 0xce, 0xaa, 0x12, 0x4d, 0x20, 0xec, 0x9d, 0xd3, 0xa4, 0xa6, 0xcb, + 0x4f, 0x20, 0x8d, 0xf8, 0xc0, 0xaa, 0xc9, 0x5b, 0x4f, 0x6b, 0x0a, 0x48, 0x68, 0x8a, 0xf5, 0xee, + 0xc3, 0x77, 0xa7, 0x8e, 0xf6, 0xe1, 0xd4, 0xd1, 0x7e, 0x9f, 0x3a, 0xda, 0x8f, 0x4f, 0x5b, 0x8d, + 0xf1, 0x14, 0x86, 0xd0, 0x2b, 0x86, 0xb7, 0xf9, 0x0c, 0x12, 0x4e, 0x13, 0x8e, 0xdf, 0x56, 0x90, + 0xed, 0xd1, 0x18, 0x7a, 0xf4, 0xba, 0x77, 0xb5, 0xe4, 0x84, 0x31, 0x7f, 0x27, 0x3e, 0x56, 0x91, + 0xbd, 0x0f, 0x41, 0x74, 0x3c, 0xb8, 0xc9, 0xf7, 0xd5, 0xf3, 0x3d, 0xe9, 0xd0, 0xd2, 0xfc, 0x3b, + 0xf4, 0xb9, 0x82, 0xec, 0x99, 0xcf, 0xcf, 0x9e, 0x1a, 0x94, 0xeb, 0x98, 0xd5, 0xc9, 0xa4, 0x1b, + 0x57, 0x98, 0xf4, 0x85, 0xf9, 0xbb, 0xf7, 0xa5, 0x82, 0xee, 0xff, 0x3d, 0xe9, 0x37, 0x06, 0x5e, + 0xd4, 0xc0, 0xd6, 0xcb, 0xef, 0x43, 0x5b, 0x3f, 0x1b, 0xda, 0xfa, 0xaf, 0xa1, 0xad, 0xbf, 0x1f, + 0xd9, 0xda, 0xd9, 0xc8, 0xd6, 0x7e, 0x8e, 0x6c, 0xed, 0xe0, 0x49, 0x18, 0xf1, 0x93, 0xee, 0x51, + 0xd3, 0x87, 0xd8, 0xf5, 0xdb, 0x84, 0xb1, 0xc8, 0x1f, 0xbf, 0xb3, 0x7c, 0x48, 0xa9, 0xdb, 0xdb, + 0x71, 0xfb, 0xe5, 0x17, 0x17, 0x1f, 0x74, 0x28, 0x3b, 0x5a, 0x94, 0xcf, 0xa2, 0x47, 0x7f, 0x02, + 0x00, 0x00, 0xff, 0xff, 0x2f, 0x52, 0x97, 0x46, 0x94, 0x09, 0x00, 0x00, } func (m *Zone) Marshal() (dAtA []byte, err error) { @@ -260,61 +558,1728 @@ func (m *ZoneList) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func encodeVarintTaxexemption(dAtA []byte, offset int, v uint64) int { - offset -= sovTaxexemption(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *ProposalMetadata) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *Zone) Size() (n int) { - if m == nil { - return 0 - } + +func (m *ProposalMetadata) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProposalMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTaxexemption(uint64(l)) + if len(m.Other) > 0 { + i -= len(m.Other) + copy(dAtA[i:], m.Other) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Other))) + i-- + dAtA[i] = 0x22 } - if m.Outgoing { - n += 2 + if len(m.Forum) > 0 { + i -= len(m.Forum) + copy(dAtA[i:], m.Forum) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Forum))) + i-- + dAtA[i] = 0x1a } - if m.Incoming { - n += 2 + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 } - if m.CrossZone { - n += 2 + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *ZoneList) Size() (n int) { - if m == nil { - return 0 +func (m *AddTaxExemptionZoneProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *AddTaxExemptionZoneProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AddTaxExemptionZoneProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.Zones) > 0 { - for _, s := range m.Zones { - l = len(s) - n += 1 + l + sovTaxexemption(uint64(l)) + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0x42 + } + if len(m.Addresses) > 0 { + for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Addresses[iNdEx]) + copy(dAtA[i:], m.Addresses[iNdEx]) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Addresses[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if m.CrossZone { + i-- + if m.CrossZone { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.Incoming { + i-- + if m.Incoming { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.Outgoing { + i-- + if m.Outgoing { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.Zone) > 0 { + i -= len(m.Zone) + copy(dAtA[i:], m.Zone) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Zone))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RemoveTaxExemptionZoneProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RemoveTaxExemptionZoneProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RemoveTaxExemptionZoneProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0x22 + } + if len(m.Zone) > 0 { + i -= len(m.Zone) + copy(dAtA[i:], m.Zone) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Zone))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ModifyTaxExemptionZoneProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModifyTaxExemptionZoneProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModifyTaxExemptionZoneProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0x3a + } + if m.CrossZone { + i-- + if m.CrossZone { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.Incoming { + i-- + if m.Incoming { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.Outgoing { + i-- + if m.Outgoing { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.Zone) > 0 { + i -= len(m.Zone) + copy(dAtA[i:], m.Zone) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Zone))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AddTaxExemptionAddressProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AddTaxExemptionAddressProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AddTaxExemptionAddressProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0x2a + } + if len(m.Addresses) > 0 { + for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Addresses[iNdEx]) + copy(dAtA[i:], m.Addresses[iNdEx]) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Addresses[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Zone) > 0 { + i -= len(m.Zone) + copy(dAtA[i:], m.Zone) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Zone))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RemoveTaxExemptionAddressProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RemoveTaxExemptionAddressProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RemoveTaxExemptionAddressProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0x2a + } + if len(m.Addresses) > 0 { + for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Addresses[iNdEx]) + copy(dAtA[i:], m.Addresses[iNdEx]) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Addresses[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Zone) > 0 { + i -= len(m.Zone) + copy(dAtA[i:], m.Zone) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Zone))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintTaxexemption(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTaxexemption(dAtA []byte, offset int, v uint64) int { + offset -= sovTaxexemption(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Zone) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + if m.Outgoing { + n += 2 + } + if m.Incoming { + n += 2 + } + if m.CrossZone { + n += 2 + } + return n +} + +func (m *ZoneList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Zones) > 0 { + for _, s := range m.Zones { + l = len(s) + n += 1 + l + sovTaxexemption(uint64(l)) + } + } + return n +} + +func (m *ProposalMetadata) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + l = len(m.Forum) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + l = len(m.Other) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + return n +} + +func (m *AddTaxExemptionZoneProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + l = len(m.Zone) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + if m.Outgoing { + n += 2 + } + if m.Incoming { + n += 2 + } + if m.CrossZone { + n += 2 + } + if len(m.Addresses) > 0 { + for _, s := range m.Addresses { + l = len(s) + n += 1 + l + sovTaxexemption(uint64(l)) + } + } + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + return n +} + +func (m *RemoveTaxExemptionZoneProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + l = len(m.Zone) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + return n +} + +func (m *ModifyTaxExemptionZoneProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + l = len(m.Zone) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + if m.Outgoing { + n += 2 + } + if m.Incoming { + n += 2 + } + if m.CrossZone { + n += 2 + } + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + return n +} + +func (m *AddTaxExemptionAddressProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + l = len(m.Zone) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + if len(m.Addresses) > 0 { + for _, s := range m.Addresses { + l = len(s) + n += 1 + l + sovTaxexemption(uint64(l)) + } + } + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + return n +} + +func (m *RemoveTaxExemptionAddressProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + l = len(m.Zone) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + if len(m.Addresses) > 0 { + for _, s := range m.Addresses { + l = len(s) + n += 1 + l + sovTaxexemption(uint64(l)) + } + } + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTaxexemption(uint64(l)) + } + return n +} + +func sovTaxexemption(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTaxexemption(x uint64) (n int) { + return sovTaxexemption(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Zone) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Zone: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Zone: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Outgoing", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Outgoing = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Incoming", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Incoming = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CrossZone", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CrossZone = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipTaxexemption(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTaxexemption + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ZoneList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ZoneList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ZoneList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Zones", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Zones = append(m.Zones, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTaxexemption(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTaxexemption + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProposalMetadata) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ProposalMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProposalMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Forum", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Forum = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Other", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Other = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTaxexemption(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTaxexemption + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AddTaxExemptionZoneProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AddTaxExemptionZoneProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AddTaxExemptionZoneProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Zone", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Zone = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Outgoing", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Outgoing = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Incoming", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Incoming = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CrossZone", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CrossZone = bool(v != 0) + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTaxexemption(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTaxexemption + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemoveTaxExemptionZoneProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemoveTaxExemptionZoneProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveTaxExemptionZoneProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Zone", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Zone = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTaxexemption(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTaxexemption + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModifyTaxExemptionZoneProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ModifyTaxExemptionZoneProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ModifyTaxExemptionZoneProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Zone", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Zone = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Outgoing", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Outgoing = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Incoming", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Incoming = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CrossZone", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CrossZone = bool(v != 0) + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTaxexemption(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTaxexemption + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } } - return n -} -func sovTaxexemption(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTaxexemption(x uint64) (n int) { - return sovTaxexemption(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func (m *Zone) Unmarshal(dAtA []byte) error { +func (m *AddTaxExemptionAddressProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -337,15 +2302,15 @@ func (m *Zone) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Zone: wiretype end group for non-group") + return fmt.Errorf("proto: AddTaxExemptionAddressProposal: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Zone: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AddTaxExemptionAddressProposal: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -373,13 +2338,13 @@ func (m *Zone) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.Title = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Outgoing", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTaxexemption @@ -389,17 +2354,29 @@ func (m *Zone) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.Outgoing = bool(v != 0) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Incoming", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Zone", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTaxexemption @@ -409,17 +2386,29 @@ func (m *Zone) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.Incoming = bool(v != 0) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Zone = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CrossZone", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTaxexemption @@ -429,12 +2418,56 @@ func (m *Zone) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.CrossZone = bool(v != 0) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTaxexemption(dAtA[iNdEx:]) @@ -456,7 +2489,7 @@ func (m *Zone) Unmarshal(dAtA []byte) error { } return nil } -func (m *ZoneList) Unmarshal(dAtA []byte) error { +func (m *RemoveTaxExemptionAddressProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -479,15 +2512,15 @@ func (m *ZoneList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ZoneList: wiretype end group for non-group") + return fmt.Errorf("proto: RemoveTaxExemptionAddressProposal: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ZoneList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RemoveTaxExemptionAddressProposal: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Zones", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -515,7 +2548,135 @@ func (m *ZoneList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Zones = append(m.Zones, string(dAtA[iNdEx:postIndex])) + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Zone", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Zone = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTaxexemption + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTaxexemption + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTaxexemption + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/taxexemption/types/tx.pb.go b/x/taxexemption/types/tx.pb.go new file mode 100644 index 000000000..c030dd4d7 --- /dev/null +++ b/x/taxexemption/types/tx.pb.go @@ -0,0 +1,2560 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: terra/taxexemption/v1beta1/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgAddTaxExemptionZone defines a message for adding a tax exemption zone. +type MsgAddTaxExemptionZone struct { + Zone string `protobuf:"bytes,1,opt,name=zone,proto3" json:"zone,omitempty" yaml:"zone"` + Outgoing bool `protobuf:"varint,2,opt,name=outgoing,proto3" json:"outgoing,omitempty" yaml:"outgoing"` + Incoming bool `protobuf:"varint,3,opt,name=incoming,proto3" json:"incoming,omitempty" yaml:"incoming"` + CrossZone bool `protobuf:"varint,4,opt,name=cross_zone,json=crossZone,proto3" json:"cross_zone,omitempty" yaml:"cross_zone"` + Addresses []string `protobuf:"bytes,5,rep,name=addresses,proto3" json:"addresses,omitempty" yaml:"addresses"` + Authority string `protobuf:"bytes,6,opt,name=authority,proto3" json:"authority,omitempty" yaml:"authority"` +} + +func (m *MsgAddTaxExemptionZone) Reset() { *m = MsgAddTaxExemptionZone{} } +func (*MsgAddTaxExemptionZone) ProtoMessage() {} +func (*MsgAddTaxExemptionZone) Descriptor() ([]byte, []int) { + return fileDescriptor_20f3cd742915e687, []int{0} +} +func (m *MsgAddTaxExemptionZone) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddTaxExemptionZone) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAddTaxExemptionZone.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAddTaxExemptionZone) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddTaxExemptionZone.Merge(m, src) +} +func (m *MsgAddTaxExemptionZone) XXX_Size() int { + return m.Size() +} +func (m *MsgAddTaxExemptionZone) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddTaxExemptionZone.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAddTaxExemptionZone proto.InternalMessageInfo + +type MsgAddTaxExemptionZoneResponse struct { +} + +func (m *MsgAddTaxExemptionZoneResponse) Reset() { *m = MsgAddTaxExemptionZoneResponse{} } +func (m *MsgAddTaxExemptionZoneResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAddTaxExemptionZoneResponse) ProtoMessage() {} +func (*MsgAddTaxExemptionZoneResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_20f3cd742915e687, []int{1} +} +func (m *MsgAddTaxExemptionZoneResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddTaxExemptionZoneResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAddTaxExemptionZoneResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAddTaxExemptionZoneResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddTaxExemptionZoneResponse.Merge(m, src) +} +func (m *MsgAddTaxExemptionZoneResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgAddTaxExemptionZoneResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddTaxExemptionZoneResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAddTaxExemptionZoneResponse proto.InternalMessageInfo + +// MsgRemoveTaxExemptionZone defines a message for removing a tax exemption zone. +type MsgRemoveTaxExemptionZone struct { + Zone string `protobuf:"bytes,1,opt,name=zone,proto3" json:"zone,omitempty" yaml:"zone"` + Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty" yaml:"authority"` +} + +func (m *MsgRemoveTaxExemptionZone) Reset() { *m = MsgRemoveTaxExemptionZone{} } +func (*MsgRemoveTaxExemptionZone) ProtoMessage() {} +func (*MsgRemoveTaxExemptionZone) Descriptor() ([]byte, []int) { + return fileDescriptor_20f3cd742915e687, []int{2} +} +func (m *MsgRemoveTaxExemptionZone) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRemoveTaxExemptionZone) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRemoveTaxExemptionZone.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRemoveTaxExemptionZone) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRemoveTaxExemptionZone.Merge(m, src) +} +func (m *MsgRemoveTaxExemptionZone) XXX_Size() int { + return m.Size() +} +func (m *MsgRemoveTaxExemptionZone) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRemoveTaxExemptionZone.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRemoveTaxExemptionZone proto.InternalMessageInfo + +type MsgRemoveTaxExemptionZoneResponse struct { +} + +func (m *MsgRemoveTaxExemptionZoneResponse) Reset() { *m = MsgRemoveTaxExemptionZoneResponse{} } +func (m *MsgRemoveTaxExemptionZoneResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRemoveTaxExemptionZoneResponse) ProtoMessage() {} +func (*MsgRemoveTaxExemptionZoneResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_20f3cd742915e687, []int{3} +} +func (m *MsgRemoveTaxExemptionZoneResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRemoveTaxExemptionZoneResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRemoveTaxExemptionZoneResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRemoveTaxExemptionZoneResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRemoveTaxExemptionZoneResponse.Merge(m, src) +} +func (m *MsgRemoveTaxExemptionZoneResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRemoveTaxExemptionZoneResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRemoveTaxExemptionZoneResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRemoveTaxExemptionZoneResponse proto.InternalMessageInfo + +// MsgModifyTaxExemptionZone defines a message for modifying a tax exemption zone. +type MsgModifyTaxExemptionZone struct { + Zone string `protobuf:"bytes,1,opt,name=zone,proto3" json:"zone,omitempty" yaml:"zone"` + Outgoing bool `protobuf:"varint,2,opt,name=outgoing,proto3" json:"outgoing,omitempty" yaml:"outgoing"` + Incoming bool `protobuf:"varint,3,opt,name=incoming,proto3" json:"incoming,omitempty" yaml:"incoming"` + CrossZone bool `protobuf:"varint,4,opt,name=cross_zone,json=crossZone,proto3" json:"cross_zone,omitempty" yaml:"cross_zone"` + Authority string `protobuf:"bytes,5,opt,name=authority,proto3" json:"authority,omitempty" yaml:"authority"` +} + +func (m *MsgModifyTaxExemptionZone) Reset() { *m = MsgModifyTaxExemptionZone{} } +func (*MsgModifyTaxExemptionZone) ProtoMessage() {} +func (*MsgModifyTaxExemptionZone) Descriptor() ([]byte, []int) { + return fileDescriptor_20f3cd742915e687, []int{4} +} +func (m *MsgModifyTaxExemptionZone) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgModifyTaxExemptionZone) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgModifyTaxExemptionZone.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgModifyTaxExemptionZone) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgModifyTaxExemptionZone.Merge(m, src) +} +func (m *MsgModifyTaxExemptionZone) XXX_Size() int { + return m.Size() +} +func (m *MsgModifyTaxExemptionZone) XXX_DiscardUnknown() { + xxx_messageInfo_MsgModifyTaxExemptionZone.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgModifyTaxExemptionZone proto.InternalMessageInfo + +type MsgModifyTaxExemptionZoneResponse struct { +} + +func (m *MsgModifyTaxExemptionZoneResponse) Reset() { *m = MsgModifyTaxExemptionZoneResponse{} } +func (m *MsgModifyTaxExemptionZoneResponse) String() string { return proto.CompactTextString(m) } +func (*MsgModifyTaxExemptionZoneResponse) ProtoMessage() {} +func (*MsgModifyTaxExemptionZoneResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_20f3cd742915e687, []int{5} +} +func (m *MsgModifyTaxExemptionZoneResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgModifyTaxExemptionZoneResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgModifyTaxExemptionZoneResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgModifyTaxExemptionZoneResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgModifyTaxExemptionZoneResponse.Merge(m, src) +} +func (m *MsgModifyTaxExemptionZoneResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgModifyTaxExemptionZoneResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgModifyTaxExemptionZoneResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgModifyTaxExemptionZoneResponse proto.InternalMessageInfo + +// MsgAddTaxExemptionAddress defines a message for adding tax exemption addresses. +type MsgAddTaxExemptionAddress struct { + Zone string `protobuf:"bytes,1,opt,name=zone,proto3" json:"zone,omitempty" yaml:"zone"` + Addresses []string `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty" yaml:"addresses"` + Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty" yaml:"authority"` +} + +func (m *MsgAddTaxExemptionAddress) Reset() { *m = MsgAddTaxExemptionAddress{} } +func (*MsgAddTaxExemptionAddress) ProtoMessage() {} +func (*MsgAddTaxExemptionAddress) Descriptor() ([]byte, []int) { + return fileDescriptor_20f3cd742915e687, []int{6} +} +func (m *MsgAddTaxExemptionAddress) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddTaxExemptionAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAddTaxExemptionAddress.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAddTaxExemptionAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddTaxExemptionAddress.Merge(m, src) +} +func (m *MsgAddTaxExemptionAddress) XXX_Size() int { + return m.Size() +} +func (m *MsgAddTaxExemptionAddress) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddTaxExemptionAddress.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAddTaxExemptionAddress proto.InternalMessageInfo + +type MsgAddTaxExemptionAddressResponse struct { +} + +func (m *MsgAddTaxExemptionAddressResponse) Reset() { *m = MsgAddTaxExemptionAddressResponse{} } +func (m *MsgAddTaxExemptionAddressResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAddTaxExemptionAddressResponse) ProtoMessage() {} +func (*MsgAddTaxExemptionAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_20f3cd742915e687, []int{7} +} +func (m *MsgAddTaxExemptionAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddTaxExemptionAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAddTaxExemptionAddressResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAddTaxExemptionAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddTaxExemptionAddressResponse.Merge(m, src) +} +func (m *MsgAddTaxExemptionAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgAddTaxExemptionAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddTaxExemptionAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAddTaxExemptionAddressResponse proto.InternalMessageInfo + +// MsgRemoveTaxExemptionAddress defines a message for removing tax exemption addresses. +type MsgRemoveTaxExemptionAddress struct { + Zone string `protobuf:"bytes,1,opt,name=zone,proto3" json:"zone,omitempty" yaml:"zone"` + Addresses []string `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty" yaml:"addresses"` + Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty" yaml:"authority"` +} + +func (m *MsgRemoveTaxExemptionAddress) Reset() { *m = MsgRemoveTaxExemptionAddress{} } +func (*MsgRemoveTaxExemptionAddress) ProtoMessage() {} +func (*MsgRemoveTaxExemptionAddress) Descriptor() ([]byte, []int) { + return fileDescriptor_20f3cd742915e687, []int{8} +} +func (m *MsgRemoveTaxExemptionAddress) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRemoveTaxExemptionAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRemoveTaxExemptionAddress.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRemoveTaxExemptionAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRemoveTaxExemptionAddress.Merge(m, src) +} +func (m *MsgRemoveTaxExemptionAddress) XXX_Size() int { + return m.Size() +} +func (m *MsgRemoveTaxExemptionAddress) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRemoveTaxExemptionAddress.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRemoveTaxExemptionAddress proto.InternalMessageInfo + +type MsgRemoveTaxExemptionAddressResponse struct { +} + +func (m *MsgRemoveTaxExemptionAddressResponse) Reset() { *m = MsgRemoveTaxExemptionAddressResponse{} } +func (m *MsgRemoveTaxExemptionAddressResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRemoveTaxExemptionAddressResponse) ProtoMessage() {} +func (*MsgRemoveTaxExemptionAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_20f3cd742915e687, []int{9} +} +func (m *MsgRemoveTaxExemptionAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRemoveTaxExemptionAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRemoveTaxExemptionAddressResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRemoveTaxExemptionAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRemoveTaxExemptionAddressResponse.Merge(m, src) +} +func (m *MsgRemoveTaxExemptionAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRemoveTaxExemptionAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRemoveTaxExemptionAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRemoveTaxExemptionAddressResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgAddTaxExemptionZone)(nil), "terra.taxexemption.v1beta1.MsgAddTaxExemptionZone") + proto.RegisterType((*MsgAddTaxExemptionZoneResponse)(nil), "terra.taxexemption.v1beta1.MsgAddTaxExemptionZoneResponse") + proto.RegisterType((*MsgRemoveTaxExemptionZone)(nil), "terra.taxexemption.v1beta1.MsgRemoveTaxExemptionZone") + proto.RegisterType((*MsgRemoveTaxExemptionZoneResponse)(nil), "terra.taxexemption.v1beta1.MsgRemoveTaxExemptionZoneResponse") + proto.RegisterType((*MsgModifyTaxExemptionZone)(nil), "terra.taxexemption.v1beta1.MsgModifyTaxExemptionZone") + proto.RegisterType((*MsgModifyTaxExemptionZoneResponse)(nil), "terra.taxexemption.v1beta1.MsgModifyTaxExemptionZoneResponse") + proto.RegisterType((*MsgAddTaxExemptionAddress)(nil), "terra.taxexemption.v1beta1.MsgAddTaxExemptionAddress") + proto.RegisterType((*MsgAddTaxExemptionAddressResponse)(nil), "terra.taxexemption.v1beta1.MsgAddTaxExemptionAddressResponse") + proto.RegisterType((*MsgRemoveTaxExemptionAddress)(nil), "terra.taxexemption.v1beta1.MsgRemoveTaxExemptionAddress") + proto.RegisterType((*MsgRemoveTaxExemptionAddressResponse)(nil), "terra.taxexemption.v1beta1.MsgRemoveTaxExemptionAddressResponse") +} + +func init() { + proto.RegisterFile("terra/taxexemption/v1beta1/tx.proto", fileDescriptor_20f3cd742915e687) +} + +var fileDescriptor_20f3cd742915e687 = []byte{ + // 586 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x96, 0xc1, 0x8b, 0xd3, 0x4e, + 0x14, 0xc7, 0x3b, 0xe9, 0x76, 0xd9, 0xce, 0xef, 0x07, 0xab, 0xd9, 0x75, 0xe9, 0x06, 0x49, 0x6a, + 0x2a, 0xd2, 0x8b, 0x09, 0x5b, 0x2d, 0x48, 0x41, 0x70, 0x0b, 0x1e, 0x8b, 0x10, 0x3c, 0xed, 0x45, + 0xd2, 0x64, 0xcc, 0x06, 0x36, 0x79, 0x25, 0x33, 0x2d, 0xa9, 0x47, 0x41, 0xf0, 0x24, 0xde, 0x14, + 0x4f, 0xfd, 0x2b, 0x04, 0xff, 0x03, 0xc1, 0xcb, 0x1e, 0xc5, 0x43, 0x91, 0xf6, 0xe2, 0xb9, 0x7f, + 0x81, 0x64, 0xb2, 0xc9, 0x6e, 0x97, 0xa4, 0xb5, 0xb9, 0xe9, 0x2d, 0xed, 0x7b, 0xdf, 0xe1, 0xf3, + 0xbe, 0xf3, 0xde, 0x63, 0x70, 0x83, 0x91, 0x20, 0x30, 0x75, 0x66, 0x86, 0x24, 0x24, 0xde, 0x80, + 0xb9, 0xe0, 0xeb, 0xa3, 0xa3, 0x3e, 0x61, 0xe6, 0x91, 0xce, 0x42, 0x6d, 0x10, 0x00, 0x03, 0x51, + 0xe2, 0x49, 0xda, 0xd5, 0x24, 0xed, 0x22, 0x49, 0xda, 0x77, 0xc0, 0x01, 0x9e, 0xa6, 0x47, 0x5f, + 0xb1, 0x42, 0x92, 0x2d, 0xa0, 0x1e, 0x50, 0xbd, 0x6f, 0x52, 0x92, 0x9e, 0x67, 0x81, 0xeb, 0xc7, + 0x71, 0xf5, 0x9b, 0x80, 0x0f, 0x7a, 0xd4, 0x39, 0xb6, 0xed, 0xe7, 0x66, 0xf8, 0x34, 0x39, 0xf4, + 0x04, 0x7c, 0x22, 0x36, 0xf0, 0xd6, 0x2b, 0xf0, 0x49, 0x0d, 0xd5, 0x51, 0xb3, 0xda, 0xdd, 0x5d, + 0x4c, 0x95, 0xff, 0xc6, 0xa6, 0x77, 0xd6, 0x51, 0xa3, 0x7f, 0x55, 0x83, 0x07, 0x45, 0x1d, 0xef, + 0xc0, 0x90, 0x39, 0xe0, 0xfa, 0x4e, 0x4d, 0xa8, 0xa3, 0xe6, 0x4e, 0x77, 0x6f, 0x31, 0x55, 0x76, + 0xe3, 0xc4, 0x24, 0xa2, 0x1a, 0x69, 0x52, 0x24, 0x70, 0x7d, 0x0b, 0xbc, 0x48, 0x50, 0xbe, 0x2e, + 0x48, 0x22, 0xaa, 0x91, 0x26, 0x89, 0x0f, 0x31, 0xb6, 0x02, 0xa0, 0xf4, 0x05, 0x87, 0xd9, 0xe2, + 0x92, 0x5b, 0x8b, 0xa9, 0x72, 0x33, 0x96, 0x5c, 0xc6, 0x54, 0xa3, 0xca, 0x7f, 0x70, 0xf8, 0x16, + 0xae, 0x9a, 0xb6, 0x1d, 0x10, 0x4a, 0x09, 0xad, 0x55, 0xea, 0xe5, 0x66, 0xb5, 0xbb, 0xbf, 0x98, + 0x2a, 0x37, 0x62, 0x51, 0x1a, 0x52, 0x8d, 0xcb, 0x34, 0xae, 0x19, 0xb2, 0x53, 0x08, 0x5c, 0x36, + 0xae, 0x6d, 0xf3, 0xaa, 0xaf, 0x6a, 0x92, 0x50, 0xa4, 0x49, 0xbe, 0x3b, 0xff, 0xbf, 0x9d, 0x28, + 0xa5, 0x8f, 0x13, 0xa5, 0xf4, 0x6b, 0xa2, 0x20, 0xb5, 0x8e, 0xe5, 0x6c, 0x33, 0x0d, 0x42, 0x07, + 0xe0, 0x53, 0xa2, 0xbe, 0x46, 0xf8, 0xb0, 0x47, 0x1d, 0x83, 0x78, 0x30, 0x22, 0xc5, 0x2c, 0x5f, + 0xc2, 0x14, 0x8a, 0x60, 0x36, 0xf0, 0x9d, 0x5c, 0x86, 0x94, 0xf4, 0x93, 0xc0, 0x49, 0x7b, 0x60, + 0xbb, 0x2f, 0xc7, 0xff, 0x5e, 0x73, 0xa4, 0x0e, 0x56, 0x8a, 0x3b, 0x98, 0xed, 0x4d, 0xea, 0xe0, + 0xe7, 0xf8, 0xae, 0xaf, 0xb5, 0xc3, 0x71, 0xdc, 0x6f, 0x7f, 0x7e, 0xd7, 0x69, 0x1b, 0x0b, 0x05, + 0xda, 0xb8, 0x5c, 0xbc, 0xba, 0x6c, 0xee, 0xb4, 0xba, 0x2f, 0x08, 0xdf, 0xce, 0xec, 0xa2, 0xbf, + 0xa0, 0xc0, 0x7b, 0xf8, 0xee, 0x2a, 0xf4, 0xa4, 0xc6, 0xd6, 0x8f, 0x0a, 0x2e, 0xf7, 0xa8, 0x23, + 0xbe, 0x41, 0x78, 0x2f, 0x6b, 0x45, 0xb6, 0xb4, 0xfc, 0x85, 0xac, 0x65, 0x6f, 0x02, 0xa9, 0xb3, + 0xb9, 0x26, 0xe1, 0x11, 0xdf, 0x21, 0x7c, 0x90, 0xb3, 0x3a, 0xda, 0x6b, 0x8e, 0xcd, 0x96, 0x49, + 0x8f, 0x0b, 0xc9, 0x96, 0x80, 0x72, 0x36, 0xc4, 0x3a, 0xa0, 0x6c, 0xd9, 0x5a, 0xa0, 0xd5, 0x33, + 0xc7, 0x81, 0x72, 0x06, 0xae, 0xbd, 0x99, 0xf1, 0x17, 0xb2, 0xb5, 0x40, 0xab, 0xc7, 0x44, 0xfc, + 0x80, 0xf0, 0x61, 0xfe, 0x8c, 0x3c, 0xda, 0xd8, 0xfe, 0x04, 0xeb, 0x49, 0x51, 0x65, 0x42, 0xd6, + 0x7d, 0xf6, 0x75, 0x26, 0xa3, 0xf3, 0x99, 0x8c, 0x7e, 0xce, 0x64, 0xf4, 0x7e, 0x2e, 0x97, 0xce, + 0xe7, 0x72, 0xe9, 0xfb, 0x5c, 0x2e, 0x9d, 0xb4, 0x1d, 0x97, 0x9d, 0x0e, 0xfb, 0x9a, 0x05, 0x9e, + 0x6e, 0x9d, 0x99, 0x94, 0xba, 0xd6, 0xfd, 0xf8, 0x79, 0x62, 0x41, 0x40, 0xf4, 0x51, 0x4b, 0x0f, + 0x97, 0x1f, 0x2a, 0x6c, 0x3c, 0x20, 0xb4, 0xbf, 0xcd, 0x9f, 0x14, 0x0f, 0x7e, 0x07, 0x00, 0x00, + 0xff, 0xff, 0x5e, 0x14, 0x28, 0xac, 0xcb, 0x08, 0x00, 0x00, +} + +func (this *MsgAddTaxExemptionZone) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgAddTaxExemptionZone) + if !ok { + that2, ok := that.(MsgAddTaxExemptionZone) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Zone != that1.Zone { + return false + } + if this.Outgoing != that1.Outgoing { + return false + } + if this.Incoming != that1.Incoming { + return false + } + if this.CrossZone != that1.CrossZone { + return false + } + if len(this.Addresses) != len(that1.Addresses) { + return false + } + for i := range this.Addresses { + if this.Addresses[i] != that1.Addresses[i] { + return false + } + } + if this.Authority != that1.Authority { + return false + } + return true +} +func (this *MsgRemoveTaxExemptionZone) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgRemoveTaxExemptionZone) + if !ok { + that2, ok := that.(MsgRemoveTaxExemptionZone) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Zone != that1.Zone { + return false + } + if this.Authority != that1.Authority { + return false + } + return true +} +func (this *MsgModifyTaxExemptionZone) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgModifyTaxExemptionZone) + if !ok { + that2, ok := that.(MsgModifyTaxExemptionZone) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Zone != that1.Zone { + return false + } + if this.Outgoing != that1.Outgoing { + return false + } + if this.Incoming != that1.Incoming { + return false + } + if this.CrossZone != that1.CrossZone { + return false + } + if this.Authority != that1.Authority { + return false + } + return true +} +func (this *MsgAddTaxExemptionAddress) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgAddTaxExemptionAddress) + if !ok { + that2, ok := that.(MsgAddTaxExemptionAddress) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Zone != that1.Zone { + return false + } + if len(this.Addresses) != len(that1.Addresses) { + return false + } + for i := range this.Addresses { + if this.Addresses[i] != that1.Addresses[i] { + return false + } + } + if this.Authority != that1.Authority { + return false + } + return true +} +func (this *MsgRemoveTaxExemptionAddress) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgRemoveTaxExemptionAddress) + if !ok { + that2, ok := that.(MsgRemoveTaxExemptionAddress) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Zone != that1.Zone { + return false + } + if len(this.Addresses) != len(that1.Addresses) { + return false + } + for i := range this.Addresses { + if this.Addresses[i] != that1.Addresses[i] { + return false + } + } + if this.Authority != that1.Authority { + return false + } + return true +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + AddTaxExemptionZone(ctx context.Context, in *MsgAddTaxExemptionZone, opts ...grpc.CallOption) (*MsgAddTaxExemptionZoneResponse, error) + RemoveTaxExemptionZone(ctx context.Context, in *MsgRemoveTaxExemptionZone, opts ...grpc.CallOption) (*MsgRemoveTaxExemptionZoneResponse, error) + ModifyTaxExemptionZone(ctx context.Context, in *MsgModifyTaxExemptionZone, opts ...grpc.CallOption) (*MsgModifyTaxExemptionZoneResponse, error) + AddTaxExemptionAddress(ctx context.Context, in *MsgAddTaxExemptionAddress, opts ...grpc.CallOption) (*MsgAddTaxExemptionAddressResponse, error) + RemoveTaxExemptionAddress(ctx context.Context, in *MsgRemoveTaxExemptionAddress, opts ...grpc.CallOption) (*MsgRemoveTaxExemptionAddressResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) AddTaxExemptionZone(ctx context.Context, in *MsgAddTaxExemptionZone, opts ...grpc.CallOption) (*MsgAddTaxExemptionZoneResponse, error) { + out := new(MsgAddTaxExemptionZoneResponse) + err := c.cc.Invoke(ctx, "/terra.taxexemption.v1beta1.Msg/AddTaxExemptionZone", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RemoveTaxExemptionZone(ctx context.Context, in *MsgRemoveTaxExemptionZone, opts ...grpc.CallOption) (*MsgRemoveTaxExemptionZoneResponse, error) { + out := new(MsgRemoveTaxExemptionZoneResponse) + err := c.cc.Invoke(ctx, "/terra.taxexemption.v1beta1.Msg/RemoveTaxExemptionZone", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ModifyTaxExemptionZone(ctx context.Context, in *MsgModifyTaxExemptionZone, opts ...grpc.CallOption) (*MsgModifyTaxExemptionZoneResponse, error) { + out := new(MsgModifyTaxExemptionZoneResponse) + err := c.cc.Invoke(ctx, "/terra.taxexemption.v1beta1.Msg/ModifyTaxExemptionZone", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) AddTaxExemptionAddress(ctx context.Context, in *MsgAddTaxExemptionAddress, opts ...grpc.CallOption) (*MsgAddTaxExemptionAddressResponse, error) { + out := new(MsgAddTaxExemptionAddressResponse) + err := c.cc.Invoke(ctx, "/terra.taxexemption.v1beta1.Msg/AddTaxExemptionAddress", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RemoveTaxExemptionAddress(ctx context.Context, in *MsgRemoveTaxExemptionAddress, opts ...grpc.CallOption) (*MsgRemoveTaxExemptionAddressResponse, error) { + out := new(MsgRemoveTaxExemptionAddressResponse) + err := c.cc.Invoke(ctx, "/terra.taxexemption.v1beta1.Msg/RemoveTaxExemptionAddress", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + AddTaxExemptionZone(context.Context, *MsgAddTaxExemptionZone) (*MsgAddTaxExemptionZoneResponse, error) + RemoveTaxExemptionZone(context.Context, *MsgRemoveTaxExemptionZone) (*MsgRemoveTaxExemptionZoneResponse, error) + ModifyTaxExemptionZone(context.Context, *MsgModifyTaxExemptionZone) (*MsgModifyTaxExemptionZoneResponse, error) + AddTaxExemptionAddress(context.Context, *MsgAddTaxExemptionAddress) (*MsgAddTaxExemptionAddressResponse, error) + RemoveTaxExemptionAddress(context.Context, *MsgRemoveTaxExemptionAddress) (*MsgRemoveTaxExemptionAddressResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) AddTaxExemptionZone(ctx context.Context, req *MsgAddTaxExemptionZone) (*MsgAddTaxExemptionZoneResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddTaxExemptionZone not implemented") +} +func (*UnimplementedMsgServer) RemoveTaxExemptionZone(ctx context.Context, req *MsgRemoveTaxExemptionZone) (*MsgRemoveTaxExemptionZoneResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveTaxExemptionZone not implemented") +} +func (*UnimplementedMsgServer) ModifyTaxExemptionZone(ctx context.Context, req *MsgModifyTaxExemptionZone) (*MsgModifyTaxExemptionZoneResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ModifyTaxExemptionZone not implemented") +} +func (*UnimplementedMsgServer) AddTaxExemptionAddress(ctx context.Context, req *MsgAddTaxExemptionAddress) (*MsgAddTaxExemptionAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddTaxExemptionAddress not implemented") +} +func (*UnimplementedMsgServer) RemoveTaxExemptionAddress(ctx context.Context, req *MsgRemoveTaxExemptionAddress) (*MsgRemoveTaxExemptionAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveTaxExemptionAddress not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_AddTaxExemptionZone_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAddTaxExemptionZone) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).AddTaxExemptionZone(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/terra.taxexemption.v1beta1.Msg/AddTaxExemptionZone", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).AddTaxExemptionZone(ctx, req.(*MsgAddTaxExemptionZone)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_RemoveTaxExemptionZone_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRemoveTaxExemptionZone) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RemoveTaxExemptionZone(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/terra.taxexemption.v1beta1.Msg/RemoveTaxExemptionZone", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RemoveTaxExemptionZone(ctx, req.(*MsgRemoveTaxExemptionZone)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ModifyTaxExemptionZone_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgModifyTaxExemptionZone) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ModifyTaxExemptionZone(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/terra.taxexemption.v1beta1.Msg/ModifyTaxExemptionZone", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ModifyTaxExemptionZone(ctx, req.(*MsgModifyTaxExemptionZone)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_AddTaxExemptionAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAddTaxExemptionAddress) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).AddTaxExemptionAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/terra.taxexemption.v1beta1.Msg/AddTaxExemptionAddress", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).AddTaxExemptionAddress(ctx, req.(*MsgAddTaxExemptionAddress)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_RemoveTaxExemptionAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRemoveTaxExemptionAddress) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RemoveTaxExemptionAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/terra.taxexemption.v1beta1.Msg/RemoveTaxExemptionAddress", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RemoveTaxExemptionAddress(ctx, req.(*MsgRemoveTaxExemptionAddress)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "terra.taxexemption.v1beta1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "AddTaxExemptionZone", + Handler: _Msg_AddTaxExemptionZone_Handler, + }, + { + MethodName: "RemoveTaxExemptionZone", + Handler: _Msg_RemoveTaxExemptionZone_Handler, + }, + { + MethodName: "ModifyTaxExemptionZone", + Handler: _Msg_ModifyTaxExemptionZone_Handler, + }, + { + MethodName: "AddTaxExemptionAddress", + Handler: _Msg_AddTaxExemptionAddress_Handler, + }, + { + MethodName: "RemoveTaxExemptionAddress", + Handler: _Msg_RemoveTaxExemptionAddress_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "terra/taxexemption/v1beta1/tx.proto", +} + +func (m *MsgAddTaxExemptionZone) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAddTaxExemptionZone) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddTaxExemptionZone) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0x32 + } + if len(m.Addresses) > 0 { + for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Addresses[iNdEx]) + copy(dAtA[i:], m.Addresses[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Addresses[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if m.CrossZone { + i-- + if m.CrossZone { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.Incoming { + i-- + if m.Incoming { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.Outgoing { + i-- + if m.Outgoing { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.Zone) > 0 { + i -= len(m.Zone) + copy(dAtA[i:], m.Zone) + i = encodeVarintTx(dAtA, i, uint64(len(m.Zone))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgAddTaxExemptionZoneResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAddTaxExemptionZoneResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddTaxExemptionZoneResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgRemoveTaxExemptionZone) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRemoveTaxExemptionZone) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRemoveTaxExemptionZone) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0x12 + } + if len(m.Zone) > 0 { + i -= len(m.Zone) + copy(dAtA[i:], m.Zone) + i = encodeVarintTx(dAtA, i, uint64(len(m.Zone))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRemoveTaxExemptionZoneResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRemoveTaxExemptionZoneResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRemoveTaxExemptionZoneResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgModifyTaxExemptionZone) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgModifyTaxExemptionZone) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgModifyTaxExemptionZone) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0x2a + } + if m.CrossZone { + i-- + if m.CrossZone { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.Incoming { + i-- + if m.Incoming { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.Outgoing { + i-- + if m.Outgoing { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.Zone) > 0 { + i -= len(m.Zone) + copy(dAtA[i:], m.Zone) + i = encodeVarintTx(dAtA, i, uint64(len(m.Zone))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgModifyTaxExemptionZoneResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgModifyTaxExemptionZoneResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgModifyTaxExemptionZoneResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgAddTaxExemptionAddress) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAddTaxExemptionAddress) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddTaxExemptionAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0x1a + } + if len(m.Addresses) > 0 { + for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Addresses[iNdEx]) + copy(dAtA[i:], m.Addresses[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Addresses[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Zone) > 0 { + i -= len(m.Zone) + copy(dAtA[i:], m.Zone) + i = encodeVarintTx(dAtA, i, uint64(len(m.Zone))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgAddTaxExemptionAddressResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAddTaxExemptionAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddTaxExemptionAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgRemoveTaxExemptionAddress) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRemoveTaxExemptionAddress) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRemoveTaxExemptionAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0x1a + } + if len(m.Addresses) > 0 { + for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Addresses[iNdEx]) + copy(dAtA[i:], m.Addresses[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Addresses[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Zone) > 0 { + i -= len(m.Zone) + copy(dAtA[i:], m.Zone) + i = encodeVarintTx(dAtA, i, uint64(len(m.Zone))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRemoveTaxExemptionAddressResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRemoveTaxExemptionAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRemoveTaxExemptionAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgAddTaxExemptionZone) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Zone) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Outgoing { + n += 2 + } + if m.Incoming { + n += 2 + } + if m.CrossZone { + n += 2 + } + if len(m.Addresses) > 0 { + for _, s := range m.Addresses { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgAddTaxExemptionZoneResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgRemoveTaxExemptionZone) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Zone) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRemoveTaxExemptionZoneResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgModifyTaxExemptionZone) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Zone) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Outgoing { + n += 2 + } + if m.Incoming { + n += 2 + } + if m.CrossZone { + n += 2 + } + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgModifyTaxExemptionZoneResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgAddTaxExemptionAddress) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Zone) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Addresses) > 0 { + for _, s := range m.Addresses { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgAddTaxExemptionAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgRemoveTaxExemptionAddress) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Zone) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Addresses) > 0 { + for _, s := range m.Addresses { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRemoveTaxExemptionAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgAddTaxExemptionZone) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAddTaxExemptionZone: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddTaxExemptionZone: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Zone", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Zone = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Outgoing", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Outgoing = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Incoming", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Incoming = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CrossZone", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CrossZone = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAddTaxExemptionZoneResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAddTaxExemptionZoneResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddTaxExemptionZoneResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRemoveTaxExemptionZone) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRemoveTaxExemptionZone: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRemoveTaxExemptionZone: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Zone", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Zone = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRemoveTaxExemptionZoneResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRemoveTaxExemptionZoneResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRemoveTaxExemptionZoneResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgModifyTaxExemptionZone) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgModifyTaxExemptionZone: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgModifyTaxExemptionZone: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Zone", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Zone = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Outgoing", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Outgoing = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Incoming", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Incoming = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CrossZone", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CrossZone = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgModifyTaxExemptionZoneResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgModifyTaxExemptionZoneResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgModifyTaxExemptionZoneResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAddTaxExemptionAddress) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAddTaxExemptionAddress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddTaxExemptionAddress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Zone", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Zone = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAddTaxExemptionAddressResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAddTaxExemptionAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddTaxExemptionAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRemoveTaxExemptionAddress) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRemoveTaxExemptionAddress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRemoveTaxExemptionAddress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Zone", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Zone = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRemoveTaxExemptionAddressResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRemoveTaxExemptionAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRemoveTaxExemptionAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +)