From 2ae047564bcfeb627c28bc35839064fd9abf08f0 Mon Sep 17 00:00:00 2001 From: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> Date: Wed, 25 Oct 2023 16:34:07 -0500 Subject: [PATCH] feat(wasmbinding)!: whitelisted stargate queries for QueryRequest::Stargate: auth, bank, gov, tokenfactory, epochs, inflation, oracle, sudo, devgas (#1646) * fix(tokenfactory)!: Fix bug in MsgBurn on total supply tracking * chore: rm stablecoin. How does this keep getting merged lol * test: add export statements for the gRPC query service descriptions in each module * feat(wasmbinding): whitelisted stargate queries for QueryRequest::Stargate * changelog * fix changelog * refactor!: make the epoch infos name consistent * docs,test(stargate_query): leave an in-depth explainer above the function * refactor: pR comments: earlier return + remove duplicate hardcoded paths * test: proto package may have more than 3 'parts'. Use len - 1 instead * docs: fix small documentation typos --- CHANGELOG.md | 1 + app/app.go | 4 +- app/keepers.go | 12 +- proto/nibiru/epochs/v1/query.proto | 6 +- wasmbinding/stargate_query.go | 150 ++ wasmbinding/stargate_query_test.go | 116 ++ wasmbinding/wasm.go | 13 +- x/devgas/v1/types/export.go | 12 + x/epochs/README.md | 4 +- x/epochs/client/cli/query.go | 8 +- x/epochs/keeper/grpc_query.go | 4 +- x/epochs/keeper/grpc_query_test.go | 2 +- x/epochs/types/export.go | 12 + x/epochs/types/query.pb.go | 104 +- x/epochs/types/query.pb.gw.go | 4 +- x/inflation/types/export.go | 12 + x/oracle/types/export.go | 12 + x/perp/v2/types/export.go | 12 + x/spot/types/export.go | 12 + x/stablecoin/types/events.pb.go | 1749 ---------------------- x/stablecoin/types/genesis.pb.go | 383 ----- x/stablecoin/types/params.pb.go | 631 -------- x/stablecoin/types/query.pb.go | 2225 --------------------------- x/stablecoin/types/query.pb.gw.go | 348 ----- x/stablecoin/types/tx.pb.go | 2228 ---------------------------- x/stablecoin/types/tx.pb.gw.go | 420 ------ x/sudo/types/export.go | 12 + x/tokenfactory/types/export.go | 12 + 28 files changed, 450 insertions(+), 8058 deletions(-) create mode 100644 wasmbinding/stargate_query.go create mode 100644 wasmbinding/stargate_query_test.go create mode 100644 x/devgas/v1/types/export.go create mode 100644 x/epochs/types/export.go create mode 100644 x/inflation/types/export.go create mode 100644 x/oracle/types/export.go create mode 100644 x/perp/v2/types/export.go create mode 100644 x/spot/types/export.go delete mode 100644 x/stablecoin/types/events.pb.go delete mode 100644 x/stablecoin/types/genesis.pb.go delete mode 100644 x/stablecoin/types/params.pb.go delete mode 100644 x/stablecoin/types/query.pb.go delete mode 100644 x/stablecoin/types/query.pb.gw.go delete mode 100644 x/stablecoin/types/tx.pb.go delete mode 100644 x/stablecoin/types/tx.pb.gw.go create mode 100644 x/sudo/types/export.go create mode 100644 x/tokenfactory/types/export.go diff --git a/CHANGELOG.md b/CHANGELOG.md index aa4f492fd..48a4119ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#1616](https://github.com/NibiruChain/nibiru/pull/1616) - fix(app)!: Add custom wasm snapshotter for proper state exports * [#1617](https://github.com/NibiruChain/nibiru/pull/1617) - fix(app)!: non-nil snapshot manager is not guaranteed in testapp * [#1645](https://github.com/NibiruChain/nibiru/pull/1645) - fix(tokenfactory)!: token supply in bank keeper must be correct after MsgBurn. +* [#1646](https://github.com/NibiruChain/nibiru/pull/1646) - feat(wasmbinding)!: whitelisted stargate queries for QueryRequest::Stargate: auth, bank, gov, tokenfactory, epochs, inflation, oracle, sudo, devgas ### Improvements diff --git a/app/app.go b/app/app.go index 8c5630657..a9c5458bf 100644 --- a/app/app.go +++ b/app/app.go @@ -116,7 +116,9 @@ func GetWasmOpts(nibiru NibiruApp, appOpts servertypes.AppOptions) []wasm.Option } // Add the bindings to the app's set of []wasm.Option. - wasmOpts = append(wasmOpts, wasmbinding.RegisterWasmOptions( + wasmOpts = append(wasmOpts, wasmbinding.NibiruWasmOptions( + nibiru.GRPCQueryRouter(), + nibiru.appCodec, nibiru.PerpKeeperV2, nibiru.SudoKeeper, nibiru.OracleKeeper, diff --git a/app/keepers.go b/app/keepers.go index bfc3f4c6a..0a56ceec4 100644 --- a/app/keepers.go +++ b/app/keepers.go @@ -156,8 +156,8 @@ type AppKeepers struct { the app, so we can SetRouter on it correctly. */ ibcKeeper *ibckeeper.Keeper ibcFeeKeeper ibcfeekeeper.Keeper - /* transferKeeper is for cross-chain fungible token transfers. */ - transferKeeper ibctransferkeeper.Keeper + /* ibcTransferKeeper is for cross-chain fungible token transfers. */ + ibcTransferKeeper ibctransferkeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper @@ -434,7 +434,7 @@ func (app *NibiruApp) InitKeepers( app.ibcKeeper.ChannelKeeper, &app.ibcKeeper.PortKeeper, app.ScopedWasmKeeper, - app.transferKeeper, + app.ibcTransferKeeper, app.MsgServiceRouter(), app.GRPCQueryRouter(), wasmDir, @@ -478,7 +478,7 @@ func (app *NibiruApp) InitKeepers( /* Create IBC module and a static IBC router */ ibcRouter := porttypes.NewRouter() - app.transferKeeper = ibctransferkeeper.NewKeeper( + app.ibcTransferKeeper = ibctransferkeeper.NewKeeper( appCodec, keys[ibctransfertypes.StoreKey], /* paramSubspace */ app.GetSubspace(ibctransfertypes.ModuleName), @@ -508,7 +508,7 @@ func (app *NibiruApp) InitKeepers( // create IBC module from bottom to top of stack var transferStack porttypes.IBCModule - transferStack = ibctransfer.NewIBCModule(app.transferKeeper) + transferStack = ibctransfer.NewIBCModule(app.ibcTransferKeeper) transferStack = ibcfee.NewIBCMiddleware(transferStack, app.ibcFeeKeeper) // Add transfer stack to IBC Router @@ -599,7 +599,7 @@ func (app *NibiruApp) initAppModules( // ibc evidence.NewAppModule(app.evidenceKeeper), ibc.NewAppModule(app.ibcKeeper), - ibctransfer.NewAppModule(app.transferKeeper), + ibctransfer.NewAppModule(app.ibcTransferKeeper), ibcfee.NewAppModule(app.ibcFeeKeeper), // wasm diff --git a/proto/nibiru/epochs/v1/query.proto b/proto/nibiru/epochs/v1/query.proto index b25b4df0f..76ed2054a 100644 --- a/proto/nibiru/epochs/v1/query.proto +++ b/proto/nibiru/epochs/v1/query.proto @@ -11,7 +11,7 @@ option go_package = "github.com/NibiruChain/nibiru/x/epochs/types"; // Query defines the gRPC querier service. service Query { // EpochInfos provide running epochInfos - rpc EpochInfos(QueryEpochsInfoRequest) returns (QueryEpochsInfoResponse) { + rpc EpochInfos(QueryEpochInfosRequest) returns (QueryEpochInfosResponse) { option (google.api.http).get = "/nibiru/epochs/v1beta1/epochs"; } // CurrentEpoch provide current epoch of specified identifier @@ -21,8 +21,8 @@ service Query { } } -message QueryEpochsInfoRequest {} -message QueryEpochsInfoResponse { +message QueryEpochInfosRequest {} +message QueryEpochInfosResponse { repeated nibiru.epochs.v1.EpochInfo epochs = 1 [ (gogoproto.nullable) = false ]; } diff --git a/wasmbinding/stargate_query.go b/wasmbinding/stargate_query.go new file mode 100644 index 000000000..b8de0e43b --- /dev/null +++ b/wasmbinding/stargate_query.go @@ -0,0 +1,150 @@ +package wasmbinding + +import ( + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + + devgas "github.com/NibiruChain/nibiru/x/devgas/v1/types" + epochs "github.com/NibiruChain/nibiru/x/epochs/types" + inflation "github.com/NibiruChain/nibiru/x/inflation/types" + oracle "github.com/NibiruChain/nibiru/x/oracle/types" + sudotypes "github.com/NibiruChain/nibiru/x/sudo/types" + tokenfactory "github.com/NibiruChain/nibiru/x/tokenfactory/types" + + auth "github.com/cosmos/cosmos-sdk/x/auth/types" + bank "github.com/cosmos/cosmos-sdk/x/bank/types" + gov "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + + ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + ibcconnectiontypes "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" +) + +/* +WasmAcceptedStargateQueries: Specifies which `QueryRequest::Stargate` types +can be sent to the application. + +### On Stargate Queries: + +A Stargate query is encoded the same way as abci_query, with path and protobuf +encoded request data. The format is defined in +[ADR-21](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md). +- The response is protobuf encoded data directly without a JSON response wrapper. +The caller is responsible for compiling the proper protobuf definitions for both +requests and responses. + + ```rust + enum QueryRequest { + Stargate { + /// this is the fully qualified service path used for routing, + /// eg. custom/cosmos_sdk.x.bank.v1.Query/QueryBalance + path: String, + /// this is the expected protobuf message type (not any), binary encoded + data: Binary, + }, + // ... + } + ``` + +### Relationship with Protobuf Message: + +A protobuf message with type URL "/cosmos.bank.v1beta1.QueryBalanceResponse" +communicates a lot of information. From this type URL, we know: + - The protobuf message has package "cosmos.bank.v1beta1" + - The protobuf message has name "QueryBalanceResponse" + +That is, a type URL is of the form "/[PB_MSG.PACKAGE]/[PB_MSG.NAME]" + +The `QueryRequest::Stargate.path` is defined based on method name of the gRPC +service description, not the type URL. In this example: + - The service name is "cosmos.bank.v1beta1.Query" + - The method name for this request on that service is "Balance" + +This results in the expected `Stargate.path` of "/[SERVICE_NAME]/[METHOD]". +By convention, the gRPC query service corresponding to a package is always +"[PB_MSG.PACKAGE].Query". + +Given only the `PB_MSG.PACKAGE` and the `PB_MSG.NAME` of either the query +request or response, we should know the `QueryRequest::Stargate.path` +deterministically. +*/ +func WasmAcceptedStargateQueries() wasmkeeper.AcceptedStargateQueries { + return wasmkeeper.AcceptedStargateQueries{ + // ibc + "/ibc.core.client.v1.Query/ClientState": &ibcclienttypes.QueryClientStateResponse{}, + "/ibc.core.client.v1.Query/ConsensusState": &ibcclienttypes.QueryConsensusStateResponse{}, + "/ibc.core.connection.v1.Query/Connection": &ibcconnectiontypes.QueryConnectionResponse{}, + "/ibc.core.connection.v1.Query/Connections": &ibcconnectiontypes.QueryConnectionsResponse{}, + "/ibc.core.connection.v1.Query/ClientConnections": &ibcconnectiontypes.QueryClientConnectionsResponse{}, + "/ibc.core.connection.v1.Query/ConnectionConsensusState": &ibcconnectiontypes.QueryConnectionConsensusStateResponse{}, + "/ibc.core.connection.v1.Query/ConnectionParams": &ibcconnectiontypes.QueryConnectionParamsResponse{}, + + // ibc transfer + "/ibc.applications.transfer.v1.Query/DenomTrace": &ibctransfertypes.QueryDenomTraceResponse{}, + "/ibc.applications.transfer.v1.Query/Params": &ibctransfertypes.QueryParamsResponse{}, + "/ibc.applications.transfer.v1.Query/DenomHash": &ibctransfertypes.QueryDenomHashResponse{}, + "/ibc.applications.transfer.v1.Query/EscrowAddress": &ibctransfertypes.QueryEscrowAddressResponse{}, + "/ibc.applications.transfer.v1.Query/TotalEscrowForDenom": &ibctransfertypes.QueryTotalEscrowForDenomResponse{}, + + // cosmos auth + "/cosmos.auth.v1beta1.Query/Account": new(auth.QueryAccountResponse), + "/cosmos.auth.v1beta1.Query/Params": new(auth.QueryParamsResponse), + + // cosmos bank + "/cosmos.bank.v1beta1.Query/Balance": new(bank.QueryBalanceResponse), + "/cosmos.bank.v1beta1.Query/DenomMetadata": new(bank.QueryDenomMetadataResponse), + "/cosmos.bank.v1beta1.Query/Params": new(bank.QueryParamsResponse), + "/cosmos.bank.v1beta1.Query/SupplyOf": new(bank.QuerySupplyOfResponse), + "/cosmos.bank.v1beta1.Query/AllBalances": new(bank.QueryAllBalancesResponse), + + // cosmos gov + "/cosmos.gov.v1.Query/Proposal": new(gov.QueryProposalResponse), + "/cosmos.gov.v1.Query/Params": new(gov.QueryParamsResponse), + "/cosmos.gov.v1.Query/Vote": new(gov.QueryVoteResponse), + + // nibiru tokenfactory + "/nibiru.tokenfactory.v1.Query/Denoms": new(tokenfactory.QueryDenomsResponse), + "/nibiru.tokenfactory.v1.Query/Params": new(tokenfactory.QueryParamsResponse), + "/nibiru.tokenfactory.v1.Query/DenomInfo": new(tokenfactory.QueryDenomInfoResponse), + + // nibiru epochs + "/nibiru.epochs.v1.Query/EpochInfos": new(epochs.QueryEpochInfosResponse), + "/nibiru.epochs.v1.Query/CurrentEpoch": new(epochs.QueryCurrentEpochResponse), + + // nibiru inflation + "/nibiru.inflation.v1.Query/Period": new(inflation.QueryPeriodResponse), + "/nibiru.inflation.v1.Query/EpochMintProvision": new(inflation.QueryEpochMintProvisionResponse), + "/nibiru.inflation.v1.Query/SkippedEpochs": new(inflation.QuerySkippedEpochsResponse), + "/nibiru.inflation.v1.Query/CirculatingSupply": new(inflation.QueryCirculatingSupplyResponse), + "/nibiru.inflation.v1.Query/InflationRate": new(inflation.QueryInflationRateResponse), + "/nibiru.inflation.v1.Query/Params": new(inflation.QueryParamsResponse), + + // nibiru oracle + "/nibiru.oracle.v1.Query/ExchangeRate": new(oracle.QueryExchangeRateResponse), + "/nibiru.oracle.v1.Query/ExchangeRateTwap": new(oracle.QueryExchangeRateResponse), + "/nibiru.oracle.v1.Query/ExchangeRates": new(oracle.QueryExchangeRatesResponse), + "/nibiru.oracle.v1.Query/Actives": new(oracle.QueryActivesResponse), + "/nibiru.oracle.v1.Query/VoteTargets": new(oracle.QueryVoteTargetsResponse), + "/nibiru.oracle.v1.Query/FeederDelegation": new(oracle.QueryFeederDelegationResponse), + "/nibiru.oracle.v1.Query/MissCounter": new(oracle.QueryMissCounterResponse), + "/nibiru.oracle.v1.Query/AggregatePrevote": new(oracle.QueryAggregatePrevoteResponse), + "/nibiru.oracle.v1.Query/AggregatePrevotes": new(oracle.QueryAggregatePrevotesResponse), + "/nibiru.oracle.v1.Query/AggregateVote": new(oracle.QueryAggregateVoteResponse), + "/nibiru.oracle.v1.Query/AggregateVotes": new(oracle.QueryAggregateVotesResponse), + "/nibiru.oracle.v1.Query/Params": new(oracle.QueryParamsResponse), + + // nibiru sudo + "/nibiru.sudo.v1.Query/QuerySudoers": new(sudotypes.QuerySudoersResponse), + + // nibiru devgas + "/nibiru.devgas.v1.Query/FeeShares": new(devgas.QueryFeeSharesResponse), + "/nibiru.devgas.v1.Query/FeeShare": new(devgas.QueryFeeShareResponse), + "/nibiru.devgas.v1.Query/Params": new(devgas.QueryParamsResponse), + "/nibiru.devgas.v1.Query/FeeSharesByWithdrawer": new(devgas.QueryFeeSharesByWithdrawerResponse), + + // TODO: for post v1 + // nibiru.perp + + // TODO: for post v1 + // nibiru.spot + } +} diff --git a/wasmbinding/stargate_query_test.go b/wasmbinding/stargate_query_test.go new file mode 100644 index 000000000..e809753ae --- /dev/null +++ b/wasmbinding/stargate_query_test.go @@ -0,0 +1,116 @@ +package wasmbinding_test + +import ( + "fmt" + "strings" + "testing" + + "github.com/cosmos/gogoproto/proto" + "github.com/stretchr/testify/assert" + "google.golang.org/grpc" + + "github.com/NibiruChain/nibiru/wasmbinding" + + "github.com/NibiruChain/nibiru/x/common/set" + + devgas "github.com/NibiruChain/nibiru/x/devgas/v1/types" + epochs "github.com/NibiruChain/nibiru/x/epochs/types" + inflation "github.com/NibiruChain/nibiru/x/inflation/types" + oracle "github.com/NibiruChain/nibiru/x/oracle/types" + sudotypes "github.com/NibiruChain/nibiru/x/sudo/types" + tokenfactory "github.com/NibiruChain/nibiru/x/tokenfactory/types" +) + +/* +TestWasmAcceptedStargateQueries: Verifies that the query paths registered in +the Wasm keeper's StargateQuerier are the official method names in the gRPC +query service of each path's respective module. + +> ℹ️ "All stargate query paths must be actual GRPC query service methods" + +Please see the function doc comment for WasmAcceptedStargateQueries in +stargate_query.go to understand in detail what invariants this test checks +for. + +Given only the `PB_MSG.PACKAGE` and the `PB_MSG.NAME` of either the query +request or response, we should know the `QueryRequest::Stargate.path` +deterministically. +*/ +func TestWasmAcceptedStargateQueries(t *testing.T) { + t.Log("stargateQueryPaths: Add nibiru query paths from GRPC service descriptions") + queryServiceDescriptions := []grpc.ServiceDesc{ + epochs.GrpcQueryServiceDesc(), + devgas.GrpcQueryServiceDesc(), + inflation.GrpcQueryServiceDesc(), + oracle.GrpcQueryServiceDesc(), + sudotypes.GrpcQueryServiceDesc(), + tokenfactory.GrpcQueryServiceDesc(), + } + stargateQueryPaths := set.New[string]() + for _, serviceDesc := range queryServiceDescriptions { + for _, queryMethod := range serviceDesc.Methods { + stargateQueryPaths.Add( + fmt.Sprintf("/%v/%v", serviceDesc.ServiceName, queryMethod.MethodName), + ) + } + } + + t.Log("stargateQueryPaths: Add cosmos and ibc query paths") + // The GRPC service descriptions aren't exported as copies from the + // Cosmos-SDK and remain private vars. Maybe we could ask the maintainers to + // export them in the future. + for queryPath := range wasmbinding.WasmAcceptedStargateQueries() { + stargateQueryPaths.Add(queryPath) + } + + // It's not required for the response type and the method description of the + // stargate query's gRPC path to match up exactly as expected. The exception + // to this convention is when our response type isn't stripped of its + // "Response" suffix and "Query" prefix is not the same as the method name. + // This happens when "QueryAAARequest" does not return a "QueryAAAResponse". + exceptionPaths := set.New[string]("/nibiru.oracle.v1.QueryExchangeRateResponse") + + gotQueryPaths := []string{} + for queryPath, protobufResponse := range wasmbinding.WasmAcceptedStargateQueries() { + gotQueryPaths = append(gotQueryPaths, queryPath) + + // Show that the underlying protobuf name and query paths coincide. + pbQueryResponseTypeUrl := "/" + proto.MessageName(protobufResponse) + isExceptionPath := exceptionPaths.Has(pbQueryResponseTypeUrl) + splitResponse := strings.Split(pbQueryResponseTypeUrl, "Response") + assert.Lenf(t, splitResponse, 2, "typeUrl: %v", + splitResponse, pbQueryResponseTypeUrl) + + // Get proto message "package" from the response type + typeUrlMinusSuffix := splitResponse[0] + typeUrlPartsFromProtoMsg := strings.Split(typeUrlMinusSuffix, ".") + lenOfParts := len(typeUrlPartsFromProtoMsg) + assert.GreaterOrEqual(t, lenOfParts, 4, typeUrlPartsFromProtoMsg) + protoMessagePackage := typeUrlPartsFromProtoMsg[:lenOfParts-1] + + // Get proto message "package" from the query path + typeUrlPartsFromQueryPath := strings.Split(queryPath, ".") + assert.GreaterOrEqual(t, len(typeUrlPartsFromQueryPath), 4, typeUrlPartsFromQueryPath) + queryPathProtoPackage := typeUrlPartsFromQueryPath[:lenOfParts-1] + + // Verify that the packages match + assert.Equalf(t, queryPathProtoPackage, protoMessagePackage, + "package names inconsistent:\nfrom query path: %v\nfrom protobuf object: %v", + queryPath, pbQueryResponseTypeUrl, + ) + + // Verify that the method names match too. + if isExceptionPath { + continue + } + methodNameFromPb := strings.TrimLeft(typeUrlPartsFromProtoMsg[3], "Query") + methodNameFromPath := strings.TrimLeft(typeUrlPartsFromQueryPath[3], "Query/") + assert.Equalf(t, methodNameFromPb, methodNameFromPath, + "method names inconsistent:\nfrom query path: %v\nfrom protobuf object: %v", + queryPath, pbQueryResponseTypeUrl, + ) + } + + t.Log("All stargate query paths must be actual GRPC query service methods") + assert.ElementsMatch(t, stargateQueryPaths.ToSlice(), gotQueryPaths) +} diff --git a/wasmbinding/wasm.go b/wasmbinding/wasm.go index 5f37f29c9..f0c3896cb 100644 --- a/wasmbinding/wasm.go +++ b/wasmbinding/wasm.go @@ -3,6 +3,8 @@ package wasmbinding import ( "github.com/CosmWasm/wasmd/x/wasm" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/codec" "github.com/NibiruChain/nibiru/x/sudo/keeper" @@ -10,7 +12,11 @@ import ( perpv2keeper "github.com/NibiruChain/nibiru/x/perp/v2/keeper" ) -func RegisterWasmOptions( +// NibiruWasmOptions: Wasm Options are extension points to instantiate the Wasm +// keeper with non-default values +func NibiruWasmOptions( + grpcQueryRouter *baseapp.GRPCQueryRouter, + appCodec codec.Codec, perpv2 perpv2keeper.Keeper, sudoKeeper keeper.Keeper, oracleKeeper oraclekeeper.Keeper, @@ -18,6 +24,11 @@ func RegisterWasmOptions( wasmQueryPlugin := NewQueryPlugin(perpv2, oracleKeeper) wasmQueryOption := wasmkeeper.WithQueryPlugins(&wasmkeeper.QueryPlugins{ Custom: CustomQuerier(wasmQueryPlugin), + Stargate: wasmkeeper.AcceptListStargateQuerier( + WasmAcceptedStargateQueries(), + grpcQueryRouter, + appCodec, + ), }) wasmExecuteOption := wasmkeeper.WithMessageHandlerDecorator( diff --git a/x/devgas/v1/types/export.go b/x/devgas/v1/types/export.go new file mode 100644 index 000000000..fb4b6e3b6 --- /dev/null +++ b/x/devgas/v1/types/export.go @@ -0,0 +1,12 @@ +package types + +import ( + grpc "google.golang.org/grpc" +) + +// GrpcQueryServiceDesc represents the query server's RPC service specification. +// This gives access to the service name and method names needed for stargate +// queries. +func GrpcQueryServiceDesc() grpc.ServiceDesc { + return _Query_serviceDesc +} diff --git a/x/epochs/README.md b/x/epochs/README.md index 7a1b36b41..dbdf04b80 100644 --- a/x/epochs/README.md +++ b/x/epochs/README.md @@ -130,7 +130,7 @@ Epochs module is providing below queries to check the module's state. ```protobuf service Query { // EpochInfos provide running epochInfos - rpc EpochInfos(QueryEpochsInfoRequest) returns (QueryEpochsInfoResponse) {} + rpc EpochInfos(QueryEpochInfosRequest) returns (QueryEpochInfosResponse) {} // CurrentEpoch provide current epoch of specified identifier rpc CurrentEpoch(QueryCurrentEpochRequest) returns (QueryCurrentEpochResponse) {} } @@ -155,4 +155,4 @@ For instance, we have an epoch of 100 units that ends at t=100, if we have a blo And new epoch start at t=110. There are time drifts here, for around 1-2 blocks time. It will slow down epochs. -It's going to slow down epoch by 10-20s per week when epoch duration is 1 week. This should be resolved after launch. \ No newline at end of file +It's going to slow down epoch by 10-20s per week when epoch duration is 1 week. This should be resolved after launch. diff --git a/x/epochs/client/cli/query.go b/x/epochs/client/cli/query.go index 5a54b74cb..4cf75f50e 100644 --- a/x/epochs/client/cli/query.go +++ b/x/epochs/client/cli/query.go @@ -24,15 +24,15 @@ func GetQueryCmd() *cobra.Command { } cmd.AddCommand( - GetCmdEpochsInfos(), + GetCmdEpochInfos(), GetCmdCurrentEpoch(), ) return cmd } -// GetCmdEpochsInfos provide running epochInfos. -func GetCmdEpochsInfos() *cobra.Command { +// GetCmdEpochInfos provide running epochInfos. +func GetCmdEpochInfos() *cobra.Command { cmd := &cobra.Command{ Use: "epoch-infos", Short: "Query running epochInfos", @@ -53,7 +53,7 @@ $ %s query epochs epoch-infos } queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.EpochInfos(cmd.Context(), &types.QueryEpochsInfoRequest{}) + res, err := queryClient.EpochInfos(cmd.Context(), &types.QueryEpochInfosRequest{}) if err != nil { return err } diff --git a/x/epochs/keeper/grpc_query.go b/x/epochs/keeper/grpc_query.go index 9062e4c23..3ecf1833a 100644 --- a/x/epochs/keeper/grpc_query.go +++ b/x/epochs/keeper/grpc_query.go @@ -21,10 +21,10 @@ func NewQuerier(k Keeper) Querier { } // EpochInfos provide running epochInfos. -func (q Querier) EpochInfos(c context.Context, _ *types.QueryEpochsInfoRequest) (*types.QueryEpochsInfoResponse, error) { +func (q Querier) EpochInfos(c context.Context, _ *types.QueryEpochInfosRequest) (*types.QueryEpochInfosResponse, error) { ctx := sdk.UnwrapSDKContext(c) - return &types.QueryEpochsInfoResponse{ + return &types.QueryEpochInfosResponse{ Epochs: q.Keeper.AllEpochInfos(ctx), }, nil } diff --git a/x/epochs/keeper/grpc_query_test.go b/x/epochs/keeper/grpc_query_test.go index fe522d184..591ad991f 100644 --- a/x/epochs/keeper/grpc_query_test.go +++ b/x/epochs/keeper/grpc_query_test.go @@ -28,7 +28,7 @@ func TestQueryEpochInfos(t *testing.T) { // Invalid param epochInfosResponse, err := queryClient.EpochInfos( - gocontext.Background(), &epochstypes.QueryEpochsInfoRequest{}, + gocontext.Background(), &epochstypes.QueryEpochInfosRequest{}, ) require.NoError(t, err, errMsg) require.Len(t, epochInfosResponse.Epochs, 3) diff --git a/x/epochs/types/export.go b/x/epochs/types/export.go new file mode 100644 index 000000000..fb4b6e3b6 --- /dev/null +++ b/x/epochs/types/export.go @@ -0,0 +1,12 @@ +package types + +import ( + grpc "google.golang.org/grpc" +) + +// GrpcQueryServiceDesc represents the query server's RPC service specification. +// This gives access to the service name and method names needed for stargate +// queries. +func GrpcQueryServiceDesc() grpc.ServiceDesc { + return _Query_serviceDesc +} diff --git a/x/epochs/types/query.pb.go b/x/epochs/types/query.pb.go index 27f8d21f3..e486ff116 100644 --- a/x/epochs/types/query.pb.go +++ b/x/epochs/types/query.pb.go @@ -30,21 +30,21 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type QueryEpochsInfoRequest struct { +type QueryEpochInfosRequest struct { } -func (m *QueryEpochsInfoRequest) Reset() { *m = QueryEpochsInfoRequest{} } -func (m *QueryEpochsInfoRequest) String() string { return proto.CompactTextString(m) } -func (*QueryEpochsInfoRequest) ProtoMessage() {} -func (*QueryEpochsInfoRequest) Descriptor() ([]byte, []int) { +func (m *QueryEpochInfosRequest) Reset() { *m = QueryEpochInfosRequest{} } +func (m *QueryEpochInfosRequest) String() string { return proto.CompactTextString(m) } +func (*QueryEpochInfosRequest) ProtoMessage() {} +func (*QueryEpochInfosRequest) Descriptor() ([]byte, []int) { return fileDescriptor_2d273c3d69b40555, []int{0} } -func (m *QueryEpochsInfoRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryEpochInfosRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryEpochsInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryEpochInfosRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryEpochsInfoRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryEpochInfosRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -54,34 +54,34 @@ func (m *QueryEpochsInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *QueryEpochsInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryEpochsInfoRequest.Merge(m, src) +func (m *QueryEpochInfosRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryEpochInfosRequest.Merge(m, src) } -func (m *QueryEpochsInfoRequest) XXX_Size() int { +func (m *QueryEpochInfosRequest) XXX_Size() int { return m.Size() } -func (m *QueryEpochsInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryEpochsInfoRequest.DiscardUnknown(m) +func (m *QueryEpochInfosRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryEpochInfosRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryEpochsInfoRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryEpochInfosRequest proto.InternalMessageInfo -type QueryEpochsInfoResponse struct { +type QueryEpochInfosResponse struct { Epochs []EpochInfo `protobuf:"bytes,1,rep,name=epochs,proto3" json:"epochs"` } -func (m *QueryEpochsInfoResponse) Reset() { *m = QueryEpochsInfoResponse{} } -func (m *QueryEpochsInfoResponse) String() string { return proto.CompactTextString(m) } -func (*QueryEpochsInfoResponse) ProtoMessage() {} -func (*QueryEpochsInfoResponse) Descriptor() ([]byte, []int) { +func (m *QueryEpochInfosResponse) Reset() { *m = QueryEpochInfosResponse{} } +func (m *QueryEpochInfosResponse) String() string { return proto.CompactTextString(m) } +func (*QueryEpochInfosResponse) ProtoMessage() {} +func (*QueryEpochInfosResponse) Descriptor() ([]byte, []int) { return fileDescriptor_2d273c3d69b40555, []int{1} } -func (m *QueryEpochsInfoResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryEpochInfosResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryEpochsInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryEpochInfosResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryEpochsInfoResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryEpochInfosResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -91,19 +91,19 @@ func (m *QueryEpochsInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *QueryEpochsInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryEpochsInfoResponse.Merge(m, src) +func (m *QueryEpochInfosResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryEpochInfosResponse.Merge(m, src) } -func (m *QueryEpochsInfoResponse) XXX_Size() int { +func (m *QueryEpochInfosResponse) XXX_Size() int { return m.Size() } -func (m *QueryEpochsInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryEpochsInfoResponse.DiscardUnknown(m) +func (m *QueryEpochInfosResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryEpochInfosResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryEpochsInfoResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryEpochInfosResponse proto.InternalMessageInfo -func (m *QueryEpochsInfoResponse) GetEpochs() []EpochInfo { +func (m *QueryEpochInfosResponse) GetEpochs() []EpochInfo { if m != nil { return m.Epochs } @@ -199,8 +199,8 @@ func (m *QueryCurrentEpochResponse) GetCurrentEpoch() uint64 { } func init() { - proto.RegisterType((*QueryEpochsInfoRequest)(nil), "nibiru.epochs.v1.QueryEpochsInfoRequest") - proto.RegisterType((*QueryEpochsInfoResponse)(nil), "nibiru.epochs.v1.QueryEpochsInfoResponse") + proto.RegisterType((*QueryEpochInfosRequest)(nil), "nibiru.epochs.v1.QueryEpochInfosRequest") + proto.RegisterType((*QueryEpochInfosResponse)(nil), "nibiru.epochs.v1.QueryEpochInfosResponse") proto.RegisterType((*QueryCurrentEpochRequest)(nil), "nibiru.epochs.v1.QueryCurrentEpochRequest") proto.RegisterType((*QueryCurrentEpochResponse)(nil), "nibiru.epochs.v1.QueryCurrentEpochResponse") } @@ -250,7 +250,7 @@ const _ = grpc.SupportPackageIsVersion4 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryClient interface { // EpochInfos provide running epochInfos - EpochInfos(ctx context.Context, in *QueryEpochsInfoRequest, opts ...grpc.CallOption) (*QueryEpochsInfoResponse, error) + EpochInfos(ctx context.Context, in *QueryEpochInfosRequest, opts ...grpc.CallOption) (*QueryEpochInfosResponse, error) // CurrentEpoch provide current epoch of specified identifier CurrentEpoch(ctx context.Context, in *QueryCurrentEpochRequest, opts ...grpc.CallOption) (*QueryCurrentEpochResponse, error) } @@ -263,8 +263,8 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } -func (c *queryClient) EpochInfos(ctx context.Context, in *QueryEpochsInfoRequest, opts ...grpc.CallOption) (*QueryEpochsInfoResponse, error) { - out := new(QueryEpochsInfoResponse) +func (c *queryClient) EpochInfos(ctx context.Context, in *QueryEpochInfosRequest, opts ...grpc.CallOption) (*QueryEpochInfosResponse, error) { + out := new(QueryEpochInfosResponse) err := c.cc.Invoke(ctx, "/nibiru.epochs.v1.Query/EpochInfos", in, out, opts...) if err != nil { return nil, err @@ -284,7 +284,7 @@ func (c *queryClient) CurrentEpoch(ctx context.Context, in *QueryCurrentEpochReq // QueryServer is the server API for Query service. type QueryServer interface { // EpochInfos provide running epochInfos - EpochInfos(context.Context, *QueryEpochsInfoRequest) (*QueryEpochsInfoResponse, error) + EpochInfos(context.Context, *QueryEpochInfosRequest) (*QueryEpochInfosResponse, error) // CurrentEpoch provide current epoch of specified identifier CurrentEpoch(context.Context, *QueryCurrentEpochRequest) (*QueryCurrentEpochResponse, error) } @@ -293,7 +293,7 @@ type QueryServer interface { type UnimplementedQueryServer struct { } -func (*UnimplementedQueryServer) EpochInfos(ctx context.Context, req *QueryEpochsInfoRequest) (*QueryEpochsInfoResponse, error) { +func (*UnimplementedQueryServer) EpochInfos(ctx context.Context, req *QueryEpochInfosRequest) (*QueryEpochInfosResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method EpochInfos not implemented") } func (*UnimplementedQueryServer) CurrentEpoch(ctx context.Context, req *QueryCurrentEpochRequest) (*QueryCurrentEpochResponse, error) { @@ -305,7 +305,7 @@ func RegisterQueryServer(s grpc1.Server, srv QueryServer) { } func _Query_EpochInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryEpochsInfoRequest) + in := new(QueryEpochInfosRequest) if err := dec(in); err != nil { return nil, err } @@ -317,7 +317,7 @@ func _Query_EpochInfos_Handler(srv interface{}, ctx context.Context, dec func(in FullMethod: "/nibiru.epochs.v1.Query/EpochInfos", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EpochInfos(ctx, req.(*QueryEpochsInfoRequest)) + return srv.(QueryServer).EpochInfos(ctx, req.(*QueryEpochInfosRequest)) } return interceptor(ctx, in, info, handler) } @@ -357,7 +357,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Metadata: "nibiru/epochs/v1/query.proto", } -func (m *QueryEpochsInfoRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryEpochInfosRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -367,12 +367,12 @@ func (m *QueryEpochsInfoRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryEpochsInfoRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryEpochInfosRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryEpochsInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryEpochInfosRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -380,7 +380,7 @@ func (m *QueryEpochsInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *QueryEpochsInfoResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryEpochInfosResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -390,12 +390,12 @@ func (m *QueryEpochsInfoResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryEpochsInfoResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryEpochInfosResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryEpochsInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryEpochInfosResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -486,7 +486,7 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *QueryEpochsInfoRequest) Size() (n int) { +func (m *QueryEpochInfosRequest) Size() (n int) { if m == nil { return 0 } @@ -495,7 +495,7 @@ func (m *QueryEpochsInfoRequest) Size() (n int) { return n } -func (m *QueryEpochsInfoResponse) Size() (n int) { +func (m *QueryEpochInfosResponse) Size() (n int) { if m == nil { return 0 } @@ -541,7 +541,7 @@ func sovQuery(x uint64) (n int) { func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *QueryEpochsInfoRequest) Unmarshal(dAtA []byte) error { +func (m *QueryEpochInfosRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -564,10 +564,10 @@ func (m *QueryEpochsInfoRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryEpochsInfoRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryEpochInfosRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryEpochsInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryEpochInfosRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -591,7 +591,7 @@ func (m *QueryEpochsInfoRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryEpochsInfoResponse) Unmarshal(dAtA []byte) error { +func (m *QueryEpochInfosResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -614,10 +614,10 @@ func (m *QueryEpochsInfoResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryEpochsInfoResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryEpochInfosResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryEpochsInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryEpochInfosResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/epochs/types/query.pb.gw.go b/x/epochs/types/query.pb.gw.go index c4ef607d0..3286ae0bc 100644 --- a/x/epochs/types/query.pb.gw.go +++ b/x/epochs/types/query.pb.gw.go @@ -34,7 +34,7 @@ var _ = descriptor.ForMessage var _ = metadata.Join func request_Query_EpochInfos_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryEpochsInfoRequest + var protoReq QueryEpochInfosRequest var metadata runtime.ServerMetadata msg, err := client.EpochInfos(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -43,7 +43,7 @@ func request_Query_EpochInfos_0(ctx context.Context, marshaler runtime.Marshaler } func local_request_Query_EpochInfos_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryEpochsInfoRequest + var protoReq QueryEpochInfosRequest var metadata runtime.ServerMetadata msg, err := server.EpochInfos(ctx, &protoReq) diff --git a/x/inflation/types/export.go b/x/inflation/types/export.go new file mode 100644 index 000000000..fb4b6e3b6 --- /dev/null +++ b/x/inflation/types/export.go @@ -0,0 +1,12 @@ +package types + +import ( + grpc "google.golang.org/grpc" +) + +// GrpcQueryServiceDesc represents the query server's RPC service specification. +// This gives access to the service name and method names needed for stargate +// queries. +func GrpcQueryServiceDesc() grpc.ServiceDesc { + return _Query_serviceDesc +} diff --git a/x/oracle/types/export.go b/x/oracle/types/export.go new file mode 100644 index 000000000..fb4b6e3b6 --- /dev/null +++ b/x/oracle/types/export.go @@ -0,0 +1,12 @@ +package types + +import ( + grpc "google.golang.org/grpc" +) + +// GrpcQueryServiceDesc represents the query server's RPC service specification. +// This gives access to the service name and method names needed for stargate +// queries. +func GrpcQueryServiceDesc() grpc.ServiceDesc { + return _Query_serviceDesc +} diff --git a/x/perp/v2/types/export.go b/x/perp/v2/types/export.go new file mode 100644 index 000000000..fb4b6e3b6 --- /dev/null +++ b/x/perp/v2/types/export.go @@ -0,0 +1,12 @@ +package types + +import ( + grpc "google.golang.org/grpc" +) + +// GrpcQueryServiceDesc represents the query server's RPC service specification. +// This gives access to the service name and method names needed for stargate +// queries. +func GrpcQueryServiceDesc() grpc.ServiceDesc { + return _Query_serviceDesc +} diff --git a/x/spot/types/export.go b/x/spot/types/export.go new file mode 100644 index 000000000..fb4b6e3b6 --- /dev/null +++ b/x/spot/types/export.go @@ -0,0 +1,12 @@ +package types + +import ( + grpc "google.golang.org/grpc" +) + +// GrpcQueryServiceDesc represents the query server's RPC service specification. +// This gives access to the service name and method names needed for stargate +// queries. +func GrpcQueryServiceDesc() grpc.ServiceDesc { + return _Query_serviceDesc +} diff --git a/x/stablecoin/types/events.pb.go b/x/stablecoin/types/events.pb.go deleted file mode 100644 index c1304ccf5..000000000 --- a/x/stablecoin/types/events.pb.go +++ /dev/null @@ -1,1749 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: nibiru/stablecoin/v1/events.proto - -package types - -import ( - fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/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 EventTransfer struct { - Coin types.Coin `protobuf:"bytes,1,opt,name=coin,proto3" json:"coin"` - From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` - To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` -} - -func (m *EventTransfer) Reset() { *m = EventTransfer{} } -func (m *EventTransfer) String() string { return proto.CompactTextString(m) } -func (*EventTransfer) ProtoMessage() {} -func (*EventTransfer) Descriptor() ([]byte, []int) { - return fileDescriptor_10d156cd0ca9fb9a, []int{0} -} -func (m *EventTransfer) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventTransfer.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 *EventTransfer) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventTransfer.Merge(m, src) -} -func (m *EventTransfer) XXX_Size() int { - return m.Size() -} -func (m *EventTransfer) XXX_DiscardUnknown() { - xxx_messageInfo_EventTransfer.DiscardUnknown(m) -} - -var xxx_messageInfo_EventTransfer proto.InternalMessageInfo - -func (m *EventTransfer) GetCoin() types.Coin { - if m != nil { - return m.Coin - } - return types.Coin{} -} - -func (m *EventTransfer) GetFrom() string { - if m != nil { - return m.From - } - return "" -} - -func (m *EventTransfer) GetTo() string { - if m != nil { - return m.To - } - return "" -} - -type EventMintStable struct { - Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` -} - -func (m *EventMintStable) Reset() { *m = EventMintStable{} } -func (m *EventMintStable) String() string { return proto.CompactTextString(m) } -func (*EventMintStable) ProtoMessage() {} -func (*EventMintStable) Descriptor() ([]byte, []int) { - return fileDescriptor_10d156cd0ca9fb9a, []int{1} -} -func (m *EventMintStable) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventMintStable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventMintStable.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 *EventMintStable) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventMintStable.Merge(m, src) -} -func (m *EventMintStable) XXX_Size() int { - return m.Size() -} -func (m *EventMintStable) XXX_DiscardUnknown() { - xxx_messageInfo_EventMintStable.DiscardUnknown(m) -} - -var xxx_messageInfo_EventMintStable proto.InternalMessageInfo - -type EventBurnStable struct { - Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` -} - -func (m *EventBurnStable) Reset() { *m = EventBurnStable{} } -func (m *EventBurnStable) String() string { return proto.CompactTextString(m) } -func (*EventBurnStable) ProtoMessage() {} -func (*EventBurnStable) Descriptor() ([]byte, []int) { - return fileDescriptor_10d156cd0ca9fb9a, []int{2} -} -func (m *EventBurnStable) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventBurnStable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventBurnStable.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 *EventBurnStable) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventBurnStable.Merge(m, src) -} -func (m *EventBurnStable) XXX_Size() int { - return m.Size() -} -func (m *EventBurnStable) XXX_DiscardUnknown() { - xxx_messageInfo_EventBurnStable.DiscardUnknown(m) -} - -var xxx_messageInfo_EventBurnStable proto.InternalMessageInfo - -type EventMintNIBI struct { - Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` -} - -func (m *EventMintNIBI) Reset() { *m = EventMintNIBI{} } -func (m *EventMintNIBI) String() string { return proto.CompactTextString(m) } -func (*EventMintNIBI) ProtoMessage() {} -func (*EventMintNIBI) Descriptor() ([]byte, []int) { - return fileDescriptor_10d156cd0ca9fb9a, []int{3} -} -func (m *EventMintNIBI) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventMintNIBI) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventMintNIBI.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 *EventMintNIBI) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventMintNIBI.Merge(m, src) -} -func (m *EventMintNIBI) XXX_Size() int { - return m.Size() -} -func (m *EventMintNIBI) XXX_DiscardUnknown() { - xxx_messageInfo_EventMintNIBI.DiscardUnknown(m) -} - -var xxx_messageInfo_EventMintNIBI proto.InternalMessageInfo - -type EventBurnNIBI struct { - Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` -} - -func (m *EventBurnNIBI) Reset() { *m = EventBurnNIBI{} } -func (m *EventBurnNIBI) String() string { return proto.CompactTextString(m) } -func (*EventBurnNIBI) ProtoMessage() {} -func (*EventBurnNIBI) Descriptor() ([]byte, []int) { - return fileDescriptor_10d156cd0ca9fb9a, []int{4} -} -func (m *EventBurnNIBI) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventBurnNIBI) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventBurnNIBI.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 *EventBurnNIBI) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventBurnNIBI.Merge(m, src) -} -func (m *EventBurnNIBI) XXX_Size() int { - return m.Size() -} -func (m *EventBurnNIBI) XXX_DiscardUnknown() { - xxx_messageInfo_EventBurnNIBI.DiscardUnknown(m) -} - -var xxx_messageInfo_EventBurnNIBI proto.InternalMessageInfo - -type EventRecollateralize struct { - Caller string `protobuf:"bytes,1,opt,name=caller,proto3" json:"caller,omitempty"` - InCoin types.Coin `protobuf:"bytes,2,opt,name=in_coin,json=inCoin,proto3" json:"in_coin"` - OutCoin types.Coin `protobuf:"bytes,3,opt,name=out_coin,json=outCoin,proto3" json:"out_coin"` - CollRatio github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=coll_ratio,json=collRatio,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"coll_ratio"` -} - -func (m *EventRecollateralize) Reset() { *m = EventRecollateralize{} } -func (m *EventRecollateralize) String() string { return proto.CompactTextString(m) } -func (*EventRecollateralize) ProtoMessage() {} -func (*EventRecollateralize) Descriptor() ([]byte, []int) { - return fileDescriptor_10d156cd0ca9fb9a, []int{5} -} -func (m *EventRecollateralize) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventRecollateralize) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventRecollateralize.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 *EventRecollateralize) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventRecollateralize.Merge(m, src) -} -func (m *EventRecollateralize) XXX_Size() int { - return m.Size() -} -func (m *EventRecollateralize) XXX_DiscardUnknown() { - xxx_messageInfo_EventRecollateralize.DiscardUnknown(m) -} - -var xxx_messageInfo_EventRecollateralize proto.InternalMessageInfo - -func (m *EventRecollateralize) GetCaller() string { - if m != nil { - return m.Caller - } - return "" -} - -func (m *EventRecollateralize) GetInCoin() types.Coin { - if m != nil { - return m.InCoin - } - return types.Coin{} -} - -func (m *EventRecollateralize) GetOutCoin() types.Coin { - if m != nil { - return m.OutCoin - } - return types.Coin{} -} - -type EventBuyback struct { - Caller string `protobuf:"bytes,1,opt,name=caller,proto3" json:"caller,omitempty"` - InCoin types.Coin `protobuf:"bytes,2,opt,name=in_coin,json=inCoin,proto3" json:"in_coin"` - OutCoin types.Coin `protobuf:"bytes,3,opt,name=out_coin,json=outCoin,proto3" json:"out_coin"` - CollRatio github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=coll_ratio,json=collRatio,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"coll_ratio"` -} - -func (m *EventBuyback) Reset() { *m = EventBuyback{} } -func (m *EventBuyback) String() string { return proto.CompactTextString(m) } -func (*EventBuyback) ProtoMessage() {} -func (*EventBuyback) Descriptor() ([]byte, []int) { - return fileDescriptor_10d156cd0ca9fb9a, []int{6} -} -func (m *EventBuyback) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventBuyback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventBuyback.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 *EventBuyback) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventBuyback.Merge(m, src) -} -func (m *EventBuyback) XXX_Size() int { - return m.Size() -} -func (m *EventBuyback) XXX_DiscardUnknown() { - xxx_messageInfo_EventBuyback.DiscardUnknown(m) -} - -var xxx_messageInfo_EventBuyback proto.InternalMessageInfo - -func (m *EventBuyback) GetCaller() string { - if m != nil { - return m.Caller - } - return "" -} - -func (m *EventBuyback) GetInCoin() types.Coin { - if m != nil { - return m.InCoin - } - return types.Coin{} -} - -func (m *EventBuyback) GetOutCoin() types.Coin { - if m != nil { - return m.OutCoin - } - return types.Coin{} -} - -func init() { - proto.RegisterType((*EventTransfer)(nil), "nibiru.stablecoin.v1.EventTransfer") - proto.RegisterType((*EventMintStable)(nil), "nibiru.stablecoin.v1.EventMintStable") - proto.RegisterType((*EventBurnStable)(nil), "nibiru.stablecoin.v1.EventBurnStable") - proto.RegisterType((*EventMintNIBI)(nil), "nibiru.stablecoin.v1.EventMintNIBI") - proto.RegisterType((*EventBurnNIBI)(nil), "nibiru.stablecoin.v1.EventBurnNIBI") - proto.RegisterType((*EventRecollateralize)(nil), "nibiru.stablecoin.v1.EventRecollateralize") - proto.RegisterType((*EventBuyback)(nil), "nibiru.stablecoin.v1.EventBuyback") -} - -func init() { proto.RegisterFile("nibiru/stablecoin/v1/events.proto", fileDescriptor_10d156cd0ca9fb9a) } - -var fileDescriptor_10d156cd0ca9fb9a = []byte{ - // 434 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x94, 0x3f, 0x6f, 0xd4, 0x30, - 0x18, 0xc6, 0xe3, 0x34, 0x4a, 0x39, 0xf3, 0x4f, 0xb2, 0x4e, 0x28, 0x74, 0x48, 0xcb, 0x0d, 0xa8, - 0x0b, 0x36, 0xa1, 0x0b, 0x62, 0x4c, 0x01, 0xe9, 0x90, 0xda, 0x21, 0x20, 0x21, 0x58, 0x2a, 0x27, - 0xb8, 0x77, 0x56, 0x13, 0xbf, 0x95, 0xed, 0x44, 0x94, 0x4f, 0xc1, 0xc7, 0xea, 0xd8, 0x11, 0x31, - 0x9c, 0xd0, 0xdd, 0xc8, 0xc8, 0x17, 0x40, 0x76, 0x22, 0xb8, 0xf1, 0x90, 0x6e, 0x62, 0x8a, 0x1d, - 0x3f, 0xcf, 0xef, 0x7d, 0xec, 0x57, 0x7a, 0xf1, 0x23, 0x25, 0x4b, 0xa9, 0x5b, 0x66, 0x2c, 0x2f, - 0x6b, 0x51, 0x81, 0x54, 0xac, 0xcb, 0x98, 0xe8, 0x84, 0xb2, 0x86, 0x5e, 0x6a, 0xb0, 0x40, 0xc6, - 0xbd, 0x84, 0xfe, 0x95, 0xd0, 0x2e, 0xdb, 0x1b, 0xcf, 0x60, 0x06, 0x5e, 0xc0, 0xdc, 0xaa, 0xd7, - 0xee, 0xa5, 0x15, 0x98, 0x06, 0x0c, 0x2b, 0xb9, 0x11, 0xac, 0xcb, 0x4a, 0x61, 0x79, 0xc6, 0xbc, - 0xc5, 0x9f, 0x4f, 0xe6, 0xf8, 0xee, 0x2b, 0xc7, 0x7e, 0xa7, 0xb9, 0x32, 0xe7, 0x42, 0x93, 0x23, - 0x1c, 0xb9, 0xe3, 0x04, 0x1d, 0xa0, 0xc3, 0xdb, 0xcf, 0x1e, 0xd2, 0xde, 0x4f, 0x9d, 0x9f, 0x0e, - 0x7e, 0x7a, 0x0c, 0x52, 0xe5, 0xd1, 0xf5, 0x62, 0x3f, 0x28, 0xbc, 0x98, 0x10, 0x1c, 0x9d, 0x6b, - 0x68, 0x92, 0xf0, 0x00, 0x1d, 0x8e, 0x0a, 0xbf, 0x26, 0xf7, 0x70, 0x68, 0x21, 0xd9, 0xf1, 0x7f, - 0x42, 0x0b, 0x93, 0x0f, 0xf8, 0xbe, 0xaf, 0x74, 0x22, 0x95, 0x7d, 0xeb, 0x93, 0x93, 0xd7, 0x38, - 0xe6, 0x0d, 0xb4, 0xca, 0xfa, 0x6a, 0xa3, 0x9c, 0x3a, 0xe4, 0xf7, 0xc5, 0xfe, 0xe3, 0x99, 0xb4, - 0xf3, 0xb6, 0xa4, 0x15, 0x34, 0x6c, 0xc8, 0xdf, 0x7f, 0x9e, 0x98, 0x4f, 0x17, 0xcc, 0x5e, 0x5d, - 0x0a, 0x43, 0xa7, 0xca, 0x16, 0x83, 0xfb, 0x0f, 0x3a, 0x6f, 0xb5, 0xda, 0x32, 0xfa, 0xfd, 0xf0, - 0x3e, 0x2e, 0xf5, 0xe9, 0x34, 0x9f, 0x6e, 0x1d, 0xec, 0x32, 0x6f, 0x15, 0xfc, 0x0b, 0xe1, 0xb1, - 0x27, 0x17, 0xa2, 0x82, 0xba, 0xe6, 0x56, 0x68, 0x5e, 0xcb, 0x2f, 0x82, 0x3c, 0xc0, 0x71, 0xc5, - 0xeb, 0x5a, 0xe8, 0xbe, 0x40, 0x31, 0xec, 0xc8, 0x73, 0xbc, 0x2b, 0xd5, 0x99, 0x6f, 0x7a, 0xb8, - 0x59, 0xd3, 0x63, 0xa9, 0xdc, 0x8e, 0xbc, 0xc0, 0xb7, 0xa0, 0xb5, 0xbd, 0x75, 0x67, 0x33, 0xeb, - 0x2e, 0xb4, 0xd6, 0x7b, 0x4f, 0x30, 0x76, 0xf1, 0xce, 0x34, 0xb7, 0x12, 0x92, 0xe8, 0x9f, 0xaf, - 0xfc, 0x52, 0x54, 0xc5, 0xc8, 0x11, 0x0a, 0x07, 0x98, 0xfc, 0x44, 0xf8, 0xce, 0xf0, 0x9e, 0x57, - 0x25, 0xaf, 0x2e, 0xfe, 0xeb, 0xdb, 0xe6, 0x6f, 0xae, 0x97, 0x29, 0xba, 0x59, 0xa6, 0xe8, 0xc7, - 0x32, 0x45, 0x5f, 0x57, 0x69, 0x70, 0xb3, 0x4a, 0x83, 0x6f, 0xab, 0x34, 0xf8, 0xf8, 0x74, 0x0d, - 0x76, 0xea, 0xc7, 0xc4, 0xf1, 0x9c, 0x4b, 0xc5, 0x86, 0xa9, 0xf2, 0x79, 0x7d, 0xae, 0x78, 0x74, - 0x19, 0xfb, 0x41, 0x70, 0xf4, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x5c, 0x6f, 0x32, 0xc4, 0x79, 0x04, - 0x00, 0x00, -} - -func (m *EventTransfer) 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 *EventTransfer) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.To) > 0 { - i -= len(m.To) - copy(dAtA[i:], m.To) - i = encodeVarintEvents(dAtA, i, uint64(len(m.To))) - i-- - dAtA[i] = 0x1a - } - if len(m.From) > 0 { - i -= len(m.From) - copy(dAtA[i:], m.From) - i = encodeVarintEvents(dAtA, i, uint64(len(m.From))) - i-- - dAtA[i] = 0x12 - } - { - size, err := m.Coin.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EventMintStable) 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 *EventMintStable) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventMintStable) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EventBurnStable) 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 *EventBurnStable) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventBurnStable) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EventMintNIBI) 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 *EventMintNIBI) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventMintNIBI) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EventBurnNIBI) 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 *EventBurnNIBI) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventBurnNIBI) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EventRecollateralize) 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 *EventRecollateralize) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventRecollateralize) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.CollRatio.Size() - i -= size - if _, err := m.CollRatio.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size, err := m.OutCoin.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.InCoin.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Caller) > 0 { - i -= len(m.Caller) - copy(dAtA[i:], m.Caller) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Caller))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventBuyback) 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 *EventBuyback) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventBuyback) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.CollRatio.Size() - i -= size - if _, err := m.CollRatio.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size, err := m.OutCoin.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.InCoin.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Caller) > 0 { - i -= len(m.Caller) - copy(dAtA[i:], m.Caller) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Caller))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { - offset -= sovEvents(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *EventTransfer) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Coin.Size() - n += 1 + l + sovEvents(uint64(l)) - l = len(m.From) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.To) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - return n -} - -func (m *EventMintStable) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Amount.Size() - n += 1 + l + sovEvents(uint64(l)) - return n -} - -func (m *EventBurnStable) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Amount.Size() - n += 1 + l + sovEvents(uint64(l)) - return n -} - -func (m *EventMintNIBI) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Amount.Size() - n += 1 + l + sovEvents(uint64(l)) - return n -} - -func (m *EventBurnNIBI) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Amount.Size() - n += 1 + l + sovEvents(uint64(l)) - return n -} - -func (m *EventRecollateralize) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Caller) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = m.InCoin.Size() - n += 1 + l + sovEvents(uint64(l)) - l = m.OutCoin.Size() - n += 1 + l + sovEvents(uint64(l)) - l = m.CollRatio.Size() - n += 1 + l + sovEvents(uint64(l)) - return n -} - -func (m *EventBuyback) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Caller) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = m.InCoin.Size() - n += 1 + l + sovEvents(uint64(l)) - l = m.OutCoin.Size() - n += 1 + l + sovEvents(uint64(l)) - l = m.CollRatio.Size() - n += 1 + l + sovEvents(uint64(l)) - return n -} - -func sovEvents(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozEvents(x uint64) (n int) { - return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *EventTransfer) 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 ErrIntOverflowEvents - } - 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: EventTransfer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventTransfer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Coin", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Coin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - 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 ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.From = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - 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 ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.To = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventMintStable) 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 ErrIntOverflowEvents - } - 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: EventMintStable: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventMintStable: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - 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 ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventBurnStable) 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 ErrIntOverflowEvents - } - 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: EventBurnStable: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventBurnStable: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - 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 ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventMintNIBI) 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 ErrIntOverflowEvents - } - 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: EventMintNIBI: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventMintNIBI: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - 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 ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventBurnNIBI) 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 ErrIntOverflowEvents - } - 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: EventBurnNIBI: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventBurnNIBI: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - 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 ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventRecollateralize) 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 ErrIntOverflowEvents - } - 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: EventRecollateralize: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventRecollateralize: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Caller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - 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 ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Caller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InCoin", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.InCoin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutCoin", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.OutCoin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CollRatio", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - 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 ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CollRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventBuyback) 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 ErrIntOverflowEvents - } - 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: EventBuyback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventBuyback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Caller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - 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 ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Caller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InCoin", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.InCoin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutCoin", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.OutCoin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CollRatio", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - 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 ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CollRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipEvents(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, ErrIntOverflowEvents - } - 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, ErrIntOverflowEvents - } - 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, ErrIntOverflowEvents - } - 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, ErrInvalidLengthEvents - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupEvents - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthEvents - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/stablecoin/types/genesis.pb.go b/x/stablecoin/types/genesis.pb.go deleted file mode 100644 index db29b5597..000000000 --- a/x/stablecoin/types/genesis.pb.go +++ /dev/null @@ -1,383 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: nibiru/stablecoin/v1/genesis.proto - -package types - -import ( - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/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 - -// GenesisState defines the stablecoin module's genesis state. -type GenesisState struct { - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` - ModuleAccountBalance types.Coin `protobuf:"bytes,2,opt,name=module_account_balance,json=moduleAccountBalance,proto3" json:"module_account_balance" yaml:"module_account_balance"` -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} -func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_0aa97d97dd3fb3f7, []int{0} -} -func (m *GenesisState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState.Merge(m, src) -} -func (m *GenesisState) XXX_Size() int { - return m.Size() -} -func (m *GenesisState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState proto.InternalMessageInfo - -func (m *GenesisState) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -func (m *GenesisState) GetModuleAccountBalance() types.Coin { - if m != nil { - return m.ModuleAccountBalance - } - return types.Coin{} -} - -func init() { - proto.RegisterType((*GenesisState)(nil), "nibiru.stablecoin.v1.GenesisState") -} - -func init() { - proto.RegisterFile("nibiru/stablecoin/v1/genesis.proto", fileDescriptor_0aa97d97dd3fb3f7) -} - -var fileDescriptor_0aa97d97dd3fb3f7 = []byte{ - // 298 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x50, 0xb1, 0x4e, 0xc3, 0x30, - 0x14, 0x8c, 0x11, 0xea, 0x10, 0x98, 0xaa, 0x0a, 0x95, 0x0a, 0x5c, 0x88, 0x84, 0xc4, 0x64, 0x13, - 0xd8, 0xba, 0x91, 0x0e, 0x48, 0x0c, 0x08, 0x95, 0x8d, 0xa5, 0xb2, 0x8d, 0x95, 0x5a, 0x4a, 0xfc, - 0xaa, 0xd8, 0x89, 0xe8, 0x5f, 0xf0, 0x4d, 0x4c, 0x1d, 0x3b, 0x32, 0x55, 0x28, 0xf9, 0x03, 0xbe, - 0x00, 0xc5, 0x8e, 0x04, 0x43, 0xb6, 0xa7, 0x7b, 0xf7, 0xee, 0xdd, 0x5d, 0x18, 0x69, 0xc5, 0x55, - 0x51, 0x52, 0x63, 0x19, 0xcf, 0xa4, 0x00, 0xa5, 0x69, 0x15, 0xd3, 0x54, 0x6a, 0x69, 0x94, 0x21, - 0xeb, 0x02, 0x2c, 0x0c, 0x47, 0x9e, 0x43, 0xfe, 0x38, 0xa4, 0x8a, 0x27, 0x58, 0x80, 0xc9, 0xc1, - 0x50, 0xce, 0x8c, 0xa4, 0x55, 0xcc, 0xa5, 0x65, 0x31, 0x75, 0x4b, 0x77, 0x35, 0x19, 0xa5, 0x90, - 0x82, 0x1b, 0x69, 0x3b, 0x75, 0xe8, 0x65, 0xef, 0xbf, 0x35, 0x2b, 0x58, 0xde, 0xbd, 0x8b, 0x3e, - 0x51, 0x78, 0xfc, 0xe0, 0x0d, 0xbc, 0x58, 0x66, 0xe5, 0x70, 0x16, 0x0e, 0x3c, 0x61, 0x8c, 0x2e, - 0xd0, 0xf5, 0xd1, 0xed, 0x19, 0xe9, 0x33, 0x44, 0x9e, 0x1d, 0x27, 0x39, 0xdc, 0xee, 0xa7, 0xc1, - 0xa2, 0xbb, 0x18, 0x56, 0xe1, 0x49, 0x0e, 0x6f, 0x65, 0x26, 0x97, 0x4c, 0x08, 0x28, 0xb5, 0x5d, - 0x72, 0x96, 0x31, 0x2d, 0xe4, 0xf8, 0xc0, 0x69, 0x9d, 0x12, 0x1f, 0x83, 0xb4, 0x31, 0x48, 0x17, - 0x83, 0xcc, 0x41, 0xe9, 0xe4, 0xaa, 0x15, 0xfa, 0xd9, 0x4f, 0xcf, 0x37, 0x2c, 0xcf, 0x66, 0x51, - 0xbf, 0x4c, 0xb4, 0x18, 0xf9, 0xc5, 0xbd, 0xc7, 0x13, 0x0f, 0x27, 0x8f, 0xdb, 0x1a, 0xa3, 0x5d, - 0x8d, 0xd1, 0x77, 0x8d, 0xd1, 0x47, 0x83, 0x83, 0x5d, 0x83, 0x83, 0xaf, 0x06, 0x07, 0xaf, 0x37, - 0xa9, 0xb2, 0xab, 0x92, 0x13, 0x01, 0x39, 0x7d, 0x72, 0x39, 0xe6, 0x2b, 0xa6, 0x34, 0xed, 0x8a, - 0x79, 0xff, 0x5f, 0x8d, 0xdd, 0xac, 0xa5, 0xe1, 0x03, 0xd7, 0xcb, 0xdd, 0x6f, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xf8, 0x3a, 0xd0, 0x91, 0xac, 0x01, 0x00, 0x00, -} - -func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ModuleAccountBalance.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovGenesis(uint64(l)) - l = m.ModuleAccountBalance.Size() - n += 1 + l + sovGenesis(uint64(l)) - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GenesisState) 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 ErrIntOverflowGenesis - } - 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: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ModuleAccountBalance", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ModuleAccountBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenesis(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, ErrIntOverflowGenesis - } - 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, ErrIntOverflowGenesis - } - 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, ErrIntOverflowGenesis - } - 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, ErrInvalidLengthGenesis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenesis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenesis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/stablecoin/types/params.pb.go b/x/stablecoin/types/params.pb.go deleted file mode 100644 index 5e50937e4..000000000 --- a/x/stablecoin/types/params.pb.go +++ /dev/null @@ -1,631 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: nibiru/stablecoin/v1/params.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/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 - -// Params defines the parameters for the module. -type Params struct { - // collRatio is the ratio needed as collateral to exchange for stables - CollRatio int64 `protobuf:"varint,1,opt,name=coll_ratio,json=collRatio,proto3" json:"coll_ratio,omitempty"` - // feeRatio is the ratio taken as fees when minting or burning stables - FeeRatio int64 `protobuf:"varint,2,opt,name=fee_ratio,json=feeRatio,proto3" json:"fee_ratio,omitempty"` - // efFeeRatio is the ratio taken from the fees that goes to Ecosystem Fund - EfFeeRatio int64 `protobuf:"varint,3,opt,name=ef_fee_ratio,json=efFeeRatio,proto3" json:"ef_fee_ratio,omitempty"` - // BonusRateRecoll is the percentage of extra stablecoin value given to the - // caller of 'Recollateralize' in units of governance tokens. - BonusRateRecoll int64 `protobuf:"varint,4,opt,name=bonus_rate_recoll,json=bonusRateRecoll,proto3" json:"bonus_rate_recoll,omitempty"` - // distr_epoch_identifier defines the frequnecy of update for the collateral - // ratio - DistrEpochIdentifier string `protobuf:"bytes,5,opt,name=distr_epoch_identifier,json=distrEpochIdentifier,proto3" json:"distr_epoch_identifier,omitempty" yaml:"distr_epoch_identifier"` - // adjustmentStep is the size of the step taken when updating the collateral - // ratio - AdjustmentStep int64 `protobuf:"varint,6,opt,name=adjustment_step,json=adjustmentStep,proto3" json:"adjustment_step,omitempty"` - // priceLowerBound is the lower bound for the stable coin to trigger a - // collateral ratio update - PriceLowerBound int64 `protobuf:"varint,7,opt,name=price_lower_bound,json=priceLowerBound,proto3" json:"price_lower_bound,omitempty"` - // priceUpperBound is the upper bound for the stable coin to trigger a - // collateral ratio update - PriceUpperBound int64 `protobuf:"varint,8,opt,name=price_upper_bound,json=priceUpperBound,proto3" json:"price_upper_bound,omitempty"` - // isCollateralRatioValid checks if the collateral ratio is correctly updated - IsCollateralRatioValid bool `protobuf:"varint,9,opt,name=is_collateral_ratio_valid,json=isCollateralRatioValid,proto3" json:"is_collateral_ratio_valid,omitempty"` -} - -func (m *Params) Reset() { *m = Params{} } -func (m *Params) String() string { return proto.CompactTextString(m) } -func (*Params) ProtoMessage() {} -func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_2d2b84d268bc3814, []int{0} -} -func (m *Params) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { - xxx_messageInfo_Params.Merge(m, src) -} -func (m *Params) XXX_Size() int { - return m.Size() -} -func (m *Params) XXX_DiscardUnknown() { - xxx_messageInfo_Params.DiscardUnknown(m) -} - -var xxx_messageInfo_Params proto.InternalMessageInfo - -func (m *Params) GetCollRatio() int64 { - if m != nil { - return m.CollRatio - } - return 0 -} - -func (m *Params) GetFeeRatio() int64 { - if m != nil { - return m.FeeRatio - } - return 0 -} - -func (m *Params) GetEfFeeRatio() int64 { - if m != nil { - return m.EfFeeRatio - } - return 0 -} - -func (m *Params) GetBonusRateRecoll() int64 { - if m != nil { - return m.BonusRateRecoll - } - return 0 -} - -func (m *Params) GetDistrEpochIdentifier() string { - if m != nil { - return m.DistrEpochIdentifier - } - return "" -} - -func (m *Params) GetAdjustmentStep() int64 { - if m != nil { - return m.AdjustmentStep - } - return 0 -} - -func (m *Params) GetPriceLowerBound() int64 { - if m != nil { - return m.PriceLowerBound - } - return 0 -} - -func (m *Params) GetPriceUpperBound() int64 { - if m != nil { - return m.PriceUpperBound - } - return 0 -} - -func (m *Params) GetIsCollateralRatioValid() bool { - if m != nil { - return m.IsCollateralRatioValid - } - return false -} - -func init() { - proto.RegisterType((*Params)(nil), "nibiru.stablecoin.v1.Params") -} - -func init() { proto.RegisterFile("nibiru/stablecoin/v1/params.proto", fileDescriptor_2d2b84d268bc3814) } - -var fileDescriptor_2d2b84d268bc3814 = []byte{ - // 400 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xc1, 0x8a, 0xd3, 0x40, - 0x18, 0x80, 0x1b, 0xab, 0xb5, 0x19, 0xc4, 0x62, 0x28, 0x25, 0x2a, 0x8d, 0x69, 0x2f, 0x16, 0x0f, - 0x89, 0xc5, 0x93, 0x1e, 0x5b, 0x14, 0x14, 0x11, 0x89, 0xa8, 0xb0, 0x97, 0x61, 0x92, 0xfc, 0x69, - 0x67, 0x49, 0x32, 0xc3, 0xcc, 0xa4, 0xbb, 0x7d, 0x8b, 0x7d, 0x8b, 0x7d, 0x95, 0x3d, 0xf6, 0xb8, - 0xa7, 0x65, 0x69, 0xdf, 0x60, 0x9f, 0x60, 0x99, 0x49, 0xb7, 0xe9, 0x61, 0x6f, 0xe1, 0xfb, 0xbe, - 0x84, 0x3f, 0x33, 0x3f, 0x1a, 0x95, 0x34, 0xa6, 0xa2, 0x0a, 0xa5, 0x22, 0x71, 0x0e, 0x09, 0xa3, - 0x65, 0xb8, 0x9a, 0x86, 0x9c, 0x08, 0x52, 0xc8, 0x80, 0x0b, 0xa6, 0x98, 0xd3, 0xaf, 0x93, 0xa0, - 0x49, 0x82, 0xd5, 0xf4, 0x4d, 0x7f, 0xc1, 0x16, 0xcc, 0x04, 0xa1, 0x7e, 0xaa, 0xdb, 0xf1, 0x65, - 0x1b, 0x75, 0x7e, 0x9b, 0x97, 0x9d, 0x21, 0x42, 0x09, 0xcb, 0x73, 0x2c, 0x88, 0xa2, 0xcc, 0xb5, - 0x7c, 0x6b, 0xd2, 0x8e, 0x6c, 0x4d, 0x22, 0x0d, 0x9c, 0xb7, 0xc8, 0xce, 0x00, 0xf6, 0xf6, 0x89, - 0xb1, 0xdd, 0x0c, 0xa0, 0x96, 0x3e, 0x7a, 0x01, 0x19, 0x6e, 0x7c, 0xdb, 0x78, 0x04, 0xd9, 0xb7, - 0x87, 0xe2, 0x03, 0x7a, 0x15, 0xb3, 0xb2, 0x92, 0x3a, 0x00, 0x2c, 0x40, 0x7f, 0xd8, 0x7d, 0x6a, - 0xb2, 0x9e, 0x11, 0x11, 0x51, 0x10, 0x19, 0xec, 0xfc, 0x47, 0x83, 0x94, 0x4a, 0x25, 0x30, 0x70, - 0x96, 0x2c, 0x31, 0x4d, 0xa1, 0x54, 0x34, 0xa3, 0x20, 0xdc, 0x67, 0xbe, 0x35, 0xb1, 0x67, 0xa3, - 0xbb, 0x9b, 0x77, 0xc3, 0x35, 0x29, 0xf2, 0x2f, 0xe3, 0xc7, 0xbb, 0x71, 0xd4, 0x37, 0xe2, 0xab, - 0xe6, 0xdf, 0x0f, 0xd8, 0x79, 0x8f, 0x7a, 0x24, 0x3d, 0xad, 0xa4, 0x2a, 0xa0, 0x54, 0x58, 0x2a, - 0xe0, 0x6e, 0xc7, 0x8c, 0xf0, 0xb2, 0xc1, 0x7f, 0x14, 0x70, 0x3d, 0x2d, 0x17, 0x34, 0x01, 0x9c, - 0xb3, 0x33, 0x10, 0x38, 0x66, 0x55, 0x99, 0xba, 0xcf, 0xeb, 0x69, 0x8d, 0xf8, 0xa9, 0xf9, 0x4c, - 0xe3, 0xa6, 0xad, 0x38, 0x3f, 0xb4, 0xdd, 0xa3, 0xf6, 0xaf, 0xe6, 0x75, 0xfb, 0x19, 0xbd, 0xa6, - 0x12, 0xeb, 0x9f, 0x24, 0x0a, 0x04, 0xd9, 0x1f, 0x36, 0x5e, 0x91, 0x9c, 0xa6, 0xae, 0xed, 0x5b, - 0x93, 0x6e, 0x34, 0xa0, 0x72, 0x7e, 0xf0, 0xe6, 0xec, 0xfe, 0x69, 0x3b, 0xfb, 0x71, 0xb5, 0xf5, - 0xac, 0xcd, 0xd6, 0xb3, 0x6e, 0xb7, 0x9e, 0x75, 0xb1, 0xf3, 0x5a, 0x9b, 0x9d, 0xd7, 0xba, 0xde, - 0x79, 0xad, 0x93, 0x8f, 0x0b, 0xaa, 0x96, 0x55, 0x1c, 0x24, 0xac, 0x08, 0x7f, 0x99, 0xab, 0x9f, - 0x2f, 0x09, 0x2d, 0xc3, 0xfd, 0xa6, 0x9c, 0x1f, 0xef, 0x8a, 0x5a, 0x73, 0x90, 0x71, 0xc7, 0x5c, - 0xfe, 0xa7, 0xfb, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x67, 0x2b, 0x61, 0x4d, 0x02, 0x00, 0x00, -} - -func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IsCollateralRatioValid { - i-- - if m.IsCollateralRatioValid { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - } - if m.PriceUpperBound != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.PriceUpperBound)) - i-- - dAtA[i] = 0x40 - } - if m.PriceLowerBound != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.PriceLowerBound)) - i-- - dAtA[i] = 0x38 - } - if m.AdjustmentStep != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.AdjustmentStep)) - i-- - dAtA[i] = 0x30 - } - if len(m.DistrEpochIdentifier) > 0 { - i -= len(m.DistrEpochIdentifier) - copy(dAtA[i:], m.DistrEpochIdentifier) - i = encodeVarintParams(dAtA, i, uint64(len(m.DistrEpochIdentifier))) - i-- - dAtA[i] = 0x2a - } - if m.BonusRateRecoll != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.BonusRateRecoll)) - i-- - dAtA[i] = 0x20 - } - if m.EfFeeRatio != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.EfFeeRatio)) - i-- - dAtA[i] = 0x18 - } - if m.FeeRatio != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.FeeRatio)) - i-- - dAtA[i] = 0x10 - } - if m.CollRatio != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.CollRatio)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintParams(dAtA []byte, offset int, v uint64) int { - offset -= sovParams(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Params) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CollRatio != 0 { - n += 1 + sovParams(uint64(m.CollRatio)) - } - if m.FeeRatio != 0 { - n += 1 + sovParams(uint64(m.FeeRatio)) - } - if m.EfFeeRatio != 0 { - n += 1 + sovParams(uint64(m.EfFeeRatio)) - } - if m.BonusRateRecoll != 0 { - n += 1 + sovParams(uint64(m.BonusRateRecoll)) - } - l = len(m.DistrEpochIdentifier) - if l > 0 { - n += 1 + l + sovParams(uint64(l)) - } - if m.AdjustmentStep != 0 { - n += 1 + sovParams(uint64(m.AdjustmentStep)) - } - if m.PriceLowerBound != 0 { - n += 1 + sovParams(uint64(m.PriceLowerBound)) - } - if m.PriceUpperBound != 0 { - n += 1 + sovParams(uint64(m.PriceUpperBound)) - } - if m.IsCollateralRatioValid { - n += 2 - } - return n -} - -func sovParams(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozParams(x uint64) (n int) { - return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Params) 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 ErrIntOverflowParams - } - 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: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CollRatio", wireType) - } - m.CollRatio = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CollRatio |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeRatio", wireType) - } - m.FeeRatio = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FeeRatio |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EfFeeRatio", wireType) - } - m.EfFeeRatio = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EfFeeRatio |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BonusRateRecoll", wireType) - } - m.BonusRateRecoll = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BonusRateRecoll |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DistrEpochIdentifier", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - 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 ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DistrEpochIdentifier = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AdjustmentStep", wireType) - } - m.AdjustmentStep = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AdjustmentStep |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PriceLowerBound", wireType) - } - m.PriceLowerBound = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PriceLowerBound |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PriceUpperBound", wireType) - } - m.PriceUpperBound = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PriceUpperBound |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsCollateralRatioValid", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsCollateralRatioValid = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipParams(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, ErrIntOverflowParams - } - 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, ErrIntOverflowParams - } - 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, ErrIntOverflowParams - } - 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, ErrInvalidLengthParams - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupParams - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthParams - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/stablecoin/types/query.pb.go b/x/stablecoin/types/query.pb.go deleted file mode 100644 index bdba4d595..000000000 --- a/x/stablecoin/types/query.pb.go +++ /dev/null @@ -1,2225 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: nibiru/stablecoin/v1/query.proto - -package types - -import ( - context "context" - fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - 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 - -// QueryParamsRequest is request type for the Query/Params RPC method. -type QueryParamsRequest struct { -} - -func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } -func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryParamsRequest) ProtoMessage() {} -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cd427158b4504e94, []int{0} -} -func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsRequest.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 *QueryParamsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsRequest.Merge(m, src) -} -func (m *QueryParamsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo - -// QueryParamsResponse is response type for the Query/Params RPC method. -type QueryParamsResponse struct { - // params holds all the parameters of this module. - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` -} - -func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } -func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsResponse) ProtoMessage() {} -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cd427158b4504e94, []int{1} -} -func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsResponse.Merge(m, src) -} -func (m *QueryParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo - -func (m *QueryParamsResponse) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -// QueryModuleAccountBalances is the request type for the balance of the -// x/stablecoin module account. -type QueryModuleAccountBalances struct { -} - -func (m *QueryModuleAccountBalances) Reset() { *m = QueryModuleAccountBalances{} } -func (m *QueryModuleAccountBalances) String() string { return proto.CompactTextString(m) } -func (*QueryModuleAccountBalances) ProtoMessage() {} -func (*QueryModuleAccountBalances) Descriptor() ([]byte, []int) { - return fileDescriptor_cd427158b4504e94, []int{2} -} -func (m *QueryModuleAccountBalances) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryModuleAccountBalances) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryModuleAccountBalances.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 *QueryModuleAccountBalances) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryModuleAccountBalances.Merge(m, src) -} -func (m *QueryModuleAccountBalances) XXX_Size() int { - return m.Size() -} -func (m *QueryModuleAccountBalances) XXX_DiscardUnknown() { - xxx_messageInfo_QueryModuleAccountBalances.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryModuleAccountBalances proto.InternalMessageInfo - -type QueryModuleAccountBalancesResponse struct { - // ModuleAccountBalances is the balance of all coins in the x/stablecoin - // module. - ModuleAccountBalances github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=module_account_balances,json=moduleAccountBalances,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"module_account_balances" yaml:"coins"` -} - -func (m *QueryModuleAccountBalancesResponse) Reset() { *m = QueryModuleAccountBalancesResponse{} } -func (m *QueryModuleAccountBalancesResponse) String() string { return proto.CompactTextString(m) } -func (*QueryModuleAccountBalancesResponse) ProtoMessage() {} -func (*QueryModuleAccountBalancesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cd427158b4504e94, []int{3} -} -func (m *QueryModuleAccountBalancesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryModuleAccountBalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryModuleAccountBalancesResponse.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 *QueryModuleAccountBalancesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryModuleAccountBalancesResponse.Merge(m, src) -} -func (m *QueryModuleAccountBalancesResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryModuleAccountBalancesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryModuleAccountBalancesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryModuleAccountBalancesResponse proto.InternalMessageInfo - -func (m *QueryModuleAccountBalancesResponse) GetModuleAccountBalances() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.ModuleAccountBalances - } - return nil -} - -// QueryCirculatingSupplies is the request type for the circulating supply of -// both NIBI and NUSD. -type QueryCirculatingSupplies struct { -} - -func (m *QueryCirculatingSupplies) Reset() { *m = QueryCirculatingSupplies{} } -func (m *QueryCirculatingSupplies) String() string { return proto.CompactTextString(m) } -func (*QueryCirculatingSupplies) ProtoMessage() {} -func (*QueryCirculatingSupplies) Descriptor() ([]byte, []int) { - return fileDescriptor_cd427158b4504e94, []int{4} -} -func (m *QueryCirculatingSupplies) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryCirculatingSupplies) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryCirculatingSupplies.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 *QueryCirculatingSupplies) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCirculatingSupplies.Merge(m, src) -} -func (m *QueryCirculatingSupplies) XXX_Size() int { - return m.Size() -} -func (m *QueryCirculatingSupplies) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCirculatingSupplies.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryCirculatingSupplies proto.InternalMessageInfo - -type QueryCirculatingSuppliesResponse struct { - Nibi types.Coin `protobuf:"bytes,1,opt,name=nibi,proto3" json:"nibi"` - Nusd types.Coin `protobuf:"bytes,2,opt,name=nusd,proto3" json:"nusd"` -} - -func (m *QueryCirculatingSuppliesResponse) Reset() { *m = QueryCirculatingSuppliesResponse{} } -func (m *QueryCirculatingSuppliesResponse) String() string { return proto.CompactTextString(m) } -func (*QueryCirculatingSuppliesResponse) ProtoMessage() {} -func (*QueryCirculatingSuppliesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cd427158b4504e94, []int{5} -} -func (m *QueryCirculatingSuppliesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryCirculatingSuppliesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryCirculatingSuppliesResponse.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 *QueryCirculatingSuppliesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCirculatingSuppliesResponse.Merge(m, src) -} -func (m *QueryCirculatingSuppliesResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryCirculatingSuppliesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCirculatingSuppliesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryCirculatingSuppliesResponse proto.InternalMessageInfo - -func (m *QueryCirculatingSuppliesResponse) GetNibi() types.Coin { - if m != nil { - return m.Nibi - } - return types.Coin{} -} - -func (m *QueryCirculatingSuppliesResponse) GetNusd() types.Coin { - if m != nil { - return m.Nusd - } - return types.Coin{} -} - -// QueryGovToMintStable is the request type for the Query/GovToMintStable RPC -// method -type QueryGovToMintStable struct { - Collateral types.Coin `protobuf:"bytes,1,opt,name=collateral,proto3" json:"collateral"` -} - -func (m *QueryGovToMintStable) Reset() { *m = QueryGovToMintStable{} } -func (m *QueryGovToMintStable) String() string { return proto.CompactTextString(m) } -func (*QueryGovToMintStable) ProtoMessage() {} -func (*QueryGovToMintStable) Descriptor() ([]byte, []int) { - return fileDescriptor_cd427158b4504e94, []int{6} -} -func (m *QueryGovToMintStable) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGovToMintStable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGovToMintStable.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 *QueryGovToMintStable) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGovToMintStable.Merge(m, src) -} -func (m *QueryGovToMintStable) XXX_Size() int { - return m.Size() -} -func (m *QueryGovToMintStable) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGovToMintStable.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGovToMintStable proto.InternalMessageInfo - -func (m *QueryGovToMintStable) GetCollateral() types.Coin { - if m != nil { - return m.Collateral - } - return types.Coin{} -} - -// QueryGovToMintStableResponse is the response type for 'QueryGovToMintStable' -type QueryGovToMintStableResponse struct { - Gov types.Coin `protobuf:"bytes,1,opt,name=gov,proto3" json:"gov"` -} - -func (m *QueryGovToMintStableResponse) Reset() { *m = QueryGovToMintStableResponse{} } -func (m *QueryGovToMintStableResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGovToMintStableResponse) ProtoMessage() {} -func (*QueryGovToMintStableResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cd427158b4504e94, []int{7} -} -func (m *QueryGovToMintStableResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGovToMintStableResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGovToMintStableResponse.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 *QueryGovToMintStableResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGovToMintStableResponse.Merge(m, src) -} -func (m *QueryGovToMintStableResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGovToMintStableResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGovToMintStableResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGovToMintStableResponse proto.InternalMessageInfo - -func (m *QueryGovToMintStableResponse) GetGov() types.Coin { - if m != nil { - return m.Gov - } - return types.Coin{} -} - -type LiquidityRatioInfo struct { - LiquidityRatio github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=liquidity_ratio,json=liquidityRatio,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"liquidity_ratio"` - UpperBand github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=upper_band,json=upperBand,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"upper_band"` - LowerBand github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=lower_band,json=lowerBand,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"lower_band"` -} - -func (m *LiquidityRatioInfo) Reset() { *m = LiquidityRatioInfo{} } -func (m *LiquidityRatioInfo) String() string { return proto.CompactTextString(m) } -func (*LiquidityRatioInfo) ProtoMessage() {} -func (*LiquidityRatioInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_cd427158b4504e94, []int{8} -} -func (m *LiquidityRatioInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LiquidityRatioInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LiquidityRatioInfo.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 *LiquidityRatioInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_LiquidityRatioInfo.Merge(m, src) -} -func (m *LiquidityRatioInfo) XXX_Size() int { - return m.Size() -} -func (m *LiquidityRatioInfo) XXX_DiscardUnknown() { - xxx_messageInfo_LiquidityRatioInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_LiquidityRatioInfo proto.InternalMessageInfo - -type QueryLiquidityRatioInfoRequest struct { -} - -func (m *QueryLiquidityRatioInfoRequest) Reset() { *m = QueryLiquidityRatioInfoRequest{} } -func (m *QueryLiquidityRatioInfoRequest) String() string { return proto.CompactTextString(m) } -func (*QueryLiquidityRatioInfoRequest) ProtoMessage() {} -func (*QueryLiquidityRatioInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cd427158b4504e94, []int{9} -} -func (m *QueryLiquidityRatioInfoRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryLiquidityRatioInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryLiquidityRatioInfoRequest.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 *QueryLiquidityRatioInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryLiquidityRatioInfoRequest.Merge(m, src) -} -func (m *QueryLiquidityRatioInfoRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryLiquidityRatioInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryLiquidityRatioInfoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryLiquidityRatioInfoRequest proto.InternalMessageInfo - -type QueryLiquidityRatioInfoResponse struct { - Info LiquidityRatioInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` -} - -func (m *QueryLiquidityRatioInfoResponse) Reset() { *m = QueryLiquidityRatioInfoResponse{} } -func (m *QueryLiquidityRatioInfoResponse) String() string { return proto.CompactTextString(m) } -func (*QueryLiquidityRatioInfoResponse) ProtoMessage() {} -func (*QueryLiquidityRatioInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cd427158b4504e94, []int{10} -} -func (m *QueryLiquidityRatioInfoResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryLiquidityRatioInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryLiquidityRatioInfoResponse.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 *QueryLiquidityRatioInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryLiquidityRatioInfoResponse.Merge(m, src) -} -func (m *QueryLiquidityRatioInfoResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryLiquidityRatioInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryLiquidityRatioInfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryLiquidityRatioInfoResponse proto.InternalMessageInfo - -func (m *QueryLiquidityRatioInfoResponse) GetInfo() LiquidityRatioInfo { - if m != nil { - return m.Info - } - return LiquidityRatioInfo{} -} - -func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "nibiru.stablecoin.v1.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "nibiru.stablecoin.v1.QueryParamsResponse") - proto.RegisterType((*QueryModuleAccountBalances)(nil), "nibiru.stablecoin.v1.QueryModuleAccountBalances") - proto.RegisterType((*QueryModuleAccountBalancesResponse)(nil), "nibiru.stablecoin.v1.QueryModuleAccountBalancesResponse") - proto.RegisterType((*QueryCirculatingSupplies)(nil), "nibiru.stablecoin.v1.QueryCirculatingSupplies") - proto.RegisterType((*QueryCirculatingSuppliesResponse)(nil), "nibiru.stablecoin.v1.QueryCirculatingSuppliesResponse") - proto.RegisterType((*QueryGovToMintStable)(nil), "nibiru.stablecoin.v1.QueryGovToMintStable") - proto.RegisterType((*QueryGovToMintStableResponse)(nil), "nibiru.stablecoin.v1.QueryGovToMintStableResponse") - proto.RegisterType((*LiquidityRatioInfo)(nil), "nibiru.stablecoin.v1.LiquidityRatioInfo") - proto.RegisterType((*QueryLiquidityRatioInfoRequest)(nil), "nibiru.stablecoin.v1.QueryLiquidityRatioInfoRequest") - proto.RegisterType((*QueryLiquidityRatioInfoResponse)(nil), "nibiru.stablecoin.v1.QueryLiquidityRatioInfoResponse") -} - -func init() { proto.RegisterFile("nibiru/stablecoin/v1/query.proto", fileDescriptor_cd427158b4504e94) } - -var fileDescriptor_cd427158b4504e94 = []byte{ - // 744 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xcd, 0x6e, 0xd3, 0x4a, - 0x18, 0x8d, 0xfb, 0x27, 0x75, 0x7a, 0x75, 0xaf, 0x34, 0x4d, 0x75, 0x83, 0x15, 0x39, 0xc1, 0x42, - 0x90, 0x82, 0xb0, 0x9b, 0x16, 0x10, 0xea, 0x06, 0x70, 0x91, 0x10, 0x88, 0x22, 0x9a, 0x22, 0x55, - 0x62, 0x13, 0x8d, 0x9d, 0xa9, 0x3b, 0xc2, 0x99, 0x71, 0x3d, 0x76, 0x20, 0x5b, 0x58, 0xc2, 0x02, - 0xa9, 0x6f, 0x81, 0x10, 0x0b, 0x16, 0x2c, 0x78, 0x82, 0x2e, 0x2b, 0xb1, 0x41, 0x2c, 0x0a, 0x6a, - 0x79, 0x02, 0x9e, 0x00, 0xcd, 0xd8, 0x4e, 0x53, 0x3a, 0x89, 0x12, 0x56, 0x89, 0x66, 0xce, 0x39, - 0xdf, 0x99, 0x33, 0xf3, 0x7d, 0x06, 0x55, 0x4a, 0x5c, 0x12, 0x25, 0x36, 0x8f, 0x91, 0x1b, 0x60, - 0x8f, 0x11, 0x6a, 0x77, 0xea, 0xf6, 0x6e, 0x82, 0xa3, 0xae, 0x15, 0x46, 0x2c, 0x66, 0xb0, 0x98, - 0x22, 0xac, 0x13, 0x84, 0xd5, 0xa9, 0xeb, 0x45, 0x9f, 0xf9, 0x4c, 0x02, 0x6c, 0xf1, 0x2f, 0xc5, - 0xea, 0x65, 0x9f, 0x31, 0x3f, 0xc0, 0x36, 0x0a, 0x89, 0x8d, 0x28, 0x65, 0x31, 0x8a, 0x09, 0xa3, - 0x3c, 0xdb, 0xbd, 0xec, 0x31, 0xde, 0x66, 0xdc, 0x76, 0x11, 0xc7, 0x69, 0x09, 0xbb, 0x53, 0x77, - 0x71, 0x8c, 0xea, 0x76, 0x88, 0x7c, 0x42, 0x25, 0x38, 0xc3, 0x1a, 0xfd, 0xd8, 0x1c, 0x25, 0x8b, - 0xa7, 0xfb, 0xe7, 0x95, 0xbe, 0x43, 0x14, 0xa1, 0x76, 0x56, 0xce, 0x2c, 0x02, 0xb8, 0x21, 0x8a, - 0x3c, 0x96, 0x8b, 0x0d, 0xbc, 0x9b, 0x60, 0x1e, 0x9b, 0x1b, 0x60, 0xfe, 0xd4, 0x2a, 0x0f, 0x19, - 0xe5, 0x18, 0xae, 0x82, 0x99, 0x94, 0x5c, 0xd2, 0xaa, 0x5a, 0x6d, 0x6e, 0xb9, 0x6c, 0xa9, 0x8e, - 0x6d, 0xa5, 0x2c, 0x67, 0x6a, 0xff, 0xb0, 0x52, 0x68, 0x64, 0x0c, 0xb3, 0x0c, 0x74, 0x29, 0xb9, - 0xce, 0x5a, 0x49, 0x80, 0xef, 0x78, 0x1e, 0x4b, 0x68, 0xec, 0xa0, 0x00, 0x51, 0x0f, 0x73, 0xf3, - 0xb3, 0x06, 0xcc, 0xc1, 0xdb, 0x3d, 0x03, 0x7b, 0x1a, 0xf8, 0xbf, 0x2d, 0x11, 0x4d, 0x94, 0x42, - 0x9a, 0x6e, 0x86, 0x29, 0x69, 0xd5, 0xc9, 0xda, 0xdc, 0xf2, 0x39, 0x2b, 0xcd, 0xc4, 0x12, 0x99, - 0x58, 0x59, 0x26, 0xd6, 0x1a, 0x23, 0xd4, 0xb9, 0x2d, 0xfc, 0xfc, 0x3a, 0xac, 0xfc, 0xd3, 0x45, - 0xed, 0x60, 0xd5, 0x14, 0x6e, 0xb9, 0xf9, 0xee, 0x7b, 0xa5, 0xe6, 0x93, 0x78, 0x27, 0x71, 0x2d, - 0x8f, 0xb5, 0xed, 0x2c, 0xd0, 0xf4, 0xe7, 0x2a, 0x6f, 0x3d, 0xb3, 0xe3, 0x6e, 0x88, 0xb9, 0x14, - 0xe0, 0x8d, 0x85, 0xb6, 0xd2, 0xbc, 0x0e, 0x4a, 0xd2, 0xfb, 0x1a, 0x89, 0xbc, 0x24, 0x40, 0x31, - 0xa1, 0xfe, 0x66, 0x12, 0x86, 0x01, 0xc1, 0xdc, 0x7c, 0xa3, 0x81, 0xea, 0xa0, 0xcd, 0xde, 0xb1, - 0x56, 0xc0, 0x94, 0x08, 0x32, 0x4b, 0x75, 0xc8, 0x11, 0xd2, 0x48, 0x25, 0x58, 0x92, 0x12, 0xde, - 0x2a, 0x4d, 0x8c, 0x4a, 0x4a, 0x78, 0xcb, 0xdc, 0x02, 0x45, 0xe9, 0xe6, 0x1e, 0xeb, 0x3c, 0x61, - 0xeb, 0x84, 0xc6, 0x9b, 0xf2, 0xe6, 0xe0, 0x2d, 0x00, 0x3c, 0x16, 0x04, 0x28, 0xc6, 0x11, 0x0a, - 0x46, 0xf5, 0xd1, 0x47, 0x31, 0x37, 0x40, 0x59, 0x25, 0xdc, 0x3b, 0x62, 0x1d, 0x4c, 0xfa, 0xac, - 0x33, 0xaa, 0xb2, 0xc0, 0x9a, 0xaf, 0x27, 0x00, 0x7c, 0x48, 0x76, 0x13, 0xd2, 0x22, 0x71, 0xb7, - 0x21, 0xde, 0xfd, 0x7d, 0xba, 0xcd, 0xe0, 0x16, 0xf8, 0x2f, 0xc8, 0x57, 0x9b, 0x91, 0x58, 0x96, - 0xaa, 0xb3, 0x8e, 0x25, 0xa8, 0xdf, 0x0e, 0x2b, 0x17, 0x47, 0xb8, 0xcf, 0xbb, 0xd8, 0x6b, 0xfc, - 0x1b, 0x9c, 0x12, 0x87, 0xeb, 0x00, 0x24, 0x61, 0x88, 0xa3, 0xa6, 0x8b, 0x68, 0x1a, 0xeb, 0xf8, - 0x9a, 0xb3, 0x52, 0xc1, 0x41, 0xb4, 0x25, 0xe4, 0x02, 0xf6, 0x3c, 0x97, 0x9b, 0xfc, 0x3b, 0x39, - 0xa9, 0x20, 0xe4, 0xcc, 0x2a, 0x30, 0x64, 0xc0, 0x67, 0x13, 0xc9, 0x9b, 0x16, 0x83, 0xca, 0x40, - 0x44, 0x76, 0x0b, 0x0e, 0x98, 0x22, 0x74, 0x9b, 0x65, 0xd7, 0x50, 0x53, 0xb7, 0xef, 0x59, 0x7e, - 0xfe, 0x84, 0x04, 0x77, 0xf9, 0xfd, 0x34, 0x98, 0x96, 0x75, 0xe0, 0x2b, 0x0d, 0xcc, 0xa4, 0xbd, - 0x0e, 0x07, 0x48, 0x9d, 0x1d, 0x2d, 0xfa, 0xe2, 0x08, 0xc8, 0xd4, 0xad, 0x79, 0xe1, 0xe5, 0x97, - 0x9f, 0x7b, 0x13, 0x06, 0x2c, 0xdb, 0x43, 0xe6, 0x18, 0xfc, 0xa4, 0x81, 0x05, 0xe5, 0xd4, 0x80, - 0x4b, 0x43, 0x4a, 0x29, 0x19, 0xfa, 0xcd, 0x71, 0x19, 0x3d, 0xaf, 0x75, 0xe9, 0xf5, 0x0a, 0x5c, - 0x54, 0x78, 0x55, 0x4f, 0x2c, 0xf8, 0x41, 0x03, 0xf3, 0x8a, 0xa9, 0x00, 0xad, 0x21, 0x26, 0x14, - 0x78, 0xfd, 0xc6, 0x78, 0xf8, 0x9e, 0x65, 0x5b, 0x5a, 0x5e, 0x84, 0x97, 0x14, 0x96, 0xbd, 0x13, - 0x5e, 0x93, 0xe7, 0xc6, 0x3e, 0x6a, 0xca, 0x86, 0xbc, 0x36, 0xa4, 0xfe, 0xc0, 0xd7, 0xaa, 0x5f, - 0x1f, 0x93, 0x35, 0x82, 0xe9, 0x3f, 0xc6, 0x42, 0x53, 0x3c, 0x57, 0xe7, 0xc1, 0xfe, 0x91, 0xa1, - 0x1d, 0x1c, 0x19, 0xda, 0x8f, 0x23, 0x43, 0x7b, 0x7b, 0x6c, 0x14, 0x0e, 0x8e, 0x8d, 0xc2, 0xd7, - 0x63, 0xa3, 0xf0, 0x74, 0xa9, 0xaf, 0x09, 0x1f, 0x49, 0xb1, 0xb5, 0x1d, 0x44, 0x68, 0x2e, 0xfc, - 0xa2, 0x5f, 0x5a, 0xb6, 0xa4, 0x3b, 0x23, 0xbf, 0x99, 0x2b, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, - 0xec, 0x4c, 0xa2, 0xce, 0x10, 0x08, 0x00, 0x00, -} - -// 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 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - // Parameters queries the parameters of the x/stablecoin module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // ModuleAccountBalances queries the account balance of x/stablecoin. - ModuleAccountBalances(ctx context.Context, in *QueryModuleAccountBalances, opts ...grpc.CallOption) (*QueryModuleAccountBalancesResponse, error) - CirculatingSupplies(ctx context.Context, in *QueryCirculatingSupplies, opts ...grpc.CallOption) (*QueryCirculatingSuppliesResponse, error) - LiquidityRatioInfo(ctx context.Context, in *QueryLiquidityRatioInfoRequest, opts ...grpc.CallOption) (*QueryLiquidityRatioInfoResponse, error) -} - -type queryClient struct { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/nibiru.stablecoin.v1.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ModuleAccountBalances(ctx context.Context, in *QueryModuleAccountBalances, opts ...grpc.CallOption) (*QueryModuleAccountBalancesResponse, error) { - out := new(QueryModuleAccountBalancesResponse) - err := c.cc.Invoke(ctx, "/nibiru.stablecoin.v1.Query/ModuleAccountBalances", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) CirculatingSupplies(ctx context.Context, in *QueryCirculatingSupplies, opts ...grpc.CallOption) (*QueryCirculatingSuppliesResponse, error) { - out := new(QueryCirculatingSuppliesResponse) - err := c.cc.Invoke(ctx, "/nibiru.stablecoin.v1.Query/CirculatingSupplies", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) LiquidityRatioInfo(ctx context.Context, in *QueryLiquidityRatioInfoRequest, opts ...grpc.CallOption) (*QueryLiquidityRatioInfoResponse, error) { - out := new(QueryLiquidityRatioInfoResponse) - err := c.cc.Invoke(ctx, "/nibiru.stablecoin.v1.Query/LiquidityRatioInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - // Parameters queries the parameters of the x/stablecoin module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // ModuleAccountBalances queries the account balance of x/stablecoin. - ModuleAccountBalances(context.Context, *QueryModuleAccountBalances) (*QueryModuleAccountBalancesResponse, error) - CirculatingSupplies(context.Context, *QueryCirculatingSupplies) (*QueryCirculatingSuppliesResponse, error) - LiquidityRatioInfo(context.Context, *QueryLiquidityRatioInfoRequest) (*QueryLiquidityRatioInfoResponse, error) -} - -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (*UnimplementedQueryServer) ModuleAccountBalances(ctx context.Context, req *QueryModuleAccountBalances) (*QueryModuleAccountBalancesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModuleAccountBalances not implemented") -} -func (*UnimplementedQueryServer) CirculatingSupplies(ctx context.Context, req *QueryCirculatingSupplies) (*QueryCirculatingSuppliesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CirculatingSupplies not implemented") -} -func (*UnimplementedQueryServer) LiquidityRatioInfo(ctx context.Context, req *QueryLiquidityRatioInfoRequest) (*QueryLiquidityRatioInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LiquidityRatioInfo not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/nibiru.stablecoin.v1.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ModuleAccountBalances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryModuleAccountBalances) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ModuleAccountBalances(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/nibiru.stablecoin.v1.Query/ModuleAccountBalances", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ModuleAccountBalances(ctx, req.(*QueryModuleAccountBalances)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_CirculatingSupplies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryCirculatingSupplies) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).CirculatingSupplies(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/nibiru.stablecoin.v1.Query/CirculatingSupplies", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).CirculatingSupplies(ctx, req.(*QueryCirculatingSupplies)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_LiquidityRatioInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryLiquidityRatioInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).LiquidityRatioInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/nibiru.stablecoin.v1.Query/LiquidityRatioInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LiquidityRatioInfo(ctx, req.(*QueryLiquidityRatioInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "nibiru.stablecoin.v1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "ModuleAccountBalances", - Handler: _Query_ModuleAccountBalances_Handler, - }, - { - MethodName: "CirculatingSupplies", - Handler: _Query_CirculatingSupplies_Handler, - }, - { - MethodName: "LiquidityRatioInfo", - Handler: _Query_LiquidityRatioInfo_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "nibiru/stablecoin/v1/query.proto", -} - -func (m *QueryParamsRequest) 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 *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *QueryModuleAccountBalances) 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 *QueryModuleAccountBalances) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryModuleAccountBalances) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryModuleAccountBalancesResponse) 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 *QueryModuleAccountBalancesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryModuleAccountBalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ModuleAccountBalances) > 0 { - for iNdEx := len(m.ModuleAccountBalances) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ModuleAccountBalances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryCirculatingSupplies) 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 *QueryCirculatingSupplies) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryCirculatingSupplies) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryCirculatingSuppliesResponse) 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 *QueryCirculatingSuppliesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryCirculatingSuppliesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Nusd.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.Nibi.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *QueryGovToMintStable) 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 *QueryGovToMintStable) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGovToMintStable) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Collateral.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *QueryGovToMintStableResponse) 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 *QueryGovToMintStableResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGovToMintStableResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Gov.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *LiquidityRatioInfo) 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 *LiquidityRatioInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LiquidityRatioInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.LowerBand.Size() - i -= size - if _, err := m.LowerBand.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size := m.UpperBand.Size() - i -= size - if _, err := m.UpperBand.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size := m.LiquidityRatio.Size() - i -= size - if _, err := m.LiquidityRatio.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *QueryLiquidityRatioInfoRequest) 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 *QueryLiquidityRatioInfoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryLiquidityRatioInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryLiquidityRatioInfoResponse) 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 *QueryLiquidityRatioInfoResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryLiquidityRatioInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryModuleAccountBalances) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryModuleAccountBalancesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ModuleAccountBalances) > 0 { - for _, e := range m.ModuleAccountBalances { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *QueryCirculatingSupplies) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryCirculatingSuppliesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Nibi.Size() - n += 1 + l + sovQuery(uint64(l)) - l = m.Nusd.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryGovToMintStable) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Collateral.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryGovToMintStableResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Gov.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *LiquidityRatioInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.LiquidityRatio.Size() - n += 1 + l + sovQuery(uint64(l)) - l = m.UpperBand.Size() - n += 1 + l + sovQuery(uint64(l)) - l = m.LowerBand.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryLiquidityRatioInfoRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryLiquidityRatioInfoResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Info.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *QueryParamsRequest) 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 ErrIntOverflowQuery - } - 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: QueryParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryParamsResponse) 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 ErrIntOverflowQuery - } - 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: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryModuleAccountBalances) 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 ErrIntOverflowQuery - } - 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: QueryModuleAccountBalances: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryModuleAccountBalances: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryModuleAccountBalancesResponse) 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 ErrIntOverflowQuery - } - 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: QueryModuleAccountBalancesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryModuleAccountBalancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ModuleAccountBalances", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ModuleAccountBalances = append(m.ModuleAccountBalances, types.Coin{}) - if err := m.ModuleAccountBalances[len(m.ModuleAccountBalances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryCirculatingSupplies) 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 ErrIntOverflowQuery - } - 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: QueryCirculatingSupplies: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCirculatingSupplies: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryCirculatingSuppliesResponse) 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 ErrIntOverflowQuery - } - 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: QueryCirculatingSuppliesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCirculatingSuppliesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nibi", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Nibi.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nusd", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Nusd.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGovToMintStable) 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 ErrIntOverflowQuery - } - 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: QueryGovToMintStable: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGovToMintStable: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Collateral", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Collateral.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGovToMintStableResponse) 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 ErrIntOverflowQuery - } - 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: QueryGovToMintStableResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGovToMintStableResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Gov", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Gov.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LiquidityRatioInfo) 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 ErrIntOverflowQuery - } - 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: LiquidityRatioInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LiquidityRatioInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LiquidityRatio", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LiquidityRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpperBand", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.UpperBand.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LowerBand", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LowerBand.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryLiquidityRatioInfoRequest) 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 ErrIntOverflowQuery - } - 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: QueryLiquidityRatioInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLiquidityRatioInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryLiquidityRatioInfoResponse) 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 ErrIntOverflowQuery - } - 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: QueryLiquidityRatioInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLiquidityRatioInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipQuery(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, ErrIntOverflowQuery - } - 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, ErrIntOverflowQuery - } - 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, ErrIntOverflowQuery - } - 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, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/stablecoin/types/query.pb.gw.go b/x/stablecoin/types/query.pb.gw.go deleted file mode 100644 index 8f967bbc3..000000000 --- a/x/stablecoin/types/query.pb.gw.go +++ /dev/null @@ -1,348 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: nibiru/stablecoin/v1/query.proto - -/* -Package types is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package types - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - -func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := server.Params(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_ModuleAccountBalances_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryModuleAccountBalances - var metadata runtime.ServerMetadata - - msg, err := client.ModuleAccountBalances(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_ModuleAccountBalances_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryModuleAccountBalances - var metadata runtime.ServerMetadata - - msg, err := server.ModuleAccountBalances(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_CirculatingSupplies_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryCirculatingSupplies - var metadata runtime.ServerMetadata - - msg, err := client.CirculatingSupplies(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_CirculatingSupplies_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryCirculatingSupplies - var metadata runtime.ServerMetadata - - msg, err := server.CirculatingSupplies(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_LiquidityRatioInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryLiquidityRatioInfoRequest - var metadata runtime.ServerMetadata - - msg, err := client.LiquidityRatioInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_LiquidityRatioInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryLiquidityRatioInfoRequest - var metadata runtime.ServerMetadata - - msg, err := server.LiquidityRatioInfo(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". -// UnaryRPC :call QueryServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. -func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ModuleAccountBalances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_ModuleAccountBalances_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_ModuleAccountBalances_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_CirculatingSupplies_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_CirculatingSupplies_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_CirculatingSupplies_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_LiquidityRatioInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_LiquidityRatioInfo_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_LiquidityRatioInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterQueryHandler(ctx, mux, conn) -} - -// RegisterQueryHandler registers the http handlers for service Query to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) -} - -// RegisterQueryHandlerClient registers the http handlers for service Query -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "QueryClient" to call the correct interceptors. -func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ModuleAccountBalances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_ModuleAccountBalances_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_ModuleAccountBalances_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_CirculatingSupplies_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_CirculatingSupplies_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_CirculatingSupplies_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_LiquidityRatioInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_LiquidityRatioInfo_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_LiquidityRatioInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"nibiru", "stablecoin", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_ModuleAccountBalances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"nibiru", "stablecoin", "module_account_balance"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_CirculatingSupplies_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"nibiru", "stablecoin", "circulating_supplies"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_LiquidityRatioInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"nibiru", "stablecoin", "liquidity_ratio_info"}, "", runtime.AssumeColonVerbOpt(false))) -) - -var ( - forward_Query_Params_0 = runtime.ForwardResponseMessage - - forward_Query_ModuleAccountBalances_0 = runtime.ForwardResponseMessage - - forward_Query_CirculatingSupplies_0 = runtime.ForwardResponseMessage - - forward_Query_LiquidityRatioInfo_0 = runtime.ForwardResponseMessage -) diff --git a/x/stablecoin/types/tx.pb.go b/x/stablecoin/types/tx.pb.go deleted file mode 100644 index 598f15437..000000000 --- a/x/stablecoin/types/tx.pb.go +++ /dev/null @@ -1,2228 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: nibiru/stablecoin/v1/tx.proto - -package types - -import ( - context "context" - fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - 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 - -// MsgMintStable: Msg to mint NUSD. A user deposits NIBI and collateral and gets -// NUSD in return. The amount of NUSD received depends on the current price set -// by the oracle library and the current collateral ratio for the protocol. -type MsgMintStable struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Stable types.Coin `protobuf:"bytes,2,opt,name=stable,proto3" json:"stable"` -} - -func (m *MsgMintStable) Reset() { *m = MsgMintStable{} } -func (m *MsgMintStable) String() string { return proto.CompactTextString(m) } -func (*MsgMintStable) ProtoMessage() {} -func (*MsgMintStable) Descriptor() ([]byte, []int) { - return fileDescriptor_7c52aa4b3b498950, []int{0} -} -func (m *MsgMintStable) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgMintStable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgMintStable.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 *MsgMintStable) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgMintStable.Merge(m, src) -} -func (m *MsgMintStable) XXX_Size() int { - return m.Size() -} -func (m *MsgMintStable) XXX_DiscardUnknown() { - xxx_messageInfo_MsgMintStable.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgMintStable proto.InternalMessageInfo - -func (m *MsgMintStable) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgMintStable) GetStable() types.Coin { - if m != nil { - return m.Stable - } - return types.Coin{} -} - -// MsgMintStableResponse specifies the amount of NUSD token the user will -// receive after their mint transaction -type MsgMintStableResponse struct { - Stable types.Coin `protobuf:"bytes,1,opt,name=stable,proto3" json:"stable"` - UsedCoins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=used_coins,json=usedCoins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"used_coins"` - FeesPayed github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=fees_payed,json=feesPayed,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"fees_payed"` -} - -func (m *MsgMintStableResponse) Reset() { *m = MsgMintStableResponse{} } -func (m *MsgMintStableResponse) String() string { return proto.CompactTextString(m) } -func (*MsgMintStableResponse) ProtoMessage() {} -func (*MsgMintStableResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7c52aa4b3b498950, []int{1} -} -func (m *MsgMintStableResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgMintStableResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgMintStableResponse.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 *MsgMintStableResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgMintStableResponse.Merge(m, src) -} -func (m *MsgMintStableResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgMintStableResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgMintStableResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgMintStableResponse proto.InternalMessageInfo - -func (m *MsgMintStableResponse) GetStable() types.Coin { - if m != nil { - return m.Stable - } - return types.Coin{} -} - -func (m *MsgMintStableResponse) GetUsedCoins() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.UsedCoins - } - return nil -} - -func (m *MsgMintStableResponse) GetFeesPayed() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.FeesPayed - } - return nil -} - -// MsgBurnStable allows users to burn NUSD in exchange for NIBI and collateral. -// The amount of NIBI and Collateral received depends on the current price set by -// the x/oracle library and the current collateral ratio. -type MsgBurnStable struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Stable types.Coin `protobuf:"bytes,2,opt,name=stable,proto3" json:"stable"` -} - -func (m *MsgBurnStable) Reset() { *m = MsgBurnStable{} } -func (m *MsgBurnStable) String() string { return proto.CompactTextString(m) } -func (*MsgBurnStable) ProtoMessage() {} -func (*MsgBurnStable) Descriptor() ([]byte, []int) { - return fileDescriptor_7c52aa4b3b498950, []int{2} -} -func (m *MsgBurnStable) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgBurnStable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgBurnStable.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 *MsgBurnStable) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgBurnStable.Merge(m, src) -} -func (m *MsgBurnStable) XXX_Size() int { - return m.Size() -} -func (m *MsgBurnStable) XXX_DiscardUnknown() { - xxx_messageInfo_MsgBurnStable.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgBurnStable proto.InternalMessageInfo - -func (m *MsgBurnStable) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgBurnStable) GetStable() types.Coin { - if m != nil { - return m.Stable - } - return types.Coin{} -} - -// MsgBurnStableResponse specifies the amount of collateral and governance -// token the user will receive after their burn transaction. -type MsgBurnStableResponse struct { - Collateral types.Coin `protobuf:"bytes,1,opt,name=collateral,proto3" json:"collateral"` - Gov types.Coin `protobuf:"bytes,2,opt,name=gov,proto3" json:"gov"` - FeesPayed github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=fees_payed,json=feesPayed,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"fees_payed"` -} - -func (m *MsgBurnStableResponse) Reset() { *m = MsgBurnStableResponse{} } -func (m *MsgBurnStableResponse) String() string { return proto.CompactTextString(m) } -func (*MsgBurnStableResponse) ProtoMessage() {} -func (*MsgBurnStableResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7c52aa4b3b498950, []int{3} -} -func (m *MsgBurnStableResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgBurnStableResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgBurnStableResponse.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 *MsgBurnStableResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgBurnStableResponse.Merge(m, src) -} -func (m *MsgBurnStableResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgBurnStableResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgBurnStableResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgBurnStableResponse proto.InternalMessageInfo - -func (m *MsgBurnStableResponse) GetCollateral() types.Coin { - if m != nil { - return m.Collateral - } - return types.Coin{} -} - -func (m *MsgBurnStableResponse) GetGov() types.Coin { - if m != nil { - return m.Gov - } - return types.Coin{} -} - -func (m *MsgBurnStableResponse) GetFeesPayed() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.FeesPayed - } - return nil -} - -// MsgRecollateralize -type MsgRecollateralize struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Coll types.Coin `protobuf:"bytes,2,opt,name=coll,proto3" json:"coll"` -} - -func (m *MsgRecollateralize) Reset() { *m = MsgRecollateralize{} } -func (m *MsgRecollateralize) String() string { return proto.CompactTextString(m) } -func (*MsgRecollateralize) ProtoMessage() {} -func (*MsgRecollateralize) Descriptor() ([]byte, []int) { - return fileDescriptor_7c52aa4b3b498950, []int{4} -} -func (m *MsgRecollateralize) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRecollateralize) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRecollateralize.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 *MsgRecollateralize) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRecollateralize.Merge(m, src) -} -func (m *MsgRecollateralize) XXX_Size() int { - return m.Size() -} -func (m *MsgRecollateralize) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRecollateralize.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRecollateralize proto.InternalMessageInfo - -func (m *MsgRecollateralize) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgRecollateralize) GetColl() types.Coin { - if m != nil { - return m.Coll - } - return types.Coin{} -} - -// MsgRecollateralizeResponse is the output of a successful 'Recollateralize' -type MsgRecollateralizeResponse struct { - // Gov (sdk.Coin): Tokens rewarded to the caller in exchange for her - // collateral. - Gov types.Coin `protobuf:"bytes,1,opt,name=gov,proto3" json:"gov"` -} - -func (m *MsgRecollateralizeResponse) Reset() { *m = MsgRecollateralizeResponse{} } -func (m *MsgRecollateralizeResponse) String() string { return proto.CompactTextString(m) } -func (*MsgRecollateralizeResponse) ProtoMessage() {} -func (*MsgRecollateralizeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7c52aa4b3b498950, []int{5} -} -func (m *MsgRecollateralizeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRecollateralizeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRecollateralizeResponse.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 *MsgRecollateralizeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRecollateralizeResponse.Merge(m, src) -} -func (m *MsgRecollateralizeResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgRecollateralizeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRecollateralizeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRecollateralizeResponse proto.InternalMessageInfo - -func (m *MsgRecollateralizeResponse) GetGov() types.Coin { - if m != nil { - return m.Gov - } - return types.Coin{} -} - -// MsgBuyback -type MsgBuyback struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - // Gov (sdk.Coin): Tokens the caller wants to sell to the protocol in exchange - // for collateral. - Gov types.Coin `protobuf:"bytes,2,opt,name=gov,proto3" json:"gov"` -} - -func (m *MsgBuyback) Reset() { *m = MsgBuyback{} } -func (m *MsgBuyback) String() string { return proto.CompactTextString(m) } -func (*MsgBuyback) ProtoMessage() {} -func (*MsgBuyback) Descriptor() ([]byte, []int) { - return fileDescriptor_7c52aa4b3b498950, []int{6} -} -func (m *MsgBuyback) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgBuyback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgBuyback.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 *MsgBuyback) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgBuyback.Merge(m, src) -} -func (m *MsgBuyback) XXX_Size() int { - return m.Size() -} -func (m *MsgBuyback) XXX_DiscardUnknown() { - xxx_messageInfo_MsgBuyback.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgBuyback proto.InternalMessageInfo - -func (m *MsgBuyback) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgBuyback) GetGov() types.Coin { - if m != nil { - return m.Gov - } - return types.Coin{} -} - -// MsgBuybackResponse is the output of a successful 'Buyback' -type MsgBuybackResponse struct { - // Coll (sdk.Coin): Tokens sold to the caller in exchange for her collateral. - Coll types.Coin `protobuf:"bytes,1,opt,name=coll,proto3" json:"coll"` -} - -func (m *MsgBuybackResponse) Reset() { *m = MsgBuybackResponse{} } -func (m *MsgBuybackResponse) String() string { return proto.CompactTextString(m) } -func (*MsgBuybackResponse) ProtoMessage() {} -func (*MsgBuybackResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7c52aa4b3b498950, []int{7} -} -func (m *MsgBuybackResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgBuybackResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgBuybackResponse.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 *MsgBuybackResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgBuybackResponse.Merge(m, src) -} -func (m *MsgBuybackResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgBuybackResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgBuybackResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgBuybackResponse proto.InternalMessageInfo - -func (m *MsgBuybackResponse) GetColl() types.Coin { - if m != nil { - return m.Coll - } - return types.Coin{} -} - -func init() { - proto.RegisterType((*MsgMintStable)(nil), "nibiru.stablecoin.v1.MsgMintStable") - proto.RegisterType((*MsgMintStableResponse)(nil), "nibiru.stablecoin.v1.MsgMintStableResponse") - proto.RegisterType((*MsgBurnStable)(nil), "nibiru.stablecoin.v1.MsgBurnStable") - proto.RegisterType((*MsgBurnStableResponse)(nil), "nibiru.stablecoin.v1.MsgBurnStableResponse") - proto.RegisterType((*MsgRecollateralize)(nil), "nibiru.stablecoin.v1.MsgRecollateralize") - proto.RegisterType((*MsgRecollateralizeResponse)(nil), "nibiru.stablecoin.v1.MsgRecollateralizeResponse") - proto.RegisterType((*MsgBuyback)(nil), "nibiru.stablecoin.v1.MsgBuyback") - proto.RegisterType((*MsgBuybackResponse)(nil), "nibiru.stablecoin.v1.MsgBuybackResponse") -} - -func init() { proto.RegisterFile("nibiru/stablecoin/v1/tx.proto", fileDescriptor_7c52aa4b3b498950) } - -var fileDescriptor_7c52aa4b3b498950 = []byte{ - // 580 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0x31, 0x6f, 0x13, 0x31, - 0x14, 0xc7, 0xe3, 0x24, 0x6a, 0xd5, 0x87, 0x10, 0xd2, 0xa9, 0x48, 0xe9, 0x51, 0xae, 0xe1, 0x58, - 0x22, 0xa1, 0xda, 0x49, 0x3b, 0x30, 0x22, 0xa5, 0x13, 0x48, 0x01, 0x14, 0x26, 0x58, 0x2a, 0xdf, - 0xc5, 0x5c, 0x4d, 0x13, 0x3b, 0x3a, 0x3b, 0x51, 0xc3, 0xd8, 0x4f, 0x50, 0x89, 0x99, 0x1d, 0xf1, - 0x49, 0x3a, 0x56, 0x62, 0x61, 0x02, 0x94, 0xf0, 0x1d, 0x58, 0x91, 0x9d, 0x4b, 0x72, 0x6d, 0xda, - 0xe3, 0x32, 0x94, 0x29, 0x4e, 0xfc, 0x7f, 0xef, 0xfd, 0xde, 0xff, 0xd9, 0x0e, 0x3c, 0x14, 0x3c, - 0xe0, 0xf1, 0x80, 0x28, 0x4d, 0x83, 0x2e, 0x0b, 0x25, 0x17, 0x64, 0xd8, 0x20, 0xfa, 0x04, 0xf7, - 0x63, 0xa9, 0xa5, 0xb3, 0x39, 0xdd, 0xc6, 0x8b, 0x6d, 0x3c, 0x6c, 0xb8, 0x5e, 0x28, 0x55, 0x4f, - 0x2a, 0x12, 0x50, 0xc5, 0xc8, 0xb0, 0x11, 0x30, 0x4d, 0x1b, 0xc4, 0x6e, 0xda, 0x28, 0x77, 0x33, - 0x92, 0x91, 0xb4, 0x4b, 0x62, 0x56, 0xc9, 0xaf, 0xdb, 0x91, 0x94, 0x51, 0x97, 0x11, 0xda, 0xe7, - 0x84, 0x0a, 0x21, 0x35, 0xd5, 0x5c, 0x0a, 0x35, 0xdd, 0xf5, 0x03, 0xb8, 0xdb, 0x52, 0x51, 0x8b, - 0x0b, 0xfd, 0xc6, 0xd6, 0x72, 0x2a, 0xb0, 0x1e, 0xc6, 0x8c, 0x6a, 0x19, 0x57, 0x50, 0x15, 0xd5, - 0x36, 0xda, 0xb3, 0xaf, 0xce, 0x53, 0x58, 0x9b, 0xf2, 0x54, 0x8a, 0x55, 0x54, 0xbb, 0xb3, 0xb7, - 0x85, 0xa7, 0x3c, 0xd8, 0xf0, 0xe0, 0x84, 0x07, 0x1f, 0x48, 0x2e, 0x9a, 0xe5, 0xf3, 0x1f, 0x3b, - 0x85, 0x76, 0x22, 0xf7, 0xbf, 0x14, 0xe1, 0xfe, 0xa5, 0x22, 0x6d, 0xa6, 0xfa, 0x52, 0x28, 0x96, - 0x4a, 0x89, 0x56, 0x4a, 0xe9, 0x7c, 0x00, 0x18, 0x28, 0xd6, 0x39, 0x34, 0xdd, 0xab, 0x4a, 0xb1, - 0x5a, 0xca, 0x0e, 0xae, 0x9b, 0xe0, 0xaf, 0x3f, 0x77, 0x6a, 0x11, 0xd7, 0x47, 0x83, 0x00, 0x87, - 0xb2, 0x47, 0x12, 0x33, 0xa7, 0x1f, 0xbb, 0xaa, 0x73, 0x4c, 0xf4, 0xa8, 0xcf, 0x94, 0x0d, 0x50, - 0xed, 0x0d, 0x93, 0xde, 0x2e, 0x4d, 0xad, 0xf7, 0x8c, 0xa9, 0xc3, 0x3e, 0x1d, 0xb1, 0x4e, 0xa5, - 0x74, 0x0b, 0xb5, 0x4c, 0xfa, 0xd7, 0x26, 0x7b, 0x32, 0x8e, 0xe6, 0x20, 0x16, 0xb7, 0x37, 0x8e, - 0x3f, 0xc8, 0x8e, 0x63, 0x51, 0x64, 0x3e, 0x8e, 0x67, 0x00, 0xa1, 0xec, 0x76, 0xa9, 0x66, 0x31, - 0xed, 0xe6, 0x1d, 0x49, 0x2a, 0xc4, 0x69, 0x40, 0x29, 0x92, 0xc3, 0xbc, 0x40, 0x46, 0xfb, 0x5f, - 0xdd, 0x0d, 0xc1, 0x69, 0xa9, 0xa8, 0xcd, 0x16, 0xc4, 0xfc, 0x63, 0x96, 0xc5, 0xfb, 0x50, 0x36, - 0xd2, 0xbc, 0xfd, 0x58, 0xb1, 0xff, 0x0a, 0xdc, 0xe5, 0x22, 0x73, 0x8b, 0x13, 0x87, 0x50, 0x7e, - 0x87, 0xfc, 0xb7, 0x00, 0x76, 0x5c, 0xa3, 0x80, 0x86, 0xc7, 0x19, 0xb4, 0xab, 0x9b, 0xef, 0x3f, - 0xb7, 0x86, 0x24, 0xa9, 0xe7, 0x8c, 0xb3, 0xb6, 0xd1, 0x0a, 0x6d, 0xef, 0x7d, 0x2e, 0x43, 0xa9, - 0xa5, 0x22, 0xe7, 0x14, 0x01, 0xa4, 0x9e, 0x93, 0xc7, 0xf8, 0xba, 0xa7, 0x0c, 0x5f, 0x7a, 0x0e, - 0xdc, 0x27, 0x39, 0x44, 0x33, 0x3a, 0xdf, 0x3f, 0xfd, 0xf6, 0xfb, 0x53, 0x71, 0xdb, 0x77, 0xc9, - 0xf2, 0x1b, 0xda, 0xe3, 0x42, 0xef, 0xaa, 0xd0, 0x42, 0xa4, 0x2e, 0xd1, 0xcd, 0x10, 0x0b, 0x51, - 0x06, 0xc4, 0xf2, 0x4d, 0xc9, 0x84, 0x08, 0x06, 0xb1, 0x30, 0x10, 0x67, 0x08, 0xee, 0x5d, 0x3d, - 0x6b, 0xb5, 0x1b, 0x8b, 0x5c, 0x51, 0xba, 0xf5, 0xbc, 0xca, 0x39, 0xd3, 0x23, 0xcb, 0xf4, 0xc0, - 0xdf, 0xba, 0x86, 0x29, 0xb6, 0x31, 0xce, 0x08, 0xd6, 0x67, 0xe7, 0xa8, 0x9a, 0xd1, 0xae, 0x55, - 0xb8, 0xb5, 0x7f, 0x29, 0x72, 0xba, 0x61, 0xb5, 0xcd, 0x17, 0xe7, 0x63, 0x0f, 0x5d, 0x8c, 0x3d, - 0xf4, 0x6b, 0xec, 0xa1, 0xb3, 0x89, 0x57, 0xb8, 0x98, 0x78, 0x85, 0xef, 0x13, 0xaf, 0xf0, 0xae, - 0x9e, 0xba, 0xca, 0x2f, 0x6d, 0xfc, 0xc1, 0x11, 0xe5, 0x62, 0x96, 0xeb, 0x24, 0x9d, 0xcd, 0x5e, - 0xec, 0x60, 0xcd, 0xfe, 0x77, 0xed, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xa1, 0x81, 0x2d, 0x97, - 0x46, 0x07, 0x00, 0x00, -} - -// 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 { - // MintStable defines a method for trading a mixture of GOV and COLL to mint - // an equivalent value of stablecoins. - MintStable(ctx context.Context, in *MsgMintStable, opts ...grpc.CallOption) (*MsgMintStableResponse, error) - // BurnStable defines a method for redeeming/burning stablecoins to receive an - // equivalent value as a mixture of governance and collateral tokens. - BurnStable(ctx context.Context, in *MsgBurnStable, opts ...grpc.CallOption) (*MsgBurnStableResponse, error) - // Recollateralize defines a method for manually adding collateral to the - // protocol in exchange for an equivalent stablecoin value in governance tokens - // plus a small bonus. - Recollateralize(ctx context.Context, in *MsgRecollateralize, opts ...grpc.CallOption) (*MsgRecollateralizeResponse, error) - // Buyback defines a method for manually adding NIBI to the protocol - // in exchange for an equivalent stablecoin value in collateral, effectively - // executing a share buyback for Nibiru Chain. The NIBI purchased by the protocol - // is then burned, distributing value to all NIBI hodlers. - Buyback(ctx context.Context, in *MsgBuyback, opts ...grpc.CallOption) (*MsgBuybackResponse, error) -} - -type msgClient struct { - cc grpc1.ClientConn -} - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) MintStable(ctx context.Context, in *MsgMintStable, opts ...grpc.CallOption) (*MsgMintStableResponse, error) { - out := new(MsgMintStableResponse) - err := c.cc.Invoke(ctx, "/nibiru.stablecoin.v1.Msg/MintStable", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) BurnStable(ctx context.Context, in *MsgBurnStable, opts ...grpc.CallOption) (*MsgBurnStableResponse, error) { - out := new(MsgBurnStableResponse) - err := c.cc.Invoke(ctx, "/nibiru.stablecoin.v1.Msg/BurnStable", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) Recollateralize(ctx context.Context, in *MsgRecollateralize, opts ...grpc.CallOption) (*MsgRecollateralizeResponse, error) { - out := new(MsgRecollateralizeResponse) - err := c.cc.Invoke(ctx, "/nibiru.stablecoin.v1.Msg/Recollateralize", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) Buyback(ctx context.Context, in *MsgBuyback, opts ...grpc.CallOption) (*MsgBuybackResponse, error) { - out := new(MsgBuybackResponse) - err := c.cc.Invoke(ctx, "/nibiru.stablecoin.v1.Msg/Buyback", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -type MsgServer interface { - // MintStable defines a method for trading a mixture of GOV and COLL to mint - // an equivalent value of stablecoins. - MintStable(context.Context, *MsgMintStable) (*MsgMintStableResponse, error) - // BurnStable defines a method for redeeming/burning stablecoins to receive an - // equivalent value as a mixture of governance and collateral tokens. - BurnStable(context.Context, *MsgBurnStable) (*MsgBurnStableResponse, error) - // Recollateralize defines a method for manually adding collateral to the - // protocol in exchange for an equivalent stablecoin value in governance tokens - // plus a small bonus. - Recollateralize(context.Context, *MsgRecollateralize) (*MsgRecollateralizeResponse, error) - // Buyback defines a method for manually adding NIBI to the protocol - // in exchange for an equivalent stablecoin value in collateral, effectively - // executing a share buyback for Nibiru Chain. The NIBI purchased by the protocol - // is then burned, distributing value to all NIBI hodlers. - Buyback(context.Context, *MsgBuyback) (*MsgBuybackResponse, error) -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (*UnimplementedMsgServer) MintStable(ctx context.Context, req *MsgMintStable) (*MsgMintStableResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MintStable not implemented") -} -func (*UnimplementedMsgServer) BurnStable(ctx context.Context, req *MsgBurnStable) (*MsgBurnStableResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BurnStable not implemented") -} -func (*UnimplementedMsgServer) Recollateralize(ctx context.Context, req *MsgRecollateralize) (*MsgRecollateralizeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Recollateralize not implemented") -} -func (*UnimplementedMsgServer) Buyback(ctx context.Context, req *MsgBuyback) (*MsgBuybackResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Buyback not implemented") -} - -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -func _Msg_MintStable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgMintStable) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).MintStable(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/nibiru.stablecoin.v1.Msg/MintStable", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).MintStable(ctx, req.(*MsgMintStable)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_BurnStable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgBurnStable) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).BurnStable(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/nibiru.stablecoin.v1.Msg/BurnStable", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).BurnStable(ctx, req.(*MsgBurnStable)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_Recollateralize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRecollateralize) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Recollateralize(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/nibiru.stablecoin.v1.Msg/Recollateralize", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Recollateralize(ctx, req.(*MsgRecollateralize)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_Buyback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgBuyback) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Buyback(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/nibiru.stablecoin.v1.Msg/Buyback", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Buyback(ctx, req.(*MsgBuyback)) - } - return interceptor(ctx, in, info, handler) -} - -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "nibiru.stablecoin.v1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "MintStable", - Handler: _Msg_MintStable_Handler, - }, - { - MethodName: "BurnStable", - Handler: _Msg_BurnStable_Handler, - }, - { - MethodName: "Recollateralize", - Handler: _Msg_Recollateralize_Handler, - }, - { - MethodName: "Buyback", - Handler: _Msg_Buyback_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "nibiru/stablecoin/v1/tx.proto", -} - -func (m *MsgMintStable) 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 *MsgMintStable) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgMintStable) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Stable.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgMintStableResponse) 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 *MsgMintStableResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgMintStableResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.FeesPayed) > 0 { - for iNdEx := len(m.FeesPayed) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.FeesPayed[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.UsedCoins) > 0 { - for iNdEx := len(m.UsedCoins) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.UsedCoins[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Stable.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *MsgBurnStable) 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 *MsgBurnStable) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgBurnStable) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Stable.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgBurnStableResponse) 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 *MsgBurnStableResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgBurnStableResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.FeesPayed) > 0 { - for iNdEx := len(m.FeesPayed) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.FeesPayed[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - { - size, err := m.Gov.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.Collateral.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *MsgRecollateralize) 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 *MsgRecollateralize) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRecollateralize) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Coll.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgRecollateralizeResponse) 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 *MsgRecollateralizeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRecollateralizeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Gov.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *MsgBuyback) 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 *MsgBuyback) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgBuyback) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Gov.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgBuybackResponse) 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 *MsgBuybackResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgBuybackResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Coll.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - 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 *MsgMintStable) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.Stable.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgMintStableResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Stable.Size() - n += 1 + l + sovTx(uint64(l)) - if len(m.UsedCoins) > 0 { - for _, e := range m.UsedCoins { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - if len(m.FeesPayed) > 0 { - for _, e := range m.FeesPayed { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - -func (m *MsgBurnStable) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.Stable.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgBurnStableResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Collateral.Size() - n += 1 + l + sovTx(uint64(l)) - l = m.Gov.Size() - n += 1 + l + sovTx(uint64(l)) - if len(m.FeesPayed) > 0 { - for _, e := range m.FeesPayed { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - -func (m *MsgRecollateralize) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.Coll.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgRecollateralizeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Gov.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgBuyback) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.Gov.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgBuybackResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Coll.Size() - n += 1 + l + sovTx(uint64(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 *MsgMintStable) 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: MsgMintStable: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgMintStable: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Stable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - 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 *MsgMintStableResponse) 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: MsgMintStableResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgMintStableResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Stable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UsedCoins", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UsedCoins = append(m.UsedCoins, types.Coin{}) - if err := m.UsedCoins[len(m.UsedCoins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeesPayed", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FeesPayed = append(m.FeesPayed, types.Coin{}) - if err := m.FeesPayed[len(m.FeesPayed)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - 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 *MsgBurnStable) 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: MsgBurnStable: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgBurnStable: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Stable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - 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 *MsgBurnStableResponse) 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: MsgBurnStableResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgBurnStableResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Collateral", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Collateral.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Gov", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Gov.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeesPayed", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FeesPayed = append(m.FeesPayed, types.Coin{}) - if err := m.FeesPayed[len(m.FeesPayed)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - 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 *MsgRecollateralize) 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: MsgRecollateralize: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRecollateralize: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Coll", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Coll.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - 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 *MsgRecollateralizeResponse) 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: MsgRecollateralizeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRecollateralizeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Gov", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Gov.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - 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 *MsgBuyback) 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: MsgBuyback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgBuyback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Gov", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Gov.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - 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 *MsgBuybackResponse) 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: MsgBuybackResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgBuybackResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Coll", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Coll.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - 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 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") -) diff --git a/x/stablecoin/types/tx.pb.gw.go b/x/stablecoin/types/tx.pb.gw.go deleted file mode 100644 index c4534226b..000000000 --- a/x/stablecoin/types/tx.pb.gw.go +++ /dev/null @@ -1,420 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: nibiru/stablecoin/v1/tx.proto - -/* -Package types is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package types - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - -var ( - filter_Msg_MintStable_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Msg_MintStable_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgMintStable - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_MintStable_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.MintStable(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Msg_MintStable_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgMintStable - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_MintStable_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.MintStable(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Msg_BurnStable_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Msg_BurnStable_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgBurnStable - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_BurnStable_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.BurnStable(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Msg_BurnStable_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgBurnStable - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_BurnStable_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.BurnStable(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Msg_Recollateralize_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Msg_Recollateralize_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgRecollateralize - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_Recollateralize_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.Recollateralize(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Msg_Recollateralize_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgRecollateralize - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_Recollateralize_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.Recollateralize(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Msg_Buyback_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Msg_Buyback_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgBuyback - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_Buyback_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.Buyback(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Msg_Buyback_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgBuyback - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_Buyback_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.Buyback(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". -// UnaryRPC :call MsgServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMsgHandlerFromEndpoint instead. -func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error { - - mux.Handle("POST", pattern_Msg_MintStable_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Msg_MintStable_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Msg_MintStable_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_Msg_BurnStable_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Msg_BurnStable_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Msg_BurnStable_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_Msg_Recollateralize_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Msg_Recollateralize_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Msg_Recollateralize_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_Msg_Buyback_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Msg_Buyback_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Msg_Buyback_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterMsgHandler(ctx, mux, conn) -} - -// RegisterMsgHandler registers the http handlers for service Msg to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterMsgHandlerClient(ctx, mux, NewMsgClient(conn)) -} - -// RegisterMsgHandlerClient registers the http handlers for service Msg -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "MsgClient" to call the correct interceptors. -func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error { - - mux.Handle("POST", pattern_Msg_MintStable_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Msg_MintStable_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Msg_MintStable_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_Msg_BurnStable_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Msg_BurnStable_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Msg_BurnStable_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_Msg_Recollateralize_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Msg_Recollateralize_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Msg_Recollateralize_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_Msg_Buyback_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Msg_Buyback_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Msg_Buyback_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Msg_MintStable_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"nibiru", "stablecoin", "mint-sc"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Msg_BurnStable_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"nibiru", "stablecoin", "burn-sc"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Msg_Recollateralize_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"nibiru", "stablecoin", "recoll"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Msg_Buyback_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"nibiru", "stablecoin", "buyback"}, "", runtime.AssumeColonVerbOpt(false))) -) - -var ( - forward_Msg_MintStable_0 = runtime.ForwardResponseMessage - - forward_Msg_BurnStable_0 = runtime.ForwardResponseMessage - - forward_Msg_Recollateralize_0 = runtime.ForwardResponseMessage - - forward_Msg_Buyback_0 = runtime.ForwardResponseMessage -) diff --git a/x/sudo/types/export.go b/x/sudo/types/export.go new file mode 100644 index 000000000..fb4b6e3b6 --- /dev/null +++ b/x/sudo/types/export.go @@ -0,0 +1,12 @@ +package types + +import ( + grpc "google.golang.org/grpc" +) + +// GrpcQueryServiceDesc represents the query server's RPC service specification. +// This gives access to the service name and method names needed for stargate +// queries. +func GrpcQueryServiceDesc() grpc.ServiceDesc { + return _Query_serviceDesc +} diff --git a/x/tokenfactory/types/export.go b/x/tokenfactory/types/export.go new file mode 100644 index 000000000..fb4b6e3b6 --- /dev/null +++ b/x/tokenfactory/types/export.go @@ -0,0 +1,12 @@ +package types + +import ( + grpc "google.golang.org/grpc" +) + +// GrpcQueryServiceDesc represents the query server's RPC service specification. +// This gives access to the service name and method names needed for stargate +// queries. +func GrpcQueryServiceDesc() grpc.ServiceDesc { + return _Query_serviceDesc +}