diff --git a/Makefile b/Makefile index a2a54ab7c..9c8a00e2d 100644 --- a/Makefile +++ b/Makefile @@ -178,7 +178,7 @@ test: test-unit test-all: check test-race test-cover test-unit: - @VERSION=$(VERSION) go test -mod=readonly -tags='ledger test_ledger_mock' `go list ./... | grep -v dex` + @VERSION=$(VERSION) go test -mod=readonly -tags='ledger test_ledger_mock' ./... test-race: @VERSION=$(VERSION) go test -mod=readonly -race -tags='ledger test_ledger_mock' ./... diff --git a/app/app.go b/app/app.go index 0d105a861..e5f286eab 100644 --- a/app/app.go +++ b/app/app.go @@ -37,6 +37,7 @@ import ( servicemetrics "github.com/skip-mev/slinky/service/metrics" v401 "github.com/neutron-org/neutron/v4/app/upgrades/v4.0.1" + v500 "github.com/neutron-org/neutron/v4/app/upgrades/v5.0.0" "github.com/neutron-org/neutron/v4/x/globalfee" globalfeetypes "github.com/neutron-org/neutron/v4/x/globalfee/types" @@ -221,7 +222,7 @@ const ( ) var ( - Upgrades = []upgrades.Upgrade{v401.Upgrade} + Upgrades = []upgrades.Upgrade{v401.Upgrade, v500.Upgrade} // DefaultNodeHome default home directories for the application daemon DefaultNodeHome string @@ -1396,6 +1397,7 @@ func (app *App) setupUpgradeHandlers() { MarketmapKeeper: app.MarketMapKeeper, FeeMarketKeeper: app.FeeMarkerKeeper, DynamicfeesKeeper: app.DynamicFeesKeeper, + DexKeeper: &app.DexKeeper, GlobalFeeSubspace: app.GetSubspace(globalfee.ModuleName), CcvConsumerSubspace: app.GetSubspace(ccvconsumertypes.ModuleName), }, diff --git a/app/upgrades/types.go b/app/upgrades/types.go index d94491025..dfbce160c 100644 --- a/app/upgrades/types.go +++ b/app/upgrades/types.go @@ -21,6 +21,7 @@ import ( contractmanagerkeeper "github.com/neutron-org/neutron/v4/x/contractmanager/keeper" cronkeeper "github.com/neutron-org/neutron/v4/x/cron/keeper" + dexkeeper "github.com/neutron-org/neutron/v4/x/dex/keeper" feeburnerkeeper "github.com/neutron-org/neutron/v4/x/feeburner/keeper" icqkeeper "github.com/neutron-org/neutron/v4/x/interchainqueries/keeper" tokenfactorykeeper "github.com/neutron-org/neutron/v4/x/tokenfactory/keeper" @@ -64,6 +65,7 @@ type UpgradeKeepers struct { MarketmapKeeper *marketmapkeeper.Keeper FeeMarketKeeper *feemarketkeeper.Keeper DynamicfeesKeeper *dynamicfeeskeeper.Keeper + DexKeeper *dexkeeper.Keeper // subspaces GlobalFeeSubspace paramtypes.Subspace CcvConsumerSubspace paramtypes.Subspace diff --git a/app/upgrades/v5.0.0/constants.go b/app/upgrades/v5.0.0/constants.go new file mode 100644 index 000000000..1eeb344c5 --- /dev/null +++ b/app/upgrades/v5.0.0/constants.go @@ -0,0 +1,20 @@ +package v400 + +import ( + storetypes "cosmossdk.io/store/types" + + "github.com/neutron-org/neutron/v4/app/upgrades" +) + +const ( + // UpgradeName defines the on-chain upgrade name. + UpgradeName = "v5.0.0" +) + +var Upgrade = upgrades.Upgrade{ + UpgradeName: UpgradeName, + CreateUpgradeHandler: CreateUpgradeHandler, + StoreUpgrades: storetypes.StoreUpgrades{ + Added: []string{}, + }, +} diff --git a/app/upgrades/v5.0.0/upgrades.go b/app/upgrades/v5.0.0/upgrades.go new file mode 100644 index 000000000..9c5e46a57 --- /dev/null +++ b/app/upgrades/v5.0.0/upgrades.go @@ -0,0 +1,60 @@ +package v400 + +import ( + "context" + "fmt" + + upgradetypes "cosmossdk.io/x/upgrade/types" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + + "github.com/neutron-org/neutron/v4/app/upgrades" + dexkeeper "github.com/neutron-org/neutron/v4/x/dex/keeper" +) + +func CreateUpgradeHandler( + mm *module.Manager, + configurator module.Configurator, + keepers *upgrades.UpgradeKeepers, + _ upgrades.StoreKeys, + _ codec.Codec, +) upgradetypes.UpgradeHandler { + return func(c context.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { + ctx := sdk.UnwrapSDKContext(c) + + ctx.Logger().Info("Starting module migrations...") + vm, err := mm.RunMigrations(ctx, configurator, vm) + if err != nil { + return vm, err + } + + ctx.Logger().Info("Running dex upgrades...") + // Only pause dex for mainnet + if ctx.ChainID() == "neutron-1" { + err = upgradeDexPause(ctx, *keepers.DexKeeper) + if err != nil { + return nil, err + } + } + + ctx.Logger().Info(fmt.Sprintf("Migration {%s} applied", UpgradeName)) + return vm, nil + } +} + +func upgradeDexPause(ctx sdk.Context, k dexkeeper.Keeper) error { + // Set the dex to paused + ctx.Logger().Info("Pausing dex...") + + params := k.GetParams(ctx) + params.Paused = true + + if err := k.SetParams(ctx, params); err != nil { + return err + } + + ctx.Logger().Info("Dex is paused") + + return nil +} diff --git a/app/upgrades/v5.0.0/upgrades_test.go b/app/upgrades/v5.0.0/upgrades_test.go new file mode 100644 index 000000000..0a5d07207 --- /dev/null +++ b/app/upgrades/v5.0.0/upgrades_test.go @@ -0,0 +1,65 @@ +package v400_test + +import ( + "testing" + + "cosmossdk.io/math" + upgradetypes "cosmossdk.io/x/upgrade/types" + "github.com/stretchr/testify/suite" + + v500 "github.com/neutron-org/neutron/v4/app/upgrades/v5.0.0" + "github.com/neutron-org/neutron/v4/testutil/common/sample" + + "github.com/neutron-org/neutron/v4/testutil" + dexkeeper "github.com/neutron-org/neutron/v4/x/dex/keeper" + dextypes "github.com/neutron-org/neutron/v4/x/dex/types" +) + +type UpgradeTestSuite struct { + testutil.IBCConnectionTestSuite +} + +func TestKeeperTestSuite(t *testing.T) { + suite.Run(t, new(UpgradeTestSuite)) +} + +func (suite *UpgradeTestSuite) SetupTest() { + suite.IBCConnectionTestSuite.SetupTest() +} + +func (suite *UpgradeTestSuite) TestUpgradeDexPause() { + var ( + app = suite.GetNeutronZoneApp(suite.ChainA) + ctx = suite.ChainA.GetContext().WithChainID("neutron-1") + msgServer = dexkeeper.NewMsgServerImpl(app.DexKeeper) + ) + + params := app.DexKeeper.GetParams(ctx) + + suite.False(params.Paused) + + upgrade := upgradetypes.Plan{ + Name: v500.UpgradeName, + Info: "some text here", + Height: 100, + } + suite.NoError(app.UpgradeKeeper.ApplyUpgrade(ctx, upgrade)) + + params = app.DexKeeper.GetParams(ctx) + + suite.True(params.Paused) + + _, err := msgServer.Deposit(ctx, &dextypes.MsgDeposit{ + Creator: sample.AccAddress(), + Receiver: sample.AccAddress(), + TokenA: "TokenA", + TokenB: "TokenB", + TickIndexesAToB: []int64{1}, + Fees: []uint64{1}, + AmountsA: []math.Int{math.OneInt()}, + AmountsB: []math.Int{math.ZeroInt()}, + Options: []*dextypes.DepositOptions{{}}, + }) + + suite.ErrorIs(err, dextypes.ErrDexPaused) +} diff --git a/go.mod b/go.mod index d4407fad5..e8714d399 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( cosmossdk.io/x/tx v0.13.5 cosmossdk.io/x/upgrade v0.1.4 github.com/CosmWasm/wasmd v0.51.0 - github.com/CosmWasm/wasmvm/v2 v2.1.2 + github.com/CosmWasm/wasmvm/v2 v2.1.3 github.com/cometbft/cometbft v0.38.11 github.com/cosmos/admin-module/v2 v2.0.0-20240430142959-8b3328d1b1a2 github.com/cosmos/cosmos-db v1.0.2 @@ -46,7 +46,7 @@ require ( github.com/stretchr/testify v1.9.0 golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 - google.golang.org/grpc v1.66.2 + google.golang.org/grpc v1.67.0 google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v2 v2.4.0 ) @@ -55,7 +55,7 @@ require ( cloud.google.com/go v0.115.0 // indirect cloud.google.com/go/auth v0.6.0 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect - cloud.google.com/go/compute/metadata v0.3.0 // indirect + cloud.google.com/go/compute/metadata v0.5.0 // indirect cloud.google.com/go/iam v1.1.9 // indirect cloud.google.com/go/storage v1.41.0 // indirect cosmossdk.io/api v0.7.5 // indirect @@ -112,7 +112,7 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect - github.com/golang/glog v1.2.1 // indirect + github.com/golang/glog v1.2.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/btree v1.1.2 // indirect diff --git a/go.sum b/go.sum index 47b7d96af..c8c82dde1 100644 --- a/go.sum +++ b/go.sum @@ -72,8 +72,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= -cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= +cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= @@ -225,8 +225,8 @@ github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25 github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/CosmWasm/wasmvm/v2 v2.1.2 h1:GkJ5bAsRlLHfIQVg/FY1VHwLyBwlCjAhDea0B8L+e20= -github.com/CosmWasm/wasmvm/v2 v2.1.2/go.mod h1:bMhLQL4Yp9CzJi9A83aR7VO9wockOsSlZbT4ztOl6bg= +github.com/CosmWasm/wasmvm/v2 v2.1.3 h1:CSJTauZqkHyb9yic6JVYCjiGUgxI2MJV2QzfSu8m49c= +github.com/CosmWasm/wasmvm/v2 v2.1.3/go.mod h1:bMhLQL4Yp9CzJi9A83aR7VO9wockOsSlZbT4ztOl6bg= github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= @@ -520,8 +520,8 @@ github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2 github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= -github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.2 h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY= +github.com/golang/glog v1.2.2/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -1676,8 +1676,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo= -google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= +google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= diff --git a/proto/neutron/dex/query.proto b/proto/neutron/dex/query.proto index ef524da0c..24fe04205 100644 --- a/proto/neutron/dex/query.proto +++ b/proto/neutron/dex/query.proto @@ -96,14 +96,16 @@ service Query { option (google.api.http).get = "/neutron/dex/pool_reserves/{pair_id}/{token_in}/{tick_index}/{fee}"; } - // Queries the simulated result of a multihop swap + // DEPRECATED Queries the simulated result of a multihop swap rpc EstimateMultiHopSwap(QueryEstimateMultiHopSwapRequest) returns (QueryEstimateMultiHopSwapResponse) { option (google.api.http).get = "/neutron/dex/estimate_multi_hop_swap"; + option deprecated = true; } - // Queries the simulated result of a PlaceLimit order + // DEPRECATED Queries the simulated result of a PlaceLimit order rpc EstimatePlaceLimitOrder(QueryEstimatePlaceLimitOrderRequest) returns (QueryEstimatePlaceLimitOrderResponse) { option (google.api.http).get = "/neutron/dex/estimate_place_limit_order"; + option deprecated = true; } // Queries a pool by pair, tick and fee @@ -126,6 +128,36 @@ service Query { option (google.api.http).get = "/neutron/dex/pool_metadata"; } + // Simulates MsgDeposit + rpc SimulateDeposit(QuerySimulateDepositRequest) returns (QuerySimulateDepositResponse) { + option (google.api.http).get = "/neutron/dex/simulate_deposit"; + } + + // Simulates MsgWithdrawal + rpc SimulateWithdrawal(QuerySimulateWithdrawalRequest) returns (QuerySimulateWithdrawalResponse) { + option (google.api.http).get = "/neutron/dex/simulate_withdrawal"; + } + + // Simulates MsgPlaceLimitOrder + rpc SimulatePlaceLimitOrder(QuerySimulatePlaceLimitOrderRequest) returns (QuerySimulatePlaceLimitOrderResponse) { + option (google.api.http).get = "/neutron/dex/simulate_place_limit_order"; + } + + // Simulates MsgWithdrawFilledLimitOrder + rpc SimulateWithdrawFilledLimitOrder(QuerySimulateWithdrawFilledLimitOrderRequest) returns (QuerySimulateWithdrawFilledLimitOrderResponse) { + option (google.api.http).get = "/neutron/dex/simulate_withdraw_filled_limit_order"; + } + + // Simulates MsgCancelLimitOrder + rpc SimulateCancelLimitOrder(QuerySimulateCancelLimitOrderRequest) returns (QuerySimulateCancelLimitOrderResponse) { + option (google.api.http).get = "/neutron/dex/simulate_cancel_limit_order"; + } + + // Simulates MsgMultiHopSwap + rpc SimulateMultiHopSwap(QuerySimulateMultiHopSwapRequest) returns (QuerySimulateMultiHopSwapResponse) { + option (google.api.http).get = "/neutron/dex/pool_metadata"; + } + // this line is used by starport scaffolding # 2 } @@ -260,6 +292,7 @@ message QueryGetPoolReservesResponse { } message QueryEstimateMultiHopSwapRequest { + // DEPRECATED: Use QuerySimulateMultiHopSwap string creator = 1; string receiver = 2; repeated MultiHopRoute routes = 3; @@ -290,6 +323,7 @@ message QueryEstimateMultiHopSwapResponse { } message QueryEstimatePlaceLimitOrderRequest { + // DEPRECATED: Use QuerySimulatePlaceLimitOrder string creator = 1; string receiver = 2; string token_in = 3; @@ -378,4 +412,52 @@ message QueryAllPoolMetadataResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } +message QuerySimulateDepositRequest { + MsgDeposit msg = 1; +} + +message QuerySimulateDepositResponse { + MsgDepositResponse resp = 1; +} + +message QuerySimulateWithdrawalRequest { + MsgWithdrawal msg = 1; +} + +message QuerySimulateWithdrawalResponse { + MsgWithdrawalResponse resp = 1; +} + +message QuerySimulatePlaceLimitOrderRequest { + MsgPlaceLimitOrder msg = 1; +} + +message QuerySimulatePlaceLimitOrderResponse { + MsgPlaceLimitOrderResponse resp = 1; +} + +message QuerySimulateWithdrawFilledLimitOrderRequest { + MsgWithdrawFilledLimitOrder msg = 1; +} + +message QuerySimulateWithdrawFilledLimitOrderResponse { + MsgWithdrawFilledLimitOrderResponse resp = 1; +} + +message QuerySimulateCancelLimitOrderRequest { + MsgCancelLimitOrder msg = 1; +} + +message QuerySimulateCancelLimitOrderResponse { + MsgCancelLimitOrderResponse resp = 1; +} + +message QuerySimulateMultiHopSwapRequest { + MsgMultiHopSwap msg = 1; +} + +message QuerySimulateMultiHopSwapResponse { + MsgMultiHopSwapResponse resp = 1; +} + // this line is used by starport scaffolding # 3 diff --git a/proto/neutron/dex/tx.proto b/proto/neutron/dex/tx.proto index 093591440..8dfc03156 100644 --- a/proto/neutron/dex/tx.proto +++ b/proto/neutron/dex/tx.proto @@ -75,6 +75,12 @@ message MsgDepositResponse { (gogoproto.jsontag) = "reserve1_deposited" ]; repeated FailedDeposit failed_deposits = 3; + repeated cosmos.base.v1beta1.Coin shares_issued = 4 [ + (gogoproto.moretags) = "yaml:\"shares_issued\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "shares_issued" + ]; } message MsgWithdrawal { @@ -95,7 +101,26 @@ message MsgWithdrawal { repeated uint64 fees = 7; } -message MsgWithdrawalResponse {} +message MsgWithdrawalResponse { + string reserve0_withdrawn = 1 [ + (gogoproto.moretags) = "yaml:\"reserve0_withdrawn\"", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "reserve0_withdrawn" + ]; + string reserve1_withdrawn = 2 [ + (gogoproto.moretags) = "yaml:\"reserve1_withdrawn\"", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "reserve1_withdrawn" + ]; + repeated cosmos.base.v1beta1.Coin shares_burned = 3 [ + (gogoproto.moretags) = "yaml:\"shares_burned\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "shares_burned" + ]; +} enum LimitOrderType { GOOD_TIL_CANCELLED = 0; @@ -161,6 +186,14 @@ message MsgPlaceLimitOrderResponse { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", (gogoproto.jsontag) = "taker_coin_out" ]; + + // Total amount of the token in that was immediately swapped for takerOutCoin + cosmos.base.v1beta1.Coin taker_coin_in = 4 [ + (gogoproto.moretags) = "yaml:\"taker_coin_in\"", + (gogoproto.nullable) = false, + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.jsontag) = "taker_coin_in" + ]; } message MsgWithdrawFilledLimitOrder { @@ -171,7 +204,22 @@ message MsgWithdrawFilledLimitOrder { string tranche_key = 2; } -message MsgWithdrawFilledLimitOrderResponse {} +message MsgWithdrawFilledLimitOrderResponse { + // Total amount of taker reserves that were withdrawn + cosmos.base.v1beta1.Coin taker_coin_out = 1 [ + (gogoproto.moretags) = "yaml:\"taker_coin_out\"", + (gogoproto.nullable) = false, + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.jsontag) = "taker_coin_out" + ]; + // Total amount of maker reserves that were withdrawn --only applies to inactive LimitOrders + cosmos.base.v1beta1.Coin maker_coin_out = 2 [ + (gogoproto.moretags) = "yaml:\"maker_coin_out\"", + (gogoproto.nullable) = false, + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.jsontag) = "maker_coin_out" + ]; +} message MsgCancelLimitOrder { option (amino.name) = "dex/MsgCancelLimitOrder"; @@ -181,7 +229,22 @@ message MsgCancelLimitOrder { string tranche_key = 2; } -message MsgCancelLimitOrderResponse {} +message MsgCancelLimitOrderResponse { + // Total amount of taker reserves that were withdrawn + cosmos.base.v1beta1.Coin taker_coin_out = 1 [ + (gogoproto.moretags) = "yaml:\"taker_coin_out\"", + (gogoproto.nullable) = false, + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.jsontag) = "taker_coin_out" + ]; + // Total amount of maker reserves that were canceled + cosmos.base.v1beta1.Coin maker_coin_out = 2 [ + (gogoproto.moretags) = "yaml:\"maker_coin_out\"", + (gogoproto.nullable) = false, + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.jsontag) = "maker_coin_out" + ]; +} message MultiHopRoute { repeated string hops = 1; @@ -213,10 +276,18 @@ message MsgMultiHopSwap { message MsgMultiHopSwapResponse { cosmos.base.v1beta1.Coin coin_out = 1 [ + (gogoproto.moretags) = "yaml:\"coin_out\"", (gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", (gogoproto.jsontag) = "coin_out" ]; + MultiHopRoute route = 2; + repeated cosmos.base.v1beta1.Coin dust = 3 [ + (gogoproto.moretags) = "yaml:\"dust\"", + (gogoproto.nullable) = false, + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.jsontag) = "dust" + ]; } message MsgUpdateParams { diff --git a/wasmbinding/queries.go b/wasmbinding/queries.go index 39b602658..b7f34fc64 100644 --- a/wasmbinding/queries.go +++ b/wasmbinding/queries.go @@ -201,7 +201,6 @@ func (qp *QueryPlugin) DexQuery(ctx sdk.Context, query bindings.DexQuery) (data data, err = dexQuery(ctx, query.TickLiquidityAll, qp.dexKeeper.TickLiquidityAll) case query.UserDepositsAll != nil: data, err = dexQuery(ctx, query.UserDepositsAll, qp.dexKeeper.UserDepositsAll) - default: return nil, wasmvmtypes.UnsupportedRequest{Kind: "unknown neutron.dex query type"} } diff --git a/wasmbinding/stargate_allowlist.go b/wasmbinding/stargate_allowlist.go index 1e591374a..d41027593 100644 --- a/wasmbinding/stargate_allowlist.go +++ b/wasmbinding/stargate_allowlist.go @@ -91,6 +91,12 @@ func AcceptedStargateQueries() wasmkeeper.AcceptedQueries { "/neutron.dex.Query/PoolByID": &dextypes.QueryPoolResponse{}, "/neutron.dex.Query/PoolMetadata": &dextypes.QueryGetPoolMetadataResponse{}, "/neutron.dex.Query/PoolMetadataAll": &dextypes.QueryAllPoolMetadataResponse{}, + "/neutron.dex.Query/SimulateDeposit": &dextypes.QuerySimulateDepositResponse{}, + "/neutron.dex.Query/SimulateWithdrawal": &dextypes.QuerySimulateWithdrawalResponse{}, + "/neutron.dex.Query/SimulatePlaceLimitOrder": &dextypes.QuerySimulatePlaceLimitOrderResponse{}, + "/neutron.dex.Query/SimulateWithdrawFilledLimitOrder": &dextypes.QuerySimulateWithdrawFilledLimitOrderResponse{}, + "/neutron.dex.Query/SimulateCancelLimitOrder": &dextypes.QuerySimulateCancelLimitOrderResponse{}, + "/neutron.dex.Query/SimulateMultiHopSwap": &dextypes.QuerySimulateMultiHopSwapResponse{}, // oracle "/slinky.oracle.v1.Query/GetAllCurrencyPairs": &oracletypes.GetAllCurrencyPairsResponse{}, diff --git a/x/dex/keeper/cancel_limit_order.go b/x/dex/keeper/cancel_limit_order.go index 46ac06545..24142db0e 100644 --- a/x/dex/keeper/cancel_limit_order.go +++ b/x/dex/keeper/cancel_limit_order.go @@ -15,12 +15,12 @@ func (k Keeper) CancelLimitOrderCore( goCtx context.Context, trancheKey string, callerAddr sdk.AccAddress, -) error { +) (makerCoinOut, takerCoinOut sdk.Coin, err error) { ctx := sdk.UnwrapSDKContext(goCtx) - makerCoinOut, takerCoinOut, tradePairID, err := k.ExecuteCancelLimitOrder(ctx, trancheKey, callerAddr) + makerCoinOut, takerCoinOut, err = k.ExecuteCancelLimitOrder(ctx, trancheKey, callerAddr) if err != nil { - return err + return sdk.Coin{}, sdk.Coin{}, err } coinsOut := sdk.NewCoins(makerCoinOut, takerCoinOut) @@ -31,11 +31,13 @@ func (k Keeper) CancelLimitOrderCore( coinsOut, ) if err != nil { - return err + return sdk.Coin{}, sdk.Coin{}, err } - // This will never panic since TradePairID has already been successfully constructed by ExecuteCancelLimitOrder - pairID := tradePairID.MustPairID() + makerDenom := makerCoinOut.Denom + takerDenom := takerCoinOut.Denom + // This will never panic since PairID has already been successfully constructed during tranche creation + pairID := types.MustNewPairID(makerDenom, takerDenom) ctx.EventManager().EmitEvent(types.CancelLimitOrderEvent( callerAddr, pairID.Token0, @@ -47,7 +49,7 @@ func (k Keeper) CancelLimitOrderCore( trancheKey, )) - return nil + return makerCoinOut, takerCoinOut, nil } // ExecuteCancelLimitOrder handles the core logic for CancelLimitOrder -- removing remaining TokenIn from the @@ -57,10 +59,10 @@ func (k Keeper) ExecuteCancelLimitOrder( ctx sdk.Context, trancheKey string, callerAddr sdk.AccAddress, -) (makerCoinOut, takerCoinOut sdk.Coin, tradePairID *types.TradePairID, error error) { +) (makerCoinOut, takerCoinOut sdk.Coin, error error) { trancheUser, found := k.GetLimitOrderTrancheUser(ctx, callerAddr.String(), trancheKey) if !found { - return sdk.Coin{}, sdk.Coin{}, nil, types.ErrActiveLimitOrderNotFound + return sdk.Coin{}, sdk.Coin{}, types.ErrActiveLimitOrderNotFound } tradePairID, tickIndex := trancheUser.TradePairId, trancheUser.TickIndexTakerToMaker @@ -73,7 +75,7 @@ func (k Keeper) ExecuteCancelLimitOrder( }, ) if tranche == nil { - return sdk.Coin{}, sdk.Coin{}, nil, types.ErrActiveLimitOrderNotFound + return sdk.Coin{}, sdk.Coin{}, types.ErrActiveLimitOrderNotFound } makerAmountToReturn := tranche.RemoveTokenIn(trancheUser) @@ -97,7 +99,7 @@ func (k Keeper) ExecuteCancelLimitOrder( trancheUser.SharesWithdrawn = trancheUser.SharesOwned if !makerAmountToReturn.IsPositive() && !takerAmountOut.IsPositive() { - return sdk.Coin{}, sdk.Coin{}, nil, sdkerrors.Wrapf(types.ErrCancelEmptyLimitOrder, "%s", tranche.Key.TrancheKey) + return sdk.Coin{}, sdk.Coin{}, sdkerrors.Wrapf(types.ErrCancelEmptyLimitOrder, "%s", tranche.Key.TrancheKey) } k.SaveTrancheUser(ctx, trancheUser) @@ -110,5 +112,5 @@ func (k Keeper) ExecuteCancelLimitOrder( makerCoinOut = sdk.NewCoin(tradePairID.MakerDenom, makerAmountToReturn) takerCoinOut = sdk.NewCoin(tradePairID.TakerDenom, takerAmountOut) - return makerCoinOut, takerCoinOut, tradePairID, nil + return makerCoinOut, takerCoinOut, nil } diff --git a/x/dex/keeper/grpc_query_estimate_multi_hop_swap.go b/x/dex/keeper/grpc_query_estimate_multi_hop_swap.go index eb133dce9..572388589 100644 --- a/x/dex/keeper/grpc_query_estimate_multi_hop_swap.go +++ b/x/dex/keeper/grpc_query_estimate_multi_hop_swap.go @@ -31,7 +31,7 @@ func (k Keeper) EstimateMultiHopSwap( callerAddr := sdk.MustAccAddressFromBech32(req.Creator) receiverAddr := sdk.MustAccAddressFromBech32(req.Receiver) - coinOut, err := k.MultiHopSwapCore( + coinOut, _, _, err := k.MultiHopSwapCore( cacheCtx, req.AmountIn, req.Routes, diff --git a/x/dex/keeper/grpc_query_simulate_cancel_limit_order.go b/x/dex/keeper/grpc_query_simulate_cancel_limit_order.go new file mode 100644 index 000000000..7b57464c5 --- /dev/null +++ b/x/dex/keeper/grpc_query_simulate_cancel_limit_order.go @@ -0,0 +1,40 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/neutron-org/neutron/v4/x/dex/types" +) + +func (k Keeper) SimulateCancelLimitOrder( + goCtx context.Context, + req *types.QuerySimulateCancelLimitOrderRequest, +) (*types.QuerySimulateCancelLimitOrderResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + cacheCtx, _ := ctx.CacheContext() + + msg := req.Msg + + if err := msg.Validate(); err != nil { + return nil, err + } + + callerAddr := sdk.MustAccAddressFromBech32(msg.Creator) + makerCoinOut, takerCoinOut, err := k.ExecuteCancelLimitOrder( + cacheCtx, + msg.TrancheKey, + callerAddr, + ) + if err != nil { + return nil, err + } + + return &types.QuerySimulateCancelLimitOrderResponse{ + Resp: &types.MsgCancelLimitOrderResponse{ + TakerCoinOut: takerCoinOut, + MakerCoinOut: makerCoinOut, + }, + }, nil +} diff --git a/x/dex/keeper/grpc_query_simulate_cancel_limit_order_test.go b/x/dex/keeper/grpc_query_simulate_cancel_limit_order_test.go new file mode 100644 index 000000000..c7144b9c1 --- /dev/null +++ b/x/dex/keeper/grpc_query_simulate_cancel_limit_order_test.go @@ -0,0 +1,52 @@ +package keeper_test + +import ( + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/neutron-org/neutron/v4/x/dex/types" +) + +func (s *DexTestSuite) TestSimulateCancelLimitOrder() { + s.fundAliceBalances(50, 0) + s.fundBobBalances(0, 20) + + trancheKey := s.aliceLimitSells("TokenA", 0, 50) + + s.bobLimitSells("TokenB", -10, 20, types.LimitOrderType_FILL_OR_KILL) + + req := &types.QuerySimulateCancelLimitOrderRequest{ + Msg: &types.MsgCancelLimitOrder{ + Creator: s.alice.String(), + TrancheKey: trancheKey, + }, + } + + resp, err := s.App.DexKeeper.SimulateCancelLimitOrder(s.Ctx, req) + s.NoError(err) + + s.Equal(sdk.NewCoin("TokenB", math.NewInt(20_000_000)), resp.Resp.TakerCoinOut) + s.Equal(sdk.NewCoin("TokenA", math.NewInt(30_000_000)), resp.Resp.MakerCoinOut) + + s.assertDexBalances(30, 20) +} + +func (s *DexTestSuite) TestSimulateCancelLimitOrderFails() { + s.fundAliceBalances(50, 0) + s.fundBobBalances(0, 60) + + trancheKey := s.aliceLimitSells("TokenA", 0, 50) + + s.bobLimitSells("TokenB", -10, 60, types.LimitOrderType_IMMEDIATE_OR_CANCEL) + + req := &types.QuerySimulateCancelLimitOrderRequest{ + Msg: &types.MsgCancelLimitOrder{ + Creator: s.bob.String(), + TrancheKey: trancheKey, + }, + } + + resp, err := s.App.DexKeeper.SimulateCancelLimitOrder(s.Ctx, req) + s.ErrorIs(err, types.ErrActiveLimitOrderNotFound) + s.Nil(resp) +} diff --git a/x/dex/keeper/grpc_query_simulate_deposit.go b/x/dex/keeper/grpc_query_simulate_deposit.go new file mode 100644 index 000000000..ca3bb77c3 --- /dev/null +++ b/x/dex/keeper/grpc_query_simulate_deposit.go @@ -0,0 +1,62 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/neutron-org/neutron/v4/x/dex/types" +) + +func (k Keeper) SimulateDeposit( + goCtx context.Context, + req *types.QuerySimulateDepositRequest, +) (*types.QuerySimulateDepositResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + cacheCtx, _ := ctx.CacheContext() + + msg := req.Msg + msg.Creator = types.DummyAddress + msg.Receiver = types.DummyAddress + + if err := msg.Validate(); err != nil { + return nil, err + } + + callerAddr := sdk.MustAccAddressFromBech32(msg.Creator) + receiverAddr := sdk.MustAccAddressFromBech32(msg.Receiver) + pairID, err := types.NewPairID(msg.TokenA, msg.TokenB) + if err != nil { + return nil, err + } + + // sort amounts + amounts0, amounts1 := SortAmounts(msg.TokenA, pairID.Token0, msg.AmountsA, msg.AmountsB) + + tickIndexes := NormalizeAllTickIndexes(msg.TokenA, pairID.Token0, msg.TickIndexesAToB) + + //nolint:dogsled + reserve0Deposited, reserve1Deposited, _, _, sharesIssued, _, failedDeposits, err := k.ExecuteDeposit( + cacheCtx, + pairID, + callerAddr, + receiverAddr, + amounts0, + amounts1, + tickIndexes, + msg.Fees, + msg.Options, + ) + if err != nil { + return nil, err + } + + return &types.QuerySimulateDepositResponse{ + Resp: &types.MsgDepositResponse{ + Reserve0Deposited: reserve0Deposited, + Reserve1Deposited: reserve1Deposited, + FailedDeposits: failedDeposits, + SharesIssued: sharesIssued, + }, + }, nil +} diff --git a/x/dex/keeper/grpc_query_simulate_deposit_test.go b/x/dex/keeper/grpc_query_simulate_deposit_test.go new file mode 100644 index 000000000..807b15e30 --- /dev/null +++ b/x/dex/keeper/grpc_query_simulate_deposit_test.go @@ -0,0 +1,78 @@ +package keeper_test + +import ( + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/neutron-org/neutron/v4/x/dex/types" +) + +func (s *DexTestSuite) TestSimulateDeposit() { + req := &types.QuerySimulateDepositRequest{ + Msg: &types.MsgDeposit{ + TokenA: "TokenA", + TokenB: "TokenB", + AmountsA: []math.Int{math.OneInt(), math.OneInt()}, + AmountsB: []math.Int{math.ZeroInt(), math.ZeroInt()}, + TickIndexesAToB: []int64{0, 1}, + Fees: []uint64{1, 1}, + Options: []*types.DepositOptions{{}, {}}, + }, + } + resp, err := s.App.DexKeeper.SimulateDeposit(s.Ctx, req) + s.NoError(err) + s.Equal([]math.Int{math.OneInt(), math.OneInt()}, resp.Resp.Reserve0Deposited) + s.Equal([]math.Int{math.ZeroInt(), math.ZeroInt()}, resp.Resp.Reserve1Deposited) + + expectedShares := sdk.NewCoins( + sdk.NewCoin("neutron/pool/0", math.OneInt()), + sdk.NewCoin("neutron/pool/1", math.OneInt()), + ) + sharesIssued := sdk.NewCoins(resp.Resp.SharesIssued...) + s.True(sharesIssued.Equal(expectedShares)) + + s.assertDexBalances(0, 0) +} + +func (s *DexTestSuite) TestSimulateDepositPartialFailure() { + req := &types.QuerySimulateDepositRequest{ + Msg: &types.MsgDeposit{ + TokenA: "TokenA", + TokenB: "TokenB", + AmountsA: []math.Int{math.OneInt(), math.ZeroInt()}, + AmountsB: []math.Int{math.ZeroInt(), math.OneInt()}, + TickIndexesAToB: []int64{3, 0}, + Fees: []uint64{1, 1}, + Options: []*types.DepositOptions{{}, {}}, + }, + } + resp, err := s.App.DexKeeper.SimulateDeposit(s.Ctx, req) + s.NoError(err) + s.Equal(resp.Resp.Reserve0Deposited, []math.Int{math.OneInt(), math.ZeroInt()}) + s.Equal(resp.Resp.Reserve1Deposited, []math.Int{math.ZeroInt(), math.ZeroInt()}) + s.Equal(uint64(1), resp.Resp.FailedDeposits[0].DepositIdx) + s.Contains(resp.Resp.FailedDeposits[0].Error, types.ErrDepositBehindEnemyLines.Error()) + + expectedShares := sdk.NewCoins( + sdk.NewCoin("neutron/pool/0", math.OneInt()), + ) + sharesIssued := sdk.NewCoins(resp.Resp.SharesIssued...) + s.True(sharesIssued.Equal(expectedShares)) +} + +func (s *DexTestSuite) TestSimulateDepositFails() { + req := &types.QuerySimulateDepositRequest{ + Msg: &types.MsgDeposit{ + TokenA: "TokenA", + TokenB: "TokenB", + AmountsA: []math.Int{math.OneInt(), math.ZeroInt()}, + AmountsB: []math.Int{math.ZeroInt(), math.OneInt()}, + TickIndexesAToB: []int64{3, 0}, + Fees: []uint64{1, 1}, + Options: []*types.DepositOptions{{}, {FailTxOnBel: true}}, + }, + } + resp, err := s.App.DexKeeper.SimulateDeposit(s.Ctx, req) + s.Error(err, types.ErrDepositBehindEnemyLines) + s.Nil(resp) +} diff --git a/x/dex/keeper/grpc_query_simulate_multi_hop_swap.go b/x/dex/keeper/grpc_query_simulate_multi_hop_swap.go new file mode 100644 index 000000000..96cae324c --- /dev/null +++ b/x/dex/keeper/grpc_query_simulate_multi_hop_swap.go @@ -0,0 +1,44 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/neutron-org/neutron/v4/x/dex/types" +) + +func (k Keeper) SimulateMultiHopSwap( + goCtx context.Context, + req *types.QuerySimulateMultiHopSwapRequest, +) (*types.QuerySimulateMultiHopSwapResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + cacheCtx, _ := ctx.CacheContext() + + msg := req.Msg + msg.Creator = types.DummyAddress + msg.Receiver = types.DummyAddress + + if err := msg.Validate(); err != nil { + return nil, err + } + + bestRoute, _, err := k.CalulateMultiHopSwap( + cacheCtx, + msg.AmountIn, + msg.Routes, + msg.ExitLimitPrice, + msg.PickBestRoute, + ) + if err != nil { + return nil, err + } + + return &types.QuerySimulateMultiHopSwapResponse{ + Resp: &types.MsgMultiHopSwapResponse{ + CoinOut: bestRoute.coinOut, + Dust: bestRoute.dust, + Route: &types.MultiHopRoute{Hops: bestRoute.route}, + }, + }, nil +} diff --git a/x/dex/keeper/grpc_query_simulate_multi_hop_swap_test.go b/x/dex/keeper/grpc_query_simulate_multi_hop_swap_test.go new file mode 100644 index 000000000..359114a86 --- /dev/null +++ b/x/dex/keeper/grpc_query_simulate_multi_hop_swap_test.go @@ -0,0 +1,107 @@ +package keeper_test + +import ( + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + + math_utils "github.com/neutron-org/neutron/v4/utils/math" + "github.com/neutron-org/neutron/v4/x/dex/types" +) + +func (s *DexTestSuite) TestSimulateMultiHopSwapSingleRoute() { + // GIVEN liquidity in pools A<>B, B<>C, C<>D, + s.SetupMultiplePools( + NewPoolSetup("TokenA", "TokenB", 0, 100, 0, 1), + NewPoolSetup("TokenB", "TokenC", 0, 100, 0, 1), + NewPoolSetup("TokenC", "TokenD", 0, 100, 0, 1), + ) + + // WHEN alice multihopswaps A<>B => B<>C => C<>D, + route := &types.MultiHopRoute{Hops: []string{"TokenA", "TokenB", "TokenC", "TokenD"}} + req := &types.QuerySimulateMultiHopSwapRequest{ + Msg: &types.MsgMultiHopSwap{ + Routes: []*types.MultiHopRoute{route}, + AmountIn: math.NewInt(100_000_000), + ExitLimitPrice: math_utils.MustNewPrecDecFromStr("0.9"), + PickBestRoute: false, + }, + } + resp, err := s.App.DexKeeper.SimulateMultiHopSwap(s.Ctx, req) + s.NoError(err) + + // THEN alice would get out ~99 BIGTokenD + expectedOutCoin := sdk.NewCoin("TokenD", math.NewInt(99970003)) + s.Assert().True(resp.Resp.CoinOut.Equal(expectedOutCoin)) + s.Assert().Equal(route, resp.Resp.Route) + dust := sdk.NewCoins(resp.Resp.Dust...) + expectedDust := sdk.NewCoin("TokenA", math.OneInt()) + s.Assert().True(dust.Equal(sdk.NewCoins(expectedDust))) + + // Nothing changes on the dex + s.assertDexBalanceWithDenom("TokenA", 0) + s.assertDexBalanceWithDenom("TokenB", 100) + s.assertDexBalanceWithDenom("TokenC", 100) + s.assertDexBalanceWithDenom("TokenD", 100) +} + +func (s *DexTestSuite) TestSimulateMultiHopSwapMultiRoute() { + // GIVEN liquidity in pools A<>B, B<>C, C<>D, + s.SetupMultiplePools( + NewPoolSetup("TokenA", "TokenB", 0, 100, 0, 1), + NewPoolSetup("TokenB", "TokenC", 0, 100, 0, 1), + NewPoolSetup("TokenC", "TokenD", 0, 100, 0, 1), + NewPoolSetup("TokenB", "TokenD", 0, 150, -1000, 1), + ) + + // WHEN alice multihopswaps A<>B => B<>C => C<>D, + route1 := &types.MultiHopRoute{Hops: []string{"TokenA", "TokenB", "TokenC", "TokenD"}} + route2 := &types.MultiHopRoute{Hops: []string{"TokenA", "TokenB", "TokenD"}} + req := &types.QuerySimulateMultiHopSwapRequest{ + Msg: &types.MsgMultiHopSwap{ + Routes: []*types.MultiHopRoute{route1, route2}, + AmountIn: math.NewInt(100_000_000), + ExitLimitPrice: math_utils.MustNewPrecDecFromStr("0.9"), + PickBestRoute: true, + }, + } + resp, err := s.App.DexKeeper.SimulateMultiHopSwap(s.Ctx, req) + s.NoError(err) + + // THEN alice would get out ~110 BIGTokenD + expectedOutCoin := sdk.NewCoin("TokenD", math.NewInt(110494438)) + s.Assert().True(resp.Resp.CoinOut.Equal(expectedOutCoin)) + s.Assert().Equal(route2, resp.Resp.Route) + dust := sdk.NewCoins(resp.Resp.Dust...) + expectedDust := sdk.NewCoin("TokenA", math.OneInt()) + s.Assert().True(dust.Equal(sdk.NewCoins(expectedDust))) + + // Nothing changes on the dex + s.assertDexBalanceWithDenom("TokenA", 0) + s.assertDexBalanceWithDenom("TokenB", 100) + s.assertDexBalanceWithDenom("TokenC", 100) + s.assertDexBalanceWithDenom("TokenD", 250) +} + +func (s *DexTestSuite) TestSimulateMultiHopSwapFails() { + // GIVEN liquidity in pools A<>B, B<>C, C<>D, + s.SetupMultiplePools( + NewPoolSetup("TokenA", "TokenB", 0, 100, 0, 1), + NewPoolSetup("TokenB", "TokenC", 0, 100, 0, 1), + NewPoolSetup("TokenC", "TokenD", 0, 100, 0, 1), + ) + + // WHEN alice multihopswaps A<>B => B<>C => C<>D with a high limit price, + route := &types.MultiHopRoute{Hops: []string{"TokenA", "TokenB", "TokenC", "TokenD"}} + req := &types.QuerySimulateMultiHopSwapRequest{ + Msg: &types.MsgMultiHopSwap{ + Routes: []*types.MultiHopRoute{route}, + AmountIn: math.NewInt(100_000_000), + ExitLimitPrice: math_utils.MustNewPrecDecFromStr("2"), + PickBestRoute: false, + }, + } + // THEN her request fails + resp, err := s.App.DexKeeper.SimulateMultiHopSwap(s.Ctx, req) + s.Error(err, types.ErrLimitPriceNotSatisfied) + s.Nil(resp) +} diff --git a/x/dex/keeper/grpc_query_simulate_place_limit_order.go b/x/dex/keeper/grpc_query_simulate_place_limit_order.go new file mode 100644 index 000000000..259fcdc95 --- /dev/null +++ b/x/dex/keeper/grpc_query_simulate_place_limit_order.go @@ -0,0 +1,67 @@ +package keeper + +import ( + "context" + + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/neutron-org/neutron/v4/x/dex/types" +) + +func (k Keeper) SimulatePlaceLimitOrder( + goCtx context.Context, + req *types.QuerySimulatePlaceLimitOrderRequest, +) (*types.QuerySimulatePlaceLimitOrderResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + cacheCtx, _ := ctx.CacheContext() + + msg := req.Msg + msg.Creator = types.DummyAddress + msg.Receiver = types.DummyAddress + + if err := msg.Validate(); err != nil { + return nil, err + } + + err := msg.ValidateGoodTilExpiration(ctx.BlockTime()) + if err != nil { + return nil, err + } + + receiverAddr := sdk.MustAccAddressFromBech32(msg.Receiver) + takerTradePairID, err := types.NewTradePairID(msg.TokenIn, msg.TokenOut) + if err != nil { + return nil, err + } + tickIndex := msg.TickIndexInToOut + if msg.LimitSellPrice != nil { + tickIndex, err = types.CalcTickIndexFromPrice(*msg.LimitSellPrice) + if err != nil { + return nil, errors.Wrapf(err, "invalid LimitSellPrice %s", msg.LimitSellPrice.String()) + } + } + trancheKey, totalIn, takerCoinIn, takerCoinOut, _, err := k.ExecutePlaceLimitOrder( + cacheCtx, + takerTradePairID, + msg.AmountIn, + tickIndex, + msg.OrderType, + msg.ExpirationTime, + msg.MaxAmountOut, + receiverAddr, + ) + if err != nil { + return nil, err + } + + coinIn := sdk.NewCoin(msg.TokenIn, totalIn) + return &types.QuerySimulatePlaceLimitOrderResponse{ + Resp: &types.MsgPlaceLimitOrderResponse{ + TrancheKey: trancheKey, + CoinIn: coinIn, + TakerCoinIn: takerCoinIn, + TakerCoinOut: takerCoinOut, + }, + }, nil +} diff --git a/x/dex/keeper/grpc_query_simulate_place_limit_order_test.go b/x/dex/keeper/grpc_query_simulate_place_limit_order_test.go new file mode 100644 index 000000000..502117de0 --- /dev/null +++ b/x/dex/keeper/grpc_query_simulate_place_limit_order_test.go @@ -0,0 +1,86 @@ +package keeper_test + +import ( + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + + math_utils "github.com/neutron-org/neutron/v4/utils/math" + "github.com/neutron-org/neutron/v4/x/dex/types" +) + +func (s *DexTestSuite) TestSimulatePlaceLimitOrderWithTick() { + s.SetupMultiplePools( + NewPoolSetup("TokenA", "TokenB", 0, 100, 0, 1), + ) + + req := &types.QuerySimulatePlaceLimitOrderRequest{ + Msg: &types.MsgPlaceLimitOrder{ + TokenIn: "TokenA", + TokenOut: "TokenB", + TickIndexInToOut: 5, + AmountIn: math.NewInt(20_000_000), + OrderType: types.LimitOrderType_FILL_OR_KILL, + }, + } + + resp, err := s.App.DexKeeper.SimulatePlaceLimitOrder(s.Ctx, req) + s.NoError(err) + + s.Equal(sdk.NewCoin("TokenA", math.NewInt(20_000_000)), resp.Resp.CoinIn) + s.Equal(sdk.NewCoin("TokenA", math.NewInt(20_000_000)), resp.Resp.TakerCoinIn) + s.Equal(sdk.NewCoin("TokenB", math.NewInt(19_998_000)), resp.Resp.TakerCoinOut) + + s.assertDexBalances(0, 100) +} + +func (s *DexTestSuite) TestSimulatePlaceLimitOrderWithPrice() { + s.SetupMultiplePools( + NewPoolSetup("TokenA", "TokenB", 0, 10, 0, 1), + NewPoolSetup("TokenA", "TokenB", 0, 10, 100, 1), + ) + + price := math_utils.MustNewPrecDecFromStr("0.995") + + req := &types.QuerySimulatePlaceLimitOrderRequest{ + Msg: &types.MsgPlaceLimitOrder{ + TokenIn: "TokenA", + TokenOut: "TokenB", + LimitSellPrice: &price, + AmountIn: math.NewInt(20_000_000), + OrderType: types.LimitOrderType_GOOD_TIL_CANCELLED, + }, + } + + resp, err := s.App.DexKeeper.SimulatePlaceLimitOrder(s.Ctx, req) + s.NoError(err) + + s.Equal(sdk.NewCoin("TokenA", math.NewInt(20_000_000)), resp.Resp.CoinIn) + s.Equal(sdk.NewCoin("TokenA", math.NewInt(10_001_000)), resp.Resp.TakerCoinIn) + s.Equal(sdk.NewCoin("TokenB", math.NewInt(10_000_000)), resp.Resp.TakerCoinOut) + + s.assertDexBalances(0, 20) +} + +func (s *DexTestSuite) TestSimulatePlaceLimitOrderFails() { + s.SetupMultiplePools( + NewPoolSetup("TokenA", "TokenB", 0, 100, 0, 1), + ) + + price := math_utils.MustNewPrecDecFromStr("1.1") + + req := &types.QuerySimulatePlaceLimitOrderRequest{ + Msg: &types.MsgPlaceLimitOrder{ + TokenIn: "TokenA", + TokenOut: "TokenB", + LimitSellPrice: &price, + AmountIn: math.NewInt(20_000_000), + OrderType: types.LimitOrderType_FILL_OR_KILL, + }, + } + + resp, err := s.App.DexKeeper.SimulatePlaceLimitOrder(s.Ctx, req) + s.ErrorIs(err, types.ErrFoKLimitOrderNotFilled) + s.Nil(resp) + + s.assertDexBalances(0, 100) +} diff --git a/x/dex/keeper/grpc_query_simulate_withdraw_filled_limit_order.go b/x/dex/keeper/grpc_query_simulate_withdraw_filled_limit_order.go new file mode 100644 index 000000000..466374205 --- /dev/null +++ b/x/dex/keeper/grpc_query_simulate_withdraw_filled_limit_order.go @@ -0,0 +1,40 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/neutron-org/neutron/v4/x/dex/types" +) + +func (k Keeper) SimulateWithdrawFilledLimitOrder( + goCtx context.Context, + req *types.QuerySimulateWithdrawFilledLimitOrderRequest, +) (*types.QuerySimulateWithdrawFilledLimitOrderResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + cacheCtx, _ := ctx.CacheContext() + + msg := req.Msg + + if err := msg.Validate(); err != nil { + return nil, err + } + + callerAddr := sdk.MustAccAddressFromBech32(msg.Creator) + takerCoinOut, makerCoinOut, err := k.ExecuteWithdrawFilledLimitOrder( + cacheCtx, + msg.TrancheKey, + callerAddr, + ) + if err != nil { + return nil, err + } + + return &types.QuerySimulateWithdrawFilledLimitOrderResponse{ + Resp: &types.MsgWithdrawFilledLimitOrderResponse{ + TakerCoinOut: takerCoinOut, + MakerCoinOut: makerCoinOut, + }, + }, nil +} diff --git a/x/dex/keeper/grpc_query_simulate_withdraw_filled_limit_order_test.go b/x/dex/keeper/grpc_query_simulate_withdraw_filled_limit_order_test.go new file mode 100644 index 000000000..0539a3712 --- /dev/null +++ b/x/dex/keeper/grpc_query_simulate_withdraw_filled_limit_order_test.go @@ -0,0 +1,52 @@ +package keeper_test + +import ( + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/neutron-org/neutron/v4/x/dex/types" +) + +func (s *DexTestSuite) TestSimulateWithdrawFilledLimitOrder() { + s.fundAliceBalances(50, 0) + s.fundBobBalances(0, 20) + + trancheKey := s.aliceLimitSells("TokenA", 0, 50) + + s.bobLimitSells("TokenB", -10, 20, types.LimitOrderType_FILL_OR_KILL) + + req := &types.QuerySimulateWithdrawFilledLimitOrderRequest{ + Msg: &types.MsgWithdrawFilledLimitOrder{ + Creator: s.alice.String(), + TrancheKey: trancheKey, + }, + } + + resp, err := s.App.DexKeeper.SimulateWithdrawFilledLimitOrder(s.Ctx, req) + s.NoError(err) + + s.Equal(sdk.NewCoin("TokenB", math.NewInt(20_000_000)), resp.Resp.TakerCoinOut) + s.Equal(sdk.NewCoin("TokenA", math.ZeroInt()), resp.Resp.MakerCoinOut) + + s.assertDexBalances(30, 20) +} + +func (s *DexTestSuite) TestSimulateWithdrawFilledLimitOrderFails() { + s.fundAliceBalances(50, 0) + s.fundBobBalances(0, 20) + + trancheKey := s.aliceLimitSells("TokenA", 0, 50) + + s.bobLimitSells("TokenB", -10, 20, types.LimitOrderType_FILL_OR_KILL) + + req := &types.QuerySimulateWithdrawFilledLimitOrderRequest{ + Msg: &types.MsgWithdrawFilledLimitOrder{ + Creator: s.bob.String(), + TrancheKey: trancheKey, + }, + } + + resp, err := s.App.DexKeeper.SimulateWithdrawFilledLimitOrder(s.Ctx, req) + s.ErrorIs(err, types.ErrValidLimitOrderTrancheNotFound) + s.Nil(resp) +} diff --git a/x/dex/keeper/grpc_query_simulate_withdrawal.go b/x/dex/keeper/grpc_query_simulate_withdrawal.go new file mode 100644 index 000000000..4348dd7eb --- /dev/null +++ b/x/dex/keeper/grpc_query_simulate_withdrawal.go @@ -0,0 +1,53 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/neutron-org/neutron/v4/x/dex/types" +) + +func (k Keeper) SimulateWithdrawal( + goCtx context.Context, + req *types.QuerySimulateWithdrawalRequest, +) (*types.QuerySimulateWithdrawalResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + cacheCtx, _ := ctx.CacheContext() + + msg := req.Msg + + if err := msg.Validate(); err != nil { + return nil, err + } + + callerAddr := sdk.MustAccAddressFromBech32(msg.Creator) + receiverAddr := sdk.MustAccAddressFromBech32(msg.Receiver) + pairID, err := types.NewPairID(msg.TokenA, msg.TokenB) + if err != nil { + return nil, err + } + + tickIndexes := NormalizeAllTickIndexes(msg.TokenA, pairID.Token0, msg.TickIndexesAToB) + + reserve0Withdrawn, reserve1Withdrawn, sharesBurned, _, err := k.ExecuteWithdraw( + cacheCtx, + pairID, + callerAddr, + receiverAddr, + msg.SharesToRemove, + tickIndexes, + msg.Fees, + ) + if err != nil { + return nil, err + } + + return &types.QuerySimulateWithdrawalResponse{ + Resp: &types.MsgWithdrawalResponse{ + Reserve0Withdrawn: reserve0Withdrawn, + Reserve1Withdrawn: reserve1Withdrawn, + SharesBurned: sharesBurned, + }, + }, nil +} diff --git a/x/dex/keeper/grpc_query_simulate_withdrawal_test.go b/x/dex/keeper/grpc_query_simulate_withdrawal_test.go new file mode 100644 index 000000000..b80ed74f0 --- /dev/null +++ b/x/dex/keeper/grpc_query_simulate_withdrawal_test.go @@ -0,0 +1,63 @@ +package keeper_test + +import ( + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/neutron-org/neutron/v4/x/dex/types" +) + +func (s *DexTestSuite) TestSimulateWithdrawal() { + s.fundAliceBalances(20, 0) + + s.aliceDeposits(NewDeposit(10, 0, 0, 1), NewDeposit(10, 0, 1, 1)) + + req := &types.QuerySimulateWithdrawalRequest{ + Msg: &types.MsgWithdrawal{ + Creator: s.alice.String(), + Receiver: s.alice.String(), + TokenA: "TokenA", + TokenB: "TokenB", + SharesToRemove: []math.Int{math.NewInt(5), math.NewInt(9)}, + TickIndexesAToB: []int64{0, 1}, + Fees: []uint64{1, 1}, + }, + } + resp, err := s.App.DexKeeper.SimulateWithdrawal(s.Ctx, req) + s.NoError(err) + + s.Equal(math.NewInt(14), resp.Resp.Reserve0Withdrawn) + s.Equal(math.ZeroInt(), resp.Resp.Reserve1Withdrawn) + + expectedSharesBurned := sdk.NewCoins( + sdk.NewCoin("neutron/pool/0", math.NewInt(5)), + sdk.NewCoin("neutron/pool/1", math.NewInt(9)), + ) + sharesBurned := sdk.NewCoins(resp.Resp.SharesBurned...) + s.True(sharesBurned.Equal(expectedSharesBurned)) + + // Dex Balances Unchanged + + s.assertDexBalances(20, 0) +} + +func (s *DexTestSuite) TestSimulateWithdrawalFails() { + s.fundAliceBalances(20, 0) + + s.aliceDeposits(NewDeposit(10, 0, 0, 1), NewDeposit(10, 0, 1, 1)) + + req := &types.QuerySimulateWithdrawalRequest{ + Msg: &types.MsgWithdrawal{ + Creator: s.alice.String(), + Receiver: s.alice.String(), + TokenA: "TokenA", + TokenB: "TokenB", + SharesToRemove: []math.Int{math.NewInt(5), math.NewInt(200_000_000)}, + TickIndexesAToB: []int64{0, 1}, + Fees: []uint64{1, 1}, + }, + } + resp, err := s.App.DexKeeper.SimulateWithdrawal(s.Ctx, req) + s.Error(err, types.ErrInsufficientShares) + s.Nil(resp) +} diff --git a/x/dex/keeper/msg_server.go b/x/dex/keeper/msg_server.go index 2b3bca666..df50b21a1 100644 --- a/x/dex/keeper/msg_server.go +++ b/x/dex/keeper/msg_server.go @@ -38,7 +38,7 @@ func (k MsgServer) Deposit( callerAddr := sdk.MustAccAddressFromBech32(msg.Creator) receiverAddr := sdk.MustAccAddressFromBech32(msg.Receiver) - pairID, err := types.NewPairIDFromUnsorted(msg.TokenA, msg.TokenB) + pairID, err := types.NewPairID(msg.TokenA, msg.TokenB) if err != nil { return nil, err } @@ -48,7 +48,7 @@ func (k MsgServer) Deposit( tickIndexes := NormalizeAllTickIndexes(msg.TokenA, pairID.Token0, msg.TickIndexesAToB) - Amounts0Deposit, Amounts1Deposit, _, failedDeposits, err := k.DepositCore( + Amounts0Deposit, Amounts1Deposit, sharesIssued, failedDeposits, err := k.DepositCore( goCtx, pairID, callerAddr, @@ -67,6 +67,7 @@ func (k MsgServer) Deposit( Reserve0Deposited: Amounts0Deposit, Reserve1Deposited: Amounts1Deposit, FailedDeposits: failedDeposits, + SharesIssued: sharesIssued, }, nil } @@ -85,14 +86,14 @@ func (k MsgServer) Withdrawal( callerAddr := sdk.MustAccAddressFromBech32(msg.Creator) receiverAddr := sdk.MustAccAddressFromBech32(msg.Receiver) - pairID, err := types.NewPairIDFromUnsorted(msg.TokenA, msg.TokenB) + pairID, err := types.NewPairID(msg.TokenA, msg.TokenB) if err != nil { return nil, err } tickIndexes := NormalizeAllTickIndexes(msg.TokenA, pairID.Token0, msg.TickIndexesAToB) - err = k.WithdrawCore( + reserve0ToRemoved, reserve1ToRemoved, sharesBurned, err := k.WithdrawCore( goCtx, pairID, callerAddr, @@ -105,7 +106,11 @@ func (k MsgServer) Withdrawal( return nil, err } - return &types.MsgWithdrawalResponse{}, nil + return &types.MsgWithdrawalResponse{ + Reserve0Withdrawn: reserve0ToRemoved, + Reserve1Withdrawn: reserve1ToRemoved, + SharesBurned: sharesBurned, + }, nil } func (k MsgServer) PlaceLimitOrder( @@ -136,7 +141,7 @@ func (k MsgServer) PlaceLimitOrder( return &types.MsgPlaceLimitOrderResponse{}, errors.Wrapf(err, "invalid LimitSellPrice %s", msg.LimitSellPrice.String()) } } - trancheKey, coinIn, _, coinOutSwap, err := k.PlaceLimitOrderCore( + trancheKey, coinIn, swapInCoin, coinOutSwap, err := k.PlaceLimitOrderCore( goCtx, msg.TokenIn, msg.TokenOut, @@ -156,6 +161,7 @@ func (k MsgServer) PlaceLimitOrder( TrancheKey: trancheKey, CoinIn: coinIn, TakerCoinOut: coinOutSwap, + TakerCoinIn: swapInCoin, }, nil } @@ -173,7 +179,7 @@ func (k MsgServer) WithdrawFilledLimitOrder( callerAddr := sdk.MustAccAddressFromBech32(msg.Creator) - err := k.WithdrawFilledLimitOrderCore( + takerCoinOut, makerCoinOut, err := k.WithdrawFilledLimitOrderCore( goCtx, msg.TrancheKey, callerAddr, @@ -182,7 +188,10 @@ func (k MsgServer) WithdrawFilledLimitOrder( return &types.MsgWithdrawFilledLimitOrderResponse{}, err } - return &types.MsgWithdrawFilledLimitOrderResponse{}, nil + return &types.MsgWithdrawFilledLimitOrderResponse{ + TakerCoinOut: takerCoinOut, + MakerCoinOut: makerCoinOut, + }, nil } func (k MsgServer) CancelLimitOrder( @@ -199,7 +208,7 @@ func (k MsgServer) CancelLimitOrder( callerAddr := sdk.MustAccAddressFromBech32(msg.Creator) - err := k.CancelLimitOrderCore( + makerCoinOut, takerCoinOut, err := k.CancelLimitOrderCore( goCtx, msg.TrancheKey, callerAddr, @@ -208,7 +217,10 @@ func (k MsgServer) CancelLimitOrder( return &types.MsgCancelLimitOrderResponse{}, err } - return &types.MsgCancelLimitOrderResponse{}, nil + return &types.MsgCancelLimitOrderResponse{ + TakerCoinOut: takerCoinOut, + MakerCoinOut: makerCoinOut, + }, nil } func (k MsgServer) MultiHopSwap( @@ -226,7 +238,7 @@ func (k MsgServer) MultiHopSwap( callerAddr := sdk.MustAccAddressFromBech32(msg.Creator) receiverAddr := sdk.MustAccAddressFromBech32(msg.Receiver) - coinOut, err := k.MultiHopSwapCore( + coinOut, route, dust, err := k.MultiHopSwapCore( goCtx, msg.AmountIn, msg.Routes, @@ -238,7 +250,11 @@ func (k MsgServer) MultiHopSwap( if err != nil { return &types.MsgMultiHopSwapResponse{}, err } - return &types.MsgMultiHopSwapResponse{CoinOut: coinOut}, nil + return &types.MsgMultiHopSwapResponse{ + CoinOut: coinOut, + Route: &types.MultiHopRoute{Hops: route}, + Dust: dust, + }, nil } func (k MsgServer) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { @@ -259,6 +275,12 @@ func (k MsgServer) UpdateParams(goCtx context.Context, req *types.MsgUpdateParam return &types.MsgUpdateParamsResponse{}, nil } -func (k MsgServer) AssertNotPaused(_ context.Context) error { - return types.ErrDexPaused +func (k MsgServer) AssertNotPaused(goCtx context.Context) error { + ctx := sdk.UnwrapSDKContext(goCtx) + paused := k.GetParams(ctx).Paused + + if paused { + return types.ErrDexPaused + } + return nil } diff --git a/x/dex/keeper/multihop_swap.go b/x/dex/keeper/multihop_swap.go index ab1ad4798..c0f93a9a2 100644 --- a/x/dex/keeper/multihop_swap.go +++ b/x/dex/keeper/multihop_swap.go @@ -35,12 +35,12 @@ func (k Keeper) MultiHopSwapCore( pickBestRoute bool, callerAddr sdk.AccAddress, receiverAddr sdk.AccAddress, -) (coinOut sdk.Coin, err error) { +) (coinOut sdk.Coin, route []string, dust sdk.Coins, err error) { ctx := sdk.UnwrapSDKContext(goCtx) bestRoute, initialInCoin, err := k.CalulateMultiHopSwap(ctx, amountIn, routes, exitLimitPrice, pickBestRoute) if err != nil { - return sdk.Coin{}, err + return sdk.Coin{}, []string{}, sdk.Coins{}, err } bestRoute.write() @@ -51,7 +51,7 @@ func (k Keeper) MultiHopSwapCore( sdk.Coins{initialInCoin}, ) if err != nil { - return sdk.Coin{}, err + return sdk.Coin{}, []string{}, sdk.Coins{}, err } // send both dust and coinOut to receiver @@ -63,7 +63,7 @@ func (k Keeper) MultiHopSwapCore( bestRoute.dust.Add(bestRoute.coinOut), ) if err != nil { - return sdk.Coin{}, fmt.Errorf("failed to send out coin and dust to the receiver: %w", err) + return sdk.Coin{}, []string{}, sdk.Coins{}, fmt.Errorf("failed to send out coin and dust to the receiver: %w", err) } ctx.EventManager().EmitEvent(types.CreateMultihopSwapEvent( @@ -77,7 +77,7 @@ func (k Keeper) MultiHopSwapCore( bestRoute.dust, )) - return bestRoute.coinOut, nil + return bestRoute.coinOut, bestRoute.route, bestRoute.dust, nil } // CalulateMultiHopSwap handles the core logic for MultiHopSwap -- simulating swap operations across all routes (when applicable) diff --git a/x/dex/keeper/withdraw.go b/x/dex/keeper/withdraw.go index ff81dd3f1..91faff3bc 100644 --- a/x/dex/keeper/withdraw.go +++ b/x/dex/keeper/withdraw.go @@ -19,7 +19,7 @@ func (k Keeper) WithdrawCore( sharesToRemoveList []math.Int, tickIndicesNormalized []int64, fees []uint64, -) error { +) (reserves0ToRemoved, reserves1ToRemoved math.Int, sharesBurned sdk.Coins, err error) { ctx := sdk.UnwrapSDKContext(goCtx) totalReserve0ToRemove, totalReserve1ToRemove, coinsToBurn, events, err := k.ExecuteWithdraw( @@ -32,13 +32,13 @@ func (k Keeper) WithdrawCore( fees, ) if err != nil { - return err + return math.ZeroInt(), math.ZeroInt(), nil, err } ctx.EventManager().EmitEvents(events) if err := k.BurnShares(ctx, callerAddr, coinsToBurn); err != nil { - return err + return math.ZeroInt(), math.ZeroInt(), nil, err } if totalReserve0ToRemove.IsPositive() { @@ -52,7 +52,7 @@ func (k Keeper) WithdrawCore( ) ctx.EventManager().EmitEvents(types.GetEventsWithdrawnAmount(sdk.Coins{coin0})) if err != nil { - return err + return math.ZeroInt(), math.ZeroInt(), nil, err } } @@ -66,11 +66,11 @@ func (k Keeper) WithdrawCore( ) ctx.EventManager().EmitEvents(types.GetEventsWithdrawnAmount(sdk.Coins{coin1})) if err != nil { - return err + return math.ZeroInt(), math.ZeroInt(), nil, err } } - return nil + return totalReserve0ToRemove, totalReserve1ToRemove, coinsToBurn, nil } // ExecuteWithdraw handles the core Withdraw logic including calculating and withdrawing reserve0,reserve1 from a specified tick @@ -104,8 +104,8 @@ func (k Keeper) ExecuteWithdraw( // TODO: this is a bit hacky. Since it is possible to have multiple withdrawals from the same pool we have to artificially update the bank balance // In the future we should enforce only one withdraw operation per pool in the message validation alreadyWithdrawnOfDenom := coinsToBurn.AmountOf(poolDenom) - totalShares := k.bankKeeper.GetSupply(ctx, poolDenom).Amount.Sub(alreadyWithdrawnOfDenom) - if totalShares.LT(sharesToRemove) { + sharesOwned := k.bankKeeper.GetBalance(ctx, callerAddr, poolDenom).Amount.Sub(alreadyWithdrawnOfDenom) + if sharesOwned.LT(sharesToRemove) { return math.ZeroInt(), math.ZeroInt(), nil, nil, sdkerrors.Wrapf( types.ErrInsufficientShares, "%s does not have %s shares of type %s", @@ -115,6 +115,7 @@ func (k Keeper) ExecuteWithdraw( ) } + totalShares := k.bankKeeper.GetSupply(ctx, poolDenom).Amount.Sub(alreadyWithdrawnOfDenom) outAmount0, outAmount1 := pool.Withdraw(sharesToRemove, totalShares) k.SetPool(ctx, pool) diff --git a/x/dex/keeper/withdraw_filled_limit_order.go b/x/dex/keeper/withdraw_filled_limit_order.go index f85450732..536c7d38f 100644 --- a/x/dex/keeper/withdraw_filled_limit_order.go +++ b/x/dex/keeper/withdraw_filled_limit_order.go @@ -15,26 +15,26 @@ func (k Keeper) WithdrawFilledLimitOrderCore( goCtx context.Context, trancheKey string, callerAddr sdk.AccAddress, -) error { +) (takerCoinOut, makerCoinOut sdk.Coin, err error) { ctx := sdk.UnwrapSDKContext(goCtx) - amountOutTokenOut, remainingTokenIn, tradePairID, err := k.ExecuteWithdrawFilledLimitOrder(ctx, trancheKey, callerAddr) + takerCoinOut, makerCoinOut, err = k.ExecuteWithdrawFilledLimitOrder(ctx, trancheKey, callerAddr) if err != nil { - return err + return sdk.Coin{}, sdk.Coin{}, err } - coinTakerDenomOut := sdk.NewCoin(tradePairID.TakerDenom, amountOutTokenOut) - coinMakerDenomRefund := sdk.NewCoin(tradePairID.MakerDenom, remainingTokenIn) // NOTE: it is possible for coinTakerDenomOut xor coinMakerDenomOut to be zero. These are removed by the sanitize call in sdk.NewCoins // ExecuteWithdrawFilledLimitOrder ensures that at least one of these has am amount > 0. - coins := sdk.NewCoins(coinTakerDenomOut, coinMakerDenomRefund) - ctx.EventManager().EmitEvents(types.GetEventsWithdrawnAmount(sdk.NewCoins(coinTakerDenomOut))) + coins := sdk.NewCoins(takerCoinOut, makerCoinOut) + ctx.EventManager().EmitEvents(types.GetEventsWithdrawnAmount(sdk.NewCoins(takerCoinOut))) if err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, callerAddr, coins); err != nil { - return err + return sdk.Coin{}, sdk.Coin{}, err } + makerDenom := makerCoinOut.Denom + takerDenom := takerCoinOut.Denom // This will never panic since TradePairID has already been successfully constructed by ExecuteWithdrawFilledLimitOrder - pairID := tradePairID.MustPairID() + pairID := types.MustNewPairID(makerDenom, takerDenom) ctx.EventManager().EmitEvent(types.WithdrawFilledLimitOrderEvent( callerAddr, pairID.Token0, @@ -46,7 +46,7 @@ func (k Keeper) WithdrawFilledLimitOrderCore( trancheKey, )) - return nil + return takerCoinOut, makerCoinOut, nil } // ExecuteWithdrawFilledLimitOrder handles the for logic for WithdrawFilledLimitOrder -- calculates and sends filled liquidity from module to user, @@ -56,14 +56,14 @@ func (k Keeper) ExecuteWithdrawFilledLimitOrder( ctx sdk.Context, trancheKey string, callerAddr sdk.AccAddress, -) (amountOutTokenOut, remainingTokenIn math.Int, tradePairID *types.TradePairID, err error) { +) (takerCoinOut, makerCoinOut sdk.Coin, err error) { trancheUser, found := k.GetLimitOrderTrancheUser( ctx, callerAddr.String(), trancheKey, ) if !found { - return math.ZeroInt(), math.ZeroInt(), nil, sdkerrors.Wrapf(types.ErrValidLimitOrderTrancheNotFound, "%s", trancheKey) + return makerCoinOut, takerCoinOut, sdkerrors.Wrapf(types.ErrValidLimitOrderTrancheNotFound, "%s", trancheKey) } tradePairID, tickIndex := trancheUser.TradePairId, trancheUser.TickIndexTakerToMaker @@ -77,8 +77,8 @@ func (k Keeper) ExecuteWithdrawFilledLimitOrder( }, ) - amountOutTokenOut = math.ZeroInt() - remainingTokenIn = math.ZeroInt() + amountOutTokenOut := math.ZeroInt() + remainingTokenIn := math.ZeroInt() // It's possible that a TrancheUser exists but tranche does not if LO was filled entirely through a swap if found { var amountOutTokenIn math.Int @@ -102,8 +102,11 @@ func (k Keeper) ExecuteWithdrawFilledLimitOrder( k.SaveTrancheUser(ctx, trancheUser) if !amountOutTokenOut.IsPositive() && !remainingTokenIn.IsPositive() { - return math.ZeroInt(), math.ZeroInt(), tradePairID, types.ErrWithdrawEmptyLimitOrder + return takerCoinOut, makerCoinOut, types.ErrWithdrawEmptyLimitOrder } - return amountOutTokenOut, remainingTokenIn, tradePairID, nil + takerCoinOut = sdk.NewCoin(tradePairID.TakerDenom, amountOutTokenOut) + makerCoinOut = sdk.NewCoin(tradePairID.MakerDenom, remainingTokenIn) + + return takerCoinOut, makerCoinOut, nil } diff --git a/x/dex/types/expected_keepers.go b/x/dex/types/expected_keepers.go index 339e22037..95c5c7a90 100644 --- a/x/dex/types/expected_keepers.go +++ b/x/dex/types/expected_keepers.go @@ -15,4 +15,5 @@ type BankKeeper interface { BurnCoins(ctx context.Context, moduleName string, amt sdk.Coins) error IterateAccountBalances(ctx context.Context, addr sdk.AccAddress, cb func(sdk.Coin) bool) GetSupply(ctx context.Context, denom string) sdk.Coin + GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin } diff --git a/x/dex/types/keys.go b/x/dex/types/keys.go index 8ac1cbb76..ed3509503 100644 --- a/x/dex/types/keys.go +++ b/x/dex/types/keys.go @@ -207,3 +207,6 @@ func JITGoodTilTime() time.Time { const ( ExpiringLimitOrderGas = 10_000 ) + +// Dummy Address used for simulate queries +const DummyAddress = "neutron1pq7j6za5zjcl3um9t5gfyleues336tv04tyq0k" diff --git a/x/dex/types/pair_id.go b/x/dex/types/pair_id.go index dd2b9b9e6..4809e7e38 100644 --- a/x/dex/types/pair_id.go +++ b/x/dex/types/pair_id.go @@ -7,7 +7,8 @@ import ( sdkerrors "cosmossdk.io/errors" ) -func NewPairID(token0, token1 string) (*PairID, error) { +func NewPairID(tokenA, tokenB string) (*PairID, error) { + token0, token1 := SortTokens(tokenA, tokenB) if token0 == token1 { return nil, sdkerrors.Wrapf(ErrInvalidTradingPair, "%s<>%s", token0, token1) } @@ -17,19 +18,14 @@ func NewPairID(token0, token1 string) (*PairID, error) { }, nil } -func MustNewPairID(token0, token1 string) *PairID { - pairID, err := NewPairID(token0, token1) +func MustNewPairID(tokenA, tokenB string) *PairID { + pairID, err := NewPairID(tokenA, tokenB) if err != nil { panic(err) } return pairID } -func NewPairIDFromUnsorted(tokenA, tokenB string) (*PairID, error) { - token0, token1 := SortTokens(tokenA, tokenB) - return NewPairID(token0, token1) -} - func (p *PairID) CanonicalString() string { return fmt.Sprintf("%s<>%s", p.Token0, p.Token1) } diff --git a/x/dex/types/query.pb.go b/x/dex/types/query.pb.go index 9450a4a07..9e9335bf6 100644 --- a/x/dex/types/query.pb.go +++ b/x/dex/types/query.pb.go @@ -1327,6 +1327,7 @@ func (m *QueryGetPoolReservesResponse) GetPoolReserves() *PoolReserves { } type QueryEstimateMultiHopSwapRequest struct { + // DEPRECATED: Use QuerySimulateMultiHopSwap Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` Routes []*MultiHopRoute `protobuf:"bytes,3,rep,name=routes,proto3" json:"routes,omitempty"` @@ -1436,6 +1437,7 @@ func (m *QueryEstimateMultiHopSwapResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryEstimateMultiHopSwapResponse proto.InternalMessageInfo type QueryEstimatePlaceLimitOrderRequest struct { + // DEPRECATED: Use QuerySimulatePlaceLimitOrder Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` TokenIn string `protobuf:"bytes,3,opt,name=token_in,json=tokenIn,proto3" json:"token_in,omitempty"` @@ -1909,1395 +1911,1731 @@ func (m *QueryAllPoolMetadataResponse) GetPagination() *query.PageResponse { return nil } -func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "neutron.dex.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "neutron.dex.QueryParamsResponse") - proto.RegisterType((*QueryGetLimitOrderTrancheUserRequest)(nil), "neutron.dex.QueryGetLimitOrderTrancheUserRequest") - proto.RegisterType((*QueryGetLimitOrderTrancheUserResponse)(nil), "neutron.dex.QueryGetLimitOrderTrancheUserResponse") - proto.RegisterType((*QueryAllLimitOrderTrancheUserRequest)(nil), "neutron.dex.QueryAllLimitOrderTrancheUserRequest") - proto.RegisterType((*QueryAllLimitOrderTrancheUserResponse)(nil), "neutron.dex.QueryAllLimitOrderTrancheUserResponse") - proto.RegisterType((*QueryGetLimitOrderTrancheRequest)(nil), "neutron.dex.QueryGetLimitOrderTrancheRequest") - proto.RegisterType((*QueryGetLimitOrderTrancheResponse)(nil), "neutron.dex.QueryGetLimitOrderTrancheResponse") - proto.RegisterType((*QueryAllLimitOrderTrancheRequest)(nil), "neutron.dex.QueryAllLimitOrderTrancheRequest") - proto.RegisterType((*QueryAllLimitOrderTrancheResponse)(nil), "neutron.dex.QueryAllLimitOrderTrancheResponse") - proto.RegisterType((*QueryAllUserDepositsRequest)(nil), "neutron.dex.QueryAllUserDepositsRequest") - proto.RegisterType((*QueryAllUserDepositsResponse)(nil), "neutron.dex.QueryAllUserDepositsResponse") - proto.RegisterType((*QueryAllLimitOrderTrancheUserByAddressRequest)(nil), "neutron.dex.QueryAllLimitOrderTrancheUserByAddressRequest") - proto.RegisterType((*QueryAllLimitOrderTrancheUserByAddressResponse)(nil), "neutron.dex.QueryAllLimitOrderTrancheUserByAddressResponse") - proto.RegisterType((*QueryAllTickLiquidityRequest)(nil), "neutron.dex.QueryAllTickLiquidityRequest") - proto.RegisterType((*QueryAllTickLiquidityResponse)(nil), "neutron.dex.QueryAllTickLiquidityResponse") - proto.RegisterType((*QueryGetInactiveLimitOrderTrancheRequest)(nil), "neutron.dex.QueryGetInactiveLimitOrderTrancheRequest") - proto.RegisterType((*QueryGetInactiveLimitOrderTrancheResponse)(nil), "neutron.dex.QueryGetInactiveLimitOrderTrancheResponse") - proto.RegisterType((*QueryAllInactiveLimitOrderTrancheRequest)(nil), "neutron.dex.QueryAllInactiveLimitOrderTrancheRequest") - proto.RegisterType((*QueryAllInactiveLimitOrderTrancheResponse)(nil), "neutron.dex.QueryAllInactiveLimitOrderTrancheResponse") - proto.RegisterType((*QueryAllPoolReservesRequest)(nil), "neutron.dex.QueryAllPoolReservesRequest") - proto.RegisterType((*QueryAllPoolReservesResponse)(nil), "neutron.dex.QueryAllPoolReservesResponse") - proto.RegisterType((*QueryGetPoolReservesRequest)(nil), "neutron.dex.QueryGetPoolReservesRequest") - proto.RegisterType((*QueryGetPoolReservesResponse)(nil), "neutron.dex.QueryGetPoolReservesResponse") - proto.RegisterType((*QueryEstimateMultiHopSwapRequest)(nil), "neutron.dex.QueryEstimateMultiHopSwapRequest") - proto.RegisterType((*QueryEstimateMultiHopSwapResponse)(nil), "neutron.dex.QueryEstimateMultiHopSwapResponse") - proto.RegisterType((*QueryEstimatePlaceLimitOrderRequest)(nil), "neutron.dex.QueryEstimatePlaceLimitOrderRequest") - proto.RegisterType((*QueryEstimatePlaceLimitOrderResponse)(nil), "neutron.dex.QueryEstimatePlaceLimitOrderResponse") - proto.RegisterType((*QueryPoolRequest)(nil), "neutron.dex.QueryPoolRequest") - proto.RegisterType((*QueryPoolByIDRequest)(nil), "neutron.dex.QueryPoolByIDRequest") - proto.RegisterType((*QueryPoolResponse)(nil), "neutron.dex.QueryPoolResponse") - proto.RegisterType((*QueryGetPoolMetadataRequest)(nil), "neutron.dex.QueryGetPoolMetadataRequest") - proto.RegisterType((*QueryGetPoolMetadataResponse)(nil), "neutron.dex.QueryGetPoolMetadataResponse") - proto.RegisterType((*QueryAllPoolMetadataRequest)(nil), "neutron.dex.QueryAllPoolMetadataRequest") - proto.RegisterType((*QueryAllPoolMetadataResponse)(nil), "neutron.dex.QueryAllPoolMetadataResponse") +type QuerySimulateDepositRequest struct { + Msg *MsgDeposit `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` } -func init() { proto.RegisterFile("neutron/dex/query.proto", fileDescriptor_b6613ea5fce61e9c) } - -var fileDescriptor_b6613ea5fce61e9c = []byte{ - // 2332 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0x4d, 0x6c, 0x1c, 0x49, - 0x15, 0x4e, 0x7b, 0x1c, 0xc7, 0x2e, 0x3b, 0xb1, 0x5d, 0xb6, 0x37, 0x93, 0xb1, 0xe3, 0xb1, 0x7b, - 0x37, 0xb1, 0x63, 0xf0, 0x74, 0x6c, 0x36, 0xbb, 0xab, 0x2c, 0x0b, 0x78, 0xf0, 0xae, 0x33, 0xec, - 0x46, 0x31, 0xbd, 0x66, 0x7f, 0xc2, 0x4a, 0xad, 0xf6, 0x74, 0xc5, 0x6e, 0xb9, 0xa7, 0xbb, 0xd3, - 0x5d, 0x63, 0x7b, 0x14, 0xe5, 0xb2, 0x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0x8e, 0x72, 0x8f, 0xc1, 0xf9, 0x26, 0x64, 0x8b, 0xf0, - 0x0b, 0x9d, 0xb3, 0x45, 0x17, 0x88, 0x12, 0xee, 0x38, 0xb2, 0xcc, 0x11, 0xcd, 0xe0, 0x5c, 0x32, - 0xa2, 0xe2, 0xc6, 0x87, 0x0f, 0x67, 0xa5, 0x8f, 0x1e, 0xce, 0x4a, 0xff, 0x7c, 0x38, 0x2b, 0x3d, - 0x78, 0x34, 0x7b, 0xea, 0xa3, 0x47, 0xb3, 0xa7, 0xfe, 0xfa, 0x68, 0xf6, 0xd4, 0xed, 0xe5, 0xf4, - 0xae, 0xe2, 0x61, 0x50, 0x5c, 0xd9, 0xcd, 0x7b, 0x7b, 0x80, 0xb7, 0x73, 0x3e, 0xf7, 0xbf, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x80, 0xda, 0x02, 0xc7, 0x18, 0x26, 0x00, 0x00, +func (m *QuerySimulateDepositRequest) Reset() { *m = QuerySimulateDepositRequest{} } +func (m *QuerySimulateDepositRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySimulateDepositRequest) ProtoMessage() {} +func (*QuerySimulateDepositRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b6613ea5fce61e9c, []int{35} +} +func (m *QuerySimulateDepositRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySimulateDepositRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySimulateDepositRequest.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 *QuerySimulateDepositRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySimulateDepositRequest.Merge(m, src) +} +func (m *QuerySimulateDepositRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySimulateDepositRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySimulateDepositRequest.DiscardUnknown(m) } -// 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 +var xxx_messageInfo_QuerySimulateDepositRequest proto.InternalMessageInfo -// 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 module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Queries a LimitOrderTrancheUser by index. - LimitOrderTrancheUser(ctx context.Context, in *QueryGetLimitOrderTrancheUserRequest, opts ...grpc.CallOption) (*QueryGetLimitOrderTrancheUserResponse, error) - // Queries a list of LimitOrderTranchUser items. - LimitOrderTrancheUserAll(ctx context.Context, in *QueryAllLimitOrderTrancheUserRequest, opts ...grpc.CallOption) (*QueryAllLimitOrderTrancheUserResponse, error) - // Queries a list of LimitOrderTrancheUser items for a given address. - LimitOrderTrancheUserAllByAddress(ctx context.Context, in *QueryAllLimitOrderTrancheUserByAddressRequest, opts ...grpc.CallOption) (*QueryAllLimitOrderTrancheUserByAddressResponse, error) - // Queries a LimitOrderTranche by index. - LimitOrderTranche(ctx context.Context, in *QueryGetLimitOrderTrancheRequest, opts ...grpc.CallOption) (*QueryGetLimitOrderTrancheResponse, error) - // Queries a list of LimitOrderTranche items for a given pairID / TokenIn - // combination. - LimitOrderTrancheAll(ctx context.Context, in *QueryAllLimitOrderTrancheRequest, opts ...grpc.CallOption) (*QueryAllLimitOrderTrancheResponse, error) - // Queries a list of UserDeposits items. - UserDepositsAll(ctx context.Context, in *QueryAllUserDepositsRequest, opts ...grpc.CallOption) (*QueryAllUserDepositsResponse, error) - // Queries a list of TickLiquidity items. - TickLiquidityAll(ctx context.Context, in *QueryAllTickLiquidityRequest, opts ...grpc.CallOption) (*QueryAllTickLiquidityResponse, error) - // Queries a InactiveLimitOrderTranche by index. - InactiveLimitOrderTranche(ctx context.Context, in *QueryGetInactiveLimitOrderTrancheRequest, opts ...grpc.CallOption) (*QueryGetInactiveLimitOrderTrancheResponse, error) - // Queries a list of InactiveLimitOrderTranche items. - InactiveLimitOrderTrancheAll(ctx context.Context, in *QueryAllInactiveLimitOrderTrancheRequest, opts ...grpc.CallOption) (*QueryAllInactiveLimitOrderTrancheResponse, error) - // Queries a list of PoolReserves items. - PoolReservesAll(ctx context.Context, in *QueryAllPoolReservesRequest, opts ...grpc.CallOption) (*QueryAllPoolReservesResponse, error) - // Queries a PoolReserve by index - PoolReserves(ctx context.Context, in *QueryGetPoolReservesRequest, opts ...grpc.CallOption) (*QueryGetPoolReservesResponse, error) - // Queries the simulated result of a multihop swap - EstimateMultiHopSwap(ctx context.Context, in *QueryEstimateMultiHopSwapRequest, opts ...grpc.CallOption) (*QueryEstimateMultiHopSwapResponse, error) - // Queries the simulated result of a PlaceLimit order - EstimatePlaceLimitOrder(ctx context.Context, in *QueryEstimatePlaceLimitOrderRequest, opts ...grpc.CallOption) (*QueryEstimatePlaceLimitOrderResponse, error) - // Queries a pool by pair, tick and fee - Pool(ctx context.Context, in *QueryPoolRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) - // Queries a pool by ID - PoolByID(ctx context.Context, in *QueryPoolByIDRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) - // Queries a PoolMetadata by ID - PoolMetadata(ctx context.Context, in *QueryGetPoolMetadataRequest, opts ...grpc.CallOption) (*QueryGetPoolMetadataResponse, error) - // Queries a list of PoolMetadata items. - PoolMetadataAll(ctx context.Context, in *QueryAllPoolMetadataRequest, opts ...grpc.CallOption) (*QueryAllPoolMetadataResponse, error) +func (m *QuerySimulateDepositRequest) GetMsg() *MsgDeposit { + if m != nil { + return m.Msg + } + return nil } -type queryClient struct { - cc grpc1.ClientConn +type QuerySimulateDepositResponse struct { + Resp *MsgDepositResponse `protobuf:"bytes,1,opt,name=resp,proto3" json:"resp,omitempty"` } -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} +func (m *QuerySimulateDepositResponse) Reset() { *m = QuerySimulateDepositResponse{} } +func (m *QuerySimulateDepositResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySimulateDepositResponse) ProtoMessage() {} +func (*QuerySimulateDepositResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b6613ea5fce61e9c, []int{36} } - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/neutron.dex.Query/Params", in, out, opts...) - if err != nil { - return nil, err +func (m *QuerySimulateDepositResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySimulateDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySimulateDepositResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *QuerySimulateDepositResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySimulateDepositResponse.Merge(m, src) +} +func (m *QuerySimulateDepositResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySimulateDepositResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySimulateDepositResponse.DiscardUnknown(m) } -func (c *queryClient) LimitOrderTrancheUser(ctx context.Context, in *QueryGetLimitOrderTrancheUserRequest, opts ...grpc.CallOption) (*QueryGetLimitOrderTrancheUserResponse, error) { - out := new(QueryGetLimitOrderTrancheUserResponse) - err := c.cc.Invoke(ctx, "/neutron.dex.Query/LimitOrderTrancheUser", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_QuerySimulateDepositResponse proto.InternalMessageInfo + +func (m *QuerySimulateDepositResponse) GetResp() *MsgDepositResponse { + if m != nil { + return m.Resp } - return out, nil + return nil } -func (c *queryClient) LimitOrderTrancheUserAll(ctx context.Context, in *QueryAllLimitOrderTrancheUserRequest, opts ...grpc.CallOption) (*QueryAllLimitOrderTrancheUserResponse, error) { - out := new(QueryAllLimitOrderTrancheUserResponse) - err := c.cc.Invoke(ctx, "/neutron.dex.Query/LimitOrderTrancheUserAll", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +type QuerySimulateWithdrawalRequest struct { + Msg *MsgWithdrawal `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` } -func (c *queryClient) LimitOrderTrancheUserAllByAddress(ctx context.Context, in *QueryAllLimitOrderTrancheUserByAddressRequest, opts ...grpc.CallOption) (*QueryAllLimitOrderTrancheUserByAddressResponse, error) { - out := new(QueryAllLimitOrderTrancheUserByAddressResponse) - err := c.cc.Invoke(ctx, "/neutron.dex.Query/LimitOrderTrancheUserAllByAddress", in, out, opts...) - if err != nil { - return nil, err +func (m *QuerySimulateWithdrawalRequest) Reset() { *m = QuerySimulateWithdrawalRequest{} } +func (m *QuerySimulateWithdrawalRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySimulateWithdrawalRequest) ProtoMessage() {} +func (*QuerySimulateWithdrawalRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b6613ea5fce61e9c, []int{37} +} +func (m *QuerySimulateWithdrawalRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySimulateWithdrawalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySimulateWithdrawalRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *QuerySimulateWithdrawalRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySimulateWithdrawalRequest.Merge(m, src) +} +func (m *QuerySimulateWithdrawalRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySimulateWithdrawalRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySimulateWithdrawalRequest.DiscardUnknown(m) } -func (c *queryClient) LimitOrderTranche(ctx context.Context, in *QueryGetLimitOrderTrancheRequest, opts ...grpc.CallOption) (*QueryGetLimitOrderTrancheResponse, error) { - out := new(QueryGetLimitOrderTrancheResponse) - err := c.cc.Invoke(ctx, "/neutron.dex.Query/LimitOrderTranche", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_QuerySimulateWithdrawalRequest proto.InternalMessageInfo + +func (m *QuerySimulateWithdrawalRequest) GetMsg() *MsgWithdrawal { + if m != nil { + return m.Msg } - return out, nil + return nil } -func (c *queryClient) LimitOrderTrancheAll(ctx context.Context, in *QueryAllLimitOrderTrancheRequest, opts ...grpc.CallOption) (*QueryAllLimitOrderTrancheResponse, error) { - out := new(QueryAllLimitOrderTrancheResponse) - err := c.cc.Invoke(ctx, "/neutron.dex.Query/LimitOrderTrancheAll", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +type QuerySimulateWithdrawalResponse struct { + Resp *MsgWithdrawalResponse `protobuf:"bytes,1,opt,name=resp,proto3" json:"resp,omitempty"` } -func (c *queryClient) UserDepositsAll(ctx context.Context, in *QueryAllUserDepositsRequest, opts ...grpc.CallOption) (*QueryAllUserDepositsResponse, error) { - out := new(QueryAllUserDepositsResponse) - err := c.cc.Invoke(ctx, "/neutron.dex.Query/UserDepositsAll", in, out, opts...) - if err != nil { - return nil, err +func (m *QuerySimulateWithdrawalResponse) Reset() { *m = QuerySimulateWithdrawalResponse{} } +func (m *QuerySimulateWithdrawalResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySimulateWithdrawalResponse) ProtoMessage() {} +func (*QuerySimulateWithdrawalResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b6613ea5fce61e9c, []int{38} +} +func (m *QuerySimulateWithdrawalResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySimulateWithdrawalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySimulateWithdrawalResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *QuerySimulateWithdrawalResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySimulateWithdrawalResponse.Merge(m, src) +} +func (m *QuerySimulateWithdrawalResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySimulateWithdrawalResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySimulateWithdrawalResponse.DiscardUnknown(m) } -func (c *queryClient) TickLiquidityAll(ctx context.Context, in *QueryAllTickLiquidityRequest, opts ...grpc.CallOption) (*QueryAllTickLiquidityResponse, error) { - out := new(QueryAllTickLiquidityResponse) - err := c.cc.Invoke(ctx, "/neutron.dex.Query/TickLiquidityAll", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_QuerySimulateWithdrawalResponse proto.InternalMessageInfo + +func (m *QuerySimulateWithdrawalResponse) GetResp() *MsgWithdrawalResponse { + if m != nil { + return m.Resp } - return out, nil + return nil } -func (c *queryClient) InactiveLimitOrderTranche(ctx context.Context, in *QueryGetInactiveLimitOrderTrancheRequest, opts ...grpc.CallOption) (*QueryGetInactiveLimitOrderTrancheResponse, error) { - out := new(QueryGetInactiveLimitOrderTrancheResponse) - err := c.cc.Invoke(ctx, "/neutron.dex.Query/InactiveLimitOrderTranche", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +type QuerySimulatePlaceLimitOrderRequest struct { + Msg *MsgPlaceLimitOrder `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` } -func (c *queryClient) InactiveLimitOrderTrancheAll(ctx context.Context, in *QueryAllInactiveLimitOrderTrancheRequest, opts ...grpc.CallOption) (*QueryAllInactiveLimitOrderTrancheResponse, error) { - out := new(QueryAllInactiveLimitOrderTrancheResponse) - err := c.cc.Invoke(ctx, "/neutron.dex.Query/InactiveLimitOrderTrancheAll", in, out, opts...) - if err != nil { - return nil, err +func (m *QuerySimulatePlaceLimitOrderRequest) Reset() { *m = QuerySimulatePlaceLimitOrderRequest{} } +func (m *QuerySimulatePlaceLimitOrderRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySimulatePlaceLimitOrderRequest) ProtoMessage() {} +func (*QuerySimulatePlaceLimitOrderRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b6613ea5fce61e9c, []int{39} +} +func (m *QuerySimulatePlaceLimitOrderRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySimulatePlaceLimitOrderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySimulatePlaceLimitOrderRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *QuerySimulatePlaceLimitOrderRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySimulatePlaceLimitOrderRequest.Merge(m, src) +} +func (m *QuerySimulatePlaceLimitOrderRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySimulatePlaceLimitOrderRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySimulatePlaceLimitOrderRequest.DiscardUnknown(m) } -func (c *queryClient) PoolReservesAll(ctx context.Context, in *QueryAllPoolReservesRequest, opts ...grpc.CallOption) (*QueryAllPoolReservesResponse, error) { - out := new(QueryAllPoolReservesResponse) - err := c.cc.Invoke(ctx, "/neutron.dex.Query/PoolReservesAll", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_QuerySimulatePlaceLimitOrderRequest proto.InternalMessageInfo + +func (m *QuerySimulatePlaceLimitOrderRequest) GetMsg() *MsgPlaceLimitOrder { + if m != nil { + return m.Msg } - return out, nil + return nil } -func (c *queryClient) PoolReserves(ctx context.Context, in *QueryGetPoolReservesRequest, opts ...grpc.CallOption) (*QueryGetPoolReservesResponse, error) { - out := new(QueryGetPoolReservesResponse) - err := c.cc.Invoke(ctx, "/neutron.dex.Query/PoolReserves", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +type QuerySimulatePlaceLimitOrderResponse struct { + Resp *MsgPlaceLimitOrderResponse `protobuf:"bytes,1,opt,name=resp,proto3" json:"resp,omitempty"` } -func (c *queryClient) EstimateMultiHopSwap(ctx context.Context, in *QueryEstimateMultiHopSwapRequest, opts ...grpc.CallOption) (*QueryEstimateMultiHopSwapResponse, error) { - out := new(QueryEstimateMultiHopSwapResponse) - err := c.cc.Invoke(ctx, "/neutron.dex.Query/EstimateMultiHopSwap", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *QuerySimulatePlaceLimitOrderResponse) Reset() { *m = QuerySimulatePlaceLimitOrderResponse{} } +func (m *QuerySimulatePlaceLimitOrderResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySimulatePlaceLimitOrderResponse) ProtoMessage() {} +func (*QuerySimulatePlaceLimitOrderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b6613ea5fce61e9c, []int{40} } - -func (c *queryClient) EstimatePlaceLimitOrder(ctx context.Context, in *QueryEstimatePlaceLimitOrderRequest, opts ...grpc.CallOption) (*QueryEstimatePlaceLimitOrderResponse, error) { - out := new(QueryEstimatePlaceLimitOrderResponse) - err := c.cc.Invoke(ctx, "/neutron.dex.Query/EstimatePlaceLimitOrder", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *QuerySimulatePlaceLimitOrderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -func (c *queryClient) Pool(ctx context.Context, in *QueryPoolRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) { - out := new(QueryPoolResponse) - err := c.cc.Invoke(ctx, "/neutron.dex.Query/Pool", in, out, opts...) - if err != nil { - return nil, err +func (m *QuerySimulatePlaceLimitOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySimulatePlaceLimitOrderResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *QuerySimulatePlaceLimitOrderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySimulatePlaceLimitOrderResponse.Merge(m, src) +} +func (m *QuerySimulatePlaceLimitOrderResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySimulatePlaceLimitOrderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySimulatePlaceLimitOrderResponse.DiscardUnknown(m) } -func (c *queryClient) PoolByID(ctx context.Context, in *QueryPoolByIDRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) { - out := new(QueryPoolResponse) - err := c.cc.Invoke(ctx, "/neutron.dex.Query/PoolByID", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_QuerySimulatePlaceLimitOrderResponse proto.InternalMessageInfo + +func (m *QuerySimulatePlaceLimitOrderResponse) GetResp() *MsgPlaceLimitOrderResponse { + if m != nil { + return m.Resp } - return out, nil + return nil } -func (c *queryClient) PoolMetadata(ctx context.Context, in *QueryGetPoolMetadataRequest, opts ...grpc.CallOption) (*QueryGetPoolMetadataResponse, error) { - out := new(QueryGetPoolMetadataResponse) - err := c.cc.Invoke(ctx, "/neutron.dex.Query/PoolMetadata", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +type QuerySimulateWithdrawFilledLimitOrderRequest struct { + Msg *MsgWithdrawFilledLimitOrder `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` } -func (c *queryClient) PoolMetadataAll(ctx context.Context, in *QueryAllPoolMetadataRequest, opts ...grpc.CallOption) (*QueryAllPoolMetadataResponse, error) { - out := new(QueryAllPoolMetadataResponse) - err := c.cc.Invoke(ctx, "/neutron.dex.Query/PoolMetadataAll", in, out, opts...) - if err != nil { - return nil, err +func (m *QuerySimulateWithdrawFilledLimitOrderRequest) Reset() { + *m = QuerySimulateWithdrawFilledLimitOrderRequest{} +} +func (m *QuerySimulateWithdrawFilledLimitOrderRequest) String() string { + return proto.CompactTextString(m) +} +func (*QuerySimulateWithdrawFilledLimitOrderRequest) ProtoMessage() {} +func (*QuerySimulateWithdrawFilledLimitOrderRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b6613ea5fce61e9c, []int{41} +} +func (m *QuerySimulateWithdrawFilledLimitOrderRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySimulateWithdrawFilledLimitOrderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySimulateWithdrawFilledLimitOrderRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil } - -// QueryServer is the server API for Query service. -type QueryServer interface { - // Parameters queries the parameters of the module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Queries a LimitOrderTrancheUser by index. - LimitOrderTrancheUser(context.Context, *QueryGetLimitOrderTrancheUserRequest) (*QueryGetLimitOrderTrancheUserResponse, error) - // Queries a list of LimitOrderTranchUser items. - LimitOrderTrancheUserAll(context.Context, *QueryAllLimitOrderTrancheUserRequest) (*QueryAllLimitOrderTrancheUserResponse, error) - // Queries a list of LimitOrderTrancheUser items for a given address. - LimitOrderTrancheUserAllByAddress(context.Context, *QueryAllLimitOrderTrancheUserByAddressRequest) (*QueryAllLimitOrderTrancheUserByAddressResponse, error) - // Queries a LimitOrderTranche by index. - LimitOrderTranche(context.Context, *QueryGetLimitOrderTrancheRequest) (*QueryGetLimitOrderTrancheResponse, error) - // Queries a list of LimitOrderTranche items for a given pairID / TokenIn - // combination. - LimitOrderTrancheAll(context.Context, *QueryAllLimitOrderTrancheRequest) (*QueryAllLimitOrderTrancheResponse, error) - // Queries a list of UserDeposits items. - UserDepositsAll(context.Context, *QueryAllUserDepositsRequest) (*QueryAllUserDepositsResponse, error) - // Queries a list of TickLiquidity items. - TickLiquidityAll(context.Context, *QueryAllTickLiquidityRequest) (*QueryAllTickLiquidityResponse, error) - // Queries a InactiveLimitOrderTranche by index. - InactiveLimitOrderTranche(context.Context, *QueryGetInactiveLimitOrderTrancheRequest) (*QueryGetInactiveLimitOrderTrancheResponse, error) - // Queries a list of InactiveLimitOrderTranche items. - InactiveLimitOrderTrancheAll(context.Context, *QueryAllInactiveLimitOrderTrancheRequest) (*QueryAllInactiveLimitOrderTrancheResponse, error) - // Queries a list of PoolReserves items. - PoolReservesAll(context.Context, *QueryAllPoolReservesRequest) (*QueryAllPoolReservesResponse, error) - // Queries a PoolReserve by index - PoolReserves(context.Context, *QueryGetPoolReservesRequest) (*QueryGetPoolReservesResponse, error) - // Queries the simulated result of a multihop swap - EstimateMultiHopSwap(context.Context, *QueryEstimateMultiHopSwapRequest) (*QueryEstimateMultiHopSwapResponse, error) - // Queries the simulated result of a PlaceLimit order - EstimatePlaceLimitOrder(context.Context, *QueryEstimatePlaceLimitOrderRequest) (*QueryEstimatePlaceLimitOrderResponse, error) - // Queries a pool by pair, tick and fee - Pool(context.Context, *QueryPoolRequest) (*QueryPoolResponse, error) - // Queries a pool by ID - PoolByID(context.Context, *QueryPoolByIDRequest) (*QueryPoolResponse, error) - // Queries a PoolMetadata by ID - PoolMetadata(context.Context, *QueryGetPoolMetadataRequest) (*QueryGetPoolMetadataResponse, error) - // Queries a list of PoolMetadata items. - PoolMetadataAll(context.Context, *QueryAllPoolMetadataRequest) (*QueryAllPoolMetadataResponse, error) +func (m *QuerySimulateWithdrawFilledLimitOrderRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySimulateWithdrawFilledLimitOrderRequest.Merge(m, src) +} +func (m *QuerySimulateWithdrawFilledLimitOrderRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySimulateWithdrawFilledLimitOrderRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySimulateWithdrawFilledLimitOrderRequest.DiscardUnknown(m) } -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { +var xxx_messageInfo_QuerySimulateWithdrawFilledLimitOrderRequest proto.InternalMessageInfo + +func (m *QuerySimulateWithdrawFilledLimitOrderRequest) GetMsg() *MsgWithdrawFilledLimitOrder { + if m != nil { + return m.Msg + } + return nil } -func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +type QuerySimulateWithdrawFilledLimitOrderResponse struct { + Resp *MsgWithdrawFilledLimitOrderResponse `protobuf:"bytes,1,opt,name=resp,proto3" json:"resp,omitempty"` } -func (*UnimplementedQueryServer) LimitOrderTrancheUser(ctx context.Context, req *QueryGetLimitOrderTrancheUserRequest) (*QueryGetLimitOrderTrancheUserResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LimitOrderTrancheUser not implemented") + +func (m *QuerySimulateWithdrawFilledLimitOrderResponse) Reset() { + *m = QuerySimulateWithdrawFilledLimitOrderResponse{} } -func (*UnimplementedQueryServer) LimitOrderTrancheUserAll(ctx context.Context, req *QueryAllLimitOrderTrancheUserRequest) (*QueryAllLimitOrderTrancheUserResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LimitOrderTrancheUserAll not implemented") +func (m *QuerySimulateWithdrawFilledLimitOrderResponse) String() string { + return proto.CompactTextString(m) } -func (*UnimplementedQueryServer) LimitOrderTrancheUserAllByAddress(ctx context.Context, req *QueryAllLimitOrderTrancheUserByAddressRequest) (*QueryAllLimitOrderTrancheUserByAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LimitOrderTrancheUserAllByAddress not implemented") +func (*QuerySimulateWithdrawFilledLimitOrderResponse) ProtoMessage() {} +func (*QuerySimulateWithdrawFilledLimitOrderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b6613ea5fce61e9c, []int{42} } -func (*UnimplementedQueryServer) LimitOrderTranche(ctx context.Context, req *QueryGetLimitOrderTrancheRequest) (*QueryGetLimitOrderTrancheResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LimitOrderTranche not implemented") +func (m *QuerySimulateWithdrawFilledLimitOrderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedQueryServer) LimitOrderTrancheAll(ctx context.Context, req *QueryAllLimitOrderTrancheRequest) (*QueryAllLimitOrderTrancheResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LimitOrderTrancheAll not implemented") +func (m *QuerySimulateWithdrawFilledLimitOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySimulateWithdrawFilledLimitOrderResponse.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 (*UnimplementedQueryServer) UserDepositsAll(ctx context.Context, req *QueryAllUserDepositsRequest) (*QueryAllUserDepositsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserDepositsAll not implemented") +func (m *QuerySimulateWithdrawFilledLimitOrderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySimulateWithdrawFilledLimitOrderResponse.Merge(m, src) } -func (*UnimplementedQueryServer) TickLiquidityAll(ctx context.Context, req *QueryAllTickLiquidityRequest) (*QueryAllTickLiquidityResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TickLiquidityAll not implemented") +func (m *QuerySimulateWithdrawFilledLimitOrderResponse) XXX_Size() int { + return m.Size() } -func (*UnimplementedQueryServer) InactiveLimitOrderTranche(ctx context.Context, req *QueryGetInactiveLimitOrderTrancheRequest) (*QueryGetInactiveLimitOrderTrancheResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method InactiveLimitOrderTranche not implemented") +func (m *QuerySimulateWithdrawFilledLimitOrderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySimulateWithdrawFilledLimitOrderResponse.DiscardUnknown(m) } -func (*UnimplementedQueryServer) InactiveLimitOrderTrancheAll(ctx context.Context, req *QueryAllInactiveLimitOrderTrancheRequest) (*QueryAllInactiveLimitOrderTrancheResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method InactiveLimitOrderTrancheAll not implemented") + +var xxx_messageInfo_QuerySimulateWithdrawFilledLimitOrderResponse proto.InternalMessageInfo + +func (m *QuerySimulateWithdrawFilledLimitOrderResponse) GetResp() *MsgWithdrawFilledLimitOrderResponse { + if m != nil { + return m.Resp + } + return nil } -func (*UnimplementedQueryServer) PoolReservesAll(ctx context.Context, req *QueryAllPoolReservesRequest) (*QueryAllPoolReservesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PoolReservesAll not implemented") + +type QuerySimulateCancelLimitOrderRequest struct { + Msg *MsgCancelLimitOrder `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` } -func (*UnimplementedQueryServer) PoolReserves(ctx context.Context, req *QueryGetPoolReservesRequest) (*QueryGetPoolReservesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PoolReserves not implemented") + +func (m *QuerySimulateCancelLimitOrderRequest) Reset() { *m = QuerySimulateCancelLimitOrderRequest{} } +func (m *QuerySimulateCancelLimitOrderRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySimulateCancelLimitOrderRequest) ProtoMessage() {} +func (*QuerySimulateCancelLimitOrderRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b6613ea5fce61e9c, []int{43} } -func (*UnimplementedQueryServer) EstimateMultiHopSwap(ctx context.Context, req *QueryEstimateMultiHopSwapRequest) (*QueryEstimateMultiHopSwapResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EstimateMultiHopSwap not implemented") +func (m *QuerySimulateCancelLimitOrderRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedQueryServer) EstimatePlaceLimitOrder(ctx context.Context, req *QueryEstimatePlaceLimitOrderRequest) (*QueryEstimatePlaceLimitOrderResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EstimatePlaceLimitOrder not implemented") +func (m *QuerySimulateCancelLimitOrderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySimulateCancelLimitOrderRequest.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 (*UnimplementedQueryServer) Pool(ctx context.Context, req *QueryPoolRequest) (*QueryPoolResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Pool not implemented") +func (m *QuerySimulateCancelLimitOrderRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySimulateCancelLimitOrderRequest.Merge(m, src) } -func (*UnimplementedQueryServer) PoolByID(ctx context.Context, req *QueryPoolByIDRequest) (*QueryPoolResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PoolByID not implemented") +func (m *QuerySimulateCancelLimitOrderRequest) XXX_Size() int { + return m.Size() } -func (*UnimplementedQueryServer) PoolMetadata(ctx context.Context, req *QueryGetPoolMetadataRequest) (*QueryGetPoolMetadataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PoolMetadata not implemented") +func (m *QuerySimulateCancelLimitOrderRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySimulateCancelLimitOrderRequest.DiscardUnknown(m) } -func (*UnimplementedQueryServer) PoolMetadataAll(ctx context.Context, req *QueryAllPoolMetadataRequest) (*QueryAllPoolMetadataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PoolMetadataAll not implemented") + +var xxx_messageInfo_QuerySimulateCancelLimitOrderRequest proto.InternalMessageInfo + +func (m *QuerySimulateCancelLimitOrderRequest) GetMsg() *MsgCancelLimitOrder { + if m != nil { + return m.Msg + } + return nil } -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) +type QuerySimulateCancelLimitOrderResponse struct { + Resp *MsgCancelLimitOrderResponse `protobuf:"bytes,1,opt,name=resp,proto3" json:"resp,omitempty"` } -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: "/neutron.dex.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) +func (m *QuerySimulateCancelLimitOrderResponse) Reset() { *m = QuerySimulateCancelLimitOrderResponse{} } +func (m *QuerySimulateCancelLimitOrderResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySimulateCancelLimitOrderResponse) ProtoMessage() {} +func (*QuerySimulateCancelLimitOrderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b6613ea5fce61e9c, []int{44} +} +func (m *QuerySimulateCancelLimitOrderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySimulateCancelLimitOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySimulateCancelLimitOrderResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *QuerySimulateCancelLimitOrderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySimulateCancelLimitOrderResponse.Merge(m, src) +} +func (m *QuerySimulateCancelLimitOrderResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySimulateCancelLimitOrderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySimulateCancelLimitOrderResponse.DiscardUnknown(m) } -func _Query_LimitOrderTrancheUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetLimitOrderTrancheUserRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).LimitOrderTrancheUser(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/neutron.dex.Query/LimitOrderTrancheUser", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LimitOrderTrancheUser(ctx, req.(*QueryGetLimitOrderTrancheUserRequest)) +var xxx_messageInfo_QuerySimulateCancelLimitOrderResponse proto.InternalMessageInfo + +func (m *QuerySimulateCancelLimitOrderResponse) GetResp() *MsgCancelLimitOrderResponse { + if m != nil { + return m.Resp } - return interceptor(ctx, in, info, handler) + return nil } -func _Query_LimitOrderTrancheUserAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllLimitOrderTrancheUserRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).LimitOrderTrancheUserAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/neutron.dex.Query/LimitOrderTrancheUserAll", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LimitOrderTrancheUserAll(ctx, req.(*QueryAllLimitOrderTrancheUserRequest)) - } - return interceptor(ctx, in, info, handler) +type QuerySimulateMultiHopSwapRequest struct { + Msg *MsgMultiHopSwap `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` } -func _Query_LimitOrderTrancheUserAllByAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllLimitOrderTrancheUserByAddressRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).LimitOrderTrancheUserAllByAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/neutron.dex.Query/LimitOrderTrancheUserAllByAddress", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LimitOrderTrancheUserAllByAddress(ctx, req.(*QueryAllLimitOrderTrancheUserByAddressRequest)) +func (m *QuerySimulateMultiHopSwapRequest) Reset() { *m = QuerySimulateMultiHopSwapRequest{} } +func (m *QuerySimulateMultiHopSwapRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySimulateMultiHopSwapRequest) ProtoMessage() {} +func (*QuerySimulateMultiHopSwapRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b6613ea5fce61e9c, []int{45} +} +func (m *QuerySimulateMultiHopSwapRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySimulateMultiHopSwapRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySimulateMultiHopSwapRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *QuerySimulateMultiHopSwapRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySimulateMultiHopSwapRequest.Merge(m, src) +} +func (m *QuerySimulateMultiHopSwapRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySimulateMultiHopSwapRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySimulateMultiHopSwapRequest.DiscardUnknown(m) } -func _Query_LimitOrderTranche_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetLimitOrderTrancheRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).LimitOrderTranche(ctx, in) +var xxx_messageInfo_QuerySimulateMultiHopSwapRequest proto.InternalMessageInfo + +func (m *QuerySimulateMultiHopSwapRequest) GetMsg() *MsgMultiHopSwap { + if m != nil { + return m.Msg } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/neutron.dex.Query/LimitOrderTranche", + return nil +} + +type QuerySimulateMultiHopSwapResponse struct { + Resp *MsgMultiHopSwapResponse `protobuf:"bytes,1,opt,name=resp,proto3" json:"resp,omitempty"` +} + +func (m *QuerySimulateMultiHopSwapResponse) Reset() { *m = QuerySimulateMultiHopSwapResponse{} } +func (m *QuerySimulateMultiHopSwapResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySimulateMultiHopSwapResponse) ProtoMessage() {} +func (*QuerySimulateMultiHopSwapResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b6613ea5fce61e9c, []int{46} +} +func (m *QuerySimulateMultiHopSwapResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySimulateMultiHopSwapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySimulateMultiHopSwapResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LimitOrderTranche(ctx, req.(*QueryGetLimitOrderTrancheRequest)) +} +func (m *QuerySimulateMultiHopSwapResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySimulateMultiHopSwapResponse.Merge(m, src) +} +func (m *QuerySimulateMultiHopSwapResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySimulateMultiHopSwapResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySimulateMultiHopSwapResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySimulateMultiHopSwapResponse proto.InternalMessageInfo + +func (m *QuerySimulateMultiHopSwapResponse) GetResp() *MsgMultiHopSwapResponse { + if m != nil { + return m.Resp } - return interceptor(ctx, in, info, handler) + return nil } -func _Query_LimitOrderTrancheAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllLimitOrderTrancheRequest) - if err := dec(in); err != nil { +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "neutron.dex.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "neutron.dex.QueryParamsResponse") + proto.RegisterType((*QueryGetLimitOrderTrancheUserRequest)(nil), "neutron.dex.QueryGetLimitOrderTrancheUserRequest") + proto.RegisterType((*QueryGetLimitOrderTrancheUserResponse)(nil), "neutron.dex.QueryGetLimitOrderTrancheUserResponse") + proto.RegisterType((*QueryAllLimitOrderTrancheUserRequest)(nil), "neutron.dex.QueryAllLimitOrderTrancheUserRequest") + proto.RegisterType((*QueryAllLimitOrderTrancheUserResponse)(nil), "neutron.dex.QueryAllLimitOrderTrancheUserResponse") + proto.RegisterType((*QueryGetLimitOrderTrancheRequest)(nil), "neutron.dex.QueryGetLimitOrderTrancheRequest") + proto.RegisterType((*QueryGetLimitOrderTrancheResponse)(nil), "neutron.dex.QueryGetLimitOrderTrancheResponse") + proto.RegisterType((*QueryAllLimitOrderTrancheRequest)(nil), "neutron.dex.QueryAllLimitOrderTrancheRequest") + proto.RegisterType((*QueryAllLimitOrderTrancheResponse)(nil), "neutron.dex.QueryAllLimitOrderTrancheResponse") + proto.RegisterType((*QueryAllUserDepositsRequest)(nil), "neutron.dex.QueryAllUserDepositsRequest") + proto.RegisterType((*QueryAllUserDepositsResponse)(nil), "neutron.dex.QueryAllUserDepositsResponse") + proto.RegisterType((*QueryAllLimitOrderTrancheUserByAddressRequest)(nil), "neutron.dex.QueryAllLimitOrderTrancheUserByAddressRequest") + proto.RegisterType((*QueryAllLimitOrderTrancheUserByAddressResponse)(nil), "neutron.dex.QueryAllLimitOrderTrancheUserByAddressResponse") + proto.RegisterType((*QueryAllTickLiquidityRequest)(nil), "neutron.dex.QueryAllTickLiquidityRequest") + proto.RegisterType((*QueryAllTickLiquidityResponse)(nil), "neutron.dex.QueryAllTickLiquidityResponse") + proto.RegisterType((*QueryGetInactiveLimitOrderTrancheRequest)(nil), "neutron.dex.QueryGetInactiveLimitOrderTrancheRequest") + proto.RegisterType((*QueryGetInactiveLimitOrderTrancheResponse)(nil), "neutron.dex.QueryGetInactiveLimitOrderTrancheResponse") + proto.RegisterType((*QueryAllInactiveLimitOrderTrancheRequest)(nil), "neutron.dex.QueryAllInactiveLimitOrderTrancheRequest") + proto.RegisterType((*QueryAllInactiveLimitOrderTrancheResponse)(nil), "neutron.dex.QueryAllInactiveLimitOrderTrancheResponse") + proto.RegisterType((*QueryAllPoolReservesRequest)(nil), "neutron.dex.QueryAllPoolReservesRequest") + proto.RegisterType((*QueryAllPoolReservesResponse)(nil), "neutron.dex.QueryAllPoolReservesResponse") + proto.RegisterType((*QueryGetPoolReservesRequest)(nil), "neutron.dex.QueryGetPoolReservesRequest") + proto.RegisterType((*QueryGetPoolReservesResponse)(nil), "neutron.dex.QueryGetPoolReservesResponse") + proto.RegisterType((*QueryEstimateMultiHopSwapRequest)(nil), "neutron.dex.QueryEstimateMultiHopSwapRequest") + proto.RegisterType((*QueryEstimateMultiHopSwapResponse)(nil), "neutron.dex.QueryEstimateMultiHopSwapResponse") + proto.RegisterType((*QueryEstimatePlaceLimitOrderRequest)(nil), "neutron.dex.QueryEstimatePlaceLimitOrderRequest") + proto.RegisterType((*QueryEstimatePlaceLimitOrderResponse)(nil), "neutron.dex.QueryEstimatePlaceLimitOrderResponse") + proto.RegisterType((*QueryPoolRequest)(nil), "neutron.dex.QueryPoolRequest") + proto.RegisterType((*QueryPoolByIDRequest)(nil), "neutron.dex.QueryPoolByIDRequest") + proto.RegisterType((*QueryPoolResponse)(nil), "neutron.dex.QueryPoolResponse") + proto.RegisterType((*QueryGetPoolMetadataRequest)(nil), "neutron.dex.QueryGetPoolMetadataRequest") + proto.RegisterType((*QueryGetPoolMetadataResponse)(nil), "neutron.dex.QueryGetPoolMetadataResponse") + proto.RegisterType((*QueryAllPoolMetadataRequest)(nil), "neutron.dex.QueryAllPoolMetadataRequest") + proto.RegisterType((*QueryAllPoolMetadataResponse)(nil), "neutron.dex.QueryAllPoolMetadataResponse") + proto.RegisterType((*QuerySimulateDepositRequest)(nil), "neutron.dex.QuerySimulateDepositRequest") + proto.RegisterType((*QuerySimulateDepositResponse)(nil), "neutron.dex.QuerySimulateDepositResponse") + proto.RegisterType((*QuerySimulateWithdrawalRequest)(nil), "neutron.dex.QuerySimulateWithdrawalRequest") + proto.RegisterType((*QuerySimulateWithdrawalResponse)(nil), "neutron.dex.QuerySimulateWithdrawalResponse") + proto.RegisterType((*QuerySimulatePlaceLimitOrderRequest)(nil), "neutron.dex.QuerySimulatePlaceLimitOrderRequest") + proto.RegisterType((*QuerySimulatePlaceLimitOrderResponse)(nil), "neutron.dex.QuerySimulatePlaceLimitOrderResponse") + proto.RegisterType((*QuerySimulateWithdrawFilledLimitOrderRequest)(nil), "neutron.dex.QuerySimulateWithdrawFilledLimitOrderRequest") + proto.RegisterType((*QuerySimulateWithdrawFilledLimitOrderResponse)(nil), "neutron.dex.QuerySimulateWithdrawFilledLimitOrderResponse") + proto.RegisterType((*QuerySimulateCancelLimitOrderRequest)(nil), "neutron.dex.QuerySimulateCancelLimitOrderRequest") + proto.RegisterType((*QuerySimulateCancelLimitOrderResponse)(nil), "neutron.dex.QuerySimulateCancelLimitOrderResponse") + proto.RegisterType((*QuerySimulateMultiHopSwapRequest)(nil), "neutron.dex.QuerySimulateMultiHopSwapRequest") + proto.RegisterType((*QuerySimulateMultiHopSwapResponse)(nil), "neutron.dex.QuerySimulateMultiHopSwapResponse") +} + +func init() { proto.RegisterFile("neutron/dex/query.proto", fileDescriptor_b6613ea5fce61e9c) } + +var fileDescriptor_b6613ea5fce61e9c = []byte{ + // 2742 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 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e, 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 module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Queries a LimitOrderTrancheUser by index. + LimitOrderTrancheUser(ctx context.Context, in *QueryGetLimitOrderTrancheUserRequest, opts ...grpc.CallOption) (*QueryGetLimitOrderTrancheUserResponse, error) + // Queries a list of LimitOrderTranchUser items. + LimitOrderTrancheUserAll(ctx context.Context, in *QueryAllLimitOrderTrancheUserRequest, opts ...grpc.CallOption) (*QueryAllLimitOrderTrancheUserResponse, error) + // Queries a list of LimitOrderTrancheUser items for a given address. + LimitOrderTrancheUserAllByAddress(ctx context.Context, in *QueryAllLimitOrderTrancheUserByAddressRequest, opts ...grpc.CallOption) (*QueryAllLimitOrderTrancheUserByAddressResponse, error) + // Queries a LimitOrderTranche by index. + LimitOrderTranche(ctx context.Context, in *QueryGetLimitOrderTrancheRequest, opts ...grpc.CallOption) (*QueryGetLimitOrderTrancheResponse, error) + // Queries a list of LimitOrderTranche items for a given pairID / TokenIn + // combination. + LimitOrderTrancheAll(ctx context.Context, in *QueryAllLimitOrderTrancheRequest, opts ...grpc.CallOption) (*QueryAllLimitOrderTrancheResponse, error) + // Queries a list of UserDeposits items. + UserDepositsAll(ctx context.Context, in *QueryAllUserDepositsRequest, opts ...grpc.CallOption) (*QueryAllUserDepositsResponse, error) + // Queries a list of TickLiquidity items. + TickLiquidityAll(ctx context.Context, in *QueryAllTickLiquidityRequest, opts ...grpc.CallOption) (*QueryAllTickLiquidityResponse, error) + // Queries a InactiveLimitOrderTranche by index. + InactiveLimitOrderTranche(ctx context.Context, in *QueryGetInactiveLimitOrderTrancheRequest, opts ...grpc.CallOption) (*QueryGetInactiveLimitOrderTrancheResponse, error) + // Queries a list of InactiveLimitOrderTranche items. + InactiveLimitOrderTrancheAll(ctx context.Context, in *QueryAllInactiveLimitOrderTrancheRequest, opts ...grpc.CallOption) (*QueryAllInactiveLimitOrderTrancheResponse, error) + // Queries a list of PoolReserves items. + PoolReservesAll(ctx context.Context, in *QueryAllPoolReservesRequest, opts ...grpc.CallOption) (*QueryAllPoolReservesResponse, error) + // Queries a PoolReserve by index + PoolReserves(ctx context.Context, in *QueryGetPoolReservesRequest, opts ...grpc.CallOption) (*QueryGetPoolReservesResponse, error) + // DEPRECATED Queries the simulated result of a multihop swap + EstimateMultiHopSwap(ctx context.Context, in *QueryEstimateMultiHopSwapRequest, opts ...grpc.CallOption) (*QueryEstimateMultiHopSwapResponse, error) + // DEPRECATED Queries the simulated result of a PlaceLimit order + EstimatePlaceLimitOrder(ctx context.Context, in *QueryEstimatePlaceLimitOrderRequest, opts ...grpc.CallOption) (*QueryEstimatePlaceLimitOrderResponse, error) + // Queries a pool by pair, tick and fee + Pool(ctx context.Context, in *QueryPoolRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) + // Queries a pool by ID + PoolByID(ctx context.Context, in *QueryPoolByIDRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) + // Queries a PoolMetadata by ID + PoolMetadata(ctx context.Context, in *QueryGetPoolMetadataRequest, opts ...grpc.CallOption) (*QueryGetPoolMetadataResponse, error) + // Queries a list of PoolMetadata items. + PoolMetadataAll(ctx context.Context, in *QueryAllPoolMetadataRequest, opts ...grpc.CallOption) (*QueryAllPoolMetadataResponse, error) + // Simulates MsgDeposit + SimulateDeposit(ctx context.Context, in *QuerySimulateDepositRequest, opts ...grpc.CallOption) (*QuerySimulateDepositResponse, error) + // Simulates MsgWithdrawal + SimulateWithdrawal(ctx context.Context, in *QuerySimulateWithdrawalRequest, opts ...grpc.CallOption) (*QuerySimulateWithdrawalResponse, error) + // Simulates MsgPlaceLimitOrder + SimulatePlaceLimitOrder(ctx context.Context, in *QuerySimulatePlaceLimitOrderRequest, opts ...grpc.CallOption) (*QuerySimulatePlaceLimitOrderResponse, error) + // Simulates MsgWithdrawFilledLimitOrder + SimulateWithdrawFilledLimitOrder(ctx context.Context, in *QuerySimulateWithdrawFilledLimitOrderRequest, opts ...grpc.CallOption) (*QuerySimulateWithdrawFilledLimitOrderResponse, error) + // Simulates MsgCancelLimitOrder + SimulateCancelLimitOrder(ctx context.Context, in *QuerySimulateCancelLimitOrderRequest, opts ...grpc.CallOption) (*QuerySimulateCancelLimitOrderResponse, error) + // Simulates MsgMultiHopSwap + SimulateMultiHopSwap(ctx context.Context, in *QuerySimulateMultiHopSwapRequest, opts ...grpc.CallOption) (*QuerySimulateMultiHopSwapResponse, 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, "/neutron.dex.Query/Params", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QueryServer).LimitOrderTrancheAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/neutron.dex.Query/LimitOrderTrancheAll", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LimitOrderTrancheAll(ctx, req.(*QueryAllLimitOrderTrancheRequest)) - } - return interceptor(ctx, in, info, handler) + return out, nil } -func _Query_UserDepositsAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllUserDepositsRequest) - if err := dec(in); err != nil { +func (c *queryClient) LimitOrderTrancheUser(ctx context.Context, in *QueryGetLimitOrderTrancheUserRequest, opts ...grpc.CallOption) (*QueryGetLimitOrderTrancheUserResponse, error) { + out := new(QueryGetLimitOrderTrancheUserResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/LimitOrderTrancheUser", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QueryServer).UserDepositsAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/neutron.dex.Query/UserDepositsAll", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UserDepositsAll(ctx, req.(*QueryAllUserDepositsRequest)) - } - return interceptor(ctx, in, info, handler) + return out, nil } -func _Query_TickLiquidityAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllTickLiquidityRequest) - if err := dec(in); err != nil { +func (c *queryClient) LimitOrderTrancheUserAll(ctx context.Context, in *QueryAllLimitOrderTrancheUserRequest, opts ...grpc.CallOption) (*QueryAllLimitOrderTrancheUserResponse, error) { + out := new(QueryAllLimitOrderTrancheUserResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/LimitOrderTrancheUserAll", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QueryServer).TickLiquidityAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/neutron.dex.Query/TickLiquidityAll", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).TickLiquidityAll(ctx, req.(*QueryAllTickLiquidityRequest)) - } - return interceptor(ctx, in, info, handler) + return out, nil } -func _Query_InactiveLimitOrderTranche_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetInactiveLimitOrderTrancheRequest) - if err := dec(in); err != nil { +func (c *queryClient) LimitOrderTrancheUserAllByAddress(ctx context.Context, in *QueryAllLimitOrderTrancheUserByAddressRequest, opts ...grpc.CallOption) (*QueryAllLimitOrderTrancheUserByAddressResponse, error) { + out := new(QueryAllLimitOrderTrancheUserByAddressResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/LimitOrderTrancheUserAllByAddress", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QueryServer).InactiveLimitOrderTranche(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/neutron.dex.Query/InactiveLimitOrderTranche", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).InactiveLimitOrderTranche(ctx, req.(*QueryGetInactiveLimitOrderTrancheRequest)) - } - return interceptor(ctx, in, info, handler) + return out, nil } -func _Query_InactiveLimitOrderTrancheAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllInactiveLimitOrderTrancheRequest) - if err := dec(in); err != nil { +func (c *queryClient) LimitOrderTranche(ctx context.Context, in *QueryGetLimitOrderTrancheRequest, opts ...grpc.CallOption) (*QueryGetLimitOrderTrancheResponse, error) { + out := new(QueryGetLimitOrderTrancheResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/LimitOrderTranche", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QueryServer).InactiveLimitOrderTrancheAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/neutron.dex.Query/InactiveLimitOrderTrancheAll", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).InactiveLimitOrderTrancheAll(ctx, req.(*QueryAllInactiveLimitOrderTrancheRequest)) - } - return interceptor(ctx, in, info, handler) + return out, nil } -func _Query_PoolReservesAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllPoolReservesRequest) - if err := dec(in); err != nil { +func (c *queryClient) LimitOrderTrancheAll(ctx context.Context, in *QueryAllLimitOrderTrancheRequest, opts ...grpc.CallOption) (*QueryAllLimitOrderTrancheResponse, error) { + out := new(QueryAllLimitOrderTrancheResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/LimitOrderTrancheAll", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QueryServer).PoolReservesAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/neutron.dex.Query/PoolReservesAll", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).PoolReservesAll(ctx, req.(*QueryAllPoolReservesRequest)) - } - return interceptor(ctx, in, info, handler) + return out, nil } -func _Query_PoolReserves_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetPoolReservesRequest) - if err := dec(in); err != nil { +func (c *queryClient) UserDepositsAll(ctx context.Context, in *QueryAllUserDepositsRequest, opts ...grpc.CallOption) (*QueryAllUserDepositsResponse, error) { + out := new(QueryAllUserDepositsResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/UserDepositsAll", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QueryServer).PoolReserves(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/neutron.dex.Query/PoolReserves", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).PoolReserves(ctx, req.(*QueryGetPoolReservesRequest)) - } - return interceptor(ctx, in, info, handler) + return out, nil } -func _Query_EstimateMultiHopSwap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryEstimateMultiHopSwapRequest) - if err := dec(in); err != nil { +func (c *queryClient) TickLiquidityAll(ctx context.Context, in *QueryAllTickLiquidityRequest, opts ...grpc.CallOption) (*QueryAllTickLiquidityResponse, error) { + out := new(QueryAllTickLiquidityResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/TickLiquidityAll", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QueryServer).EstimateMultiHopSwap(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/neutron.dex.Query/EstimateMultiHopSwap", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EstimateMultiHopSwap(ctx, req.(*QueryEstimateMultiHopSwapRequest)) - } - return interceptor(ctx, in, info, handler) + return out, nil } -func _Query_EstimatePlaceLimitOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryEstimatePlaceLimitOrderRequest) - if err := dec(in); err != nil { +func (c *queryClient) InactiveLimitOrderTranche(ctx context.Context, in *QueryGetInactiveLimitOrderTrancheRequest, opts ...grpc.CallOption) (*QueryGetInactiveLimitOrderTrancheResponse, error) { + out := new(QueryGetInactiveLimitOrderTrancheResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/InactiveLimitOrderTranche", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QueryServer).EstimatePlaceLimitOrder(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/neutron.dex.Query/EstimatePlaceLimitOrder", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EstimatePlaceLimitOrder(ctx, req.(*QueryEstimatePlaceLimitOrderRequest)) - } - return interceptor(ctx, in, info, handler) + return out, nil } -func _Query_Pool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryPoolRequest) - if err := dec(in); err != nil { +func (c *queryClient) InactiveLimitOrderTrancheAll(ctx context.Context, in *QueryAllInactiveLimitOrderTrancheRequest, opts ...grpc.CallOption) (*QueryAllInactiveLimitOrderTrancheResponse, error) { + out := new(QueryAllInactiveLimitOrderTrancheResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/InactiveLimitOrderTrancheAll", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QueryServer).Pool(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/neutron.dex.Query/Pool", + return out, nil +} + +func (c *queryClient) PoolReservesAll(ctx context.Context, in *QueryAllPoolReservesRequest, opts ...grpc.CallOption) (*QueryAllPoolReservesResponse, error) { + out := new(QueryAllPoolReservesResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/PoolReservesAll", in, out, opts...) + if err != nil { + return nil, err } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Pool(ctx, req.(*QueryPoolRequest)) + return out, nil +} + +func (c *queryClient) PoolReserves(ctx context.Context, in *QueryGetPoolReservesRequest, opts ...grpc.CallOption) (*QueryGetPoolReservesResponse, error) { + out := new(QueryGetPoolReservesResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/PoolReserves", in, out, opts...) + if err != nil { + return nil, err } - return interceptor(ctx, in, info, handler) + return out, nil } -func _Query_PoolByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryPoolByIDRequest) - if err := dec(in); err != nil { +// Deprecated: Do not use. +func (c *queryClient) EstimateMultiHopSwap(ctx context.Context, in *QueryEstimateMultiHopSwapRequest, opts ...grpc.CallOption) (*QueryEstimateMultiHopSwapResponse, error) { + out := new(QueryEstimateMultiHopSwapResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/EstimateMultiHopSwap", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QueryServer).PoolByID(ctx, in) + return out, nil +} + +// Deprecated: Do not use. +func (c *queryClient) EstimatePlaceLimitOrder(ctx context.Context, in *QueryEstimatePlaceLimitOrderRequest, opts ...grpc.CallOption) (*QueryEstimatePlaceLimitOrderResponse, error) { + out := new(QueryEstimatePlaceLimitOrderResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/EstimatePlaceLimitOrder", in, out, opts...) + if err != nil { + return nil, err } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/neutron.dex.Query/PoolByID", + return out, nil +} + +func (c *queryClient) Pool(ctx context.Context, in *QueryPoolRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) { + out := new(QueryPoolResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/Pool", in, out, opts...) + if err != nil { + return nil, err } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).PoolByID(ctx, req.(*QueryPoolByIDRequest)) + return out, nil +} + +func (c *queryClient) PoolByID(ctx context.Context, in *QueryPoolByIDRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) { + out := new(QueryPoolResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/PoolByID", in, out, opts...) + if err != nil { + return nil, err } - return interceptor(ctx, in, info, handler) + return out, nil } -func _Query_PoolMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetPoolMetadataRequest) - if err := dec(in); err != nil { +func (c *queryClient) PoolMetadata(ctx context.Context, in *QueryGetPoolMetadataRequest, opts ...grpc.CallOption) (*QueryGetPoolMetadataResponse, error) { + out := new(QueryGetPoolMetadataResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/PoolMetadata", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QueryServer).PoolMetadata(ctx, in) + return out, nil +} + +func (c *queryClient) PoolMetadataAll(ctx context.Context, in *QueryAllPoolMetadataRequest, opts ...grpc.CallOption) (*QueryAllPoolMetadataResponse, error) { + out := new(QueryAllPoolMetadataResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/PoolMetadataAll", in, out, opts...) + if err != nil { + return nil, err } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/neutron.dex.Query/PoolMetadata", + return out, nil +} + +func (c *queryClient) SimulateDeposit(ctx context.Context, in *QuerySimulateDepositRequest, opts ...grpc.CallOption) (*QuerySimulateDepositResponse, error) { + out := new(QuerySimulateDepositResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/SimulateDeposit", in, out, opts...) + if err != nil { + return nil, err } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).PoolMetadata(ctx, req.(*QueryGetPoolMetadataRequest)) + return out, nil +} + +func (c *queryClient) SimulateWithdrawal(ctx context.Context, in *QuerySimulateWithdrawalRequest, opts ...grpc.CallOption) (*QuerySimulateWithdrawalResponse, error) { + out := new(QuerySimulateWithdrawalResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/SimulateWithdrawal", in, out, opts...) + if err != nil { + return nil, err } - return interceptor(ctx, in, info, handler) + return out, nil } -func _Query_PoolMetadataAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllPoolMetadataRequest) - if err := dec(in); err != nil { +func (c *queryClient) SimulatePlaceLimitOrder(ctx context.Context, in *QuerySimulatePlaceLimitOrderRequest, opts ...grpc.CallOption) (*QuerySimulatePlaceLimitOrderResponse, error) { + out := new(QuerySimulatePlaceLimitOrderResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/SimulatePlaceLimitOrder", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QueryServer).PoolMetadataAll(ctx, in) + return out, nil +} + +func (c *queryClient) SimulateWithdrawFilledLimitOrder(ctx context.Context, in *QuerySimulateWithdrawFilledLimitOrderRequest, opts ...grpc.CallOption) (*QuerySimulateWithdrawFilledLimitOrderResponse, error) { + out := new(QuerySimulateWithdrawFilledLimitOrderResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/SimulateWithdrawFilledLimitOrder", in, out, opts...) + if err != nil { + return nil, err } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/neutron.dex.Query/PoolMetadataAll", + return out, nil +} + +func (c *queryClient) SimulateCancelLimitOrder(ctx context.Context, in *QuerySimulateCancelLimitOrderRequest, opts ...grpc.CallOption) (*QuerySimulateCancelLimitOrderResponse, error) { + out := new(QuerySimulateCancelLimitOrderResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/SimulateCancelLimitOrder", in, out, opts...) + if err != nil { + return nil, err } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).PoolMetadataAll(ctx, req.(*QueryAllPoolMetadataRequest)) + return out, nil +} + +func (c *queryClient) SimulateMultiHopSwap(ctx context.Context, in *QuerySimulateMultiHopSwapRequest, opts ...grpc.CallOption) (*QuerySimulateMultiHopSwapResponse, error) { + out := new(QuerySimulateMultiHopSwapResponse) + err := c.cc.Invoke(ctx, "/neutron.dex.Query/SimulateMultiHopSwap", in, out, opts...) + if err != nil { + return nil, err } - return interceptor(ctx, in, info, handler) + return out, nil } -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "neutron.dex.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "LimitOrderTrancheUser", - Handler: _Query_LimitOrderTrancheUser_Handler, - }, - { - MethodName: "LimitOrderTrancheUserAll", - Handler: _Query_LimitOrderTrancheUserAll_Handler, - }, - { - MethodName: "LimitOrderTrancheUserAllByAddress", - Handler: _Query_LimitOrderTrancheUserAllByAddress_Handler, - }, - { - MethodName: "LimitOrderTranche", - Handler: _Query_LimitOrderTranche_Handler, - }, - { - MethodName: "LimitOrderTrancheAll", - Handler: _Query_LimitOrderTrancheAll_Handler, - }, - { - MethodName: "UserDepositsAll", - Handler: _Query_UserDepositsAll_Handler, - }, - { - MethodName: "TickLiquidityAll", - Handler: _Query_TickLiquidityAll_Handler, - }, - { - MethodName: "InactiveLimitOrderTranche", - Handler: _Query_InactiveLimitOrderTranche_Handler, - }, - { - MethodName: "InactiveLimitOrderTrancheAll", - Handler: _Query_InactiveLimitOrderTrancheAll_Handler, - }, - { - MethodName: "PoolReservesAll", - Handler: _Query_PoolReservesAll_Handler, - }, - { - MethodName: "PoolReserves", - Handler: _Query_PoolReserves_Handler, - }, - { - MethodName: "EstimateMultiHopSwap", - Handler: _Query_EstimateMultiHopSwap_Handler, - }, - { - MethodName: "EstimatePlaceLimitOrder", - Handler: _Query_EstimatePlaceLimitOrder_Handler, - }, - { - MethodName: "Pool", - Handler: _Query_Pool_Handler, - }, - { - MethodName: "PoolByID", - Handler: _Query_PoolByID_Handler, - }, - { - MethodName: "PoolMetadata", - Handler: _Query_PoolMetadata_Handler, - }, - { - MethodName: "PoolMetadataAll", - Handler: _Query_PoolMetadataAll_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "neutron/dex/query.proto", +// QueryServer is the server API for Query service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Queries a LimitOrderTrancheUser by index. + LimitOrderTrancheUser(context.Context, *QueryGetLimitOrderTrancheUserRequest) (*QueryGetLimitOrderTrancheUserResponse, error) + // Queries a list of LimitOrderTranchUser items. + LimitOrderTrancheUserAll(context.Context, *QueryAllLimitOrderTrancheUserRequest) (*QueryAllLimitOrderTrancheUserResponse, error) + // Queries a list of LimitOrderTrancheUser items for a given address. + LimitOrderTrancheUserAllByAddress(context.Context, *QueryAllLimitOrderTrancheUserByAddressRequest) (*QueryAllLimitOrderTrancheUserByAddressResponse, error) + // Queries a LimitOrderTranche by index. + LimitOrderTranche(context.Context, *QueryGetLimitOrderTrancheRequest) (*QueryGetLimitOrderTrancheResponse, error) + // Queries a list of LimitOrderTranche items for a given pairID / TokenIn + // combination. + LimitOrderTrancheAll(context.Context, *QueryAllLimitOrderTrancheRequest) (*QueryAllLimitOrderTrancheResponse, error) + // Queries a list of UserDeposits items. + UserDepositsAll(context.Context, *QueryAllUserDepositsRequest) (*QueryAllUserDepositsResponse, error) + // Queries a list of TickLiquidity items. + TickLiquidityAll(context.Context, *QueryAllTickLiquidityRequest) (*QueryAllTickLiquidityResponse, error) + // Queries a InactiveLimitOrderTranche by index. + InactiveLimitOrderTranche(context.Context, *QueryGetInactiveLimitOrderTrancheRequest) (*QueryGetInactiveLimitOrderTrancheResponse, error) + // Queries a list of InactiveLimitOrderTranche items. + InactiveLimitOrderTrancheAll(context.Context, *QueryAllInactiveLimitOrderTrancheRequest) (*QueryAllInactiveLimitOrderTrancheResponse, error) + // Queries a list of PoolReserves items. + PoolReservesAll(context.Context, *QueryAllPoolReservesRequest) (*QueryAllPoolReservesResponse, error) + // Queries a PoolReserve by index + PoolReserves(context.Context, *QueryGetPoolReservesRequest) (*QueryGetPoolReservesResponse, error) + // DEPRECATED Queries the simulated result of a multihop swap + EstimateMultiHopSwap(context.Context, *QueryEstimateMultiHopSwapRequest) (*QueryEstimateMultiHopSwapResponse, error) + // DEPRECATED Queries the simulated result of a PlaceLimit order + EstimatePlaceLimitOrder(context.Context, *QueryEstimatePlaceLimitOrderRequest) (*QueryEstimatePlaceLimitOrderResponse, error) + // Queries a pool by pair, tick and fee + Pool(context.Context, *QueryPoolRequest) (*QueryPoolResponse, error) + // Queries a pool by ID + PoolByID(context.Context, *QueryPoolByIDRequest) (*QueryPoolResponse, error) + // Queries a PoolMetadata by ID + PoolMetadata(context.Context, *QueryGetPoolMetadataRequest) (*QueryGetPoolMetadataResponse, error) + // Queries a list of PoolMetadata items. + PoolMetadataAll(context.Context, *QueryAllPoolMetadataRequest) (*QueryAllPoolMetadataResponse, error) + // Simulates MsgDeposit + SimulateDeposit(context.Context, *QuerySimulateDepositRequest) (*QuerySimulateDepositResponse, error) + // Simulates MsgWithdrawal + SimulateWithdrawal(context.Context, *QuerySimulateWithdrawalRequest) (*QuerySimulateWithdrawalResponse, error) + // Simulates MsgPlaceLimitOrder + SimulatePlaceLimitOrder(context.Context, *QuerySimulatePlaceLimitOrderRequest) (*QuerySimulatePlaceLimitOrderResponse, error) + // Simulates MsgWithdrawFilledLimitOrder + SimulateWithdrawFilledLimitOrder(context.Context, *QuerySimulateWithdrawFilledLimitOrderRequest) (*QuerySimulateWithdrawFilledLimitOrderResponse, error) + // Simulates MsgCancelLimitOrder + SimulateCancelLimitOrder(context.Context, *QuerySimulateCancelLimitOrderRequest) (*QuerySimulateCancelLimitOrderResponse, error) + // Simulates MsgMultiHopSwap + SimulateMultiHopSwap(context.Context, *QuerySimulateMultiHopSwapRequest) (*QuerySimulateMultiHopSwapResponse, error) } -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 +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { } -func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (*UnimplementedQueryServer) LimitOrderTrancheUser(ctx context.Context, req *QueryGetLimitOrderTrancheUserRequest) (*QueryGetLimitOrderTrancheUserResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LimitOrderTrancheUser not implemented") +} +func (*UnimplementedQueryServer) LimitOrderTrancheUserAll(ctx context.Context, req *QueryAllLimitOrderTrancheUserRequest) (*QueryAllLimitOrderTrancheUserResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LimitOrderTrancheUserAll not implemented") +} +func (*UnimplementedQueryServer) LimitOrderTrancheUserAllByAddress(ctx context.Context, req *QueryAllLimitOrderTrancheUserByAddressRequest) (*QueryAllLimitOrderTrancheUserByAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LimitOrderTrancheUserAllByAddress not implemented") +} +func (*UnimplementedQueryServer) LimitOrderTranche(ctx context.Context, req *QueryGetLimitOrderTrancheRequest) (*QueryGetLimitOrderTrancheResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LimitOrderTranche not implemented") +} +func (*UnimplementedQueryServer) LimitOrderTrancheAll(ctx context.Context, req *QueryAllLimitOrderTrancheRequest) (*QueryAllLimitOrderTrancheResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LimitOrderTrancheAll not implemented") +} +func (*UnimplementedQueryServer) UserDepositsAll(ctx context.Context, req *QueryAllUserDepositsRequest) (*QueryAllUserDepositsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UserDepositsAll not implemented") +} +func (*UnimplementedQueryServer) TickLiquidityAll(ctx context.Context, req *QueryAllTickLiquidityRequest) (*QueryAllTickLiquidityResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TickLiquidityAll not implemented") +} +func (*UnimplementedQueryServer) InactiveLimitOrderTranche(ctx context.Context, req *QueryGetInactiveLimitOrderTrancheRequest) (*QueryGetInactiveLimitOrderTrancheResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method InactiveLimitOrderTranche not implemented") +} +func (*UnimplementedQueryServer) InactiveLimitOrderTrancheAll(ctx context.Context, req *QueryAllInactiveLimitOrderTrancheRequest) (*QueryAllInactiveLimitOrderTrancheResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method InactiveLimitOrderTrancheAll not implemented") +} +func (*UnimplementedQueryServer) PoolReservesAll(ctx context.Context, req *QueryAllPoolReservesRequest) (*QueryAllPoolReservesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PoolReservesAll not implemented") +} +func (*UnimplementedQueryServer) PoolReserves(ctx context.Context, req *QueryGetPoolReservesRequest) (*QueryGetPoolReservesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PoolReserves not implemented") +} +func (*UnimplementedQueryServer) EstimateMultiHopSwap(ctx context.Context, req *QueryEstimateMultiHopSwapRequest) (*QueryEstimateMultiHopSwapResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EstimateMultiHopSwap not implemented") +} +func (*UnimplementedQueryServer) EstimatePlaceLimitOrder(ctx context.Context, req *QueryEstimatePlaceLimitOrderRequest) (*QueryEstimatePlaceLimitOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EstimatePlaceLimitOrder not implemented") +} +func (*UnimplementedQueryServer) Pool(ctx context.Context, req *QueryPoolRequest) (*QueryPoolResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Pool not implemented") +} +func (*UnimplementedQueryServer) PoolByID(ctx context.Context, req *QueryPoolByIDRequest) (*QueryPoolResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PoolByID not implemented") +} +func (*UnimplementedQueryServer) PoolMetadata(ctx context.Context, req *QueryGetPoolMetadataRequest) (*QueryGetPoolMetadataResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PoolMetadata not implemented") +} +func (*UnimplementedQueryServer) PoolMetadataAll(ctx context.Context, req *QueryAllPoolMetadataRequest) (*QueryAllPoolMetadataResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PoolMetadataAll not implemented") +} +func (*UnimplementedQueryServer) SimulateDeposit(ctx context.Context, req *QuerySimulateDepositRequest) (*QuerySimulateDepositResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SimulateDeposit not implemented") +} +func (*UnimplementedQueryServer) SimulateWithdrawal(ctx context.Context, req *QuerySimulateWithdrawalRequest) (*QuerySimulateWithdrawalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SimulateWithdrawal not implemented") +} +func (*UnimplementedQueryServer) SimulatePlaceLimitOrder(ctx context.Context, req *QuerySimulatePlaceLimitOrderRequest) (*QuerySimulatePlaceLimitOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SimulatePlaceLimitOrder not implemented") +} +func (*UnimplementedQueryServer) SimulateWithdrawFilledLimitOrder(ctx context.Context, req *QuerySimulateWithdrawFilledLimitOrderRequest) (*QuerySimulateWithdrawFilledLimitOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SimulateWithdrawFilledLimitOrder not implemented") +} +func (*UnimplementedQueryServer) SimulateCancelLimitOrder(ctx context.Context, req *QuerySimulateCancelLimitOrderRequest) (*QuerySimulateCancelLimitOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SimulateCancelLimitOrder not implemented") +} +func (*UnimplementedQueryServer) SimulateMultiHopSwap(ctx context.Context, req *QuerySimulateMultiHopSwapRequest) (*QuerySimulateMultiHopSwapResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SimulateMultiHopSwap not implemented") } -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) } -func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +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 } - return dAtA[:n], nil -} - -func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.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 (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)) +func _Query_LimitOrderTrancheUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetLimitOrderTrancheUserRequest) + if err := dec(in); err != nil { + return nil, err } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + if interceptor == nil { + return srv.(QueryServer).LimitOrderTrancheUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/LimitOrderTrancheUser", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).LimitOrderTrancheUser(ctx, req.(*QueryGetLimitOrderTrancheUserRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryGetLimitOrderTrancheUserRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_LimitOrderTrancheUserAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllLimitOrderTrancheUserRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(QueryServer).LimitOrderTrancheUserAll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/LimitOrderTrancheUserAll", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).LimitOrderTrancheUserAll(ctx, req.(*QueryAllLimitOrderTrancheUserRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryGetLimitOrderTrancheUserRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _Query_LimitOrderTrancheUserAllByAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllLimitOrderTrancheUserByAddressRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).LimitOrderTrancheUserAllByAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/LimitOrderTrancheUserAllByAddress", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).LimitOrderTrancheUserAllByAddress(ctx, req.(*QueryAllLimitOrderTrancheUserByAddressRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryGetLimitOrderTrancheUserRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CalcWithdrawableShares { - i-- - if m.CalcWithdrawableShares { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 +func _Query_LimitOrderTranche_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetLimitOrderTrancheRequest) + if err := dec(in); err != nil { + return nil, err } - if len(m.TrancheKey) > 0 { - i -= len(m.TrancheKey) - copy(dAtA[i:], m.TrancheKey) - i = encodeVarintQuery(dAtA, i, uint64(len(m.TrancheKey))) - i-- - dAtA[i] = 0x12 + if interceptor == nil { + return srv.(QueryServer).LimitOrderTranche(ctx, in) } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/LimitOrderTranche", } - return len(dAtA) - i, nil + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).LimitOrderTranche(ctx, req.(*QueryGetLimitOrderTrancheRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryGetLimitOrderTrancheUserResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_LimitOrderTrancheAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllLimitOrderTrancheRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *QueryGetLimitOrderTrancheUserResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetLimitOrderTrancheUserResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.WithdrawableShares != nil { - { - size := m.WithdrawableShares.Size() - i -= size - if _, err := m.WithdrawableShares.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + if interceptor == nil { + return srv.(QueryServer).LimitOrderTrancheAll(ctx, in) } - if m.LimitOrderTrancheUser != nil { - { - size, err := m.LimitOrderTrancheUser.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/LimitOrderTrancheAll", } - return len(dAtA) - i, nil + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).LimitOrderTrancheAll(ctx, req.(*QueryAllLimitOrderTrancheRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryAllLimitOrderTrancheUserRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_UserDepositsAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllUserDepositsRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *QueryAllLimitOrderTrancheUserRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllLimitOrderTrancheUserRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + if interceptor == nil { + return srv.(QueryServer).UserDepositsAll(ctx, in) } - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/UserDepositsAll", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).UserDepositsAll(ctx, req.(*QueryAllUserDepositsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryAllLimitOrderTrancheUserResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_TickLiquidityAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllTickLiquidityRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *QueryAllLimitOrderTrancheUserResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllLimitOrderTrancheUserResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + if interceptor == nil { + return srv.(QueryServer).TickLiquidityAll(ctx, in) } - if len(m.LimitOrderTrancheUser) > 0 { - for iNdEx := len(m.LimitOrderTrancheUser) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.LimitOrderTrancheUser[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/TickLiquidityAll", } - return len(dAtA) - i, nil + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TickLiquidityAll(ctx, req.(*QueryAllTickLiquidityRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryGetLimitOrderTrancheRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_InactiveLimitOrderTranche_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetInactiveLimitOrderTrancheRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *QueryGetLimitOrderTrancheRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + if interceptor == nil { + return srv.(QueryServer).InactiveLimitOrderTranche(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/InactiveLimitOrderTranche", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).InactiveLimitOrderTranche(ctx, req.(*QueryGetInactiveLimitOrderTrancheRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryGetLimitOrderTrancheRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TrancheKey) > 0 { - i -= len(m.TrancheKey) - copy(dAtA[i:], m.TrancheKey) - i = encodeVarintQuery(dAtA, i, uint64(len(m.TrancheKey))) - i-- - dAtA[i] = 0x22 +func _Query_InactiveLimitOrderTrancheAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllInactiveLimitOrderTrancheRequest) + if err := dec(in); err != nil { + return nil, err } - if len(m.TokenIn) > 0 { - i -= len(m.TokenIn) - copy(dAtA[i:], m.TokenIn) - i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenIn))) - i-- - dAtA[i] = 0x1a + if interceptor == nil { + return srv.(QueryServer).InactiveLimitOrderTrancheAll(ctx, in) } - if m.TickIndex != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.TickIndex)) - i-- - dAtA[i] = 0x10 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/InactiveLimitOrderTrancheAll", } - if len(m.PairId) > 0 { - i -= len(m.PairId) - copy(dAtA[i:], m.PairId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.PairId))) - i-- - dAtA[i] = 0xa + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).InactiveLimitOrderTrancheAll(ctx, req.(*QueryAllInactiveLimitOrderTrancheRequest)) } - return len(dAtA) - i, nil + return interceptor(ctx, in, info, handler) } -func (m *QueryGetLimitOrderTrancheResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_PoolReservesAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllPoolReservesRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *QueryGetLimitOrderTrancheResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + if interceptor == nil { + return srv.(QueryServer).PoolReservesAll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/PoolReservesAll", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PoolReservesAll(ctx, req.(*QueryAllPoolReservesRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryGetLimitOrderTrancheResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.LimitOrderTranche != nil { - { - size, err := m.LimitOrderTranche.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa +func _Query_PoolReserves_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetPoolReservesRequest) + if err := dec(in); err != nil { + return nil, err } - return len(dAtA) - i, nil + if interceptor == nil { + return srv.(QueryServer).PoolReserves(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/PoolReserves", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PoolReserves(ctx, req.(*QueryGetPoolReservesRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryAllLimitOrderTrancheRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_EstimateMultiHopSwap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryEstimateMultiHopSwapRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(QueryServer).EstimateMultiHopSwap(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/EstimateMultiHopSwap", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).EstimateMultiHopSwap(ctx, req.(*QueryEstimateMultiHopSwapRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryAllLimitOrderTrancheRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _Query_EstimatePlaceLimitOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryEstimatePlaceLimitOrderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).EstimatePlaceLimitOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/EstimatePlaceLimitOrder", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).EstimatePlaceLimitOrder(ctx, req.(*QueryEstimatePlaceLimitOrderRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryAllLimitOrderTrancheRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a +func _Query_Pool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPoolRequest) + if err := dec(in); err != nil { + return nil, err } - if len(m.TokenIn) > 0 { - i -= len(m.TokenIn) - copy(dAtA[i:], m.TokenIn) - i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenIn))) - i-- - dAtA[i] = 0x12 + if interceptor == nil { + return srv.(QueryServer).Pool(ctx, in) } - if len(m.PairId) > 0 { - i -= len(m.PairId) - copy(dAtA[i:], m.PairId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.PairId))) - i-- - dAtA[i] = 0xa + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/Pool", } - return len(dAtA) - i, nil + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Pool(ctx, req.(*QueryPoolRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryAllLimitOrderTrancheResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_PoolByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPoolByIDRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(QueryServer).PoolByID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/PoolByID", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PoolByID(ctx, req.(*QueryPoolByIDRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryAllLimitOrderTrancheResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _Query_PoolMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetPoolMetadataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).PoolMetadata(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/PoolMetadata", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PoolMetadata(ctx, req.(*QueryGetPoolMetadataRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryAllLimitOrderTrancheResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 +func _Query_PoolMetadataAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllPoolMetadataRequest) + if err := dec(in); err != nil { + return nil, err } - if len(m.LimitOrderTranche) > 0 { - for iNdEx := len(m.LimitOrderTranche) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.LimitOrderTranche[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + if interceptor == nil { + return srv.(QueryServer).PoolMetadataAll(ctx, in) } - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/PoolMetadataAll", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PoolMetadataAll(ctx, req.(*QueryAllPoolMetadataRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryAllUserDepositsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_SimulateDeposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySimulateDepositRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(QueryServer).SimulateDeposit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/SimulateDeposit", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SimulateDeposit(ctx, req.(*QuerySimulateDepositRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryAllUserDepositsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _Query_SimulateWithdrawal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySimulateWithdrawalRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SimulateWithdrawal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/SimulateWithdrawal", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SimulateWithdrawal(ctx, req.(*QuerySimulateWithdrawalRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryAllUserDepositsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IncludePoolData { - i-- - if m.IncludePoolData { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 +func _Query_SimulatePlaceLimitOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySimulatePlaceLimitOrderRequest) + if err := dec(in); err != nil { + return nil, err } - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + if interceptor == nil { + return srv.(QueryServer).SimulatePlaceLimitOrder(ctx, in) } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/SimulatePlaceLimitOrder", } - return len(dAtA) - i, nil + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SimulatePlaceLimitOrder(ctx, req.(*QuerySimulatePlaceLimitOrderRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryAllUserDepositsResponse) Marshal() (dAtA []byte, err error) { +func _Query_SimulateWithdrawFilledLimitOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySimulateWithdrawFilledLimitOrderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SimulateWithdrawFilledLimitOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/SimulateWithdrawFilledLimitOrder", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SimulateWithdrawFilledLimitOrder(ctx, req.(*QuerySimulateWithdrawFilledLimitOrderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SimulateCancelLimitOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySimulateCancelLimitOrderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SimulateCancelLimitOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/SimulateCancelLimitOrder", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SimulateCancelLimitOrder(ctx, req.(*QuerySimulateCancelLimitOrderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SimulateMultiHopSwap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySimulateMultiHopSwapRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SimulateMultiHopSwap(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/neutron.dex.Query/SimulateMultiHopSwap", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SimulateMultiHopSwap(ctx, req.(*QuerySimulateMultiHopSwapRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "neutron.dex.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "LimitOrderTrancheUser", + Handler: _Query_LimitOrderTrancheUser_Handler, + }, + { + MethodName: "LimitOrderTrancheUserAll", + Handler: _Query_LimitOrderTrancheUserAll_Handler, + }, + { + MethodName: "LimitOrderTrancheUserAllByAddress", + Handler: _Query_LimitOrderTrancheUserAllByAddress_Handler, + }, + { + MethodName: "LimitOrderTranche", + Handler: _Query_LimitOrderTranche_Handler, + }, + { + MethodName: "LimitOrderTrancheAll", + Handler: _Query_LimitOrderTrancheAll_Handler, + }, + { + MethodName: "UserDepositsAll", + Handler: _Query_UserDepositsAll_Handler, + }, + { + MethodName: "TickLiquidityAll", + Handler: _Query_TickLiquidityAll_Handler, + }, + { + MethodName: "InactiveLimitOrderTranche", + Handler: _Query_InactiveLimitOrderTranche_Handler, + }, + { + MethodName: "InactiveLimitOrderTrancheAll", + Handler: _Query_InactiveLimitOrderTrancheAll_Handler, + }, + { + MethodName: "PoolReservesAll", + Handler: _Query_PoolReservesAll_Handler, + }, + { + MethodName: "PoolReserves", + Handler: _Query_PoolReserves_Handler, + }, + { + MethodName: "EstimateMultiHopSwap", + Handler: _Query_EstimateMultiHopSwap_Handler, + }, + { + MethodName: "EstimatePlaceLimitOrder", + Handler: _Query_EstimatePlaceLimitOrder_Handler, + }, + { + MethodName: "Pool", + Handler: _Query_Pool_Handler, + }, + { + MethodName: "PoolByID", + Handler: _Query_PoolByID_Handler, + }, + { + MethodName: "PoolMetadata", + Handler: _Query_PoolMetadata_Handler, + }, + { + MethodName: "PoolMetadataAll", + Handler: _Query_PoolMetadataAll_Handler, + }, + { + MethodName: "SimulateDeposit", + Handler: _Query_SimulateDeposit_Handler, + }, + { + MethodName: "SimulateWithdrawal", + Handler: _Query_SimulateWithdrawal_Handler, + }, + { + MethodName: "SimulatePlaceLimitOrder", + Handler: _Query_SimulatePlaceLimitOrder_Handler, + }, + { + MethodName: "SimulateWithdrawFilledLimitOrder", + Handler: _Query_SimulateWithdrawFilledLimitOrder_Handler, + }, + { + MethodName: "SimulateCancelLimitOrder", + Handler: _Query_SimulateCancelLimitOrder_Handler, + }, + { + MethodName: "SimulateMultiHopSwap", + Handler: _Query_SimulateMultiHopSwap_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "neutron/dex/query.proto", +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3307,46 +3645,53 @@ func (m *QueryAllUserDepositsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryAllUserDepositsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllUserDepositsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + 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 } - if len(m.Deposits) > 0 { - for iNdEx := len(m.Deposits) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Deposits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + 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 *QueryAllLimitOrderTrancheUserByAddressRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryGetLimitOrderTrancheUserRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3356,26 +3701,31 @@ func (m *QueryAllLimitOrderTrancheUserByAddressRequest) Marshal() (dAtA []byte, return dAtA[:n], nil } -func (m *QueryAllLimitOrderTrancheUserByAddressRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGetLimitOrderTrancheUserRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllLimitOrderTrancheUserByAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGetLimitOrderTrancheUserRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + if m.CalcWithdrawableShares { + i-- + if m.CalcWithdrawableShares { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } i-- + dAtA[i] = 0x18 + } + if len(m.TrancheKey) > 0 { + i -= len(m.TrancheKey) + copy(dAtA[i:], m.TrancheKey) + i = encodeVarintQuery(dAtA, i, uint64(len(m.TrancheKey))) + i-- dAtA[i] = 0x12 } if len(m.Address) > 0 { @@ -3388,7 +3738,7 @@ func (m *QueryAllLimitOrderTrancheUserByAddressRequest) MarshalToSizedBuffer(dAt return len(dAtA) - i, nil } -func (m *QueryAllLimitOrderTrancheUserByAddressResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryGetLimitOrderTrancheUserResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3398,46 +3748,44 @@ func (m *QueryAllLimitOrderTrancheUserByAddressResponse) Marshal() (dAtA []byte, return dAtA[:n], nil } -func (m *QueryAllLimitOrderTrancheUserByAddressResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGetLimitOrderTrancheUserResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllLimitOrderTrancheUserByAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGetLimitOrderTrancheUserResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Pagination != nil { + if m.WithdrawableShares != nil { { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { + size := m.WithdrawableShares.Size() + i -= size + if _, err := m.WithdrawableShares.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i -= size i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } - if len(m.LimitOrders) > 0 { - for iNdEx := len(m.LimitOrders) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.LimitOrders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + if m.LimitOrderTrancheUser != nil { + { + size, err := m.LimitOrderTrancheUser.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryAllTickLiquidityRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryAllLimitOrderTrancheUserRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3447,12 +3795,12 @@ func (m *QueryAllTickLiquidityRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryAllTickLiquidityRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllLimitOrderTrancheUserRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllTickLiquidityRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllLimitOrderTrancheUserRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3467,26 +3815,12 @@ func (m *QueryAllTickLiquidityRequest) MarshalToSizedBuffer(dAtA []byte) (int, e i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a - } - if len(m.TokenIn) > 0 { - i -= len(m.TokenIn) - copy(dAtA[i:], m.TokenIn) - i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenIn))) - i-- - dAtA[i] = 0x12 - } - if len(m.PairId) > 0 { - i -= len(m.PairId) - copy(dAtA[i:], m.PairId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.PairId))) - i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryAllTickLiquidityResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryAllLimitOrderTrancheUserResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3496,12 +3830,12 @@ func (m *QueryAllTickLiquidityResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryAllTickLiquidityResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllLimitOrderTrancheUserResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllTickLiquidityResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllLimitOrderTrancheUserResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3518,10 +3852,10 @@ func (m *QueryAllTickLiquidityResponse) MarshalToSizedBuffer(dAtA []byte) (int, i-- dAtA[i] = 0x12 } - if len(m.TickLiquidity) > 0 { - for iNdEx := len(m.TickLiquidity) - 1; iNdEx >= 0; iNdEx-- { + if len(m.LimitOrderTrancheUser) > 0 { + for iNdEx := len(m.LimitOrderTrancheUser) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.TickLiquidity[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.LimitOrderTrancheUser[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3535,7 +3869,7 @@ func (m *QueryAllTickLiquidityResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *QueryGetInactiveLimitOrderTrancheRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryGetLimitOrderTrancheRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3545,12 +3879,12 @@ func (m *QueryGetInactiveLimitOrderTrancheRequest) Marshal() (dAtA []byte, err e return dAtA[:n], nil } -func (m *QueryGetInactiveLimitOrderTrancheRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGetLimitOrderTrancheRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGetInactiveLimitOrderTrancheRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGetLimitOrderTrancheRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3562,17 +3896,17 @@ func (m *QueryGetInactiveLimitOrderTrancheRequest) MarshalToSizedBuffer(dAtA []b i-- dAtA[i] = 0x22 } - if m.TickIndex != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.TickIndex)) - i-- - dAtA[i] = 0x18 - } if len(m.TokenIn) > 0 { i -= len(m.TokenIn) copy(dAtA[i:], m.TokenIn) i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenIn))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a + } + if m.TickIndex != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.TickIndex)) + i-- + dAtA[i] = 0x10 } if len(m.PairId) > 0 { i -= len(m.PairId) @@ -3584,7 +3918,7 @@ func (m *QueryGetInactiveLimitOrderTrancheRequest) MarshalToSizedBuffer(dAtA []b return len(dAtA) - i, nil } -func (m *QueryGetInactiveLimitOrderTrancheResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryGetLimitOrderTrancheResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3594,19 +3928,19 @@ func (m *QueryGetInactiveLimitOrderTrancheResponse) Marshal() (dAtA []byte, err return dAtA[:n], nil } -func (m *QueryGetInactiveLimitOrderTrancheResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGetLimitOrderTrancheResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGetInactiveLimitOrderTrancheResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGetLimitOrderTrancheResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.InactiveLimitOrderTranche != nil { + if m.LimitOrderTranche != nil { { - size, err := m.InactiveLimitOrderTranche.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.LimitOrderTranche.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3619,7 +3953,7 @@ func (m *QueryGetInactiveLimitOrderTrancheResponse) MarshalToSizedBuffer(dAtA [] return len(dAtA) - i, nil } -func (m *QueryAllInactiveLimitOrderTrancheRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryAllLimitOrderTrancheRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3629,12 +3963,12 @@ func (m *QueryAllInactiveLimitOrderTrancheRequest) Marshal() (dAtA []byte, err e return dAtA[:n], nil } -func (m *QueryAllInactiveLimitOrderTrancheRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllLimitOrderTrancheRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllInactiveLimitOrderTrancheRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllLimitOrderTrancheRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3649,12 +3983,26 @@ func (m *QueryAllInactiveLimitOrderTrancheRequest) MarshalToSizedBuffer(dAtA []b i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x1a + } + if len(m.TokenIn) > 0 { + i -= len(m.TokenIn) + copy(dAtA[i:], m.TokenIn) + i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenIn))) + i-- + dAtA[i] = 0x12 + } + if len(m.PairId) > 0 { + i -= len(m.PairId) + copy(dAtA[i:], m.PairId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PairId))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryAllInactiveLimitOrderTrancheResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryAllLimitOrderTrancheResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3664,12 +4012,12 @@ func (m *QueryAllInactiveLimitOrderTrancheResponse) Marshal() (dAtA []byte, err return dAtA[:n], nil } -func (m *QueryAllInactiveLimitOrderTrancheResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllLimitOrderTrancheResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllInactiveLimitOrderTrancheResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllLimitOrderTrancheResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3686,10 +4034,10 @@ func (m *QueryAllInactiveLimitOrderTrancheResponse) MarshalToSizedBuffer(dAtA [] i-- dAtA[i] = 0x12 } - if len(m.InactiveLimitOrderTranche) > 0 { - for iNdEx := len(m.InactiveLimitOrderTranche) - 1; iNdEx >= 0; iNdEx-- { + if len(m.LimitOrderTranche) > 0 { + for iNdEx := len(m.LimitOrderTranche) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.InactiveLimitOrderTranche[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.LimitOrderTranche[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3703,7 +4051,7 @@ func (m *QueryAllInactiveLimitOrderTrancheResponse) MarshalToSizedBuffer(dAtA [] return len(dAtA) - i, nil } -func (m *QueryAllPoolReservesRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryAllUserDepositsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3713,16 +4061,26 @@ func (m *QueryAllPoolReservesRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryAllPoolReservesRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllUserDepositsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllPoolReservesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllUserDepositsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if m.IncludePoolData { + i-- + if m.IncludePoolData { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } if m.Pagination != nil { { size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) @@ -3733,26 +4091,19 @@ func (m *QueryAllPoolReservesRequest) MarshalToSizedBuffer(dAtA []byte) (int, er i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a - } - if len(m.TokenIn) > 0 { - i -= len(m.TokenIn) - copy(dAtA[i:], m.TokenIn) - i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenIn))) - i-- dAtA[i] = 0x12 } - if len(m.PairId) > 0 { - i -= len(m.PairId) - copy(dAtA[i:], m.PairId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.PairId))) + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryAllPoolReservesResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryAllUserDepositsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3762,12 +4113,12 @@ func (m *QueryAllPoolReservesResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryAllPoolReservesResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllUserDepositsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllPoolReservesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllUserDepositsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3784,10 +4135,10 @@ func (m *QueryAllPoolReservesResponse) MarshalToSizedBuffer(dAtA []byte) (int, e i-- dAtA[i] = 0x12 } - if len(m.PoolReserves) > 0 { - for iNdEx := len(m.PoolReserves) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Deposits) > 0 { + for iNdEx := len(m.Deposits) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.PoolReserves[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Deposits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3801,7 +4152,7 @@ func (m *QueryAllPoolReservesResponse) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } -func (m *QueryGetPoolReservesRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryAllLimitOrderTrancheUserByAddressRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3811,44 +4162,39 @@ func (m *QueryGetPoolReservesRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryGetPoolReservesRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllLimitOrderTrancheUserByAddressRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGetPoolReservesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllLimitOrderTrancheUserByAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Fee != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Fee)) - i-- - dAtA[i] = 0x20 - } - if m.TickIndex != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.TickIndex)) - i-- - dAtA[i] = 0x18 - } - if len(m.TokenIn) > 0 { - i -= len(m.TokenIn) - copy(dAtA[i:], m.TokenIn) - i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenIn))) + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x12 } - if len(m.PairId) > 0 { - i -= len(m.PairId) - copy(dAtA[i:], m.PairId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.PairId))) + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryGetPoolReservesResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryAllLimitOrderTrancheUserByAddressResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3858,19 +4204,19 @@ func (m *QueryGetPoolReservesResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryGetPoolReservesResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllLimitOrderTrancheUserByAddressResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGetPoolReservesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllLimitOrderTrancheUserByAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.PoolReserves != nil { + if m.Pagination != nil { { - size, err := m.PoolReserves.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3878,12 +4224,26 @@ func (m *QueryGetPoolReservesResponse) MarshalToSizedBuffer(dAtA []byte) (int, e i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 + } + if len(m.LimitOrders) > 0 { + for iNdEx := len(m.LimitOrders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.LimitOrders[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 *QueryEstimateMultiHopSwapRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryAllTickLiquidityRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3893,78 +4253,46 @@ func (m *QueryEstimateMultiHopSwapRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryEstimateMultiHopSwapRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllTickLiquidityRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryEstimateMultiHopSwapRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllTickLiquidityRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.PickBestRoute { - i-- - if m.PickBestRoute { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x30 - } - { - size := m.ExitLimitPrice.Size() - i -= size - if _, err := m.ExitLimitPrice.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x2a - { - size := m.AmountIn.Size() - i -= size - if _, err := m.AmountIn.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if len(m.Routes) > 0 { - for iNdEx := len(m.Routes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Routes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Receiver) > 0 { - i -= len(m.Receiver) - copy(dAtA[i:], m.Receiver) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Receiver))) + if len(m.TokenIn) > 0 { + i -= len(m.TokenIn) + copy(dAtA[i:], m.TokenIn) + i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenIn))) i-- dAtA[i] = 0x12 } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Creator))) + if len(m.PairId) > 0 { + i -= len(m.PairId) + copy(dAtA[i:], m.PairId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PairId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryEstimateMultiHopSwapResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryAllTickLiquidityResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3974,30 +4302,46 @@ func (m *QueryEstimateMultiHopSwapResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryEstimateMultiHopSwapResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllTickLiquidityResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryEstimateMultiHopSwapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllTickLiquidityResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size := m.CoinOut.Size() - i -= size - if _, err := m.CoinOut.MarshalTo(dAtA[i:]); err != nil { - return 0, err + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.TickLiquidity) > 0 { + for iNdEx := len(m.TickLiquidity) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TickLiquidity[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - i = encodeVarintQuery(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *QueryEstimatePlaceLimitOrderRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryGetInactiveLimitOrderTrancheRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4007,90 +4351,46 @@ func (m *QueryEstimatePlaceLimitOrderRequest) Marshal() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *QueryEstimatePlaceLimitOrderRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGetInactiveLimitOrderTrancheRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryEstimatePlaceLimitOrderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGetInactiveLimitOrderTrancheRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.MaxAmountOut != nil { - { - size := m.MaxAmountOut.Size() - i -= size - if _, err := m.MaxAmountOut.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if m.ExpirationTime != nil { - n21, err21 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.ExpirationTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.ExpirationTime):]) - if err21 != nil { - return 0, err21 - } - i -= n21 - i = encodeVarintQuery(dAtA, i, uint64(n21)) - i-- - dAtA[i] = 0x42 - } - if m.OrderType != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.OrderType)) - i-- - dAtA[i] = 0x38 - } - { - size := m.AmountIn.Size() - i -= size - if _, err := m.AmountIn.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - if m.TickIndexInToOut != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.TickIndexInToOut)) + if len(m.TrancheKey) > 0 { + i -= len(m.TrancheKey) + copy(dAtA[i:], m.TrancheKey) + i = encodeVarintQuery(dAtA, i, uint64(len(m.TrancheKey))) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x22 } - if len(m.TokenOut) > 0 { - i -= len(m.TokenOut) - copy(dAtA[i:], m.TokenOut) - i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenOut))) + if m.TickIndex != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.TickIndex)) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x18 } if len(m.TokenIn) > 0 { i -= len(m.TokenIn) copy(dAtA[i:], m.TokenIn) i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenIn))) i-- - dAtA[i] = 0x1a - } - if len(m.Receiver) > 0 { - i -= len(m.Receiver) - copy(dAtA[i:], m.Receiver) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Receiver))) - i-- dAtA[i] = 0x12 } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Creator))) + if len(m.PairId) > 0 { + i -= len(m.PairId) + copy(dAtA[i:], m.PairId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PairId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryEstimatePlaceLimitOrderResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryGetInactiveLimitOrderTrancheResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4100,50 +4400,32 @@ func (m *QueryEstimatePlaceLimitOrderResponse) Marshal() (dAtA []byte, err error return dAtA[:n], nil } -func (m *QueryEstimatePlaceLimitOrderResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGetInactiveLimitOrderTrancheResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryEstimatePlaceLimitOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGetInactiveLimitOrderTrancheResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size := m.SwapOutCoin.Size() - i -= size - if _, err := m.SwapOutCoin.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size := m.SwapInCoin.Size() - i -= size - if _, err := m.SwapInCoin.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size := m.TotalInCoin.Size() - i -= size - if _, err := m.TotalInCoin.MarshalTo(dAtA[i:]); err != nil { - return 0, err + if m.InactiveLimitOrderTranche != nil { + { + size, err := m.InactiveLimitOrderTranche.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *QueryPoolRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryAllInactiveLimitOrderTrancheRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4153,37 +4435,32 @@ func (m *QueryPoolRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryPoolRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllInactiveLimitOrderTrancheRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryPoolRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllInactiveLimitOrderTrancheRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Fee != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Fee)) - i-- - dAtA[i] = 0x18 - } - if m.TickIndex != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.TickIndex)) - i-- - dAtA[i] = 0x10 - } - if len(m.PairId) > 0 { - i -= len(m.PairId) - copy(dAtA[i:], m.PairId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.PairId))) + if m.Pagination != nil { + { + size, err := m.Pagination.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 *QueryPoolByIDRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryAllInactiveLimitOrderTrancheResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4193,47 +4470,68 @@ func (m *QueryPoolByIDRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryPoolByIDRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllInactiveLimitOrderTrancheResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryPoolByIDRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllInactiveLimitOrderTrancheResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.PoolId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryPoolResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + dAtA[i] = 0x12 + } + if len(m.InactiveLimitOrderTranche) > 0 { + for iNdEx := len(m.InactiveLimitOrderTranche) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.InactiveLimitOrderTranche[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 *QueryAllPoolReservesRequest) 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 *QueryPoolResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllPoolReservesRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllPoolReservesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Pool != nil { + if m.Pagination != nil { { - size, err := m.Pool.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -4241,12 +4539,26 @@ func (m *QueryPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x1a + } + if len(m.TokenIn) > 0 { + i -= len(m.TokenIn) + copy(dAtA[i:], m.TokenIn) + i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenIn))) + i-- + dAtA[i] = 0x12 + } + if len(m.PairId) > 0 { + i -= len(m.PairId) + copy(dAtA[i:], m.PairId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PairId))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryGetPoolMetadataRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryAllPoolReservesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4256,25 +4568,46 @@ func (m *QueryGetPoolMetadataRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryGetPoolMetadataRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllPoolReservesResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGetPoolMetadataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllPoolReservesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Id != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Id)) + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x8 + dAtA[i] = 0x12 + } + if len(m.PoolReserves) > 0 { + for iNdEx := len(m.PoolReserves) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PoolReserves[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 *QueryGetPoolMetadataResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryGetPoolReservesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4284,30 +4617,44 @@ func (m *QueryGetPoolMetadataResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryGetPoolMetadataResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGetPoolReservesRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGetPoolMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGetPoolReservesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.PoolMetadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + if m.Fee != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Fee)) + i-- + dAtA[i] = 0x20 + } + if m.TickIndex != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.TickIndex)) + i-- + dAtA[i] = 0x18 + } + if len(m.TokenIn) > 0 { + i -= len(m.TokenIn) + copy(dAtA[i:], m.TokenIn) + i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenIn))) + i-- + dAtA[i] = 0x12 + } + if len(m.PairId) > 0 { + i -= len(m.PairId) + copy(dAtA[i:], m.PairId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PairId))) + i-- + dAtA[i] = 0xa } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *QueryAllPoolMetadataRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryGetPoolReservesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4317,19 +4664,19 @@ func (m *QueryAllPoolMetadataRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryAllPoolMetadataRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGetPoolReservesResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllPoolMetadataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGetPoolReservesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Pagination != nil { + if m.PoolReserves != nil { { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.PoolReserves.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -4342,7 +4689,7 @@ func (m *QueryAllPoolMetadataRequest) MarshalToSizedBuffer(dAtA []byte) (int, er return len(dAtA) - i, nil } -func (m *QueryAllPoolMetadataResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryEstimateMultiHopSwapRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4352,32 +4699,50 @@ func (m *QueryAllPoolMetadataResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryAllPoolMetadataResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryEstimateMultiHopSwapRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllPoolMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryEstimateMultiHopSwapRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + if m.PickBestRoute { + i-- + if m.PickBestRoute { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x30 } - if len(m.PoolMetadata) > 0 { - for iNdEx := len(m.PoolMetadata) - 1; iNdEx >= 0; iNdEx-- { + { + size := m.ExitLimitPrice.Size() + i -= size + if _, err := m.ExitLimitPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size := m.AmountIn.Size() + i -= size + if _, err := m.AmountIn.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.Routes) > 0 { + for iNdEx := len(m.Routes) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.PoolMetadata[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Routes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -4385,652 +4750,2785 @@ func (m *QueryAllPoolMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, e i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x1a } } + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0x12 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Creator))) + 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 +func (m *QueryEstimateMultiHopSwapResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - return n + return dAtA[:n], nil } -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 *QueryEstimateMultiHopSwapResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGetLimitOrderTrancheUserRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryEstimateMultiHopSwapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.TrancheKey) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.CalcWithdrawableShares { - n += 2 + { + size := m.CoinOut.Size() + i -= size + if _, err := m.CoinOut.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) } - return n + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *QueryGetLimitOrderTrancheUserResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.LimitOrderTrancheUser != nil { - l = m.LimitOrderTrancheUser.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.WithdrawableShares != nil { - l = m.WithdrawableShares.Size() - n += 1 + l + sovQuery(uint64(l)) +func (m *QueryEstimatePlaceLimitOrderRequest) 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 n + return dAtA[:n], nil } -func (m *QueryAllLimitOrderTrancheUserRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n +func (m *QueryEstimatePlaceLimitOrderRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllLimitOrderTrancheUserResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryEstimatePlaceLimitOrderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.LimitOrderTrancheUser) > 0 { - for _, e := range m.LimitOrderTrancheUser { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.MaxAmountOut != nil { + { + size := m.MaxAmountOut.Size() + i -= size + if _, err := m.MaxAmountOut.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x4a } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.ExpirationTime != nil { + n21, err21 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.ExpirationTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.ExpirationTime):]) + if err21 != nil { + return 0, err21 + } + i -= n21 + i = encodeVarintQuery(dAtA, i, uint64(n21)) + i-- + dAtA[i] = 0x42 } - return n -} - -func (m *QueryGetLimitOrderTrancheRequest) Size() (n int) { - if m == nil { - return 0 + if m.OrderType != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.OrderType)) + i-- + dAtA[i] = 0x38 } - var l int - _ = l - l = len(m.PairId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + { + size := m.AmountIn.Size() + i -= size + if _, err := m.AmountIn.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) } - if m.TickIndex != 0 { - n += 1 + sovQuery(uint64(m.TickIndex)) + i-- + dAtA[i] = 0x32 + if m.TickIndexInToOut != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.TickIndexInToOut)) + i-- + dAtA[i] = 0x28 } - l = len(m.TokenIn) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.TokenOut) > 0 { + i -= len(m.TokenOut) + copy(dAtA[i:], m.TokenOut) + i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenOut))) + i-- + dAtA[i] = 0x22 } - l = len(m.TrancheKey) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.TokenIn) > 0 { + i -= len(m.TokenIn) + copy(dAtA[i:], m.TokenIn) + i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenIn))) + i-- + dAtA[i] = 0x1a } - return n -} - -func (m *QueryGetLimitOrderTrancheResponse) Size() (n int) { - if m == nil { - return 0 + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0x12 } - var l int - _ = l - if m.LimitOrderTranche != nil { - l = m.LimitOrderTranche.Size() - n += 1 + l + sovQuery(uint64(l)) + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *QueryAllLimitOrderTrancheRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PairId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.TokenIn) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) +func (m *QueryEstimatePlaceLimitOrderResponse) 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 n + return dAtA[:n], nil } -func (m *QueryAllLimitOrderTrancheResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryEstimatePlaceLimitOrderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryEstimatePlaceLimitOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.LimitOrderTranche) > 0 { - for _, e := range m.LimitOrderTranche { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + { + size := m.SwapOutCoin.Size() + i -= size + if _, err := m.SwapOutCoin.MarshalTo(dAtA[i:]); err != nil { + return 0, err } + i = encodeVarintQuery(dAtA, i, uint64(size)) } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) + i-- + dAtA[i] = 0x1a + { + size := m.SwapInCoin.Size() + i -= size + if _, err := m.SwapInCoin.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) } - return n + i-- + dAtA[i] = 0x12 + { + size := m.TotalInCoin.Size() + i -= size + if _, err := m.TotalInCoin.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 *QueryAllUserDepositsRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QueryPoolRequest) 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 *QueryPoolRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPoolRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if m.Fee != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Fee)) + i-- + dAtA[i] = 0x18 } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.TickIndex != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.TickIndex)) + i-- + dAtA[i] = 0x10 } - if m.IncludePoolData { - n += 2 + if len(m.PairId) > 0 { + i -= len(m.PairId) + copy(dAtA[i:], m.PairId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PairId))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *QueryAllUserDepositsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Deposits) > 0 { - for _, e := range m.Deposits { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) +func (m *QueryPoolByIDRequest) 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 n + return dAtA[:n], nil } -func (m *QueryAllLimitOrderTrancheUserByAddressRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryPoolByIDRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPoolByIDRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.PoolId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x8 } - return n + return len(dAtA) - i, nil } -func (m *QueryAllLimitOrderTrancheUserByAddressResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QueryPoolResponse) 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 *QueryPoolResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.LimitOrders) > 0 { - for _, e := range m.LimitOrders { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.Pool != nil { + { + size, err := m.Pool.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n + return len(dAtA) - i, nil } -func (m *QueryAllTickLiquidityRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QueryGetPoolMetadataRequest) 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 *QueryGetPoolMetadataRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetPoolMetadataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.PairId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.TokenIn) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.Id != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 } - return n + return len(dAtA) - i, nil } -func (m *QueryAllTickLiquidityResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QueryGetPoolMetadataResponse) 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 *QueryGetPoolMetadataResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetPoolMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.TickLiquidity) > 0 { - for _, e := range m.TickLiquidity { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + { + size, err := m.PoolMetadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *QueryGetInactiveLimitOrderTrancheRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PairId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.TokenIn) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.TickIndex != 0 { - n += 1 + sovQuery(uint64(m.TickIndex)) - } - l = len(m.TrancheKey) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) +func (m *QueryAllPoolMetadataRequest) 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 n + return dAtA[:n], nil } -func (m *QueryGetInactiveLimitOrderTrancheResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.InactiveLimitOrderTranche != nil { - l = m.InactiveLimitOrderTranche.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n +func (m *QueryAllPoolMetadataRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllInactiveLimitOrderTrancheRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryAllPoolMetadataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *QueryAllInactiveLimitOrderTrancheResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QueryAllPoolMetadataResponse) 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 *QueryAllPoolMetadataResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllPoolMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.InactiveLimitOrderTranche) > 0 { - for _, e := range m.InactiveLimitOrderTranche { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.PoolMetadata) > 0 { + for iNdEx := len(m.PoolMetadata) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PoolMetadata[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 *QueryAllPoolReservesRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QuerySimulateDepositRequest) 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 *QuerySimulateDepositRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySimulateDepositRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.PairId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.TokenIn) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.Msg != nil { + { + size, err := m.Msg.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *QueryAllPoolReservesResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QuerySimulateDepositResponse) 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 *QuerySimulateDepositResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySimulateDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.PoolReserves) > 0 { - for _, e := range m.PoolReserves { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.Resp != nil { + { + size, err := m.Resp.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n + return len(dAtA) - i, nil } -func (m *QueryGetPoolReservesRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QuerySimulateWithdrawalRequest) 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 *QuerySimulateWithdrawalRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySimulateWithdrawalRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.PairId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.TokenIn) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.TickIndex != 0 { - n += 1 + sovQuery(uint64(m.TickIndex)) - } - if m.Fee != 0 { - n += 1 + sovQuery(uint64(m.Fee)) + if m.Msg != nil { + { + size, err := m.Msg.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *QueryGetPoolReservesResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QuerySimulateWithdrawalResponse) 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 *QuerySimulateWithdrawalResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySimulateWithdrawalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.PoolReserves != nil { - l = m.PoolReserves.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.Resp != nil { + { + size, err := m.Resp.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *QueryEstimateMultiHopSwapRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QuerySimulatePlaceLimitOrderRequest) 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 *QuerySimulatePlaceLimitOrderRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySimulatePlaceLimitOrderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Receiver) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if len(m.Routes) > 0 { - for _, e := range m.Routes { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.Msg != nil { + { + size, err := m.Msg.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa } - l = m.AmountIn.Size() - n += 1 + l + sovQuery(uint64(l)) - l = m.ExitLimitPrice.Size() - n += 1 + l + sovQuery(uint64(l)) - if m.PickBestRoute { - n += 2 - } - return n + return len(dAtA) - i, nil } -func (m *QueryEstimateMultiHopSwapResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QuerySimulatePlaceLimitOrderResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - l = m.CoinOut.Size() - n += 1 + l + sovQuery(uint64(l)) - return n + return dAtA[:n], nil } -func (m *QueryEstimatePlaceLimitOrderRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *QuerySimulatePlaceLimitOrderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySimulatePlaceLimitOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if m.Resp != nil { + { + size, err := m.Resp.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - l = len(m.Receiver) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.TokenIn) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.TokenOut) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.TickIndexInToOut != 0 { - n += 1 + sovQuery(uint64(m.TickIndexInToOut)) - } - l = m.AmountIn.Size() - n += 1 + l + sovQuery(uint64(l)) - if m.OrderType != 0 { - n += 1 + sovQuery(uint64(m.OrderType)) - } - if m.ExpirationTime != nil { - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.ExpirationTime) - n += 1 + l + sovQuery(uint64(l)) + return len(dAtA) - i, nil +} + +func (m *QuerySimulateWithdrawFilledLimitOrderRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - if m.MaxAmountOut != nil { - l = m.MaxAmountOut.Size() - n += 1 + l + sovQuery(uint64(l)) + return dAtA[:n], nil +} + +func (m *QuerySimulateWithdrawFilledLimitOrderRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySimulateWithdrawFilledLimitOrderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Msg != nil { + { + size, err := m.Msg.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *QueryEstimatePlaceLimitOrderResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QuerySimulateWithdrawFilledLimitOrderResponse) 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 *QuerySimulateWithdrawFilledLimitOrderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySimulateWithdrawFilledLimitOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = m.TotalInCoin.Size() - n += 1 + l + sovQuery(uint64(l)) - l = m.SwapInCoin.Size() - n += 1 + l + sovQuery(uint64(l)) - l = m.SwapOutCoin.Size() - n += 1 + l + sovQuery(uint64(l)) - return n + if m.Resp != nil { + { + size, err := m.Resp.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 *QueryPoolRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QuerySimulateCancelLimitOrderRequest) 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 *QuerySimulateCancelLimitOrderRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySimulateCancelLimitOrderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.PairId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if m.Msg != nil { + { + size, err := m.Msg.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - if m.TickIndex != 0 { - n += 1 + sovQuery(uint64(m.TickIndex)) + return len(dAtA) - i, nil +} + +func (m *QuerySimulateCancelLimitOrderResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - if m.Fee != 0 { - n += 1 + sovQuery(uint64(m.Fee)) + return dAtA[:n], nil +} + +func (m *QuerySimulateCancelLimitOrderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySimulateCancelLimitOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Resp != nil { + { + size, err := m.Resp.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *QueryPoolByIDRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QuerySimulateMultiHopSwapRequest) 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 *QuerySimulateMultiHopSwapRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySimulateMultiHopSwapRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.PoolId != 0 { - n += 1 + sovQuery(uint64(m.PoolId)) + if m.Msg != nil { + { + size, err := m.Msg.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *QueryPoolResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QuerySimulateMultiHopSwapResponse) 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 *QuerySimulateMultiHopSwapResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySimulateMultiHopSwapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.Pool != nil { - l = m.Pool.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.Resp != nil { + { + size, err := m.Resp.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *QueryGetPoolMetadataRequest) Size() (n int) { +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 - if m.Id != 0 { - n += 1 + sovQuery(uint64(m.Id)) - } return n } -func (m *QueryGetPoolMetadataResponse) Size() (n int) { +func (m *QueryParamsResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.PoolMetadata.Size() + l = m.Params.Size() n += 1 + l + sovQuery(uint64(l)) return n } -func (m *QueryAllPoolMetadataRequest) Size() (n int) { +func (m *QueryGetLimitOrderTrancheUserRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Pagination != nil { - l = m.Pagination.Size() + l = len(m.Address) + if l > 0 { n += 1 + l + sovQuery(uint64(l)) } + l = len(m.TrancheKey) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.CalcWithdrawableShares { + n += 2 + } return n } -func (m *QueryAllPoolMetadataResponse) Size() (n int) { +func (m *QueryGetLimitOrderTrancheUserResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.PoolMetadata) > 0 { - for _, e := range m.PoolMetadata { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.LimitOrderTrancheUser != nil { + l = m.LimitOrderTrancheUser.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.WithdrawableShares != nil { + l = m.WithdrawableShares.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllLimitOrderTrancheUserRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllLimitOrderTrancheUserResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.LimitOrderTrancheUser) > 0 { + for _, e := range m.LimitOrderTrancheUser { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetLimitOrderTrancheRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PairId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.TickIndex != 0 { + n += 1 + sovQuery(uint64(m.TickIndex)) + } + l = len(m.TokenIn) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.TrancheKey) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetLimitOrderTrancheResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.LimitOrderTranche != nil { + l = m.LimitOrderTranche.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllLimitOrderTrancheRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PairId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.TokenIn) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllLimitOrderTrancheResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.LimitOrderTranche) > 0 { + for _, e := range m.LimitOrderTranche { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllUserDepositsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.IncludePoolData { + n += 2 + } + return n +} + +func (m *QueryAllUserDepositsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Deposits) > 0 { + for _, e := range m.Deposits { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllLimitOrderTrancheUserByAddressRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllLimitOrderTrancheUserByAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.LimitOrders) > 0 { + for _, e := range m.LimitOrders { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllTickLiquidityRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PairId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.TokenIn) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllTickLiquidityResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.TickLiquidity) > 0 { + for _, e := range m.TickLiquidity { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetInactiveLimitOrderTrancheRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PairId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.TokenIn) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.TickIndex != 0 { + n += 1 + sovQuery(uint64(m.TickIndex)) + } + l = len(m.TrancheKey) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetInactiveLimitOrderTrancheResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.InactiveLimitOrderTranche != nil { + l = m.InactiveLimitOrderTranche.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllInactiveLimitOrderTrancheRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllInactiveLimitOrderTrancheResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.InactiveLimitOrderTranche) > 0 { + for _, e := range m.InactiveLimitOrderTranche { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllPoolReservesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PairId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.TokenIn) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllPoolReservesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.PoolReserves) > 0 { + for _, e := range m.PoolReserves { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetPoolReservesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PairId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.TokenIn) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.TickIndex != 0 { + n += 1 + sovQuery(uint64(m.TickIndex)) + } + if m.Fee != 0 { + n += 1 + sovQuery(uint64(m.Fee)) + } + return n +} + +func (m *QueryGetPoolReservesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolReserves != nil { + l = m.PoolReserves.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryEstimateMultiHopSwapRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.Routes) > 0 { + for _, e := range m.Routes { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + l = m.AmountIn.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.ExitLimitPrice.Size() + n += 1 + l + sovQuery(uint64(l)) + if m.PickBestRoute { + n += 2 + } + return n +} + +func (m *QueryEstimateMultiHopSwapResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.CoinOut.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryEstimatePlaceLimitOrderRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.TokenIn) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.TokenOut) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.TickIndexInToOut != 0 { + n += 1 + sovQuery(uint64(m.TickIndexInToOut)) + } + l = m.AmountIn.Size() + n += 1 + l + sovQuery(uint64(l)) + if m.OrderType != 0 { + n += 1 + sovQuery(uint64(m.OrderType)) + } + if m.ExpirationTime != nil { + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.ExpirationTime) + n += 1 + l + sovQuery(uint64(l)) + } + if m.MaxAmountOut != nil { + l = m.MaxAmountOut.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryEstimatePlaceLimitOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.TotalInCoin.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.SwapInCoin.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.SwapOutCoin.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryPoolRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PairId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.TickIndex != 0 { + n += 1 + sovQuery(uint64(m.TickIndex)) + } + if m.Fee != 0 { + n += 1 + sovQuery(uint64(m.Fee)) + } + return n +} + +func (m *QueryPoolByIDRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolId != 0 { + n += 1 + sovQuery(uint64(m.PoolId)) + } + return n +} + +func (m *QueryPoolResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pool != nil { + l = m.Pool.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetPoolMetadataRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuery(uint64(m.Id)) + } + return n +} + +func (m *QueryGetPoolMetadataResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.PoolMetadata.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAllPoolMetadataRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllPoolMetadataResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.PoolMetadata) > 0 { + for _, e := range m.PoolMetadata { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySimulateDepositRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Msg != nil { + l = m.Msg.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySimulateDepositResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Resp != nil { + l = m.Resp.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySimulateWithdrawalRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Msg != nil { + l = m.Msg.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySimulateWithdrawalResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Resp != nil { + l = m.Resp.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySimulatePlaceLimitOrderRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Msg != nil { + l = m.Msg.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySimulatePlaceLimitOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Resp != nil { + l = m.Resp.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySimulateWithdrawFilledLimitOrderRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Msg != nil { + l = m.Msg.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySimulateWithdrawFilledLimitOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Resp != nil { + l = m.Resp.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySimulateCancelLimitOrderRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Msg != nil { + l = m.Msg.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySimulateCancelLimitOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Resp != nil { + l = m.Resp.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySimulateMultiHopSwapRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Msg != nil { + l = m.Msg.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySimulateMultiHopSwapResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Resp != nil { + l = m.Resp.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 *QueryGetLimitOrderTrancheUserRequest) 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: QueryGetLimitOrderTrancheUserRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetLimitOrderTrancheUserRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", 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 + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TrancheKey", 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 + } + m.TrancheKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CalcWithdrawableShares", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CalcWithdrawableShares = bool(v != 0) + 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 *QueryGetLimitOrderTrancheUserResponse) 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: QueryGetLimitOrderTrancheUserResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetLimitOrderTrancheUserResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LimitOrderTrancheUser", 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 m.LimitOrderTrancheUser == nil { + m.LimitOrderTrancheUser = &LimitOrderTrancheUser{} + } + if err := m.LimitOrderTrancheUser.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WithdrawableShares", 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 + } + var v cosmossdk_io_math.Int + m.WithdrawableShares = &v + if err := m.WithdrawableShares.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 *QueryAllLimitOrderTrancheUserRequest) 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: QueryAllLimitOrderTrancheUserRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllLimitOrderTrancheUserRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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 m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.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 *QueryAllLimitOrderTrancheUserResponse) 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: QueryAllLimitOrderTrancheUserResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllLimitOrderTrancheUserResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LimitOrderTrancheUser", 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.LimitOrderTrancheUser = append(m.LimitOrderTrancheUser, &LimitOrderTrancheUser{}) + if err := m.LimitOrderTrancheUser[len(m.LimitOrderTrancheUser)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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 m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.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 *QueryGetLimitOrderTrancheRequest) 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: QueryGetLimitOrderTrancheRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetLimitOrderTrancheRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PairId", 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 + } + m.PairId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TickIndex", wireType) + } + m.TickIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TickIndex |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenIn", 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 + } + m.TokenIn = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TrancheKey", 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 + } + m.TrancheKey = string(dAtA[iNdEx:postIndex]) + 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 *QueryGetLimitOrderTrancheResponse) 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: QueryGetLimitOrderTrancheResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetLimitOrderTrancheResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LimitOrderTranche", 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 m.LimitOrderTranche == nil { + m.LimitOrderTranche = &LimitOrderTranche{} + } + if err := m.LimitOrderTranche.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 *QueryAllLimitOrderTrancheRequest) 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: QueryAllLimitOrderTrancheRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllLimitOrderTrancheRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PairId", 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 + } + m.PairId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenIn", 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 + } + m.TokenIn = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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 m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.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 *QueryAllLimitOrderTrancheResponse) 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: QueryAllLimitOrderTrancheResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllLimitOrderTrancheResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LimitOrderTranche", 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.LimitOrderTranche = append(m.LimitOrderTranche, &LimitOrderTranche{}) + if err := m.LimitOrderTranche[len(m.LimitOrderTranche)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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 m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.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 m.Pagination != nil { - l = m.Pagination.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)))) + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAllUserDepositsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5053,12 +7551,100 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllUserDepositsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllUserDepositsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", 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 + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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 m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IncludePoolData", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IncludePoolData = bool(v != 0) default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -5080,7 +7666,7 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllUserDepositsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5103,15 +7689,15 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllUserDepositsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllUserDepositsResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Deposits", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5138,7 +7724,44 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Deposits = append(m.Deposits, &DepositRecord{}) + if err := m.Deposits[len(m.Deposits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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 m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5163,7 +7786,7 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetLimitOrderTrancheUserRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAllLimitOrderTrancheUserByAddressRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5186,10 +7809,10 @@ func (m *QueryGetLimitOrderTrancheUserRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetLimitOrderTrancheUserRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllLimitOrderTrancheUserByAddressRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetLimitOrderTrancheUserRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllLimitOrderTrancheUserByAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5226,41 +7849,9 @@ func (m *QueryGetLimitOrderTrancheUserRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TrancheKey", 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 - } - m.TrancheKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CalcWithdrawableShares", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5270,12 +7861,28 @@ func (m *QueryGetLimitOrderTrancheUserRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.CalcWithdrawableShares = bool(v != 0) + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -5297,7 +7904,7 @@ func (m *QueryGetLimitOrderTrancheUserRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetLimitOrderTrancheUserResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllLimitOrderTrancheUserByAddressResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5320,15 +7927,15 @@ func (m *QueryGetLimitOrderTrancheUserResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetLimitOrderTrancheUserResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllLimitOrderTrancheUserByAddressResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetLimitOrderTrancheUserResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllLimitOrderTrancheUserByAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LimitOrderTrancheUser", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LimitOrders", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5355,18 +7962,16 @@ func (m *QueryGetLimitOrderTrancheUserResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.LimitOrderTrancheUser == nil { - m.LimitOrderTrancheUser = &LimitOrderTrancheUser{} - } - if err := m.LimitOrderTrancheUser.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.LimitOrders = append(m.LimitOrders, &LimitOrderTrancheUser{}) + if err := m.LimitOrders[len(m.LimitOrders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WithdrawableShares", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5376,25 +7981,25 @@ func (m *QueryGetLimitOrderTrancheUserResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - var v cosmossdk_io_math.Int - m.WithdrawableShares = &v - if err := m.WithdrawableShares.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5419,7 +8024,7 @@ func (m *QueryGetLimitOrderTrancheUserResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllLimitOrderTrancheUserRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAllTickLiquidityRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5442,13 +8047,77 @@ func (m *QueryAllLimitOrderTrancheUserRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllLimitOrderTrancheUserRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllTickLiquidityRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllLimitOrderTrancheUserRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllTickLiquidityRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PairId", 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 + } + m.PairId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenIn", 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 + } + m.TokenIn = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } @@ -5505,7 +8174,7 @@ func (m *QueryAllLimitOrderTrancheUserRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllLimitOrderTrancheUserResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllTickLiquidityResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5528,15 +8197,15 @@ func (m *QueryAllLimitOrderTrancheUserResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllLimitOrderTrancheUserResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllTickLiquidityResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllLimitOrderTrancheUserResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllTickLiquidityResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LimitOrderTrancheUser", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TickLiquidity", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5563,8 +8232,8 @@ func (m *QueryAllLimitOrderTrancheUserResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.LimitOrderTrancheUser = append(m.LimitOrderTrancheUser, &LimitOrderTrancheUser{}) - if err := m.LimitOrderTrancheUser[len(m.LimitOrderTrancheUser)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.TickLiquidity = append(m.TickLiquidity, &TickLiquidity{}) + if err := m.TickLiquidity[len(m.TickLiquidity)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5625,7 +8294,7 @@ func (m *QueryAllLimitOrderTrancheUserResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetLimitOrderTrancheRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGetInactiveLimitOrderTrancheRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5648,10 +8317,10 @@ func (m *QueryGetLimitOrderTrancheRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetLimitOrderTrancheRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetInactiveLimitOrderTrancheRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetLimitOrderTrancheRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetInactiveLimitOrderTrancheRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5687,6 +8356,38 @@ func (m *QueryGetLimitOrderTrancheRequest) Unmarshal(dAtA []byte) error { m.PairId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenIn", 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 + } + m.TokenIn = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TickIndex", wireType) } @@ -5705,11 +8406,93 @@ func (m *QueryGetLimitOrderTrancheRequest) Unmarshal(dAtA []byte) error { break } } - case 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenIn", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TrancheKey", 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 + } + m.TrancheKey = string(dAtA[iNdEx:postIndex]) + 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 *QueryGetInactiveLimitOrderTrancheResponse) 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: QueryGetInactiveLimitOrderTrancheResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetInactiveLimitOrderTrancheResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InactiveLimitOrderTranche", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5719,29 +8502,83 @@ func (m *QueryGetLimitOrderTrancheRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.TokenIn = string(dAtA[iNdEx:postIndex]) + if m.InactiveLimitOrderTranche == nil { + m.InactiveLimitOrderTranche = &LimitOrderTranche{} + } + if err := m.InactiveLimitOrderTranche.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 4: + 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 *QueryAllInactiveLimitOrderTrancheRequest) 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: QueryAllInactiveLimitOrderTrancheRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllInactiveLimitOrderTrancheRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TrancheKey", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5751,23 +8588,27 @@ func (m *QueryGetLimitOrderTrancheRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.TrancheKey = string(dAtA[iNdEx:postIndex]) + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -5790,7 +8631,7 @@ func (m *QueryGetLimitOrderTrancheRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetLimitOrderTrancheResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllInactiveLimitOrderTrancheResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5813,15 +8654,15 @@ func (m *QueryGetLimitOrderTrancheResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetLimitOrderTrancheResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllInactiveLimitOrderTrancheResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetLimitOrderTrancheResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllInactiveLimitOrderTrancheResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LimitOrderTranche", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field InactiveLimitOrderTranche", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5848,10 +8689,44 @@ func (m *QueryGetLimitOrderTrancheResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.LimitOrderTranche == nil { - m.LimitOrderTranche = &LimitOrderTranche{} + m.InactiveLimitOrderTranche = append(m.InactiveLimitOrderTranche, &LimitOrderTranche{}) + if err := m.InactiveLimitOrderTranche[len(m.InactiveLimitOrderTranche)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - if err := m.LimitOrderTranche.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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 m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5876,7 +8751,7 @@ func (m *QueryGetLimitOrderTrancheResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllLimitOrderTrancheRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAllPoolReservesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5899,10 +8774,10 @@ func (m *QueryAllLimitOrderTrancheRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllLimitOrderTrancheRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllPoolReservesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllLimitOrderTrancheRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllPoolReservesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -6026,7 +8901,7 @@ func (m *QueryAllLimitOrderTrancheRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllLimitOrderTrancheResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllPoolReservesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6049,15 +8924,15 @@ func (m *QueryAllLimitOrderTrancheResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllLimitOrderTrancheResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllPoolReservesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllLimitOrderTrancheResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllPoolReservesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LimitOrderTranche", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PoolReserves", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6084,8 +8959,8 @@ func (m *QueryAllLimitOrderTrancheResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.LimitOrderTranche = append(m.LimitOrderTranche, &LimitOrderTranche{}) - if err := m.LimitOrderTranche[len(m.LimitOrderTranche)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.PoolReserves = append(m.PoolReserves, &PoolReserves{}) + if err := m.PoolReserves[len(m.PoolReserves)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6146,7 +9021,7 @@ func (m *QueryAllLimitOrderTrancheResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllUserDepositsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGetPoolReservesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6169,15 +9044,15 @@ func (m *QueryAllUserDepositsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllUserDepositsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetPoolReservesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllUserDepositsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetPoolReservesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PairId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6205,13 +9080,13 @@ func (m *QueryAllUserDepositsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.PairId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TokenIn", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6221,33 +9096,29 @@ func (m *QueryAllUserDepositsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.TokenIn = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludePoolData", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TickIndex", wireType) } - var v int + m.TickIndex = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6257,12 +9128,30 @@ func (m *QueryAllUserDepositsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.TickIndex |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + } + m.Fee = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Fee |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.IncludePoolData = bool(v != 0) default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -6284,72 +9173,38 @@ func (m *QueryAllUserDepositsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllUserDepositsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryGetPoolReservesResponse) 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: QueryAllUserDepositsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllUserDepositsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deposits", 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 shift >= 64 { + return ErrIntOverflowQuery } - if postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - m.Deposits = append(m.Deposits, &DepositRecord{}) - if err := m.Deposits[len(m.Deposits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex - case 2: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetPoolReservesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetPoolReservesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PoolReserves", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6376,10 +9231,10 @@ func (m *QueryAllUserDepositsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} + if m.PoolReserves == nil { + m.PoolReserves = &PoolReserves{} } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.PoolReserves.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6404,7 +9259,7 @@ func (m *QueryAllUserDepositsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllLimitOrderTrancheUserByAddressRequest) Unmarshal(dAtA []byte) error { +func (m *QueryEstimateMultiHopSwapRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6427,15 +9282,15 @@ func (m *QueryAllLimitOrderTrancheUserByAddressRequest) Unmarshal(dAtA []byte) e fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllLimitOrderTrancheUserByAddressRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryEstimateMultiHopSwapRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllLimitOrderTrancheUserByAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryEstimateMultiHopSwapRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6463,13 +9318,13 @@ func (m *QueryAllLimitOrderTrancheUserByAddressRequest) Unmarshal(dAtA []byte) e if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6479,83 +9334,63 @@ func (m *QueryAllLimitOrderTrancheUserByAddressRequest) Unmarshal(dAtA []byte) e } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Receiver = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Routes", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery + 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 (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + if msglen < 0 { + return ErrInvalidLengthQuery } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllLimitOrderTrancheUserByAddressResponse) 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 + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.Routes = append(m.Routes, &MultiHopRoute{}) + if err := m.Routes[len(m.Routes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllLimitOrderTrancheUserByAddressResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllLimitOrderTrancheUserByAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LimitOrders", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AmountIn", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6565,31 +9400,31 @@ func (m *QueryAllLimitOrderTrancheUserByAddressResponse) Unmarshal(dAtA []byte) } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.LimitOrders = append(m.LimitOrders, &LimitOrderTrancheUser{}) - if err := m.LimitOrders[len(m.LimitOrders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.AmountIn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExitLimitPrice", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6599,28 +9434,46 @@ func (m *QueryAllLimitOrderTrancheUserByAddressResponse) Unmarshal(dAtA []byte) } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ExitLimitPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PickBestRoute", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PickBestRoute = bool(v != 0) default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -6642,7 +9495,7 @@ func (m *QueryAllLimitOrderTrancheUserByAddressResponse) Unmarshal(dAtA []byte) } return nil } -func (m *QueryAllTickLiquidityRequest) Unmarshal(dAtA []byte) error { +func (m *QueryEstimateMultiHopSwapResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6665,79 +9518,15 @@ func (m *QueryAllTickLiquidityRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllTickLiquidityRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryEstimateMultiHopSwapResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllTickLiquidityRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryEstimateMultiHopSwapResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PairId", 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 - } - m.PairId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenIn", 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 - } - m.TokenIn = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CoinOut", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6764,10 +9553,7 @@ func (m *QueryAllTickLiquidityRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.CoinOut.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6792,7 +9578,7 @@ func (m *QueryAllTickLiquidityRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllTickLiquidityResponse) Unmarshal(dAtA []byte) error { +func (m *QueryEstimatePlaceLimitOrderRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6815,17 +9601,17 @@ func (m *QueryAllTickLiquidityResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllTickLiquidityResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryEstimatePlaceLimitOrderRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllTickLiquidityResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryEstimatePlaceLimitOrderRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TickLiquidity", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6835,31 +9621,29 @@ func (m *QueryAllTickLiquidityResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.TickLiquidity = append(m.TickLiquidity, &TickLiquidity{}) - if err := m.TickLiquidity[len(m.TickLiquidity)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6869,81 +9653,27 @@ func (m *QueryAllTickLiquidityResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Receiver = string(dAtA[iNdEx:postIndex]) 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 *QueryGetInactiveLimitOrderTrancheRequest) 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: QueryGetInactiveLimitOrderTrancheRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetInactiveLimitOrderTrancheRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PairId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TokenIn", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6971,11 +9701,11 @@ func (m *QueryGetInactiveLimitOrderTrancheRequest) Unmarshal(dAtA []byte) error if postIndex > l { return io.ErrUnexpectedEOF } - m.PairId = string(dAtA[iNdEx:postIndex]) + m.TokenIn = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenIn", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TokenOut", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7003,13 +9733,13 @@ func (m *QueryGetInactiveLimitOrderTrancheRequest) Unmarshal(dAtA []byte) error if postIndex > l { return io.ErrUnexpectedEOF } - m.TokenIn = string(dAtA[iNdEx:postIndex]) + m.TokenOut = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TickIndex", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TickIndexInToOut", wireType) } - m.TickIndex = 0 + m.TickIndexInToOut = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -7019,14 +9749,14 @@ func (m *QueryGetInactiveLimitOrderTrancheRequest) Unmarshal(dAtA []byte) error } b := dAtA[iNdEx] iNdEx++ - m.TickIndex |= int64(b&0x7F) << shift + m.TickIndexInToOut |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 4: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TrancheKey", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AmountIn", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7054,61 +9784,32 @@ func (m *QueryGetInactiveLimitOrderTrancheRequest) Unmarshal(dAtA []byte) error if postIndex > l { return io.ErrUnexpectedEOF } - m.TrancheKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { + if err := m.AmountIn.Unmarshal(dAtA[iNdEx:postIndex]); 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 *QueryGetInactiveLimitOrderTrancheResponse) 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 + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderType", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.OrderType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OrderType |= LimitOrderType(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetInactiveLimitOrderTrancheResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetInactiveLimitOrderTrancheResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InactiveLimitOrderTranche", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExpirationTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7135,68 +9836,18 @@ func (m *QueryGetInactiveLimitOrderTrancheResponse) Unmarshal(dAtA []byte) error if postIndex > l { return io.ErrUnexpectedEOF } - if m.InactiveLimitOrderTranche == nil { - m.InactiveLimitOrderTranche = &LimitOrderTranche{} + if m.ExpirationTime == nil { + m.ExpirationTime = new(time.Time) } - if err := m.InactiveLimitOrderTranche.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.ExpirationTime, 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 *QueryAllInactiveLimitOrderTrancheRequest) 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: QueryAllInactiveLimitOrderTrancheRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllInactiveLimitOrderTrancheRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MaxAmountOut", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -7206,25 +9857,25 @@ func (m *QueryAllInactiveLimitOrderTrancheRequest) Unmarshal(dAtA []byte) error } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + var v cosmossdk_io_math.Int + m.MaxAmountOut = &v + if err := m.MaxAmountOut.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -7249,7 +9900,7 @@ func (m *QueryAllInactiveLimitOrderTrancheRequest) Unmarshal(dAtA []byte) error } return nil } -func (m *QueryAllInactiveLimitOrderTrancheResponse) Unmarshal(dAtA []byte) error { +func (m *QueryEstimatePlaceLimitOrderResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7272,15 +9923,15 @@ func (m *QueryAllInactiveLimitOrderTrancheResponse) Unmarshal(dAtA []byte) error fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllInactiveLimitOrderTrancheResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryEstimatePlaceLimitOrderResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllInactiveLimitOrderTrancheResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryEstimatePlaceLimitOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InactiveLimitOrderTranche", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TotalInCoin", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7307,14 +9958,13 @@ func (m *QueryAllInactiveLimitOrderTrancheResponse) Unmarshal(dAtA []byte) error if postIndex > l { return io.ErrUnexpectedEOF } - m.InactiveLimitOrderTranche = append(m.InactiveLimitOrderTranche, &LimitOrderTranche{}) - if err := m.InactiveLimitOrderTranche[len(m.InactiveLimitOrderTranche)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.TotalInCoin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SwapInCoin", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7341,10 +9991,40 @@ func (m *QueryAllInactiveLimitOrderTrancheResponse) Unmarshal(dAtA []byte) error if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} + if err := m.SwapInCoin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SwapOutCoin", 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.SwapOutCoin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -7369,7 +10049,7 @@ func (m *QueryAllInactiveLimitOrderTrancheResponse) Unmarshal(dAtA []byte) error } return nil } -func (m *QueryAllPoolReservesRequest) Unmarshal(dAtA []byte) error { +func (m *QueryPoolRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7392,10 +10072,10 @@ func (m *QueryAllPoolReservesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllPoolReservesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryPoolRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllPoolReservesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryPoolRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -7431,10 +10111,10 @@ func (m *QueryAllPoolReservesRequest) Unmarshal(dAtA []byte) error { m.PairId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenIn", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TickIndex", wireType) } - var stringLen uint64 + m.TickIndex = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -7444,29 +10124,16 @@ func (m *QueryAllPoolReservesRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.TickIndex |= int64(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 - } - m.TokenIn = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) } - var msglen int + m.Fee = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -7476,28 +10143,11 @@ func (m *QueryAllPoolReservesRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Fee |= uint64(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 m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -7519,7 +10169,7 @@ func (m *QueryAllPoolReservesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllPoolReservesResponse) Unmarshal(dAtA []byte) error { +func (m *QueryPoolByIDRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7542,17 +10192,17 @@ func (m *QueryAllPoolReservesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllPoolReservesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryPoolByIDRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllPoolReservesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryPoolByIDRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PoolReserves", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) } - var msglen int + m.PoolId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -7562,29 +10212,64 @@ func (m *QueryAllPoolReservesResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.PoolId |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthQuery + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.PoolReserves = append(m.PoolReserves, &PoolReserves{}) - if err := m.PoolReserves[len(m.PoolReserves)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryPoolResponse) 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 } - iNdEx = postIndex - case 2: + 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: QueryPoolResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPoolResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7611,13 +10296,82 @@ func (m *QueryAllPoolReservesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} + if m.Pool == nil { + m.Pool = &Pool{} } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Pool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { return err } - iNdEx = postIndex + 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 *QueryGetPoolMetadataRequest) 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: QueryGetPoolMetadataRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetPoolMetadataRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -7639,7 +10393,7 @@ func (m *QueryAllPoolReservesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetPoolReservesRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGetPoolMetadataResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7662,17 +10416,17 @@ func (m *QueryGetPoolReservesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetPoolReservesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetPoolMetadataResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetPoolReservesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetPoolMetadataResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PairId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PoolMetadata", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -7682,94 +10436,25 @@ func (m *QueryGetPoolReservesRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.PairId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenIn", 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.PoolMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.TokenIn = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TickIndex", wireType) - } - m.TickIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TickIndex |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) - } - m.Fee = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Fee |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -7791,7 +10476,7 @@ func (m *QueryGetPoolReservesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetPoolReservesResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllPoolMetadataRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7814,15 +10499,15 @@ func (m *QueryGetPoolReservesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetPoolReservesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllPoolMetadataRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetPoolReservesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllPoolMetadataRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PoolReserves", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7849,10 +10534,10 @@ func (m *QueryGetPoolReservesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.PoolReserves == nil { - m.PoolReserves = &PoolReserves{} + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} } - if err := m.PoolReserves.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -7877,7 +10562,7 @@ func (m *QueryGetPoolReservesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryEstimateMultiHopSwapRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAllPoolMetadataResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7900,79 +10585,15 @@ func (m *QueryEstimateMultiHopSwapRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryEstimateMultiHopSwapRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllPoolMetadataResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryEstimateMultiHopSwapRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllPoolMetadataResponse: 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 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 - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Receiver", 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 - } - m.Receiver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Routes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PoolMetadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7999,50 +10620,16 @@ func (m *QueryEstimateMultiHopSwapRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Routes = append(m.Routes, &MultiHopRoute{}) - if err := m.Routes[len(m.Routes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AmountIn", 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.AmountIn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.PoolMetadata = append(m.PoolMetadata, PoolMetadata{}) + if err := m.PoolMetadata[len(m.PoolMetadata)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 5: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExitLimitPrice", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -8052,46 +10639,28 @@ func (m *QueryEstimateMultiHopSwapRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ExitLimitPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PickBestRoute", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} } - m.PickBestRoute = bool(v != 0) + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -8113,7 +10682,7 @@ func (m *QueryEstimateMultiHopSwapRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryEstimateMultiHopSwapResponse) Unmarshal(dAtA []byte) error { +func (m *QuerySimulateDepositRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8136,15 +10705,15 @@ func (m *QueryEstimateMultiHopSwapResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryEstimateMultiHopSwapResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySimulateDepositRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryEstimateMultiHopSwapResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySimulateDepositRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CoinOut", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8171,7 +10740,10 @@ func (m *QueryEstimateMultiHopSwapResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.CoinOut.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Msg == nil { + m.Msg = &MsgDeposit{} + } + if err := m.Msg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -8196,7 +10768,7 @@ func (m *QueryEstimateMultiHopSwapResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryEstimatePlaceLimitOrderRequest) Unmarshal(dAtA []byte) error { +func (m *QuerySimulateDepositResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8219,81 +10791,17 @@ func (m *QueryEstimatePlaceLimitOrderRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryEstimatePlaceLimitOrderRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySimulateDepositResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryEstimatePlaceLimitOrderRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySimulateDepositResponse: 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 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 - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Receiver", 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 - } - m.Receiver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenIn", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Resp", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -8303,169 +10811,83 @@ func (m *QueryEstimatePlaceLimitOrderRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.TokenIn = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenOut", 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 m.Resp == nil { + m.Resp = &MsgDepositResponse{} } - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.Resp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.TokenOut = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TickIndexInToOut", wireType) - } - m.TickIndexInToOut = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TickIndexInToOut |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AmountIn", 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 + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if err := m.AmountIn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OrderType", wireType) - } - m.OrderType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.OrderType |= LimitOrderType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpirationTime", 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 + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySimulateWithdrawalRequest) 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 postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - if m.ExpirationTime == nil { - m.ExpirationTime = new(time.Time) - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.ExpirationTime, dAtA[iNdEx:postIndex]); err != nil { - return err + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex - case 9: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySimulateWithdrawalRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySimulateWithdrawalRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxAmountOut", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -8475,25 +10897,25 @@ func (m *QueryEstimatePlaceLimitOrderRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - var v cosmossdk_io_math.Int - m.MaxAmountOut = &v - if err := m.MaxAmountOut.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Msg == nil { + m.Msg = &MsgWithdrawal{} + } + if err := m.Msg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -8518,7 +10940,7 @@ func (m *QueryEstimatePlaceLimitOrderRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryEstimatePlaceLimitOrderResponse) Unmarshal(dAtA []byte) error { +func (m *QuerySimulateWithdrawalResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8541,15 +10963,15 @@ func (m *QueryEstimatePlaceLimitOrderResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryEstimatePlaceLimitOrderResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySimulateWithdrawalResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryEstimatePlaceLimitOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySimulateWithdrawalResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalInCoin", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Resp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8576,46 +10998,66 @@ func (m *QueryEstimatePlaceLimitOrderResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.TotalInCoin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Resp == nil { + m.Resp = &MsgWithdrawalResponse{} + } + if err := m.Resp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapInCoin", 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 - } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err } - if msglen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - if postIndex > l { + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySimulatePlaceLimitOrderRequest) 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 } - if err := m.SwapInCoin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex - case 3: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySimulatePlaceLimitOrderRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySimulatePlaceLimitOrderRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapOutCoin", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8642,7 +11084,10 @@ func (m *QueryEstimatePlaceLimitOrderResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.SwapOutCoin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Msg == nil { + m.Msg = &MsgPlaceLimitOrder{} + } + if err := m.Msg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -8667,7 +11112,7 @@ func (m *QueryEstimatePlaceLimitOrderResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryPoolRequest) Unmarshal(dAtA []byte) error { +func (m *QuerySimulatePlaceLimitOrderResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8690,17 +11135,17 @@ func (m *QueryPoolRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryPoolRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySimulatePlaceLimitOrderResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryPoolRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySimulatePlaceLimitOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PairId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Resp", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -8710,62 +11155,28 @@ func (m *QueryPoolRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.PairId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TickIndex", wireType) - } - m.TickIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TickIndex |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + if m.Resp == nil { + m.Resp = &MsgPlaceLimitOrderResponse{} } - m.Fee = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Fee |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if err := m.Resp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -8787,7 +11198,7 @@ func (m *QueryPoolRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryPoolByIDRequest) Unmarshal(dAtA []byte) error { +func (m *QuerySimulateWithdrawFilledLimitOrderRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8810,17 +11221,17 @@ func (m *QueryPoolByIDRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryPoolByIDRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySimulateWithdrawFilledLimitOrderRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryPoolByIDRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySimulateWithdrawFilledLimitOrderRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) } - m.PoolId = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -8830,11 +11241,28 @@ func (m *QueryPoolByIDRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PoolId |= uint64(b&0x7F) << shift + 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 m.Msg == nil { + m.Msg = &MsgWithdrawFilledLimitOrder{} + } + if err := m.Msg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -8856,7 +11284,7 @@ func (m *QueryPoolByIDRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryPoolResponse) Unmarshal(dAtA []byte) error { +func (m *QuerySimulateWithdrawFilledLimitOrderResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8879,15 +11307,15 @@ func (m *QueryPoolResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryPoolResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySimulateWithdrawFilledLimitOrderResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryPoolResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySimulateWithdrawFilledLimitOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Resp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8914,10 +11342,10 @@ func (m *QueryPoolResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pool == nil { - m.Pool = &Pool{} + if m.Resp == nil { + m.Resp = &MsgWithdrawFilledLimitOrderResponse{} } - if err := m.Pool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Resp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -8942,7 +11370,7 @@ func (m *QueryPoolResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetPoolMetadataRequest) Unmarshal(dAtA []byte) error { +func (m *QuerySimulateCancelLimitOrderRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8965,17 +11393,17 @@ func (m *QueryGetPoolMetadataRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetPoolMetadataRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySimulateCancelLimitOrderRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetPoolMetadataRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySimulateCancelLimitOrderRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) } - m.Id = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -8985,11 +11413,28 @@ func (m *QueryGetPoolMetadataRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Id |= uint64(b&0x7F) << shift + 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 m.Msg == nil { + m.Msg = &MsgCancelLimitOrder{} + } + if err := m.Msg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -9011,7 +11456,7 @@ func (m *QueryGetPoolMetadataRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetPoolMetadataResponse) Unmarshal(dAtA []byte) error { +func (m *QuerySimulateCancelLimitOrderResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9034,15 +11479,15 @@ func (m *QueryGetPoolMetadataResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetPoolMetadataResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySimulateCancelLimitOrderResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetPoolMetadataResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySimulateCancelLimitOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PoolMetadata", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Resp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9069,7 +11514,10 @@ func (m *QueryGetPoolMetadataResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.PoolMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Resp == nil { + m.Resp = &MsgCancelLimitOrderResponse{} + } + if err := m.Resp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -9094,7 +11542,7 @@ func (m *QueryGetPoolMetadataResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllPoolMetadataRequest) Unmarshal(dAtA []byte) error { +func (m *QuerySimulateMultiHopSwapRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9117,15 +11565,15 @@ func (m *QueryAllPoolMetadataRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllPoolMetadataRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySimulateMultiHopSwapRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllPoolMetadataRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySimulateMultiHopSwapRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9152,10 +11600,10 @@ func (m *QueryAllPoolMetadataRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} + if m.Msg == nil { + m.Msg = &MsgMultiHopSwap{} } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Msg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -9180,7 +11628,7 @@ func (m *QueryAllPoolMetadataRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllPoolMetadataResponse) Unmarshal(dAtA []byte) error { +func (m *QuerySimulateMultiHopSwapResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9203,49 +11651,15 @@ func (m *QueryAllPoolMetadataResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllPoolMetadataResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySimulateMultiHopSwapResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllPoolMetadataResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySimulateMultiHopSwapResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PoolMetadata", 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.PoolMetadata = append(m.PoolMetadata, PoolMetadata{}) - if err := m.PoolMetadata[len(m.PoolMetadata)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Resp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9272,10 +11686,10 @@ func (m *QueryAllPoolMetadataResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} + if m.Resp == nil { + m.Resp = &MsgMultiHopSwapResponse{} } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Resp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/dex/types/query.pb.gw.go b/x/dex/types/query.pb.gw.go index d460afbaa..072db61b8 100644 --- a/x/dex/types/query.pb.gw.go +++ b/x/dex/types/query.pb.gw.go @@ -1473,6 +1473,222 @@ func local_request_Query_PoolMetadataAll_0(ctx context.Context, marshaler runtim } +var ( + filter_Query_SimulateDeposit_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_SimulateDeposit_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySimulateDepositRequest + 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_Query_SimulateDeposit_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SimulateDeposit(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_SimulateDeposit_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySimulateDepositRequest + 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_Query_SimulateDeposit_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SimulateDeposit(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_SimulateWithdrawal_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_SimulateWithdrawal_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySimulateWithdrawalRequest + 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_Query_SimulateWithdrawal_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SimulateWithdrawal(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_SimulateWithdrawal_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySimulateWithdrawalRequest + 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_Query_SimulateWithdrawal_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SimulateWithdrawal(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_SimulatePlaceLimitOrder_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_SimulatePlaceLimitOrder_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySimulatePlaceLimitOrderRequest + 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_Query_SimulatePlaceLimitOrder_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SimulatePlaceLimitOrder(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_SimulatePlaceLimitOrder_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySimulatePlaceLimitOrderRequest + 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_Query_SimulatePlaceLimitOrder_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SimulatePlaceLimitOrder(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_SimulateWithdrawFilledLimitOrder_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_SimulateWithdrawFilledLimitOrder_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySimulateWithdrawFilledLimitOrderRequest + 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_Query_SimulateWithdrawFilledLimitOrder_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SimulateWithdrawFilledLimitOrder(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_SimulateWithdrawFilledLimitOrder_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySimulateWithdrawFilledLimitOrderRequest + 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_Query_SimulateWithdrawFilledLimitOrder_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SimulateWithdrawFilledLimitOrder(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_SimulateCancelLimitOrder_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_SimulateCancelLimitOrder_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySimulateCancelLimitOrderRequest + 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_Query_SimulateCancelLimitOrder_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SimulateCancelLimitOrder(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_SimulateCancelLimitOrder_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySimulateCancelLimitOrderRequest + 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_Query_SimulateCancelLimitOrder_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SimulateCancelLimitOrder(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_SimulateMultiHopSwap_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_SimulateMultiHopSwap_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySimulateMultiHopSwapRequest + 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_Query_SimulateMultiHopSwap_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SimulateMultiHopSwap(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_SimulateMultiHopSwap_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySimulateMultiHopSwapRequest + 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_Query_SimulateMultiHopSwap_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SimulateMultiHopSwap(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. @@ -1939,6 +2155,144 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_SimulateDeposit_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_SimulateDeposit_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_SimulateDeposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SimulateWithdrawal_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_SimulateWithdrawal_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_SimulateWithdrawal_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SimulatePlaceLimitOrder_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_SimulatePlaceLimitOrder_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_SimulatePlaceLimitOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SimulateWithdrawFilledLimitOrder_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_SimulateWithdrawFilledLimitOrder_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_SimulateWithdrawFilledLimitOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SimulateCancelLimitOrder_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_SimulateCancelLimitOrder_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_SimulateCancelLimitOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SimulateMultiHopSwap_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_SimulateMultiHopSwap_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_SimulateMultiHopSwap_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -2380,6 +2734,126 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_SimulateDeposit_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_SimulateDeposit_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_SimulateDeposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SimulateWithdrawal_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_SimulateWithdrawal_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_SimulateWithdrawal_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SimulatePlaceLimitOrder_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_SimulatePlaceLimitOrder_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_SimulatePlaceLimitOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SimulateWithdrawFilledLimitOrder_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_SimulateWithdrawFilledLimitOrder_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_SimulateWithdrawFilledLimitOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SimulateCancelLimitOrder_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_SimulateCancelLimitOrder_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_SimulateCancelLimitOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SimulateMultiHopSwap_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_SimulateMultiHopSwap_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_SimulateMultiHopSwap_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -2423,6 +2897,18 @@ var ( pattern_Query_PoolMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"neutron", "dex", "pool_metadata", "id"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_PoolMetadataAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"neutron", "dex", "pool_metadata"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_SimulateDeposit_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"neutron", "dex", "simulate_deposit"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_SimulateWithdrawal_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"neutron", "dex", "simulate_withdrawal"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_SimulatePlaceLimitOrder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"neutron", "dex", "simulate_place_limit_order"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_SimulateWithdrawFilledLimitOrder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"neutron", "dex", "simulate_withdraw_filled_limit_order"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_SimulateCancelLimitOrder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"neutron", "dex", "simulate_cancel_limit_order"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_SimulateMultiHopSwap_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"neutron", "dex", "pool_metadata"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -2465,4 +2951,16 @@ var ( forward_Query_PoolMetadata_0 = runtime.ForwardResponseMessage forward_Query_PoolMetadataAll_0 = runtime.ForwardResponseMessage + + forward_Query_SimulateDeposit_0 = runtime.ForwardResponseMessage + + forward_Query_SimulateWithdrawal_0 = runtime.ForwardResponseMessage + + forward_Query_SimulatePlaceLimitOrder_0 = runtime.ForwardResponseMessage + + forward_Query_SimulateWithdrawFilledLimitOrder_0 = runtime.ForwardResponseMessage + + forward_Query_SimulateCancelLimitOrder_0 = runtime.ForwardResponseMessage + + forward_Query_SimulateMultiHopSwap_0 = runtime.ForwardResponseMessage ) diff --git a/x/dex/types/trade_pair_id.go b/x/dex/types/trade_pair_id.go index 54b8469b6..565bd0185 100644 --- a/x/dex/types/trade_pair_id.go +++ b/x/dex/types/trade_pair_id.go @@ -68,7 +68,7 @@ func (p TradePairID) MustPairID() *PairID { } func (p TradePairID) PairID() (*PairID, error) { - return NewPairIDFromUnsorted(p.MakerDenom, p.TakerDenom) + return NewPairID(p.MakerDenom, p.TakerDenom) } func (p TradePairID) Reversed() *TradePairID { diff --git a/x/dex/types/tx.pb.go b/x/dex/types/tx.pb.go index 433e795c2..7d3ee51f3 100644 --- a/x/dex/types/tx.pb.go +++ b/x/dex/types/tx.pb.go @@ -272,9 +272,10 @@ func (m *FailedDeposit) GetError() string { } type MsgDepositResponse struct { - Reserve0Deposited []cosmossdk_io_math.Int `protobuf:"bytes,1,rep,name=reserve0_deposited,json=reserve0Deposited,proto3,customtype=cosmossdk.io/math.Int" json:"reserve0_deposited" yaml:"reserve0_deposited"` - Reserve1Deposited []cosmossdk_io_math.Int `protobuf:"bytes,2,rep,name=reserve1_deposited,json=reserve1Deposited,proto3,customtype=cosmossdk.io/math.Int" json:"reserve1_deposited" yaml:"reserve1_deposited"` - FailedDeposits []*FailedDeposit `protobuf:"bytes,3,rep,name=failed_deposits,json=failedDeposits,proto3" json:"failed_deposits,omitempty"` + Reserve0Deposited []cosmossdk_io_math.Int `protobuf:"bytes,1,rep,name=reserve0_deposited,json=reserve0Deposited,proto3,customtype=cosmossdk.io/math.Int" json:"reserve0_deposited" yaml:"reserve0_deposited"` + Reserve1Deposited []cosmossdk_io_math.Int `protobuf:"bytes,2,rep,name=reserve1_deposited,json=reserve1Deposited,proto3,customtype=cosmossdk.io/math.Int" json:"reserve1_deposited" yaml:"reserve1_deposited"` + FailedDeposits []*FailedDeposit `protobuf:"bytes,3,rep,name=failed_deposits,json=failedDeposits,proto3" json:"failed_deposits,omitempty"` + SharesIssued []github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,4,rep,name=shares_issued,json=sharesIssued,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"shares_issued" yaml:"shares_issued"` } func (m *MsgDepositResponse) Reset() { *m = MsgDepositResponse{} } @@ -403,6 +404,9 @@ func (m *MsgWithdrawal) GetFees() []uint64 { } type MsgWithdrawalResponse struct { + Reserve0Withdrawn cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=reserve0_withdrawn,json=reserve0Withdrawn,proto3,customtype=cosmossdk.io/math.Int" json:"reserve0_withdrawn" yaml:"reserve0_withdrawn"` + Reserve1Withdrawn cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=reserve1_withdrawn,json=reserve1Withdrawn,proto3,customtype=cosmossdk.io/math.Int" json:"reserve1_withdrawn" yaml:"reserve1_withdrawn"` + SharesBurned []github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,3,rep,name=shares_burned,json=sharesBurned,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"shares_burned" yaml:"shares_burned"` } func (m *MsgWithdrawalResponse) Reset() { *m = MsgWithdrawalResponse{} } @@ -545,6 +549,8 @@ type MsgPlaceLimitOrderResponse struct { // executing the limit order. It does not include any future proceeds from the // maker portion which will have withdrawn in the future TakerCoinOut github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,3,opt,name=taker_coin_out,json=takerCoinOut,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"taker_coin_out" yaml:"taker_coin_out"` + // Total amount of the token in that was immediately swapped for takerOutCoin + TakerCoinIn github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,4,opt,name=taker_coin_in,json=takerCoinIn,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"taker_coin_in" yaml:"taker_coin_in"` } func (m *MsgPlaceLimitOrderResponse) Reset() { *m = MsgPlaceLimitOrderResponse{} } @@ -640,6 +646,10 @@ func (m *MsgWithdrawFilledLimitOrder) GetTrancheKey() string { } type MsgWithdrawFilledLimitOrderResponse struct { + // Total amount of taker reserves that were withdrawn + TakerCoinOut github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,1,opt,name=taker_coin_out,json=takerCoinOut,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"taker_coin_out" yaml:"taker_coin_out"` + // Total amount of maker reserves that were withdrawn --only applies to inactive LimitOrders + MakerCoinOut github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,2,opt,name=maker_coin_out,json=makerCoinOut,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"maker_coin_out" yaml:"maker_coin_out"` } func (m *MsgWithdrawFilledLimitOrderResponse) Reset() { *m = MsgWithdrawFilledLimitOrderResponse{} } @@ -728,6 +738,10 @@ func (m *MsgCancelLimitOrder) GetTrancheKey() string { } type MsgCancelLimitOrderResponse struct { + // Total amount of taker reserves that were withdrawn + TakerCoinOut github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,1,opt,name=taker_coin_out,json=takerCoinOut,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"taker_coin_out" yaml:"taker_coin_out"` + // Total amount of maker reserves that were canceled + MakerCoinOut github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,2,opt,name=maker_coin_out,json=makerCoinOut,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"maker_coin_out" yaml:"maker_coin_out"` } func (m *MsgCancelLimitOrderResponse) Reset() { *m = MsgCancelLimitOrderResponse{} } @@ -880,7 +894,9 @@ func (m *MsgMultiHopSwap) GetPickBestRoute() bool { } type MsgMultiHopSwapResponse struct { - CoinOut github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,1,opt,name=coin_out,json=coinOut,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"coin_out"` + CoinOut github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,1,opt,name=coin_out,json=coinOut,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"coin_out" yaml:"coin_out"` + Route *MultiHopRoute `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` + Dust []github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,3,rep,name=dust,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"dust" yaml:"dust"` } func (m *MsgMultiHopSwapResponse) Reset() { *m = MsgMultiHopSwapResponse{} } @@ -916,6 +932,13 @@ func (m *MsgMultiHopSwapResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgMultiHopSwapResponse proto.InternalMessageInfo +func (m *MsgMultiHopSwapResponse) GetRoute() *MultiHopRoute { + if m != nil { + return m.Route + } + return nil +} + type MsgUpdateParams struct { // Authority is the address of the governance account. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` @@ -1034,113 +1057,126 @@ func init() { func init() { proto.RegisterFile("neutron/dex/tx.proto", fileDescriptor_a489f6e187d5e074) } var fileDescriptor_a489f6e187d5e074 = []byte{ - // 1687 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x6f, 0x23, 0x49, - 0x15, 0x4f, 0xdb, 0x89, 0x3f, 0x2a, 0x89, 0xe3, 0x74, 0x32,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be, 0x0b, - 0xde, 0x6b, 0x96, 0x5e, 0x4d, 0xe5, 0x2d, 0x17, 0xe7, 0x79, 0x9d, 0xa2, 0xae, 0x7b, 0xc2, 0x03, - 0x4f, 0x16, 0x0a, 0x60, 0x37, 0x14, 0x40, 0xec, 0x7e, 0x01, 0xec, 0xde, 0x12, 0xc0, 0xee, 0x75, - 0x01, 0xec, 0x06, 0x01, 0xec, 0x83, 0xb5, 0x53, 0x06, 0xb0, 0x67, 0x87, 0xa5, 0x38, 0x4b, 0x60, - 0x7e, 0x26, 0x81, 0x33, 0x49, 0x50, 0x33, 0xa7, 0xe1, 0x29, 0x56, 0xfe, 0x16, 0x03, 0xab, 0x2d, - 0xdc, 0xff, 0x99, 0x49, 0xce, 0x0c, 0x47, 0xff, 0x4a, 0xb7, 0xbe, 0xb5, 0x9e, 0x1b, 0x83, 0x2c, - 0x3e, 0xd3, 0x1d, 0x88, 0x69, 0xc5, 0x3a, 0x70, 0x80, 0xc6, 0x90, 0xb7, 0x5e, 0xf3, 0x2e, 0xf4, - 0xe6, 0x16, 0x5e, 0x4d, 0xe5, 0x9c, 0x8b, 0x5d, 0x54, 0xa3, 0xa8, 0x19, 0x57, 0xd4, 0x41, 0x2a, - 0x13, 0xdc, 0xd4, 0x31, 0x89, 0xdb, 0x3b, 0x26, 0x19, 0x74, 0x4c, 0x55, 0x89, 0x96, 0xfe, 0x3a, - 0x2f, 0xfd, 0x00, 0x45, 0x25, 0x07, 0x1e, 0xcc, 0x08, 0xbc, 0xba, 0x55, 0xfe, 0xb2, 0xc4, 0xca, - 0xf9, 0xd8, 0xd2, 0x7b, 0xb0, 0x69, 0x0e, 0x4c, 0xd2, 0x76, 0x0c, 0xe8, 0xbc, 0x25, 0xea, 0x5b, - 0x20, 0xe5, 0x82, 0x6b, 0xda, 0x1c, 0x76, 0x17, 0xec, 0x86, 0x2d, 0x3e, 0x04, 0x69, 0x57, 0x85, - 0x46, 0x84, 0x23, 0xef, 0xda, 0xb6, 0x47, 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x09, 0xf6, 0x16, 0xfd, 0xe1, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x2a, - 0x07, 0x8e, 0x98, 0x26, 0x12, 0x00, 0x00, + // 1896 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0xcb, 0x6f, 0x23, 0x49, + 0x19, 0x4f, 0xdb, 0x4e, 0x62, 0x57, 0x12, 0xc7, 0xd3, 0xc9, 0x6c, 0x3a, 0x1e, 0x94, 0xb6, 0x7a, + 0x56, 0x3b, 0x66, 0xc4, 0xd8, 0xe3, 0x61, 0xd9, 0x43, 0x0e, 0x48, 0x71, 0x1e, 0xbb, 0x66, 0xed, + 0x49, 0xd4, 0xe3, 0x15, 0x68, 0x57, 0xa2, 0x69, 0xbb, 0x2b, 0x4e, 0x2b, 0xdd, 0x5d, 0x56, 0x57, + 0x39, 0xe3, 0x70, 0x61, 0x85, 0x38, 0xed, 0x69, 0x2f, 0x08, 0x24, 0xfe, 0x01, 0xb8, 0xcd, 0x61, + 0xcf, 0x9c, 0x87, 0x13, 0x2b, 0x24, 0x24, 0xe0, 0x60, 0x60, 0xe6, 0x30, 0xd2, 0x1e, 0x73, 0x80, + 0x0b, 0x07, 0x54, 0x8f, 0x7e, 0x3a, 0x8f, 0xc9, 0x92, 0x41, 0x1c, 0xb8, 0x4c, 0xaa, 0x7e, 0xdf, + 0x57, 0x5f, 0xfd, 0xaa, 0xbe, 0x57, 0xb9, 0x07, 0xac, 0x7a, 0x70, 0x44, 0x7c, 0xe4, 0xd5, 0x2d, + 0x38, 0xae, 0x93, 0x71, 0x6d, 0xe8, 0x23, 0x82, 0xe4, 0x05, 0x81, 0xd6, 0x2c, 0x38, 0x2e, 0xdf, + 0x32, 0x5d, 0xdb, 0x43, 0x75, 0xf6, 0x2f, 0x97, 0x97, 0x37, 0xfa, 0x08, 0xbb, 0x08, 0xd7, 0x7b, + 0x26, 0x86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x87, 0x86, 0x6d, + 0x8d, 0x99, 0x43, 0x73, 0x3a, 0x10, 0x50, 0xcb, 0x1a, 0xcb, 0xab, 0x60, 0x16, 0xfa, 0x3e, 0x0a, + 0x1c, 0xca, 0x27, 0xda, 0x3f, 0xb2, 0x40, 0x8e, 0xcc, 0xea, 0x10, 0x0f, 0x91, 0x87, 0xa1, 0xfc, + 0x13, 0x20, 0xfb, 0x10, 0x43, 0xff, 0x04, 0x3e, 0x34, 0x84, 0x0d, 0x68, 0x29, 0x12, 0xbb, 0xde, + 0x83, 0xab, 0xae, 0xf7, 0x9c, 0xa5, 0x67, 0x13, 0x75, 0x9d, 0xdf, 0xf3, 0xb4, 0x4c, 0xd3, 0x6f, + 0x05, 0xe0, 0x4e, 0x80, 0xc5, 0x08, 0x34, 0x62, 0x04, 0x32, 0xd7, 0x23, 0xd0, 0xb8, 0x84, 0x40, + 0xe3, 0x3c, 0x02, 0x8d, 0x88, 0xc0, 0x36, 0x58, 0x3e, 0x64, 0x17, 0x1c, 0xe8, 0x61, 0x25, 0xcb, + 0x1c, 0x58, 0x4e, 0x38, 0x30, 0xe1, 0x04, 0xbd, 0x78, 0x18, 0x9f, 0x62, 0xf9, 0x97, 0x12, 0x58, + 0xc2, 0x47, 0xa6, 0x0f, 0xb1, 0x61, 0x63, 0x3c, 0x82, 0x96, 0x92, 0x63, 0x36, 0xd6, 0x6b, 0xa2, + 0x94, 0xd0, 0x82, 0x54, 0x13, 0x05, 0xa9, 0xb6, 0x8d, 0x6c, 0xaf, 0xf9, 0x03, 0x71, 0xb8, 0x7b, + 0x03, 0x9b, 0x1c, 0x8d, 0x7a, 0xb5, 0x3e, 0x72, 0x45, 0xdd, 0x11, 0x7f, 0x1e, 0x60, 0xeb, 0xb8, + 0x4e, 0x4e, 0x87, 0x10, 0xb3, 0x05, 0x5f, 0x4d, 0xd4, 0xe4, 0x16, 0x67, 0x13, 0x75, 0x95, 0x9f, + 0x34, 0x01, 0x6b, 0xfa, 0x22, 0x9f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0x8d, 0xd0, 0xbe, 0x0e, 0x16, 0x13, 0x9d, + 0xe1, 0x1b, 0xe9, 0x95, 0x71, 0x69, 0xf9, 0xed, 0xcb, 0xa4, 0x71, 0x9b, 0x89, 0x04, 0x9b, 0xb2, + 0x19, 0x97, 0x4e, 0xdb, 0x3c, 0x2f, 0xe2, 0xcb, 0xb3, 0x9f, 0xd2, 0x1c, 0x6a, 0xbe, 0xff, 0xfc, + 0xc5, 0x86, 0xf4, 0xe5, 0x8b, 0x0d, 0xe9, 0x6f, 0x2f, 0x36, 0xa4, 0xcf, 0x5f, 0x6e, 0xcc, 0x7c, + 0xf9, 0x72, 0x63, 0xe6, 0x4f, 0x2f, 0x37, 0x66, 0x3e, 0x7e, 0x70, 0x75, 0xa1, 0x1f, 0xf3, 0xff, + 0x14, 0xa0, 0xa5, 0xa2, 0x37, 0xc7, 0x7e, 0x5c, 0x7e, 0xfb, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x42, 0x14, 0x76, 0xb2, 0x30, 0x18, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1667,6 +1703,20 @@ func (m *MsgDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.SharesIssued) > 0 { + for iNdEx := len(m.SharesIssued) - 1; iNdEx >= 0; iNdEx-- { + { + size := m.SharesIssued[iNdEx].Size() + i -= size + if _, err := m.SharesIssued[iNdEx].MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } if len(m.FailedDeposits) > 0 { for iNdEx := len(m.FailedDeposits) - 1; iNdEx >= 0; iNdEx-- { { @@ -1834,6 +1884,40 @@ func (m *MsgWithdrawalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.SharesBurned) > 0 { + for iNdEx := len(m.SharesBurned) - 1; iNdEx >= 0; iNdEx-- { + { + size := m.SharesBurned[iNdEx].Size() + i -= size + if _, err := m.SharesBurned[iNdEx].MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + { + size := m.Reserve1Withdrawn.Size() + i -= size + if _, err := m.Reserve1Withdrawn.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Reserve0Withdrawn.Size() + i -= size + if _, err := m.Reserve0Withdrawn.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -1962,6 +2046,16 @@ func (m *MsgPlaceLimitOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l + { + size := m.TakerCoinIn.Size() + i -= size + if _, err := m.TakerCoinIn.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 { size := m.TakerCoinOut.Size() i -= size @@ -2049,6 +2143,26 @@ func (m *MsgWithdrawFilledLimitOrderResponse) MarshalToSizedBuffer(dAtA []byte) _ = i var l int _ = l + { + size := m.MakerCoinOut.Size() + i -= size + if _, err := m.MakerCoinOut.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.TakerCoinOut.Size() + i -= size + if _, err := m.TakerCoinOut.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -2109,6 +2223,26 @@ func (m *MsgCancelLimitOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, er _ = i var l int _ = l + { + size := m.MakerCoinOut.Size() + i -= size + if _, err := m.MakerCoinOut.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.TakerCoinOut.Size() + i -= size + if _, err := m.TakerCoinOut.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -2245,6 +2379,32 @@ func (m *MsgMultiHopSwapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if len(m.Dust) > 0 { + for iNdEx := len(m.Dust) - 1; iNdEx >= 0; iNdEx-- { + { + size := m.Dust[iNdEx].Size() + i -= size + if _, err := m.Dust[iNdEx].MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.Route != nil { + { + size, err := m.Route.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } { size := m.CoinOut.Size() i -= size @@ -2444,6 +2604,12 @@ func (m *MsgDepositResponse) Size() (n int) { n += 1 + l + sovTx(uint64(l)) } } + if len(m.SharesIssued) > 0 { + for _, e := range m.SharesIssued { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } return n } @@ -2498,6 +2664,16 @@ func (m *MsgWithdrawalResponse) Size() (n int) { } var l int _ = l + l = m.Reserve0Withdrawn.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.Reserve1Withdrawn.Size() + n += 1 + l + sovTx(uint64(l)) + if len(m.SharesBurned) > 0 { + for _, e := range m.SharesBurned { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } return n } @@ -2560,6 +2736,8 @@ func (m *MsgPlaceLimitOrderResponse) Size() (n int) { n += 1 + l + sovTx(uint64(l)) l = m.TakerCoinOut.Size() n += 1 + l + sovTx(uint64(l)) + l = m.TakerCoinIn.Size() + n += 1 + l + sovTx(uint64(l)) return n } @@ -2586,6 +2764,10 @@ func (m *MsgWithdrawFilledLimitOrderResponse) Size() (n int) { } var l int _ = l + l = m.TakerCoinOut.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.MakerCoinOut.Size() + n += 1 + l + sovTx(uint64(l)) return n } @@ -2612,6 +2794,10 @@ func (m *MsgCancelLimitOrderResponse) Size() (n int) { } var l int _ = l + l = m.TakerCoinOut.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.MakerCoinOut.Size() + n += 1 + l + sovTx(uint64(l)) return n } @@ -2668,6 +2854,16 @@ func (m *MsgMultiHopSwapResponse) Size() (n int) { _ = l l = m.CoinOut.Size() n += 1 + l + sovTx(uint64(l)) + if m.Route != nil { + l = m.Route.Size() + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Dust) > 0 { + for _, e := range m.Dust { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } return n } @@ -3463,6 +3659,40 @@ func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SharesIssued", 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.SharesIssued = append(m.SharesIssued, github_com_cosmos_cosmos_sdk_types.Coin{}) + if err := m.SharesIssued[len(m.SharesIssued)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -3879,6 +4109,108 @@ func (m *MsgWithdrawalResponse) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: MsgWithdrawalResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reserve0Withdrawn", 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 + } + if err := m.Reserve0Withdrawn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reserve1Withdrawn", 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 + } + if err := m.Reserve1Withdrawn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SharesBurned", 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.SharesBurned = append(m.SharesBurned, github_com_cosmos_cosmos_sdk_types.Coin{}) + if err := m.SharesBurned[len(m.SharesBurned)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -4385,6 +4717,39 @@ func (m *MsgPlaceLimitOrderResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TakerCoinIn", 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.TakerCoinIn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -4549,6 +4914,72 @@ func (m *MsgWithdrawFilledLimitOrderResponse) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: MsgWithdrawFilledLimitOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TakerCoinOut", 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.TakerCoinOut.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MakerCoinOut", 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.MakerCoinOut.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -4713,6 +5144,72 @@ func (m *MsgCancelLimitOrderResponse) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: MsgCancelLimitOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TakerCoinOut", 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.TakerCoinOut.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MakerCoinOut", 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.MakerCoinOut.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -5114,6 +5611,76 @@ func (m *MsgMultiHopSwapResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Route", 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 m.Route == nil { + m.Route = &MultiHopRoute{} + } + if err := m.Route.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dust", 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.Dust = append(m.Dust, github_com_cosmos_cosmos_sdk_types.Coin{}) + if err := m.Dust[len(m.Dust)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:])