From 7c89df7be30c734457a45d19a480f1640215b48f Mon Sep 17 00:00:00 2001 From: GnaD Date: Mon, 17 Apr 2023 00:54:48 +0700 Subject: [PATCH 01/16] nit --- tests/interchaintest/packet_foward_test.go | 36 ++++++++++++++++------ 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/tests/interchaintest/packet_foward_test.go b/tests/interchaintest/packet_foward_test.go index a245887..ac67d6e 100644 --- a/tests/interchaintest/packet_foward_test.go +++ b/tests/interchaintest/packet_foward_test.go @@ -51,14 +51,20 @@ func TestPacketForwardMiddleware(t *testing.T) { NumFullNodes: &numFullNodes, }, { - Name: "gaia", - Version: "v9.0.2", + Name: "gaia", + Version: "v9.0.2", + ChainConfig: ibc.ChainConfig{ + GasPrices: "0.0uatom", + }, NumValidators: &numVals, NumFullNodes: &numFullNodes, }, { - Name: "osmosis", - Version: "v15.0.0", + Name: "osmosis", + Version: "v15.0.0", + ChainConfig: ibc.ChainConfig{ + GasPrices: "0.005uosmo", + }, NumValidators: &numVals, NumFullNodes: &numFullNodes, }, @@ -145,8 +151,9 @@ func TestPacketForwardMiddleware(t *testing.T) { feeabsUser, gaiaUser, osmosisUser := users[0], users[1], users[2] _ = feeabsUser _ = gaiaUser + _ = osmosisUser - const transferAmount int64 = 100000 + // const transferAmount int64 = 100000 // Compose the prefixed denoms and ibc denom for asserting balances // firstHopDenom := transfertypes.GetPrefixedDenom(gaiafeeabsChannel.PortID, gaiafeeabsChannel.ChannelID, feeabs.Config().Denom) @@ -167,12 +174,23 @@ func TestPacketForwardMiddleware(t *testing.T) { t.Run("forward a->b->a", func(t *testing.T) { // Setup contract on Osmosis - // Store code - crossChainRegistryContractID, err := osmosis.StoreContract(ctx, osmosisUser.KeyName, "./bytecode/crosschain_registry.wasm") + // Store code crosschain Registry + crossChainRegistryContractID, err := feeabs.StoreContract(ctx, feeabsUser.KeyName, "./bytecode/crosschain_registry.wasm") require.NoError(t, err) _ = crossChainRegistryContractID - // Instatiate - // Execute + // // Instatiate + // owner := feeabsUser.Bech32Address(feeabs.Config().Bech32Prefix) + // swapRegistryInitMsg := fmt.Sprintf("{\"owner\":\"%s\"}", owner) + // address, err := feeabs.InstantiateContract(ctx, feeabsUser.KeyName, crossChainRegistryContractID, swapRegistryInitMsg, true) + // require.NoError(t, err) + // feeabs.FullNodes + // // Execute + // msg := fmt.Sprintf("{\"modify_chain_channel_links\": {\"operations\": [{\"operation\": \"set\",\"source_chain\": \"feeabs\",\"destination_chain\": \"osmosis\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"osmosis\",\"destination_chain\": \"feeabs\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"feeabs\",\"destination_chain\": \"gaia\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"gaia\",\"destination_chain\": \"feeabs\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"osmosis\",\"destination_chain\": \"gaia\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"gaia\",\"destination_chain\": \"osmosis\",\"channel_id\": \"%s\"}]}}", feeabsOsmosisChannel, osmosisFeeabsChannel, feeabsGaiaChannel, gaiaFeeabsChannel, osmosisGaiaChannel, gaiaOsmosisChannel) + // txHash, err := feeabs.ExecuteContract(ctx, feeabsUser.KeyName, address, msg) + // require.NoError(t, err) + // fmt.Printf("Hash----------------: %s", txHash) + // tx, err := feeabs.GetTransaction(txHash) + // fmt.Printf("tx----------------: %v", tx) // Send Gaia uatom to Osmosis From 1e0c8815fc4b4f0784e7d713cc22d22009221a51 Mon Sep 17 00:00:00 2001 From: GnaD Date: Mon, 17 Apr 2023 23:12:43 +0700 Subject: [PATCH 02/16] add setup rly ictest --- go.work.sum | 9 +- tests/interchaintest/go.mod | 14 +- tests/interchaintest/go.sum | 7 +- .../osmosistypes/gamm/types/codec.go | 35 + .../osmosistypes/gamm/types/genesis.pb.go | 620 ++ .../osmosistypes/gamm/types/msgs.go | 206 + .../osmosistypes/gamm/types/query.pb.go | 6727 +++++++++++++++++ .../osmosistypes/gamm/types/query.pb.gw.go | 1484 ++++ .../osmosistypes/gamm/types/tx.pb.go | 4972 ++++++++++++ tests/interchaintest/packet_foward_test.go | 188 +- tests/interchaintest/setup.go | 15 +- 11 files changed, 14237 insertions(+), 40 deletions(-) create mode 100644 tests/interchaintest/osmosistypes/gamm/types/codec.go create mode 100644 tests/interchaintest/osmosistypes/gamm/types/genesis.pb.go create mode 100644 tests/interchaintest/osmosistypes/gamm/types/msgs.go create mode 100644 tests/interchaintest/osmosistypes/gamm/types/query.pb.go create mode 100644 tests/interchaintest/osmosistypes/gamm/types/query.pb.gw.go create mode 100644 tests/interchaintest/osmosistypes/gamm/types/tx.pb.go diff --git a/go.work.sum b/go.work.sum index e6a3075..a26fd13 100644 --- a/go.work.sum +++ b/go.work.sum @@ -298,10 +298,6 @@ github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EF github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w= github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= -github.com/CosmWasm/wasmd v0.31.0 h1:xACf6A/SkCeGWQWrKGsR4X9PQb5G4XYuNfnrl+HQ1mE= -github.com/CosmWasm/wasmd v0.31.0/go.mod h1:VcyDGk/ISVlMUeW+1GGL0zdHWBS2FPwLEV2qZ86l7l8= -github.com/CosmWasm/wasmvm v1.2.1 h1:si0tRsRDdUShV0k51Wn6zRKlmj3/WWP9Yr4cLmDTf+8= -github.com/CosmWasm/wasmvm v1.2.1/go.mod h1:vW/E3h8j9xBQs9bCoijDuawKo9kCtxOaS8N8J7KFtkc= github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0/go.mod h1:b3g59n2Y+T5xmcxJL+UEG2f8cQploZm1mR/v6BW0mU0= @@ -418,8 +414,6 @@ github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU= github.com/cosmos/cosmos-db v0.0.0-20221226095112-f3c38ecb5e32/go.mod h1:kwMlEC4wWvB48zAShGKVqboJL6w4zCLesaNQ3YLU2BQ= github.com/cosmos/cosmos-proto v1.0.0-beta.1/go.mod h1:8k2GNZghi5sDRFw/scPL8gMSowT1vDA+5ouxL8GjaUE= -github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= -github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= github.com/cosmos/cosmos-sdk v0.45.12/go.mod h1:ZAdIs09zttoA3aSwQCTK9gecOThUVNnzBSVj3DiS6UY= github.com/cosmos/cosmos-sdk v0.47.0 h1:GKYtBpvjwuDEVix1vdnQpq7PuEOnItuEK0vdAL2cZ5g= github.com/cosmos/cosmos-sdk v0.47.0/go.mod h1:FTtZbqiHCZ2vun9WrPq6qLQafNKkAuIhLAxzLjr2TiI= @@ -435,6 +429,7 @@ github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XH github.com/cosmos/ibc-go/v7 v7.0.0 h1:j4kyywlG0hhDmT9FmSaR5iCIka7Pz7kJTxGWY1nlV9Q= github.com/cosmos/ibc-go/v7 v7.0.0/go.mod h1:BFh8nKWjr5zeR2OZfhkzdgDzj1+KjRn3aJLpwapStj8= github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab h1:I9ialKTQo7248V827Bba4OuKPmk+FPzmTVHsLXaIJWw= +github.com/cosmos/interchain-accounts v0.2.6 h1:TV2M2g1/Rb9MCNw1YePdBKE0rcEczNj1RGHT+2iRYas= github.com/cosmos/interchain-accounts v0.2.6/go.mod h1:lUzWNzCiCtIEYZefac5+YgEBz2aR39nMS374jIv1c7o= github.com/cosmos/interchain-accounts v0.5.1/go.mod h1:JB3gKbX8geQhxEIrBQtpDco0cyKMUDpVhugb78e5z6U= github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= @@ -1282,7 +1277,9 @@ gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= honnef.co/go/tools v0.3.3/go.mod h1:jzwdWgg7Jdq75wlfblQxO4neNaFFSvgc1tD5Wv8U0Yw= lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0= diff --git a/tests/interchaintest/go.mod b/tests/interchaintest/go.mod index 06c8398..1096536 100644 --- a/tests/interchaintest/go.mod +++ b/tests/interchaintest/go.mod @@ -3,12 +3,18 @@ module github.com/notional-labs/fee-abstraction/tests/interchaintest go 1.19 require ( + github.com/cosmos/cosmos-proto v1.0.0-beta.2 github.com/cosmos/cosmos-sdk v0.45.14 github.com/cosmos/ibc-go/v4 v4.3.0 + github.com/gogo/protobuf v1.3.3 + github.com/golang/protobuf v1.5.2 + github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/notional-labs/fee-abstraction/v2 v2.0.1 github.com/strangelove-ventures/interchaintest/v4 v4.0.0-20230331040355-5d08aab13017 github.com/stretchr/testify v1.8.2 go.uber.org/zap v1.23.0 + google.golang.org/genproto v0.0.0-20230125152338-dcaf20b6aeaa + google.golang.org/grpc v1.53.0 ) require ( @@ -18,6 +24,8 @@ require ( github.com/BurntSushi/toml v1.2.1 // indirect github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect github.com/ChainSafe/go-schnorrkel/1 v0.0.0-00010101000000-000000000000 // indirect + github.com/CosmWasm/wasmd v0.31.0 // indirect + github.com/CosmWasm/wasmvm v1.2.1 // indirect github.com/Microsoft/go-winio v0.6.0 // indirect github.com/StirlingMarketingGroup/go-namecase v1.0.0 // indirect github.com/armon/go-metrics v0.4.1 // indirect @@ -62,10 +70,8 @@ require ( github.com/go-stack/stack v1.8.1 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/gateway v1.1.0 // indirect - github.com/gogo/protobuf v1.3.3 // indirect github.com/golang/glog v1.0.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.2 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/flatbuffers v1.12.1 // indirect @@ -75,7 +81,6 @@ require ( github.com/gorilla/mux v1.8.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect - github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect @@ -158,14 +163,11 @@ require ( golang.org/x/term v0.5.0 // indirect golang.org/x/text v0.7.0 // indirect golang.org/x/tools v0.6.0 // indirect - google.golang.org/genproto v0.0.0-20230125152338-dcaf20b6aeaa // indirect - google.golang.org/grpc v1.53.0 // indirect google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - gotest.tools/v3 v3.4.0 // indirect lukechampine.com/blake3 v1.1.6 // indirect lukechampine.com/uint128 v1.1.1 // indirect modernc.org/cc/v3 v3.36.0 // indirect diff --git a/tests/interchaintest/go.sum b/tests/interchaintest/go.sum index c72abad..c28dc55 100644 --- a/tests/interchaintest/go.sum +++ b/tests/interchaintest/go.sum @@ -58,6 +58,10 @@ github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQ github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= +github.com/CosmWasm/wasmd v0.31.0 h1:xACf6A/SkCeGWQWrKGsR4X9PQb5G4XYuNfnrl+HQ1mE= +github.com/CosmWasm/wasmd v0.31.0/go.mod h1:VcyDGk/ISVlMUeW+1GGL0zdHWBS2FPwLEV2qZ86l7l8= +github.com/CosmWasm/wasmvm v1.2.1 h1:si0tRsRDdUShV0k51Wn6zRKlmj3/WWP9Yr4cLmDTf+8= +github.com/CosmWasm/wasmvm v1.2.1/go.mod h1:vW/E3h8j9xBQs9bCoijDuawKo9kCtxOaS8N8J7KFtkc= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= @@ -147,6 +151,8 @@ github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8Nz github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= +github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= +github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= github.com/cosmos/cosmos-sdk v0.45.13-ics h1:EuBiwr9UO/s+dcjCXrrmwrZPowEhBYguIdMcr5fH3dg= github.com/cosmos/cosmos-sdk v0.45.13-ics/go.mod h1:tpDFgc98sgRcLLRiosBSyos8EZoDHv1xab9HPLGLQJ4= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= @@ -1244,7 +1250,6 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/tests/interchaintest/osmosistypes/gamm/types/codec.go b/tests/interchaintest/osmosistypes/gamm/types/codec.go new file mode 100644 index 0000000..4ae7aa2 --- /dev/null +++ b/tests/interchaintest/osmosistypes/gamm/types/codec.go @@ -0,0 +1,35 @@ +package types + +import ( + "github.com/cosmos/cosmos-sdk/codec" + types "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +func RegisterInterfaces(registry types.InterfaceRegistry) { + registry.RegisterImplementations( + (*sdk.Msg)(nil), + &MsgJoinPool{}, + &MsgExitPool{}, + &MsgSwapExactAmountIn{}, + &MsgSwapExactAmountOut{}, + &MsgJoinSwapExternAmountIn{}, + &MsgJoinSwapShareAmountOut{}, + &MsgExitSwapExternAmountOut{}, + &MsgExitSwapShareAmountIn{}, + ) + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} + +var ( + amino = codec.NewLegacyAmino() + + // ModuleCdc references the global x/bank module codec. Note, the codec should + // ONLY be used in certain instances of tests and for JSON encoding as Amino is + // still used for that purpose. + // + // The actual codec used for serialization should be provided to x/staking and + // defined at the application level. + ModuleCdc = codec.NewAminoCodec(amino) +) diff --git a/tests/interchaintest/osmosistypes/gamm/types/genesis.pb.go b/tests/interchaintest/osmosistypes/gamm/types/genesis.pb.go new file mode 100644 index 0000000..16628a6 --- /dev/null +++ b/tests/interchaintest/osmosistypes/gamm/types/genesis.pb.go @@ -0,0 +1,620 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: osmosis/gamm/v1beta1/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types1 "github.com/cosmos/cosmos-sdk/codec/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Params holds parameters for the incentives module +type Params struct { + PoolCreationFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=pool_creation_fee,json=poolCreationFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"pool_creation_fee" yaml:"pool_creation_fee"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_5a324eb7f1dd793e, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetPoolCreationFee() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.PoolCreationFee + } + return nil +} + +// GenesisState defines the gamm module's genesis state. +type GenesisState struct { + Pools []*types1.Any `protobuf:"bytes,1,rep,name=pools,proto3" json:"pools,omitempty"` + // will be renamed to next_pool_id in an upcoming version + NextPoolNumber uint64 `protobuf:"varint,2,opt,name=next_pool_number,json=nextPoolNumber,proto3" json:"next_pool_number,omitempty"` + Params Params `protobuf:"bytes,3,opt,name=params,proto3" json:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_5a324eb7f1dd793e, []int{1} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetPools() []*types1.Any { + if m != nil { + return m.Pools + } + return nil +} + +func (m *GenesisState) GetNextPoolNumber() uint64 { + if m != nil { + return m.NextPoolNumber + } + return 0 +} + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*Params)(nil), "osmosis.gamm.v1beta1.Params") + proto.RegisterType((*GenesisState)(nil), "osmosis.gamm.v1beta1.GenesisState") +} + +func init() { + proto.RegisterFile("osmosis/gamm/v1beta1/genesis.proto", fileDescriptor_5a324eb7f1dd793e) +} + +var fileDescriptor_5a324eb7f1dd793e = []byte{ + // 401 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xcf, 0xaa, 0xd3, 0x40, + 0x18, 0xc5, 0x33, 0xde, 0x7b, 0x0b, 0xe6, 0x8a, 0x7f, 0x42, 0x17, 0xb9, 0x17, 0x49, 0x4b, 0x56, + 0xd9, 0x74, 0xc6, 0x56, 0xdd, 0x74, 0x67, 0x0a, 0x8a, 0x22, 0x52, 0xe2, 0xce, 0x4d, 0x98, 0xc4, + 0x69, 0x0c, 0x26, 0xf3, 0x85, 0xcc, 0xb4, 0x34, 0x6f, 0x21, 0xb8, 0xf7, 0x01, 0x74, 0xeb, 0x43, + 0x14, 0x57, 0x5d, 0xba, 0xaa, 0xd2, 0xbe, 0x81, 0x4f, 0x20, 0xf3, 0x27, 0x22, 0xe8, 0x2a, 0xf9, + 0xe6, 0xfb, 0x9d, 0xc3, 0x99, 0x93, 0xb8, 0x21, 0x88, 0x1a, 0x44, 0x29, 0x48, 0x41, 0xeb, 0x9a, + 0x6c, 0xa6, 0x19, 0x93, 0x74, 0x4a, 0x0a, 0xc6, 0x99, 0x28, 0x05, 0x6e, 0x5a, 0x90, 0xe0, 0x0d, + 0x2d, 0x83, 0x15, 0x83, 0x2d, 0x73, 0x3d, 0x2c, 0xa0, 0x00, 0x0d, 0x10, 0xf5, 0x66, 0xd8, 0xeb, + 0xab, 0x02, 0xa0, 0xa8, 0x18, 0xd1, 0x53, 0xb6, 0x5e, 0x11, 0xca, 0xbb, 0x7e, 0x95, 0x6b, 0x9f, + 0xd4, 0x68, 0xcc, 0x60, 0x57, 0x81, 0x99, 0x48, 0x46, 0x05, 0xfb, 0x13, 0x22, 0x87, 0x92, 0x9b, + 0x7d, 0xf8, 0x09, 0xb9, 0x83, 0x25, 0x6d, 0x69, 0x2d, 0xbc, 0x8f, 0xc8, 0xbd, 0xd7, 0x00, 0x54, + 0x69, 0xde, 0x32, 0x2a, 0x4b, 0xe0, 0xe9, 0x8a, 0x31, 0x1f, 0x8d, 0xcf, 0xa2, 0xcb, 0xd9, 0x15, + 0xb6, 0xae, 0xca, 0xa7, 0x0f, 0x8a, 0x17, 0x50, 0xf2, 0xf8, 0xe5, 0xee, 0x30, 0x72, 0x7e, 0x1d, + 0x46, 0x7e, 0x47, 0xeb, 0x6a, 0x1e, 0xfe, 0xe3, 0x10, 0x7e, 0xfe, 0x31, 0x8a, 0x8a, 0x52, 0xbe, + 0x5b, 0x67, 0x38, 0x87, 0xda, 0xc6, 0xb3, 0x8f, 0x89, 0x78, 0xfb, 0x9e, 0xc8, 0xae, 0x61, 0x42, + 0x9b, 0x89, 0xe4, 0x8e, 0xd2, 0x2f, 0xac, 0xfc, 0x29, 0x63, 0xe1, 0x17, 0xe4, 0xde, 0x7a, 0x66, + 0x4a, 0x7b, 0x2d, 0xa9, 0x64, 0xde, 0x63, 0xf7, 0x42, 0x31, 0xc2, 0x26, 0x1b, 0x62, 0xd3, 0x0b, + 0xee, 0x7b, 0xc1, 0x4f, 0x78, 0x17, 0xdf, 0xfc, 0xf6, 0x75, 0x72, 0xb1, 0x04, 0xa8, 0x9e, 0x27, + 0x86, 0xf6, 0x22, 0xf7, 0x2e, 0x67, 0x5b, 0x99, 0xea, 0x7c, 0x7c, 0x5d, 0x67, 0xac, 0xf5, 0x6f, + 0x8c, 0x51, 0x74, 0x9e, 0xdc, 0x56, 0xe7, 0x8a, 0x7d, 0xa5, 0x4f, 0xbd, 0xb9, 0x3b, 0x68, 0x74, + 0x23, 0xfe, 0xd9, 0x18, 0x45, 0x97, 0xb3, 0xfb, 0xf8, 0x7f, 0x5f, 0x09, 0x9b, 0xd6, 0xe2, 0x73, + 0x75, 0xfd, 0xc4, 0x2a, 0xe2, 0x17, 0xbb, 0x63, 0x80, 0xf6, 0xc7, 0x00, 0xfd, 0x3c, 0x06, 0xe8, + 0xc3, 0x29, 0x70, 0xf6, 0xa7, 0xc0, 0xf9, 0x7e, 0x0a, 0x9c, 0x37, 0x0f, 0xfe, 0xaa, 0xc0, 0xfa, + 0x4d, 0x2a, 0x9a, 0x89, 0x7e, 0x20, 0x9b, 0xe9, 0x23, 0xb2, 0x35, 0x3f, 0x8b, 0x2e, 0x24, 0x1b, + 0xe8, 0x1b, 0x3d, 0xfc, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x03, 0x26, 0x4b, 0x36, 0x49, 0x02, 0x00, + 0x00, +} + +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PoolCreationFee) > 0 { + for iNdEx := len(m.PoolCreationFee) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PoolCreationFee[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.NextPoolNumber != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.NextPoolNumber)) + i-- + dAtA[i] = 0x10 + } + if len(m.Pools) > 0 { + for iNdEx := len(m.Pools) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Pools[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.PoolCreationFee) > 0 { + for _, e := range m.PoolCreationFee { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Pools) > 0 { + for _, e := range m.Pools { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if m.NextPoolNumber != 0 { + n += 1 + sovGenesis(uint64(m.NextPoolNumber)) + } + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolCreationFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PoolCreationFee = append(m.PoolCreationFee, types.Coin{}) + if err := m.PoolCreationFee[len(m.PoolCreationFee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pools", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pools = append(m.Pools, &types1.Any{}) + if err := m.Pools[len(m.Pools)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NextPoolNumber", wireType) + } + m.NextPoolNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NextPoolNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/tests/interchaintest/osmosistypes/gamm/types/msgs.go b/tests/interchaintest/osmosistypes/gamm/types/msgs.go new file mode 100644 index 0000000..ef62968 --- /dev/null +++ b/tests/interchaintest/osmosistypes/gamm/types/msgs.go @@ -0,0 +1,206 @@ +package types + +import ( + "fmt" + "strings" + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// constants. +const ( + RouterKey = "gamm" + TypeMsgSwapExactAmountIn = "swap_exact_amount_in" + TypeMsgSwapExactAmountOut = "swap_exact_amount_out" + TypeMsgJoinPool = "join_pool" + TypeMsgExitPool = "exit_pool" + TypeMsgJoinSwapExternAmountIn = "join_swap_extern_amount_in" + TypeMsgJoinSwapShareAmountOut = "join_swap_share_amount_out" + TypeMsgExitSwapExternAmountOut = "exit_swap_extern_amount_out" + TypeMsgExitSwapShareAmountIn = "exit_swap_share_amount_in" +) + +func ValidateFutureGovernor(governor string) error { + // allow empty governor + if governor == "" { + return nil + } + + // validation for future owner + // "osmo1fqlr98d45v5ysqgp6h56kpujcj4cvsjnjq9nck" + _, err := sdk.AccAddressFromBech32(governor) + if err == nil { + return nil + } + + lockTimeStr := "" + splits := strings.Split(governor, ",") + if len(splits) > 2 { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, fmt.Sprintf("invalid future governor: %s", governor)) + } + + // token,100h + if len(splits) == 2 { + lpTokenStr := splits[0] + if sdk.ValidateDenom(lpTokenStr) != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, fmt.Sprintf("invalid future governor: %s", governor)) + } + lockTimeStr = splits[1] + } + + // 100h + if len(splits) == 1 { + lockTimeStr = splits[0] + } + + // Note that a duration of 0 is allowed + _, err = time.ParseDuration(lockTimeStr) + if err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, fmt.Sprintf("invalid future governor: %s", governor)) + } + return nil +} + +var _ sdk.Msg = &MsgSwapExactAmountIn{} + +func (msg MsgSwapExactAmountIn) Route() string { return RouterKey } +func (msg MsgSwapExactAmountIn) Type() string { return TypeMsgSwapExactAmountIn } +func (msg MsgSwapExactAmountIn) ValidateBasic() error { return nil } + +func (msg MsgSwapExactAmountIn) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +func (msg MsgSwapExactAmountIn) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +var _ sdk.Msg = &MsgSwapExactAmountOut{} + +func (msg MsgSwapExactAmountOut) Route() string { return RouterKey } +func (msg MsgSwapExactAmountOut) Type() string { return TypeMsgSwapExactAmountOut } +func (msg MsgSwapExactAmountOut) ValidateBasic() error { return nil } + +func (msg MsgSwapExactAmountOut) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +func (msg MsgSwapExactAmountOut) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +var _ sdk.Msg = &MsgJoinPool{} + +func (msg MsgJoinPool) Route() string { return RouterKey } +func (msg MsgJoinPool) Type() string { return TypeMsgJoinPool } +func (msg MsgJoinPool) ValidateBasic() error { return nil } +func (msg MsgJoinPool) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} +func (msg MsgJoinPool) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +var _ sdk.Msg = &MsgExitPool{} + +func (msg MsgExitPool) Route() string { return RouterKey } +func (msg MsgExitPool) Type() string { return TypeMsgExitPool } +func (msg MsgExitPool) ValidateBasic() error { return nil } + +func (msg MsgExitPool) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +func (msg MsgExitPool) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +var _ sdk.Msg = &MsgJoinSwapExternAmountIn{} + +func (msg MsgJoinSwapExternAmountIn) Route() string { return RouterKey } +func (msg MsgJoinSwapExternAmountIn) Type() string { return TypeMsgJoinSwapExternAmountIn } +func (msg MsgJoinSwapExternAmountIn) ValidateBasic() error { return nil } + +func (msg MsgJoinSwapExternAmountIn) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +func (msg MsgJoinSwapExternAmountIn) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +var _ sdk.Msg = &MsgJoinSwapShareAmountOut{} + +func (msg MsgJoinSwapShareAmountOut) Route() string { return RouterKey } +func (msg MsgJoinSwapShareAmountOut) Type() string { return TypeMsgJoinSwapShareAmountOut } +func (msg MsgJoinSwapShareAmountOut) ValidateBasic() error { return nil } + +func (msg MsgJoinSwapShareAmountOut) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +func (msg MsgJoinSwapShareAmountOut) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +var _ sdk.Msg = &MsgExitSwapExternAmountOut{} + +func (msg MsgExitSwapExternAmountOut) Route() string { return RouterKey } +func (msg MsgExitSwapExternAmountOut) Type() string { return TypeMsgExitSwapExternAmountOut } +func (msg MsgExitSwapExternAmountOut) ValidateBasic() error { return nil } + +func (msg MsgExitSwapExternAmountOut) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +func (msg MsgExitSwapExternAmountOut) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +var _ sdk.Msg = &MsgExitSwapShareAmountIn{} + +func (msg MsgExitSwapShareAmountIn) Route() string { return RouterKey } +func (msg MsgExitSwapShareAmountIn) Type() string { return TypeMsgExitSwapShareAmountIn } +func (msg MsgExitSwapShareAmountIn) ValidateBasic() error { return nil } + +func (msg MsgExitSwapShareAmountIn) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +func (msg MsgExitSwapShareAmountIn) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} diff --git a/tests/interchaintest/osmosistypes/gamm/types/query.pb.go b/tests/interchaintest/osmosistypes/gamm/types/query.pb.go new file mode 100644 index 0000000..8914073 --- /dev/null +++ b/tests/interchaintest/osmosistypes/gamm/types/query.pb.go @@ -0,0 +1,6727 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: osmosis/gamm/v1beta1/query.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/codec/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types1 "github.com/cosmos/cosmos-sdk/types" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// =============================== Pool +type QueryPoolRequest struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` +} + +func (m *QueryPoolRequest) Reset() { *m = QueryPoolRequest{} } +func (m *QueryPoolRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPoolRequest) ProtoMessage() {} +func (*QueryPoolRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{0} +} +func (m *QueryPoolRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPoolRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPoolRequest.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 *QueryPoolRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPoolRequest.Merge(m, src) +} +func (m *QueryPoolRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPoolRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPoolRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPoolRequest proto.InternalMessageInfo + +func (m *QueryPoolRequest) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +type QueryPoolResponse struct { + Pool *types.Any `protobuf:"bytes,1,opt,name=pool,proto3" json:"pool,omitempty"` +} + +func (m *QueryPoolResponse) Reset() { *m = QueryPoolResponse{} } +func (m *QueryPoolResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPoolResponse) ProtoMessage() {} +func (*QueryPoolResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{1} +} +func (m *QueryPoolResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPoolResponse.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 *QueryPoolResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPoolResponse.Merge(m, src) +} +func (m *QueryPoolResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPoolResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPoolResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPoolResponse proto.InternalMessageInfo + +func (m *QueryPoolResponse) GetPool() *types.Any { + if m != nil { + return m.Pool + } + return nil +} + +// =============================== Pools +type QueryPoolsRequest struct { + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryPoolsRequest) Reset() { *m = QueryPoolsRequest{} } +func (m *QueryPoolsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPoolsRequest) ProtoMessage() {} +func (*QueryPoolsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{2} +} +func (m *QueryPoolsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPoolsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPoolsRequest.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 *QueryPoolsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPoolsRequest.Merge(m, src) +} +func (m *QueryPoolsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPoolsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPoolsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPoolsRequest proto.InternalMessageInfo + +func (m *QueryPoolsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryPoolsResponse struct { + Pools []*types.Any `protobuf:"bytes,1,rep,name=pools,proto3" json:"pools,omitempty"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryPoolsResponse) Reset() { *m = QueryPoolsResponse{} } +func (m *QueryPoolsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPoolsResponse) ProtoMessage() {} +func (*QueryPoolsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{3} +} +func (m *QueryPoolsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPoolsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPoolsResponse.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 *QueryPoolsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPoolsResponse.Merge(m, src) +} +func (m *QueryPoolsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPoolsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPoolsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPoolsResponse proto.InternalMessageInfo + +func (m *QueryPoolsResponse) GetPools() []*types.Any { + if m != nil { + return m.Pools + } + return nil +} + +func (m *QueryPoolsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// =============================== NumPools +type QueryNumPoolsRequest struct { +} + +func (m *QueryNumPoolsRequest) Reset() { *m = QueryNumPoolsRequest{} } +func (m *QueryNumPoolsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryNumPoolsRequest) ProtoMessage() {} +func (*QueryNumPoolsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{4} +} +func (m *QueryNumPoolsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryNumPoolsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryNumPoolsRequest.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 *QueryNumPoolsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNumPoolsRequest.Merge(m, src) +} +func (m *QueryNumPoolsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryNumPoolsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNumPoolsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryNumPoolsRequest proto.InternalMessageInfo + +type QueryNumPoolsResponse struct { + NumPools uint64 `protobuf:"varint,1,opt,name=num_pools,json=numPools,proto3" json:"num_pools,omitempty" yaml:"num_pools"` +} + +func (m *QueryNumPoolsResponse) Reset() { *m = QueryNumPoolsResponse{} } +func (m *QueryNumPoolsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryNumPoolsResponse) ProtoMessage() {} +func (*QueryNumPoolsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{5} +} +func (m *QueryNumPoolsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryNumPoolsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryNumPoolsResponse.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 *QueryNumPoolsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNumPoolsResponse.Merge(m, src) +} +func (m *QueryNumPoolsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryNumPoolsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNumPoolsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryNumPoolsResponse proto.InternalMessageInfo + +func (m *QueryNumPoolsResponse) GetNumPools() uint64 { + if m != nil { + return m.NumPools + } + return 0 +} + +// =============================== PoolType +type QueryPoolTypeRequest struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` +} + +func (m *QueryPoolTypeRequest) Reset() { *m = QueryPoolTypeRequest{} } +func (m *QueryPoolTypeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPoolTypeRequest) ProtoMessage() {} +func (*QueryPoolTypeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{6} +} +func (m *QueryPoolTypeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPoolTypeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPoolTypeRequest.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 *QueryPoolTypeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPoolTypeRequest.Merge(m, src) +} +func (m *QueryPoolTypeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPoolTypeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPoolTypeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPoolTypeRequest proto.InternalMessageInfo + +func (m *QueryPoolTypeRequest) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +type QueryPoolTypeResponse struct { + PoolType string `protobuf:"bytes,1,opt,name=pool_type,json=poolType,proto3" json:"pool_type,omitempty" yaml:"pool_type"` +} + +func (m *QueryPoolTypeResponse) Reset() { *m = QueryPoolTypeResponse{} } +func (m *QueryPoolTypeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPoolTypeResponse) ProtoMessage() {} +func (*QueryPoolTypeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{7} +} +func (m *QueryPoolTypeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPoolTypeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPoolTypeResponse.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 *QueryPoolTypeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPoolTypeResponse.Merge(m, src) +} +func (m *QueryPoolTypeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPoolTypeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPoolTypeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPoolTypeResponse proto.InternalMessageInfo + +func (m *QueryPoolTypeResponse) GetPoolType() string { + if m != nil { + return m.PoolType + } + return "" +} + +// =============================== CalcJoinPoolShares +type QueryCalcJoinPoolSharesRequest struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` + TokensIn github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=tokens_in,json=tokensIn,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_in"` +} + +func (m *QueryCalcJoinPoolSharesRequest) Reset() { *m = QueryCalcJoinPoolSharesRequest{} } +func (m *QueryCalcJoinPoolSharesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCalcJoinPoolSharesRequest) ProtoMessage() {} +func (*QueryCalcJoinPoolSharesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{8} +} +func (m *QueryCalcJoinPoolSharesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCalcJoinPoolSharesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCalcJoinPoolSharesRequest.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 *QueryCalcJoinPoolSharesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCalcJoinPoolSharesRequest.Merge(m, src) +} +func (m *QueryCalcJoinPoolSharesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryCalcJoinPoolSharesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCalcJoinPoolSharesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCalcJoinPoolSharesRequest proto.InternalMessageInfo + +func (m *QueryCalcJoinPoolSharesRequest) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +func (m *QueryCalcJoinPoolSharesRequest) GetTokensIn() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.TokensIn + } + return nil +} + +type QueryCalcJoinPoolSharesResponse struct { + ShareOutAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=share_out_amount,json=shareOutAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"share_out_amount" yaml:"share_out_amount"` + TokensOut github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=tokens_out,json=tokensOut,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_out"` +} + +func (m *QueryCalcJoinPoolSharesResponse) Reset() { *m = QueryCalcJoinPoolSharesResponse{} } +func (m *QueryCalcJoinPoolSharesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCalcJoinPoolSharesResponse) ProtoMessage() {} +func (*QueryCalcJoinPoolSharesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{9} +} +func (m *QueryCalcJoinPoolSharesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCalcJoinPoolSharesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCalcJoinPoolSharesResponse.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 *QueryCalcJoinPoolSharesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCalcJoinPoolSharesResponse.Merge(m, src) +} +func (m *QueryCalcJoinPoolSharesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryCalcJoinPoolSharesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCalcJoinPoolSharesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCalcJoinPoolSharesResponse proto.InternalMessageInfo + +func (m *QueryCalcJoinPoolSharesResponse) GetTokensOut() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.TokensOut + } + return nil +} + +// =============================== CalcExitPoolCoinsFromShares +type QueryCalcExitPoolCoinsFromSharesRequest struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` + ShareInAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=share_in_amount,json=shareInAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"share_in_amount"` +} + +func (m *QueryCalcExitPoolCoinsFromSharesRequest) Reset() { + *m = QueryCalcExitPoolCoinsFromSharesRequest{} +} +func (m *QueryCalcExitPoolCoinsFromSharesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCalcExitPoolCoinsFromSharesRequest) ProtoMessage() {} +func (*QueryCalcExitPoolCoinsFromSharesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{10} +} +func (m *QueryCalcExitPoolCoinsFromSharesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCalcExitPoolCoinsFromSharesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCalcExitPoolCoinsFromSharesRequest.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 *QueryCalcExitPoolCoinsFromSharesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCalcExitPoolCoinsFromSharesRequest.Merge(m, src) +} +func (m *QueryCalcExitPoolCoinsFromSharesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryCalcExitPoolCoinsFromSharesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCalcExitPoolCoinsFromSharesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCalcExitPoolCoinsFromSharesRequest proto.InternalMessageInfo + +func (m *QueryCalcExitPoolCoinsFromSharesRequest) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +type QueryCalcExitPoolCoinsFromSharesResponse struct { + TokensOut github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=tokens_out,json=tokensOut,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_out"` +} + +func (m *QueryCalcExitPoolCoinsFromSharesResponse) Reset() { + *m = QueryCalcExitPoolCoinsFromSharesResponse{} +} +func (m *QueryCalcExitPoolCoinsFromSharesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCalcExitPoolCoinsFromSharesResponse) ProtoMessage() {} +func (*QueryCalcExitPoolCoinsFromSharesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{11} +} +func (m *QueryCalcExitPoolCoinsFromSharesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCalcExitPoolCoinsFromSharesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCalcExitPoolCoinsFromSharesResponse.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 *QueryCalcExitPoolCoinsFromSharesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCalcExitPoolCoinsFromSharesResponse.Merge(m, src) +} +func (m *QueryCalcExitPoolCoinsFromSharesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryCalcExitPoolCoinsFromSharesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCalcExitPoolCoinsFromSharesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCalcExitPoolCoinsFromSharesResponse proto.InternalMessageInfo + +func (m *QueryCalcExitPoolCoinsFromSharesResponse) GetTokensOut() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.TokensOut + } + return nil +} + +// =============================== PoolParams +type QueryPoolParamsRequest struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` +} + +func (m *QueryPoolParamsRequest) Reset() { *m = QueryPoolParamsRequest{} } +func (m *QueryPoolParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPoolParamsRequest) ProtoMessage() {} +func (*QueryPoolParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{12} +} +func (m *QueryPoolParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPoolParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPoolParamsRequest.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 *QueryPoolParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPoolParamsRequest.Merge(m, src) +} +func (m *QueryPoolParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPoolParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPoolParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPoolParamsRequest proto.InternalMessageInfo + +func (m *QueryPoolParamsRequest) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +type QueryPoolParamsResponse struct { + Params *types.Any `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (m *QueryPoolParamsResponse) Reset() { *m = QueryPoolParamsResponse{} } +func (m *QueryPoolParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPoolParamsResponse) ProtoMessage() {} +func (*QueryPoolParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{13} +} +func (m *QueryPoolParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPoolParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPoolParamsResponse.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 *QueryPoolParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPoolParamsResponse.Merge(m, src) +} +func (m *QueryPoolParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPoolParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPoolParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPoolParamsResponse proto.InternalMessageInfo + +func (m *QueryPoolParamsResponse) GetParams() *types.Any { + if m != nil { + return m.Params + } + return nil +} + +// =============================== PoolLiquidity +type QueryTotalPoolLiquidityRequest struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` +} + +func (m *QueryTotalPoolLiquidityRequest) Reset() { *m = QueryTotalPoolLiquidityRequest{} } +func (m *QueryTotalPoolLiquidityRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTotalPoolLiquidityRequest) ProtoMessage() {} +func (*QueryTotalPoolLiquidityRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{14} +} +func (m *QueryTotalPoolLiquidityRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTotalPoolLiquidityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTotalPoolLiquidityRequest.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 *QueryTotalPoolLiquidityRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTotalPoolLiquidityRequest.Merge(m, src) +} +func (m *QueryTotalPoolLiquidityRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTotalPoolLiquidityRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTotalPoolLiquidityRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTotalPoolLiquidityRequest proto.InternalMessageInfo + +func (m *QueryTotalPoolLiquidityRequest) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +type QueryTotalPoolLiquidityResponse struct { + Liquidity github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=liquidity,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"liquidity" yaml:"liquidity"` +} + +func (m *QueryTotalPoolLiquidityResponse) Reset() { *m = QueryTotalPoolLiquidityResponse{} } +func (m *QueryTotalPoolLiquidityResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTotalPoolLiquidityResponse) ProtoMessage() {} +func (*QueryTotalPoolLiquidityResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{15} +} +func (m *QueryTotalPoolLiquidityResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTotalPoolLiquidityResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTotalPoolLiquidityResponse.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 *QueryTotalPoolLiquidityResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTotalPoolLiquidityResponse.Merge(m, src) +} +func (m *QueryTotalPoolLiquidityResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTotalPoolLiquidityResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTotalPoolLiquidityResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTotalPoolLiquidityResponse proto.InternalMessageInfo + +func (m *QueryTotalPoolLiquidityResponse) GetLiquidity() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Liquidity + } + return nil +} + +// =============================== TotalShares +type QueryTotalSharesRequest struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` +} + +func (m *QueryTotalSharesRequest) Reset() { *m = QueryTotalSharesRequest{} } +func (m *QueryTotalSharesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTotalSharesRequest) ProtoMessage() {} +func (*QueryTotalSharesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{16} +} +func (m *QueryTotalSharesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTotalSharesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTotalSharesRequest.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 *QueryTotalSharesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTotalSharesRequest.Merge(m, src) +} +func (m *QueryTotalSharesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTotalSharesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTotalSharesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTotalSharesRequest proto.InternalMessageInfo + +func (m *QueryTotalSharesRequest) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +type QueryTotalSharesResponse struct { + TotalShares types1.Coin `protobuf:"bytes,1,opt,name=total_shares,json=totalShares,proto3" json:"total_shares" yaml:"total_shares"` +} + +func (m *QueryTotalSharesResponse) Reset() { *m = QueryTotalSharesResponse{} } +func (m *QueryTotalSharesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTotalSharesResponse) ProtoMessage() {} +func (*QueryTotalSharesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{17} +} +func (m *QueryTotalSharesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTotalSharesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTotalSharesResponse.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 *QueryTotalSharesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTotalSharesResponse.Merge(m, src) +} +func (m *QueryTotalSharesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTotalSharesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTotalSharesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTotalSharesResponse proto.InternalMessageInfo + +func (m *QueryTotalSharesResponse) GetTotalShares() types1.Coin { + if m != nil { + return m.TotalShares + } + return types1.Coin{} +} + +// =============================== CalcJoinPoolNoSwapShares +type QueryCalcJoinPoolNoSwapSharesRequest struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` + TokensIn github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=tokens_in,json=tokensIn,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_in"` +} + +func (m *QueryCalcJoinPoolNoSwapSharesRequest) Reset() { *m = QueryCalcJoinPoolNoSwapSharesRequest{} } +func (m *QueryCalcJoinPoolNoSwapSharesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCalcJoinPoolNoSwapSharesRequest) ProtoMessage() {} +func (*QueryCalcJoinPoolNoSwapSharesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{18} +} +func (m *QueryCalcJoinPoolNoSwapSharesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCalcJoinPoolNoSwapSharesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesRequest.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 *QueryCalcJoinPoolNoSwapSharesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesRequest.Merge(m, src) +} +func (m *QueryCalcJoinPoolNoSwapSharesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryCalcJoinPoolNoSwapSharesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesRequest proto.InternalMessageInfo + +func (m *QueryCalcJoinPoolNoSwapSharesRequest) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +func (m *QueryCalcJoinPoolNoSwapSharesRequest) GetTokensIn() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.TokensIn + } + return nil +} + +type QueryCalcJoinPoolNoSwapSharesResponse struct { + TokensOut github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=tokens_out,json=tokensOut,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_out" yaml:"tokens_out"` + SharesOut github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=shares_out,json=sharesOut,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"shares_out"` +} + +func (m *QueryCalcJoinPoolNoSwapSharesResponse) Reset() { *m = QueryCalcJoinPoolNoSwapSharesResponse{} } +func (m *QueryCalcJoinPoolNoSwapSharesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCalcJoinPoolNoSwapSharesResponse) ProtoMessage() {} +func (*QueryCalcJoinPoolNoSwapSharesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{19} +} +func (m *QueryCalcJoinPoolNoSwapSharesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCalcJoinPoolNoSwapSharesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesResponse.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 *QueryCalcJoinPoolNoSwapSharesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesResponse.Merge(m, src) +} +func (m *QueryCalcJoinPoolNoSwapSharesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryCalcJoinPoolNoSwapSharesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesResponse proto.InternalMessageInfo + +func (m *QueryCalcJoinPoolNoSwapSharesResponse) GetTokensOut() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.TokensOut + } + return nil +} + +// QuerySpotPriceRequest defines the gRPC request structure for a SpotPrice +// query. +// +// Deprecated: Do not use. +type QuerySpotPriceRequest struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` + BaseAssetDenom string `protobuf:"bytes,2,opt,name=base_asset_denom,json=baseAssetDenom,proto3" json:"base_asset_denom,omitempty" yaml:"base_asset_denom"` + QuoteAssetDenom string `protobuf:"bytes,3,opt,name=quote_asset_denom,json=quoteAssetDenom,proto3" json:"quote_asset_denom,omitempty" yaml:"quote_asset_denom"` +} + +func (m *QuerySpotPriceRequest) Reset() { *m = QuerySpotPriceRequest{} } +func (m *QuerySpotPriceRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySpotPriceRequest) ProtoMessage() {} +func (*QuerySpotPriceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{20} +} +func (m *QuerySpotPriceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySpotPriceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySpotPriceRequest.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 *QuerySpotPriceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySpotPriceRequest.Merge(m, src) +} +func (m *QuerySpotPriceRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySpotPriceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySpotPriceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySpotPriceRequest proto.InternalMessageInfo + +func (m *QuerySpotPriceRequest) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +func (m *QuerySpotPriceRequest) GetBaseAssetDenom() string { + if m != nil { + return m.BaseAssetDenom + } + return "" +} + +func (m *QuerySpotPriceRequest) GetQuoteAssetDenom() string { + if m != nil { + return m.QuoteAssetDenom + } + return "" +} + +type QueryPoolsWithFilterRequest struct { + // String of the coins in single string seperated by comma. Ex) + // 10uatom,100uosmo + MinLiquidity string `protobuf:"bytes,1,opt,name=min_liquidity,json=minLiquidity,proto3" json:"min_liquidity,omitempty" yaml:"min_liquidity"` + PoolType string `protobuf:"bytes,2,opt,name=pool_type,json=poolType,proto3" json:"pool_type,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryPoolsWithFilterRequest) Reset() { *m = QueryPoolsWithFilterRequest{} } +func (m *QueryPoolsWithFilterRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPoolsWithFilterRequest) ProtoMessage() {} +func (*QueryPoolsWithFilterRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{21} +} +func (m *QueryPoolsWithFilterRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPoolsWithFilterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPoolsWithFilterRequest.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 *QueryPoolsWithFilterRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPoolsWithFilterRequest.Merge(m, src) +} +func (m *QueryPoolsWithFilterRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPoolsWithFilterRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPoolsWithFilterRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPoolsWithFilterRequest proto.InternalMessageInfo + +func (m *QueryPoolsWithFilterRequest) GetMinLiquidity() string { + if m != nil { + return m.MinLiquidity + } + return "" +} + +func (m *QueryPoolsWithFilterRequest) GetPoolType() string { + if m != nil { + return m.PoolType + } + return "" +} + +func (m *QueryPoolsWithFilterRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryPoolsWithFilterResponse struct { + Pools []*types.Any `protobuf:"bytes,1,rep,name=pools,proto3" json:"pools,omitempty"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryPoolsWithFilterResponse) Reset() { *m = QueryPoolsWithFilterResponse{} } +func (m *QueryPoolsWithFilterResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPoolsWithFilterResponse) ProtoMessage() {} +func (*QueryPoolsWithFilterResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{22} +} +func (m *QueryPoolsWithFilterResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPoolsWithFilterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPoolsWithFilterResponse.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 *QueryPoolsWithFilterResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPoolsWithFilterResponse.Merge(m, src) +} +func (m *QueryPoolsWithFilterResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPoolsWithFilterResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPoolsWithFilterResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPoolsWithFilterResponse proto.InternalMessageInfo + +func (m *QueryPoolsWithFilterResponse) GetPools() []*types.Any { + if m != nil { + return m.Pools + } + return nil +} + +func (m *QueryPoolsWithFilterResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QuerySpotPriceResponse defines the gRPC response structure for a SpotPrice +// query. +// +// Deprecated: Do not use. +type QuerySpotPriceResponse struct { + // String of the Dec. Ex) 10.203uatom + SpotPrice string `protobuf:"bytes,1,opt,name=spot_price,json=spotPrice,proto3" json:"spot_price,omitempty" yaml:"spot_price"` +} + +func (m *QuerySpotPriceResponse) Reset() { *m = QuerySpotPriceResponse{} } +func (m *QuerySpotPriceResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySpotPriceResponse) ProtoMessage() {} +func (*QuerySpotPriceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{23} +} +func (m *QuerySpotPriceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySpotPriceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySpotPriceResponse.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 *QuerySpotPriceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySpotPriceResponse.Merge(m, src) +} +func (m *QuerySpotPriceResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySpotPriceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySpotPriceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySpotPriceResponse proto.InternalMessageInfo + +func (m *QuerySpotPriceResponse) GetSpotPrice() string { + if m != nil { + return m.SpotPrice + } + return "" +} + +// =============================== EstimateSwapExactAmountIn +type QuerySwapExactAmountInRequest struct { + // TODO: CHANGE THIS TO RESERVED IN A PATCH RELEASE + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` + PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` + TokenIn string `protobuf:"bytes,3,opt,name=token_in,json=tokenIn,proto3" json:"token_in,omitempty" yaml:"token_in"` + Routes []SwapAmountInRoute `protobuf:"bytes,4,rep,name=routes,proto3" json:"routes" yaml:"routes"` +} + +func (m *QuerySwapExactAmountInRequest) Reset() { *m = QuerySwapExactAmountInRequest{} } +func (m *QuerySwapExactAmountInRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySwapExactAmountInRequest) ProtoMessage() {} +func (*QuerySwapExactAmountInRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{24} +} +func (m *QuerySwapExactAmountInRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySwapExactAmountInRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySwapExactAmountInRequest.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 *QuerySwapExactAmountInRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySwapExactAmountInRequest.Merge(m, src) +} +func (m *QuerySwapExactAmountInRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySwapExactAmountInRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySwapExactAmountInRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySwapExactAmountInRequest proto.InternalMessageInfo + +func (m *QuerySwapExactAmountInRequest) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *QuerySwapExactAmountInRequest) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +func (m *QuerySwapExactAmountInRequest) GetTokenIn() string { + if m != nil { + return m.TokenIn + } + return "" +} + +func (m *QuerySwapExactAmountInRequest) GetRoutes() []SwapAmountInRoute { + if m != nil { + return m.Routes + } + return nil +} + +type QuerySwapExactAmountInResponse struct { + TokenOutAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=token_out_amount,json=tokenOutAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"token_out_amount" yaml:"token_out_amount"` +} + +func (m *QuerySwapExactAmountInResponse) Reset() { *m = QuerySwapExactAmountInResponse{} } +func (m *QuerySwapExactAmountInResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySwapExactAmountInResponse) ProtoMessage() {} +func (*QuerySwapExactAmountInResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{25} +} +func (m *QuerySwapExactAmountInResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySwapExactAmountInResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySwapExactAmountInResponse.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 *QuerySwapExactAmountInResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySwapExactAmountInResponse.Merge(m, src) +} +func (m *QuerySwapExactAmountInResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySwapExactAmountInResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySwapExactAmountInResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySwapExactAmountInResponse proto.InternalMessageInfo + +// =============================== EstimateSwapExactAmountOut +type QuerySwapExactAmountOutRequest struct { + // TODO: CHANGE THIS TO RESERVED IN A PATCH RELEASE + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` + PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` + Routes []SwapAmountOutRoute `protobuf:"bytes,3,rep,name=routes,proto3" json:"routes" yaml:"routes"` + TokenOut string `protobuf:"bytes,4,opt,name=token_out,json=tokenOut,proto3" json:"token_out,omitempty" yaml:"token_out"` +} + +func (m *QuerySwapExactAmountOutRequest) Reset() { *m = QuerySwapExactAmountOutRequest{} } +func (m *QuerySwapExactAmountOutRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySwapExactAmountOutRequest) ProtoMessage() {} +func (*QuerySwapExactAmountOutRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{26} +} +func (m *QuerySwapExactAmountOutRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySwapExactAmountOutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySwapExactAmountOutRequest.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 *QuerySwapExactAmountOutRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySwapExactAmountOutRequest.Merge(m, src) +} +func (m *QuerySwapExactAmountOutRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySwapExactAmountOutRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySwapExactAmountOutRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySwapExactAmountOutRequest proto.InternalMessageInfo + +func (m *QuerySwapExactAmountOutRequest) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *QuerySwapExactAmountOutRequest) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +func (m *QuerySwapExactAmountOutRequest) GetRoutes() []SwapAmountOutRoute { + if m != nil { + return m.Routes + } + return nil +} + +func (m *QuerySwapExactAmountOutRequest) GetTokenOut() string { + if m != nil { + return m.TokenOut + } + return "" +} + +type QuerySwapExactAmountOutResponse struct { + TokenInAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=token_in_amount,json=tokenInAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"token_in_amount" yaml:"token_in_amount"` +} + +func (m *QuerySwapExactAmountOutResponse) Reset() { *m = QuerySwapExactAmountOutResponse{} } +func (m *QuerySwapExactAmountOutResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySwapExactAmountOutResponse) ProtoMessage() {} +func (*QuerySwapExactAmountOutResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{27} +} +func (m *QuerySwapExactAmountOutResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySwapExactAmountOutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySwapExactAmountOutResponse.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 *QuerySwapExactAmountOutResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySwapExactAmountOutResponse.Merge(m, src) +} +func (m *QuerySwapExactAmountOutResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySwapExactAmountOutResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySwapExactAmountOutResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySwapExactAmountOutResponse proto.InternalMessageInfo + +type QueryTotalLiquidityRequest struct { +} + +func (m *QueryTotalLiquidityRequest) Reset() { *m = QueryTotalLiquidityRequest{} } +func (m *QueryTotalLiquidityRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTotalLiquidityRequest) ProtoMessage() {} +func (*QueryTotalLiquidityRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{28} +} +func (m *QueryTotalLiquidityRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTotalLiquidityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTotalLiquidityRequest.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 *QueryTotalLiquidityRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTotalLiquidityRequest.Merge(m, src) +} +func (m *QueryTotalLiquidityRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTotalLiquidityRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTotalLiquidityRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTotalLiquidityRequest proto.InternalMessageInfo + +type QueryTotalLiquidityResponse struct { + Liquidity github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=liquidity,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"liquidity" yaml:"liquidity"` +} + +func (m *QueryTotalLiquidityResponse) Reset() { *m = QueryTotalLiquidityResponse{} } +func (m *QueryTotalLiquidityResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTotalLiquidityResponse) ProtoMessage() {} +func (*QueryTotalLiquidityResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{29} +} +func (m *QueryTotalLiquidityResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTotalLiquidityResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTotalLiquidityResponse.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 *QueryTotalLiquidityResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTotalLiquidityResponse.Merge(m, src) +} +func (m *QueryTotalLiquidityResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTotalLiquidityResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTotalLiquidityResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTotalLiquidityResponse proto.InternalMessageInfo + +func (m *QueryTotalLiquidityResponse) GetLiquidity() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Liquidity + } + return nil +} + +func init() { + proto.RegisterType((*QueryPoolRequest)(nil), "osmosis.gamm.v1beta1.QueryPoolRequest") + proto.RegisterType((*QueryPoolResponse)(nil), "osmosis.gamm.v1beta1.QueryPoolResponse") + proto.RegisterType((*QueryPoolsRequest)(nil), "osmosis.gamm.v1beta1.QueryPoolsRequest") + proto.RegisterType((*QueryPoolsResponse)(nil), "osmosis.gamm.v1beta1.QueryPoolsResponse") + proto.RegisterType((*QueryNumPoolsRequest)(nil), "osmosis.gamm.v1beta1.QueryNumPoolsRequest") + proto.RegisterType((*QueryNumPoolsResponse)(nil), "osmosis.gamm.v1beta1.QueryNumPoolsResponse") + proto.RegisterType((*QueryPoolTypeRequest)(nil), "osmosis.gamm.v1beta1.QueryPoolTypeRequest") + proto.RegisterType((*QueryPoolTypeResponse)(nil), "osmosis.gamm.v1beta1.QueryPoolTypeResponse") + proto.RegisterType((*QueryCalcJoinPoolSharesRequest)(nil), "osmosis.gamm.v1beta1.QueryCalcJoinPoolSharesRequest") + proto.RegisterType((*QueryCalcJoinPoolSharesResponse)(nil), "osmosis.gamm.v1beta1.QueryCalcJoinPoolSharesResponse") + proto.RegisterType((*QueryCalcExitPoolCoinsFromSharesRequest)(nil), "osmosis.gamm.v1beta1.QueryCalcExitPoolCoinsFromSharesRequest") + proto.RegisterType((*QueryCalcExitPoolCoinsFromSharesResponse)(nil), "osmosis.gamm.v1beta1.QueryCalcExitPoolCoinsFromSharesResponse") + proto.RegisterType((*QueryPoolParamsRequest)(nil), "osmosis.gamm.v1beta1.QueryPoolParamsRequest") + proto.RegisterType((*QueryPoolParamsResponse)(nil), "osmosis.gamm.v1beta1.QueryPoolParamsResponse") + proto.RegisterType((*QueryTotalPoolLiquidityRequest)(nil), "osmosis.gamm.v1beta1.QueryTotalPoolLiquidityRequest") + proto.RegisterType((*QueryTotalPoolLiquidityResponse)(nil), "osmosis.gamm.v1beta1.QueryTotalPoolLiquidityResponse") + proto.RegisterType((*QueryTotalSharesRequest)(nil), "osmosis.gamm.v1beta1.QueryTotalSharesRequest") + proto.RegisterType((*QueryTotalSharesResponse)(nil), "osmosis.gamm.v1beta1.QueryTotalSharesResponse") + proto.RegisterType((*QueryCalcJoinPoolNoSwapSharesRequest)(nil), "osmosis.gamm.v1beta1.QueryCalcJoinPoolNoSwapSharesRequest") + proto.RegisterType((*QueryCalcJoinPoolNoSwapSharesResponse)(nil), "osmosis.gamm.v1beta1.QueryCalcJoinPoolNoSwapSharesResponse") + proto.RegisterType((*QuerySpotPriceRequest)(nil), "osmosis.gamm.v1beta1.QuerySpotPriceRequest") + proto.RegisterType((*QueryPoolsWithFilterRequest)(nil), "osmosis.gamm.v1beta1.QueryPoolsWithFilterRequest") + proto.RegisterType((*QueryPoolsWithFilterResponse)(nil), "osmosis.gamm.v1beta1.QueryPoolsWithFilterResponse") + proto.RegisterType((*QuerySpotPriceResponse)(nil), "osmosis.gamm.v1beta1.QuerySpotPriceResponse") + proto.RegisterType((*QuerySwapExactAmountInRequest)(nil), "osmosis.gamm.v1beta1.QuerySwapExactAmountInRequest") + proto.RegisterType((*QuerySwapExactAmountInResponse)(nil), "osmosis.gamm.v1beta1.QuerySwapExactAmountInResponse") + proto.RegisterType((*QuerySwapExactAmountOutRequest)(nil), "osmosis.gamm.v1beta1.QuerySwapExactAmountOutRequest") + proto.RegisterType((*QuerySwapExactAmountOutResponse)(nil), "osmosis.gamm.v1beta1.QuerySwapExactAmountOutResponse") + proto.RegisterType((*QueryTotalLiquidityRequest)(nil), "osmosis.gamm.v1beta1.QueryTotalLiquidityRequest") + proto.RegisterType((*QueryTotalLiquidityResponse)(nil), "osmosis.gamm.v1beta1.QueryTotalLiquidityResponse") +} + +func init() { proto.RegisterFile("osmosis/gamm/v1beta1/query.proto", fileDescriptor_d9a717df9ca609ef) } + +var fileDescriptor_d9a717df9ca609ef = []byte{ + // 1788 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x4b, 0x6c, 0x54, 0xd5, + 0x1b, 0xef, 0x99, 0x3e, 0xe8, 0x9c, 0xd2, 0xd7, 0xa1, 0xc0, 0x30, 0x2d, 0x33, 0xfc, 0xcf, 0x1f, + 0xda, 0x02, 0xed, 0x1d, 0x5a, 0x4a, 0x34, 0x55, 0x1e, 0x2d, 0xb4, 0x30, 0x8d, 0xd0, 0x7a, 0x21, + 0x10, 0x75, 0x31, 0xb9, 0x6d, 0x2f, 0xd3, 0x0b, 0x33, 0xf7, 0xdc, 0xce, 0x3d, 0x97, 0xb6, 0x31, + 0x84, 0x84, 0x18, 0xe3, 0xc2, 0x85, 0x09, 0xc2, 0xc2, 0x18, 0x75, 0x61, 0x8c, 0x61, 0x6d, 0xe2, + 0xca, 0x85, 0x31, 0x26, 0xc4, 0xc4, 0x04, 0xe3, 0xc6, 0xb8, 0x18, 0x0d, 0xe8, 0xce, 0x55, 0x37, + 0x2e, 0x35, 0xe7, 0x71, 0x1f, 0xf3, 0x7e, 0x28, 0x09, 0xae, 0x66, 0xee, 0xf9, 0x5e, 0xbf, 0xef, + 0x71, 0xbe, 0xf3, 0x9d, 0x03, 0x0f, 0x10, 0x3b, 0x4b, 0x6c, 0xc3, 0x4e, 0xa4, 0xb5, 0x6c, 0x36, + 0x71, 0x6b, 0x62, 0x59, 0xa7, 0xda, 0x44, 0x62, 0xdd, 0xd1, 0x73, 0x5b, 0x8a, 0x95, 0x23, 0x94, + 0xa0, 0x01, 0xc9, 0xa1, 0x30, 0x0e, 0x45, 0x72, 0x44, 0x07, 0xd2, 0x24, 0x4d, 0x38, 0x43, 0x82, + 0xfd, 0x13, 0xbc, 0xd1, 0xfd, 0x65, 0xb5, 0xd1, 0x4d, 0x49, 0x8e, 0xad, 0x70, 0x7a, 0x62, 0x59, + 0xb3, 0x75, 0x8f, 0xba, 0x42, 0x0c, 0x53, 0xd2, 0x8f, 0x04, 0xe9, 0x1c, 0x83, 0xc7, 0x65, 0x69, + 0x69, 0xc3, 0xd4, 0xa8, 0x41, 0x5c, 0xde, 0xa1, 0x34, 0x21, 0xe9, 0x8c, 0x9e, 0xd0, 0x2c, 0x23, + 0xa1, 0x99, 0x26, 0xa1, 0x9c, 0x68, 0x4b, 0xea, 0x3e, 0x49, 0xe5, 0x5f, 0xcb, 0xce, 0xf5, 0x84, + 0x66, 0x6e, 0xb9, 0x24, 0x61, 0x24, 0x25, 0xc0, 0x8b, 0x0f, 0x41, 0xc2, 0xa7, 0x61, 0xdf, 0xab, + 0xcc, 0xea, 0x12, 0x21, 0x19, 0x55, 0x5f, 0x77, 0x74, 0x9b, 0xa2, 0xa3, 0x70, 0x87, 0x45, 0x48, + 0x26, 0x65, 0xac, 0x46, 0xc0, 0x01, 0x30, 0xda, 0x36, 0x8b, 0xb6, 0xf3, 0xf1, 0x9e, 0x2d, 0x2d, + 0x9b, 0x99, 0xc6, 0x92, 0x80, 0xd5, 0x0e, 0xf6, 0x2f, 0xb9, 0x8a, 0x2f, 0xc0, 0xfe, 0x80, 0x02, + 0xdb, 0x22, 0xa6, 0xad, 0xa3, 0xe3, 0xb0, 0x8d, 0x91, 0xb9, 0x78, 0xd7, 0xe4, 0x80, 0x22, 0xa0, + 0x29, 0x2e, 0x34, 0x65, 0xc6, 0xdc, 0x9a, 0x0d, 0x7f, 0xf7, 0xc5, 0x78, 0x3b, 0x93, 0x4a, 0xaa, + 0x9c, 0x19, 0xbf, 0x11, 0xd0, 0x64, 0xbb, 0x58, 0xe6, 0x21, 0xf4, 0xe3, 0x10, 0x09, 0x71, 0x7d, + 0xc3, 0x8a, 0x74, 0x81, 0x05, 0x4d, 0x11, 0x89, 0x93, 0x41, 0x53, 0x96, 0xb4, 0xb4, 0x2e, 0x65, + 0xd5, 0x80, 0x24, 0x7e, 0x1f, 0x40, 0x14, 0xd4, 0x2e, 0x81, 0x9e, 0x80, 0xed, 0xcc, 0xb6, 0x1d, + 0x01, 0x07, 0x5a, 0xeb, 0x41, 0x2a, 0xb8, 0xd1, 0xf9, 0x32, 0xa8, 0x46, 0x6a, 0xa2, 0x12, 0x36, + 0x0b, 0x60, 0xed, 0x81, 0x03, 0x1c, 0xd5, 0x25, 0x27, 0x1b, 0x74, 0x1b, 0x2f, 0xc0, 0xdd, 0x45, + 0xeb, 0x12, 0xf0, 0x04, 0x0c, 0x9b, 0x4e, 0x36, 0xe5, 0x82, 0x66, 0xd9, 0x19, 0xd8, 0xce, 0xc7, + 0xfb, 0x44, 0x76, 0x3c, 0x12, 0x56, 0x3b, 0x4d, 0x29, 0x8a, 0xcf, 0x4a, 0x1b, 0xec, 0xeb, 0xca, + 0x96, 0xa5, 0x37, 0x95, 0x66, 0x17, 0x90, 0xaf, 0xc4, 0x07, 0xc4, 0x99, 0xe9, 0x96, 0xa5, 0x73, + 0x3d, 0xe1, 0x20, 0x20, 0x8f, 0x84, 0xd5, 0x4e, 0x4b, 0x8a, 0xe2, 0x2f, 0x01, 0x8c, 0x71, 0x65, + 0x67, 0xb5, 0xcc, 0xca, 0x02, 0x31, 0x4c, 0xa6, 0xf4, 0xf2, 0x9a, 0x96, 0xd3, 0xed, 0x66, 0xb0, + 0xa1, 0x35, 0x18, 0xa6, 0xe4, 0xa6, 0x6e, 0xda, 0x29, 0x83, 0x25, 0x83, 0x25, 0x72, 0x5f, 0x41, + 0x32, 0xdc, 0x34, 0x9c, 0x25, 0x86, 0x39, 0x7b, 0xec, 0x51, 0x3e, 0xde, 0xf2, 0xf0, 0x97, 0xf8, + 0x68, 0xda, 0xa0, 0x6b, 0xce, 0xb2, 0xb2, 0x42, 0xb2, 0x72, 0x4b, 0xc8, 0x9f, 0x71, 0x7b, 0xf5, + 0x66, 0x82, 0x61, 0xb6, 0xb9, 0x80, 0xad, 0x76, 0x0a, 0xed, 0x49, 0x13, 0xdf, 0x0d, 0xc1, 0x78, + 0x45, 0xe4, 0x32, 0x20, 0x36, 0xec, 0xb3, 0xd9, 0x4a, 0x8a, 0x38, 0x34, 0xa5, 0x65, 0x89, 0x63, + 0x52, 0x19, 0x97, 0x24, 0xb3, 0xfc, 0x73, 0x3e, 0x3e, 0x5c, 0x87, 0xe5, 0xa4, 0x49, 0xb7, 0xf3, + 0xf1, 0xbd, 0xc2, 0xe3, 0x62, 0x7d, 0x58, 0xed, 0xe1, 0x4b, 0x8b, 0x0e, 0x9d, 0xe1, 0x0b, 0xe8, + 0x06, 0x84, 0x32, 0x04, 0xc4, 0xa1, 0xcf, 0x22, 0x06, 0x32, 0xc2, 0x8b, 0x0e, 0xc5, 0x1f, 0x00, + 0x38, 0xe2, 0x05, 0x61, 0x6e, 0xd3, 0xa0, 0x2c, 0x08, 0x9c, 0x6b, 0x3e, 0x47, 0xb2, 0x85, 0x79, + 0xdc, 0x5b, 0x94, 0x47, 0x2f, 0x67, 0x57, 0x61, 0xaf, 0xf0, 0xca, 0x30, 0xdd, 0x20, 0x85, 0x78, + 0x90, 0x94, 0xc6, 0x82, 0xa4, 0x76, 0x73, 0x35, 0x49, 0x53, 0x04, 0x02, 0x3f, 0x00, 0x70, 0xb4, + 0x36, 0x38, 0x99, 0xaa, 0xc2, 0xa8, 0x81, 0x67, 0x1a, 0xb5, 0x39, 0xb8, 0xc7, 0xdb, 0x40, 0x4b, + 0x5a, 0x4e, 0xcb, 0x36, 0x55, 0xeb, 0xf8, 0x3c, 0xdc, 0x5b, 0xa2, 0x46, 0x7a, 0x33, 0x06, 0x3b, + 0x2c, 0xbe, 0x52, 0xad, 0xed, 0xaa, 0x92, 0x07, 0x5f, 0x94, 0x7b, 0xf0, 0x0a, 0xa1, 0x5a, 0x86, + 0x69, 0x7b, 0xc5, 0x58, 0x77, 0x8c, 0x55, 0x83, 0x6e, 0x35, 0x85, 0xeb, 0x13, 0x20, 0x77, 0x46, + 0x39, 0x7d, 0x12, 0xe0, 0x6d, 0x18, 0xce, 0xb8, 0x8b, 0xb5, 0xa3, 0x7d, 0x8e, 0x45, 0xdb, 0xef, + 0x24, 0x9e, 0x24, 0x6e, 0x2c, 0x03, 0xbe, 0xdc, 0xbc, 0x0c, 0x1d, 0x47, 0xd8, 0x7c, 0xbb, 0xc1, + 0x0e, 0x8c, 0x94, 0xea, 0x91, 0x2e, 0xbe, 0x06, 0x77, 0x52, 0xb6, 0x9c, 0xe2, 0x55, 0xe9, 0x66, + 0xa2, 0x8a, 0x97, 0x83, 0xd2, 0xcb, 0x5d, 0xc2, 0x58, 0x50, 0x18, 0xab, 0x5d, 0xd4, 0x37, 0x81, + 0xbf, 0x02, 0xf0, 0x60, 0x49, 0xef, 0xb9, 0x44, 0x2e, 0x6f, 0x68, 0xd6, 0x7f, 0xa2, 0x77, 0xfe, + 0x09, 0xe0, 0xa1, 0x1a, 0xf8, 0x65, 0x10, 0xef, 0x34, 0xb6, 0x2d, 0xe7, 0x64, 0x08, 0xfb, 0xdd, + 0x10, 0xba, 0xa2, 0xb8, 0xc9, 0xbd, 0x8a, 0x2e, 0x42, 0x28, 0x52, 0x20, 0xbb, 0x69, 0x33, 0x7d, + 0x29, 0x2c, 0x34, 0xb0, 0xad, 0xff, 0x07, 0x90, 0x87, 0xe7, 0x65, 0x8b, 0xd0, 0xa5, 0x9c, 0xb1, + 0xd2, 0xd4, 0x11, 0x8c, 0xe6, 0x60, 0x1f, 0x73, 0x3e, 0xa5, 0xd9, 0xb6, 0x4e, 0x53, 0xab, 0xba, + 0x49, 0xb2, 0x12, 0xdb, 0xa0, 0x7f, 0x54, 0x14, 0x73, 0x60, 0xb5, 0x87, 0x2d, 0xcd, 0xb0, 0x95, + 0x73, 0x6c, 0x01, 0x5d, 0x80, 0xfd, 0xeb, 0x0e, 0xa1, 0x85, 0x7a, 0x5a, 0xb9, 0x9e, 0xa1, 0xed, + 0x7c, 0x3c, 0x22, 0xf4, 0x94, 0xb0, 0x60, 0xb5, 0x97, 0xaf, 0xf9, 0x9a, 0xa6, 0x43, 0x11, 0xb0, + 0xd0, 0xd6, 0xd9, 0xd6, 0xd7, 0xae, 0x76, 0x6d, 0x18, 0x74, 0x8d, 0x65, 0x72, 0x5e, 0xd7, 0xf1, + 0xd7, 0x00, 0x0e, 0xfa, 0xa3, 0xd6, 0x35, 0x83, 0xae, 0xcd, 0x1b, 0x19, 0xaa, 0xe7, 0x5c, 0xa7, + 0x4f, 0xc2, 0xee, 0xac, 0x61, 0xa6, 0x82, 0xad, 0x80, 0x19, 0x8f, 0x6c, 0xe7, 0xe3, 0x03, 0xc2, + 0x78, 0x01, 0x19, 0xab, 0x3b, 0xb3, 0x86, 0xe9, 0x75, 0x13, 0x34, 0x18, 0x1c, 0x38, 0xb8, 0xff, + 0xfe, 0x68, 0x51, 0x34, 0x2e, 0xb6, 0x36, 0x3d, 0x2e, 0x7e, 0x04, 0xe0, 0x50, 0x79, 0x1f, 0x9e, + 0x93, 0xc1, 0x51, 0x95, 0xc7, 0x49, 0xa0, 0xa4, 0x24, 0xb2, 0x29, 0x08, 0x6d, 0x8b, 0xd0, 0x94, + 0xc5, 0x56, 0x65, 0x6c, 0x77, 0xfb, 0xdb, 0xc3, 0xa7, 0x61, 0x35, 0x6c, 0xbb, 0xd2, 0x2c, 0x97, + 0xf8, 0x2f, 0x00, 0xf7, 0x0b, 0xa5, 0x1b, 0x9a, 0x35, 0xb7, 0xa9, 0xad, 0xc8, 0xe9, 0x22, 0x69, + 0xba, 0xa9, 0x3b, 0x0c, 0x3b, 0x6c, 0xdd, 0x5c, 0xd5, 0x73, 0x52, 0x6f, 0xff, 0x76, 0x3e, 0xde, + 0x2d, 0xf5, 0xf2, 0x75, 0xac, 0x4a, 0x86, 0x60, 0x69, 0x87, 0x6a, 0x96, 0xb6, 0x02, 0x45, 0x9f, + 0x60, 0x4d, 0x48, 0x94, 0xe2, 0xae, 0xed, 0x7c, 0xbc, 0x37, 0xb0, 0xa1, 0x53, 0x86, 0x89, 0xd5, + 0x1d, 0xfc, 0x6f, 0xd2, 0x44, 0x57, 0x61, 0x47, 0x8e, 0x38, 0x54, 0xb7, 0x23, 0x6d, 0x3c, 0xfc, + 0x23, 0x4a, 0xb9, 0x1b, 0x9b, 0xc2, 0xfc, 0xf0, 0x5c, 0x60, 0xfc, 0xb3, 0xbb, 0x65, 0xaf, 0x90, + 0xa0, 0x85, 0x12, 0xac, 0x4a, 0x6d, 0xf8, 0xbe, 0x3b, 0x99, 0x96, 0x89, 0x80, 0x3f, 0xde, 0x09, + 0x40, 0xff, 0xde, 0x78, 0x57, 0xac, 0x0f, 0xab, 0x3d, 0x7c, 0xc9, 0x1b, 0xef, 0xf0, 0x5b, 0xa1, + 0xf2, 0xb8, 0x16, 0x1d, 0xfa, 0xac, 0x53, 0x73, 0xcd, 0x0b, 0x75, 0x2b, 0x0f, 0xf5, 0x68, 0xad, + 0x50, 0x33, 0x4c, 0x75, 0xc4, 0x9a, 0x5d, 0x1c, 0x3c, 0xc7, 0x23, 0x6d, 0xc5, 0x17, 0x07, 0x8f, + 0x84, 0xe5, 0x11, 0xc2, 0x1a, 0xe9, 0x3d, 0x77, 0xc8, 0x28, 0x17, 0x06, 0x99, 0x1f, 0x0b, 0xf6, + 0xba, 0x05, 0x53, 0x98, 0x9e, 0x0b, 0x0d, 0xa7, 0x67, 0x4f, 0x61, 0xfd, 0x79, 0xd9, 0xe9, 0x96, + 0x65, 0x28, 0x93, 0x33, 0x04, 0xa3, 0xfe, 0x3c, 0x50, 0x3c, 0x45, 0xe1, 0x0f, 0xdd, 0x6e, 0x58, + 0x4c, 0x7e, 0x2e, 0x86, 0xa2, 0xc9, 0x87, 0x03, 0xb0, 0x9d, 0xc3, 0x43, 0x77, 0x20, 0x6f, 0x55, + 0x36, 0xaa, 0xb0, 0x99, 0x4a, 0xee, 0xe6, 0xd1, 0xd1, 0xda, 0x8c, 0xc2, 0x49, 0xfc, 0xff, 0xbb, + 0x3f, 0xfe, 0x76, 0x2f, 0xb4, 0x1f, 0x0d, 0x26, 0xca, 0xbe, 0x96, 0x88, 0xde, 0xf8, 0x2e, 0x80, + 0x9d, 0xee, 0x7d, 0x17, 0x1d, 0xa9, 0xa2, 0xbb, 0xe8, 0xb2, 0x1c, 0x3d, 0x5a, 0x17, 0xaf, 0x84, + 0x32, 0xc2, 0xa1, 0xfc, 0x0f, 0xc5, 0xcb, 0x43, 0xf1, 0x6e, 0xd0, 0xe8, 0x53, 0x00, 0x7b, 0x0a, + 0x73, 0x86, 0x8e, 0x55, 0x31, 0x54, 0x36, 0xfb, 0xd1, 0x89, 0x06, 0x24, 0x24, 0xc0, 0x71, 0x0e, + 0x70, 0x04, 0x1d, 0x2a, 0x0f, 0x50, 0x4c, 0x88, 0x5e, 0x02, 0xd1, 0x67, 0x00, 0xf6, 0x16, 0x1d, + 0x52, 0x68, 0xa2, 0x56, 0x62, 0x4a, 0x0e, 0xe5, 0xe8, 0x64, 0x23, 0x22, 0x12, 0xe9, 0x18, 0x47, + 0x3a, 0x8c, 0x0e, 0x96, 0x47, 0x7a, 0x9d, 0x73, 0xeb, 0xab, 0x32, 0x9e, 0x6f, 0x03, 0xd8, 0xc6, + 0x34, 0xa1, 0xe1, 0x1a, 0xa6, 0x5c, 0x48, 0x23, 0x35, 0xf9, 0xea, 0x8b, 0x18, 0x37, 0x9f, 0x78, + 0x53, 0x76, 0xb6, 0xdb, 0xe8, 0x01, 0x80, 0x9d, 0xee, 0x33, 0x46, 0xd5, 0x3a, 0x2b, 0x7a, 0x30, + 0xa9, 0x5a, 0x67, 0xc5, 0xef, 0x22, 0x78, 0x82, 0x83, 0x3a, 0x8a, 0x0e, 0x57, 0x06, 0xc5, 0x47, + 0x98, 0x00, 0xb0, 0xfb, 0x00, 0x46, 0x2a, 0x0d, 0xc7, 0x68, 0xba, 0x8a, 0xf1, 0x1a, 0x37, 0x82, + 0xe8, 0x4b, 0x4d, 0xc9, 0x4a, 0x47, 0x5a, 0xd0, 0x37, 0x00, 0xa2, 0xd2, 0x07, 0x0f, 0x34, 0x55, + 0xa7, 0xd6, 0x42, 0x2c, 0x27, 0x1a, 0x94, 0x92, 0x28, 0xce, 0xf0, 0x70, 0x4e, 0xa3, 0x17, 0xeb, + 0xca, 0x71, 0xe2, 0x06, 0x31, 0xcc, 0x94, 0xbd, 0xa1, 0x59, 0x29, 0x9d, 0x1d, 0x13, 0x29, 0xc3, + 0x44, 0xbf, 0x03, 0x38, 0x58, 0xe5, 0x51, 0x00, 0x9d, 0xac, 0x01, 0xac, 0xfa, 0x4b, 0x47, 0xf4, + 0x54, 0xb3, 0xe2, 0xd2, 0xc1, 0xf3, 0xdc, 0xc1, 0x19, 0x74, 0xba, 0x3e, 0x07, 0xf5, 0x4d, 0x83, + 0x0a, 0x07, 0xc5, 0x33, 0x8a, 0x38, 0x9b, 0x98, 0x9f, 0x1f, 0x03, 0x08, 0xfd, 0xd7, 0x01, 0x34, + 0x56, 0xa3, 0x68, 0x0b, 0xde, 0x22, 0xa2, 0xe3, 0x75, 0x72, 0x4b, 0xd0, 0x53, 0x1c, 0xb4, 0x82, + 0xc6, 0xea, 0x03, 0x2d, 0x9e, 0x1e, 0xd0, 0xb7, 0x00, 0xa2, 0xd2, 0x67, 0x82, 0xaa, 0xf5, 0x54, + 0xf1, 0x95, 0xa2, 0x6a, 0x3d, 0x55, 0x7e, 0x8b, 0xc0, 0xb3, 0x1c, 0xf9, 0xcb, 0x68, 0xba, 0x3e, + 0xe4, 0xa2, 0xeb, 0xf2, 0x4f, 0xbf, 0xf5, 0x7e, 0x0e, 0x60, 0x57, 0xe0, 0x11, 0x00, 0x8d, 0xd7, + 0x82, 0x52, 0x58, 0x31, 0x4a, 0xbd, 0xec, 0x12, 0xf2, 0x34, 0x87, 0x3c, 0x85, 0x26, 0x1b, 0x81, + 0x2c, 0x6e, 0xa1, 0xac, 0x28, 0xc2, 0xde, 0x55, 0x01, 0x55, 0x6b, 0x64, 0xc5, 0x77, 0xd4, 0xe8, + 0x58, 0x7d, 0xcc, 0x12, 0xe4, 0x0b, 0x0d, 0x56, 0x04, 0x13, 0xb6, 0xdf, 0x09, 0x01, 0xf4, 0x3d, + 0x80, 0xfb, 0xe6, 0x6c, 0x6a, 0x64, 0x35, 0xaa, 0x97, 0x4c, 0xdf, 0xe8, 0x78, 0x35, 0x10, 0x15, + 0x6e, 0x2b, 0xd1, 0xa9, 0xc6, 0x84, 0xa4, 0x07, 0x73, 0xdc, 0x83, 0xd3, 0xe8, 0x64, 0x79, 0x0f, + 0x02, 0x5b, 0x50, 0xa2, 0x4d, 0x04, 0xfa, 0x8c, 0xbf, 0x0d, 0x7f, 0x00, 0x30, 0x5a, 0xc1, 0x9f, + 0x45, 0x87, 0xa2, 0x06, 0xb0, 0xf9, 0x43, 0x7e, 0xd5, 0x62, 0xaf, 0x3c, 0x13, 0xe3, 0x79, 0xee, + 0xd2, 0x19, 0x74, 0xea, 0x1f, 0xb8, 0x44, 0x1c, 0x3a, 0xbb, 0xf0, 0xe8, 0x49, 0x0c, 0x3c, 0x7e, + 0x12, 0x03, 0xbf, 0x3e, 0x89, 0x81, 0xf7, 0x9e, 0xc6, 0x5a, 0x1e, 0x3f, 0x8d, 0xb5, 0xfc, 0xf4, + 0x34, 0xd6, 0xf2, 0xfa, 0xb1, 0xc0, 0xec, 0x29, 0x6d, 0x8c, 0x67, 0xb4, 0x65, 0xdb, 0x33, 0x78, + 0x6b, 0x62, 0x2a, 0xb1, 0x29, 0xcc, 0xf2, 0x49, 0x74, 0xb9, 0x83, 0xdf, 0x94, 0x8f, 0xff, 0x1d, + 0x00, 0x00, 0xff, 0xff, 0xa7, 0x83, 0x77, 0x41, 0x8e, 0x1b, 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 { + Pools(ctx context.Context, in *QueryPoolsRequest, opts ...grpc.CallOption) (*QueryPoolsResponse, error) + NumPools(ctx context.Context, in *QueryNumPoolsRequest, opts ...grpc.CallOption) (*QueryNumPoolsResponse, error) + TotalLiquidity(ctx context.Context, in *QueryTotalLiquidityRequest, opts ...grpc.CallOption) (*QueryTotalLiquidityResponse, error) + // PoolsWithFilter allows you to query specific pools with requested + // parameters + PoolsWithFilter(ctx context.Context, in *QueryPoolsWithFilterRequest, opts ...grpc.CallOption) (*QueryPoolsWithFilterResponse, error) + // Per Pool gRPC Endpoints + Pool(ctx context.Context, in *QueryPoolRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) + // PoolType returns the type of the pool. + // Returns "Balancer" as a string literal when the pool is a balancer pool. + // Errors if the pool is failed to be type caseted. + PoolType(ctx context.Context, in *QueryPoolTypeRequest, opts ...grpc.CallOption) (*QueryPoolTypeResponse, error) + // Simulates joining pool without a swap. Returns the amount of shares you'd + // get and tokens needed to provide + CalcJoinPoolNoSwapShares(ctx context.Context, in *QueryCalcJoinPoolNoSwapSharesRequest, opts ...grpc.CallOption) (*QueryCalcJoinPoolNoSwapSharesResponse, error) + CalcJoinPoolShares(ctx context.Context, in *QueryCalcJoinPoolSharesRequest, opts ...grpc.CallOption) (*QueryCalcJoinPoolSharesResponse, error) + CalcExitPoolCoinsFromShares(ctx context.Context, in *QueryCalcExitPoolCoinsFromSharesRequest, opts ...grpc.CallOption) (*QueryCalcExitPoolCoinsFromSharesResponse, error) + PoolParams(ctx context.Context, in *QueryPoolParamsRequest, opts ...grpc.CallOption) (*QueryPoolParamsResponse, error) + TotalPoolLiquidity(ctx context.Context, in *QueryTotalPoolLiquidityRequest, opts ...grpc.CallOption) (*QueryTotalPoolLiquidityResponse, error) + TotalShares(ctx context.Context, in *QueryTotalSharesRequest, opts ...grpc.CallOption) (*QueryTotalSharesResponse, error) + // SpotPrice defines a gRPC query handler that returns the spot price given + // a base denomination and a quote denomination. + SpotPrice(ctx context.Context, in *QuerySpotPriceRequest, opts ...grpc.CallOption) (*QuerySpotPriceResponse, error) + // Estimate the swap. + EstimateSwapExactAmountIn(ctx context.Context, in *QuerySwapExactAmountInRequest, opts ...grpc.CallOption) (*QuerySwapExactAmountInResponse, error) + EstimateSwapExactAmountOut(ctx context.Context, in *QuerySwapExactAmountOutRequest, opts ...grpc.CallOption) (*QuerySwapExactAmountOutResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Pools(ctx context.Context, in *QueryPoolsRequest, opts ...grpc.CallOption) (*QueryPoolsResponse, error) { + out := new(QueryPoolsResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/Pools", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) NumPools(ctx context.Context, in *QueryNumPoolsRequest, opts ...grpc.CallOption) (*QueryNumPoolsResponse, error) { + out := new(QueryNumPoolsResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/NumPools", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) TotalLiquidity(ctx context.Context, in *QueryTotalLiquidityRequest, opts ...grpc.CallOption) (*QueryTotalLiquidityResponse, error) { + out := new(QueryTotalLiquidityResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/TotalLiquidity", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) PoolsWithFilter(ctx context.Context, in *QueryPoolsWithFilterRequest, opts ...grpc.CallOption) (*QueryPoolsWithFilterResponse, error) { + out := new(QueryPoolsWithFilterResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/PoolsWithFilter", in, out, opts...) + if err != nil { + return nil, err + } + 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, "/osmosis.gamm.v1beta1.Query/Pool", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) PoolType(ctx context.Context, in *QueryPoolTypeRequest, opts ...grpc.CallOption) (*QueryPoolTypeResponse, error) { + out := new(QueryPoolTypeResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/PoolType", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) CalcJoinPoolNoSwapShares(ctx context.Context, in *QueryCalcJoinPoolNoSwapSharesRequest, opts ...grpc.CallOption) (*QueryCalcJoinPoolNoSwapSharesResponse, error) { + out := new(QueryCalcJoinPoolNoSwapSharesResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/CalcJoinPoolNoSwapShares", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) CalcJoinPoolShares(ctx context.Context, in *QueryCalcJoinPoolSharesRequest, opts ...grpc.CallOption) (*QueryCalcJoinPoolSharesResponse, error) { + out := new(QueryCalcJoinPoolSharesResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/CalcJoinPoolShares", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) CalcExitPoolCoinsFromShares(ctx context.Context, in *QueryCalcExitPoolCoinsFromSharesRequest, opts ...grpc.CallOption) (*QueryCalcExitPoolCoinsFromSharesResponse, error) { + out := new(QueryCalcExitPoolCoinsFromSharesResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/CalcExitPoolCoinsFromShares", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) PoolParams(ctx context.Context, in *QueryPoolParamsRequest, opts ...grpc.CallOption) (*QueryPoolParamsResponse, error) { + out := new(QueryPoolParamsResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/PoolParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) TotalPoolLiquidity(ctx context.Context, in *QueryTotalPoolLiquidityRequest, opts ...grpc.CallOption) (*QueryTotalPoolLiquidityResponse, error) { + out := new(QueryTotalPoolLiquidityResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/TotalPoolLiquidity", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) TotalShares(ctx context.Context, in *QueryTotalSharesRequest, opts ...grpc.CallOption) (*QueryTotalSharesResponse, error) { + out := new(QueryTotalSharesResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/TotalShares", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Deprecated: Do not use. +func (c *queryClient) SpotPrice(ctx context.Context, in *QuerySpotPriceRequest, opts ...grpc.CallOption) (*QuerySpotPriceResponse, error) { + out := new(QuerySpotPriceResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/SpotPrice", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) EstimateSwapExactAmountIn(ctx context.Context, in *QuerySwapExactAmountInRequest, opts ...grpc.CallOption) (*QuerySwapExactAmountInResponse, error) { + out := new(QuerySwapExactAmountInResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/EstimateSwapExactAmountIn", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) EstimateSwapExactAmountOut(ctx context.Context, in *QuerySwapExactAmountOutRequest, opts ...grpc.CallOption) (*QuerySwapExactAmountOutResponse, error) { + out := new(QuerySwapExactAmountOutResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/EstimateSwapExactAmountOut", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + Pools(context.Context, *QueryPoolsRequest) (*QueryPoolsResponse, error) + NumPools(context.Context, *QueryNumPoolsRequest) (*QueryNumPoolsResponse, error) + TotalLiquidity(context.Context, *QueryTotalLiquidityRequest) (*QueryTotalLiquidityResponse, error) + // PoolsWithFilter allows you to query specific pools with requested + // parameters + PoolsWithFilter(context.Context, *QueryPoolsWithFilterRequest) (*QueryPoolsWithFilterResponse, error) + // Per Pool gRPC Endpoints + Pool(context.Context, *QueryPoolRequest) (*QueryPoolResponse, error) + // PoolType returns the type of the pool. + // Returns "Balancer" as a string literal when the pool is a balancer pool. + // Errors if the pool is failed to be type caseted. + PoolType(context.Context, *QueryPoolTypeRequest) (*QueryPoolTypeResponse, error) + // Simulates joining pool without a swap. Returns the amount of shares you'd + // get and tokens needed to provide + CalcJoinPoolNoSwapShares(context.Context, *QueryCalcJoinPoolNoSwapSharesRequest) (*QueryCalcJoinPoolNoSwapSharesResponse, error) + CalcJoinPoolShares(context.Context, *QueryCalcJoinPoolSharesRequest) (*QueryCalcJoinPoolSharesResponse, error) + CalcExitPoolCoinsFromShares(context.Context, *QueryCalcExitPoolCoinsFromSharesRequest) (*QueryCalcExitPoolCoinsFromSharesResponse, error) + PoolParams(context.Context, *QueryPoolParamsRequest) (*QueryPoolParamsResponse, error) + TotalPoolLiquidity(context.Context, *QueryTotalPoolLiquidityRequest) (*QueryTotalPoolLiquidityResponse, error) + TotalShares(context.Context, *QueryTotalSharesRequest) (*QueryTotalSharesResponse, error) + // SpotPrice defines a gRPC query handler that returns the spot price given + // a base denomination and a quote denomination. + SpotPrice(context.Context, *QuerySpotPriceRequest) (*QuerySpotPriceResponse, error) + // Estimate the swap. + EstimateSwapExactAmountIn(context.Context, *QuerySwapExactAmountInRequest) (*QuerySwapExactAmountInResponse, error) + EstimateSwapExactAmountOut(context.Context, *QuerySwapExactAmountOutRequest) (*QuerySwapExactAmountOutResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Pools(ctx context.Context, req *QueryPoolsRequest) (*QueryPoolsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Pools not implemented") +} +func (*UnimplementedQueryServer) NumPools(ctx context.Context, req *QueryNumPoolsRequest) (*QueryNumPoolsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NumPools not implemented") +} +func (*UnimplementedQueryServer) TotalLiquidity(ctx context.Context, req *QueryTotalLiquidityRequest) (*QueryTotalLiquidityResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TotalLiquidity not implemented") +} +func (*UnimplementedQueryServer) PoolsWithFilter(ctx context.Context, req *QueryPoolsWithFilterRequest) (*QueryPoolsWithFilterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PoolsWithFilter not implemented") +} +func (*UnimplementedQueryServer) Pool(ctx context.Context, req *QueryPoolRequest) (*QueryPoolResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Pool not implemented") +} +func (*UnimplementedQueryServer) PoolType(ctx context.Context, req *QueryPoolTypeRequest) (*QueryPoolTypeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PoolType not implemented") +} +func (*UnimplementedQueryServer) CalcJoinPoolNoSwapShares(ctx context.Context, req *QueryCalcJoinPoolNoSwapSharesRequest) (*QueryCalcJoinPoolNoSwapSharesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CalcJoinPoolNoSwapShares not implemented") +} +func (*UnimplementedQueryServer) CalcJoinPoolShares(ctx context.Context, req *QueryCalcJoinPoolSharesRequest) (*QueryCalcJoinPoolSharesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CalcJoinPoolShares not implemented") +} +func (*UnimplementedQueryServer) CalcExitPoolCoinsFromShares(ctx context.Context, req *QueryCalcExitPoolCoinsFromSharesRequest) (*QueryCalcExitPoolCoinsFromSharesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CalcExitPoolCoinsFromShares not implemented") +} +func (*UnimplementedQueryServer) PoolParams(ctx context.Context, req *QueryPoolParamsRequest) (*QueryPoolParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PoolParams not implemented") +} +func (*UnimplementedQueryServer) TotalPoolLiquidity(ctx context.Context, req *QueryTotalPoolLiquidityRequest) (*QueryTotalPoolLiquidityResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TotalPoolLiquidity not implemented") +} +func (*UnimplementedQueryServer) TotalShares(ctx context.Context, req *QueryTotalSharesRequest) (*QueryTotalSharesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TotalShares not implemented") +} +func (*UnimplementedQueryServer) SpotPrice(ctx context.Context, req *QuerySpotPriceRequest) (*QuerySpotPriceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SpotPrice not implemented") +} +func (*UnimplementedQueryServer) EstimateSwapExactAmountIn(ctx context.Context, req *QuerySwapExactAmountInRequest) (*QuerySwapExactAmountInResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EstimateSwapExactAmountIn not implemented") +} +func (*UnimplementedQueryServer) EstimateSwapExactAmountOut(ctx context.Context, req *QuerySwapExactAmountOutRequest) (*QuerySwapExactAmountOutResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EstimateSwapExactAmountOut not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Pools_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPoolsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Pools(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Query/Pools", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Pools(ctx, req.(*QueryPoolsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_NumPools_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryNumPoolsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).NumPools(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Query/NumPools", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).NumPools(ctx, req.(*QueryNumPoolsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_TotalLiquidity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTotalLiquidityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TotalLiquidity(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Query/TotalLiquidity", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TotalLiquidity(ctx, req.(*QueryTotalLiquidityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_PoolsWithFilter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPoolsWithFilterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).PoolsWithFilter(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Query/PoolsWithFilter", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PoolsWithFilter(ctx, req.(*QueryPoolsWithFilterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +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 interceptor == nil { + return srv.(QueryServer).Pool(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Query/Pool", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Pool(ctx, req.(*QueryPoolRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_PoolType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPoolTypeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).PoolType(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Query/PoolType", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PoolType(ctx, req.(*QueryPoolTypeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_CalcJoinPoolNoSwapShares_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCalcJoinPoolNoSwapSharesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CalcJoinPoolNoSwapShares(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Query/CalcJoinPoolNoSwapShares", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CalcJoinPoolNoSwapShares(ctx, req.(*QueryCalcJoinPoolNoSwapSharesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_CalcJoinPoolShares_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCalcJoinPoolSharesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CalcJoinPoolShares(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Query/CalcJoinPoolShares", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CalcJoinPoolShares(ctx, req.(*QueryCalcJoinPoolSharesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_CalcExitPoolCoinsFromShares_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCalcExitPoolCoinsFromSharesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CalcExitPoolCoinsFromShares(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Query/CalcExitPoolCoinsFromShares", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CalcExitPoolCoinsFromShares(ctx, req.(*QueryCalcExitPoolCoinsFromSharesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_PoolParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPoolParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).PoolParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Query/PoolParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PoolParams(ctx, req.(*QueryPoolParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_TotalPoolLiquidity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTotalPoolLiquidityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TotalPoolLiquidity(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Query/TotalPoolLiquidity", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TotalPoolLiquidity(ctx, req.(*QueryTotalPoolLiquidityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_TotalShares_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTotalSharesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TotalShares(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Query/TotalShares", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TotalShares(ctx, req.(*QueryTotalSharesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SpotPrice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySpotPriceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SpotPrice(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Query/SpotPrice", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SpotPrice(ctx, req.(*QuerySpotPriceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_EstimateSwapExactAmountIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySwapExactAmountInRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).EstimateSwapExactAmountIn(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Query/EstimateSwapExactAmountIn", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).EstimateSwapExactAmountIn(ctx, req.(*QuerySwapExactAmountInRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_EstimateSwapExactAmountOut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySwapExactAmountOutRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).EstimateSwapExactAmountOut(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Query/EstimateSwapExactAmountOut", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).EstimateSwapExactAmountOut(ctx, req.(*QuerySwapExactAmountOutRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "osmosis.gamm.v1beta1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Pools", + Handler: _Query_Pools_Handler, + }, + { + MethodName: "NumPools", + Handler: _Query_NumPools_Handler, + }, + { + MethodName: "TotalLiquidity", + Handler: _Query_TotalLiquidity_Handler, + }, + { + MethodName: "PoolsWithFilter", + Handler: _Query_PoolsWithFilter_Handler, + }, + { + MethodName: "Pool", + Handler: _Query_Pool_Handler, + }, + { + MethodName: "PoolType", + Handler: _Query_PoolType_Handler, + }, + { + MethodName: "CalcJoinPoolNoSwapShares", + Handler: _Query_CalcJoinPoolNoSwapShares_Handler, + }, + { + MethodName: "CalcJoinPoolShares", + Handler: _Query_CalcJoinPoolShares_Handler, + }, + { + MethodName: "CalcExitPoolCoinsFromShares", + Handler: _Query_CalcExitPoolCoinsFromShares_Handler, + }, + { + MethodName: "PoolParams", + Handler: _Query_PoolParams_Handler, + }, + { + MethodName: "TotalPoolLiquidity", + Handler: _Query_TotalPoolLiquidity_Handler, + }, + { + MethodName: "TotalShares", + Handler: _Query_TotalShares_Handler, + }, + { + MethodName: "SpotPrice", + Handler: _Query_SpotPrice_Handler, + }, + { + MethodName: "EstimateSwapExactAmountIn", + Handler: _Query_EstimateSwapExactAmountIn_Handler, + }, + { + MethodName: "EstimateSwapExactAmountOut", + Handler: _Query_EstimateSwapExactAmountOut_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "osmosis/gamm/v1beta1/query.proto", +} + +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 + if m.PoolId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) + 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 + } + 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 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 + } + return len(dAtA) - i, nil +} + +func (m *QueryPoolsRequest) 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 *QueryPoolsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPoolsRequest) 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 *QueryPoolsResponse) 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 *QueryPoolsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPoolsResponse) 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 len(m.Pools) > 0 { + for iNdEx := len(m.Pools) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Pools[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 *QueryNumPoolsRequest) 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 *QueryNumPoolsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryNumPoolsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryNumPoolsResponse) 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 *QueryNumPoolsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryNumPoolsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NumPools != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.NumPools)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryPoolTypeRequest) 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 *QueryPoolTypeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPoolTypeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.PoolId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryPoolTypeResponse) 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 *QueryPoolTypeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPoolTypeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PoolType) > 0 { + i -= len(m.PoolType) + copy(dAtA[i:], m.PoolType) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PoolType))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryCalcJoinPoolSharesRequest) 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 *QueryCalcJoinPoolSharesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCalcJoinPoolSharesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TokensIn) > 0 { + for iNdEx := len(m.TokensIn) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TokensIn[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.PoolId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryCalcJoinPoolSharesResponse) 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 *QueryCalcJoinPoolSharesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCalcJoinPoolSharesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TokensOut) > 0 { + for iNdEx := len(m.TokensOut) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TokensOut[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size := m.ShareOutAmount.Size() + i -= size + if _, err := m.ShareOutAmount.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 *QueryCalcExitPoolCoinsFromSharesRequest) 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 *QueryCalcExitPoolCoinsFromSharesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCalcExitPoolCoinsFromSharesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.ShareInAmount.Size() + i -= size + if _, err := m.ShareInAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.PoolId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryCalcExitPoolCoinsFromSharesResponse) 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 *QueryCalcExitPoolCoinsFromSharesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCalcExitPoolCoinsFromSharesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TokensOut) > 0 { + for iNdEx := len(m.TokensOut) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TokensOut[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 *QueryPoolParamsRequest) 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 *QueryPoolParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPoolParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.PoolId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryPoolParamsResponse) 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 *QueryPoolParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPoolParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Params != nil { + { + 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 *QueryTotalPoolLiquidityRequest) 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 *QueryTotalPoolLiquidityRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTotalPoolLiquidityRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.PoolId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryTotalPoolLiquidityResponse) 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 *QueryTotalPoolLiquidityResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTotalPoolLiquidityResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Liquidity) > 0 { + for iNdEx := len(m.Liquidity) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Liquidity[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 *QueryTotalSharesRequest) 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 *QueryTotalSharesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTotalSharesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.PoolId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryTotalSharesResponse) 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 *QueryTotalSharesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTotalSharesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.TotalShares.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 *QueryCalcJoinPoolNoSwapSharesRequest) 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 *QueryCalcJoinPoolNoSwapSharesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCalcJoinPoolNoSwapSharesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TokensIn) > 0 { + for iNdEx := len(m.TokensIn) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TokensIn[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.PoolId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryCalcJoinPoolNoSwapSharesResponse) 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 *QueryCalcJoinPoolNoSwapSharesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCalcJoinPoolNoSwapSharesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.SharesOut.Size() + i -= size + if _, err := m.SharesOut.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.TokensOut) > 0 { + for iNdEx := len(m.TokensOut) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TokensOut[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 *QuerySpotPriceRequest) 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 *QuerySpotPriceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySpotPriceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.QuoteAssetDenom) > 0 { + i -= len(m.QuoteAssetDenom) + copy(dAtA[i:], m.QuoteAssetDenom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.QuoteAssetDenom))) + i-- + dAtA[i] = 0x1a + } + if len(m.BaseAssetDenom) > 0 { + i -= len(m.BaseAssetDenom) + copy(dAtA[i:], m.BaseAssetDenom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.BaseAssetDenom))) + i-- + dAtA[i] = 0x12 + } + if m.PoolId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryPoolsWithFilterRequest) 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 *QueryPoolsWithFilterRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPoolsWithFilterRequest) 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 + } + if len(m.PoolType) > 0 { + i -= len(m.PoolType) + copy(dAtA[i:], m.PoolType) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PoolType))) + i-- + dAtA[i] = 0x12 + } + if len(m.MinLiquidity) > 0 { + i -= len(m.MinLiquidity) + copy(dAtA[i:], m.MinLiquidity) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MinLiquidity))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryPoolsWithFilterResponse) 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 *QueryPoolsWithFilterResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPoolsWithFilterResponse) 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 len(m.Pools) > 0 { + for iNdEx := len(m.Pools) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Pools[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 *QuerySpotPriceResponse) 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 *QuerySpotPriceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySpotPriceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SpotPrice) > 0 { + i -= len(m.SpotPrice) + copy(dAtA[i:], m.SpotPrice) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SpotPrice))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySwapExactAmountInRequest) 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 *QuerySwapExactAmountInRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySwapExactAmountInRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + 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] = 0x22 + } + } + 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 m.PoolId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySwapExactAmountInResponse) 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 *QuerySwapExactAmountInResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySwapExactAmountInResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.TokenOutAmount.Size() + i -= size + if _, err := m.TokenOutAmount.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 *QuerySwapExactAmountOutRequest) 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 *QuerySwapExactAmountOutRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySwapExactAmountOutRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = 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 + } + 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 m.PoolId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySwapExactAmountOutResponse) 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 *QuerySwapExactAmountOutResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySwapExactAmountOutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.TokenInAmount.Size() + i -= size + if _, err := m.TokenInAmount.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 *QueryTotalLiquidityRequest) 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 *QueryTotalLiquidityRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTotalLiquidityRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryTotalLiquidityResponse) 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 *QueryTotalLiquidityResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTotalLiquidityResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Liquidity) > 0 { + for iNdEx := len(m.Liquidity) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Liquidity[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 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 *QueryPoolRequest) 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 *QueryPoolsRequest) 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 *QueryPoolsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Pools) > 0 { + for _, e := range m.Pools { + 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 *QueryNumPoolsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryNumPoolsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NumPools != 0 { + n += 1 + sovQuery(uint64(m.NumPools)) + } + return n +} + +func (m *QueryPoolTypeRequest) 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 *QueryPoolTypeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PoolType) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCalcJoinPoolSharesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolId != 0 { + n += 1 + sovQuery(uint64(m.PoolId)) + } + if len(m.TokensIn) > 0 { + for _, e := range m.TokensIn { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryCalcJoinPoolSharesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ShareOutAmount.Size() + n += 1 + l + sovQuery(uint64(l)) + if len(m.TokensOut) > 0 { + for _, e := range m.TokensOut { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryCalcExitPoolCoinsFromSharesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolId != 0 { + n += 1 + sovQuery(uint64(m.PoolId)) + } + l = m.ShareInAmount.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryCalcExitPoolCoinsFromSharesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.TokensOut) > 0 { + for _, e := range m.TokensOut { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryPoolParamsRequest) 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 *QueryPoolParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Params != nil { + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTotalPoolLiquidityRequest) 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 *QueryTotalPoolLiquidityResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Liquidity) > 0 { + for _, e := range m.Liquidity { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryTotalSharesRequest) 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 *QueryTotalSharesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.TotalShares.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryCalcJoinPoolNoSwapSharesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolId != 0 { + n += 1 + sovQuery(uint64(m.PoolId)) + } + if len(m.TokensIn) > 0 { + for _, e := range m.TokensIn { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryCalcJoinPoolNoSwapSharesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.TokensOut) > 0 { + for _, e := range m.TokensOut { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + l = m.SharesOut.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QuerySpotPriceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolId != 0 { + n += 1 + sovQuery(uint64(m.PoolId)) + } + l = len(m.BaseAssetDenom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.QuoteAssetDenom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryPoolsWithFilterRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MinLiquidity) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.PoolType) + 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 *QueryPoolsWithFilterResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Pools) > 0 { + for _, e := range m.Pools { + 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 *QuerySpotPriceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpotPrice) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySwapExactAmountInRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.PoolId != 0 { + n += 1 + sovQuery(uint64(m.PoolId)) + } + l = len(m.TokenIn) + 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)) + } + } + return n +} + +func (m *QuerySwapExactAmountInResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.TokenOutAmount.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QuerySwapExactAmountOutRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.PoolId != 0 { + n += 1 + sovQuery(uint64(m.PoolId)) + } + if len(m.Routes) > 0 { + for _, e := range m.Routes { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + l = len(m.TokenOut) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySwapExactAmountOutResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.TokenInAmount.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryTotalLiquidityRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryTotalLiquidityResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Liquidity) > 0 { + for _, e := range m.Liquidity { + l = e.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 *QueryPoolRequest) 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: QueryPoolRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPoolRequest: 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) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 *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 + } + 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 Pool", 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.Pool == nil { + m.Pool = &types.Any{} + } + 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 + } + 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 *QueryPoolsRequest) 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: QueryPoolsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPoolsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 + 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 *QueryPoolsResponse) 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: QueryPoolsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPoolsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pools", 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.Pools = append(m.Pools, &types.Any{}) + if err := m.Pools[len(m.Pools)-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 *QueryNumPoolsRequest) 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: QueryNumPoolsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryNumPoolsRequest: 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 *QueryNumPoolsResponse) 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: QueryNumPoolsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryNumPoolsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumPools", wireType) + } + m.NumPools = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumPools |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 *QueryPoolTypeRequest) 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: QueryPoolTypeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPoolTypeRequest: 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) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 *QueryPoolTypeResponse) 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: QueryPoolTypeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPoolTypeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolType", 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.PoolType = 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 *QueryCalcJoinPoolSharesRequest) 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: QueryCalcJoinPoolSharesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCalcJoinPoolSharesRequest: 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) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokensIn", 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.TokensIn = append(m.TokensIn, types1.Coin{}) + if err := m.TokensIn[len(m.TokensIn)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCalcJoinPoolSharesResponse) 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: QueryCalcJoinPoolSharesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCalcJoinPoolSharesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShareOutAmount", 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.ShareOutAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokensOut", 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.TokensOut = append(m.TokensOut, types1.Coin{}) + if err := m.TokensOut[len(m.TokensOut)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCalcExitPoolCoinsFromSharesRequest) 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: QueryCalcExitPoolCoinsFromSharesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCalcExitPoolCoinsFromSharesRequest: 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) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShareInAmount", 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.ShareInAmount.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 *QueryCalcExitPoolCoinsFromSharesResponse) 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: QueryCalcExitPoolCoinsFromSharesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCalcExitPoolCoinsFromSharesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokensOut", 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.TokensOut = append(m.TokensOut, types1.Coin{}) + if err := m.TokensOut[len(m.TokensOut)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryPoolParamsRequest) 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: QueryPoolParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPoolParamsRequest: 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) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 *QueryPoolParamsResponse) 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: QueryPoolParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPoolParamsResponse: 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 m.Params == nil { + m.Params = &types.Any{} + } + 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 *QueryTotalPoolLiquidityRequest) 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: QueryTotalPoolLiquidityRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTotalPoolLiquidityRequest: 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) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 *QueryTotalPoolLiquidityResponse) 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: QueryTotalPoolLiquidityResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTotalPoolLiquidityResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Liquidity", 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.Liquidity = append(m.Liquidity, types1.Coin{}) + if err := m.Liquidity[len(m.Liquidity)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTotalSharesRequest) 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: QueryTotalSharesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTotalSharesRequest: 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) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 *QueryTotalSharesResponse) 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: QueryTotalSharesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTotalSharesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalShares", 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.TotalShares.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 *QueryCalcJoinPoolNoSwapSharesRequest) 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: QueryCalcJoinPoolNoSwapSharesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCalcJoinPoolNoSwapSharesRequest: 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) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokensIn", 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.TokensIn = append(m.TokensIn, types1.Coin{}) + if err := m.TokensIn[len(m.TokensIn)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCalcJoinPoolNoSwapSharesResponse) 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: QueryCalcJoinPoolNoSwapSharesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCalcJoinPoolNoSwapSharesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokensOut", 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.TokensOut = append(m.TokensOut, types1.Coin{}) + if err := m.TokensOut[len(m.TokensOut)-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 SharesOut", 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.SharesOut.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 *QuerySpotPriceRequest) 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: QuerySpotPriceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySpotPriceRequest: 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) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseAssetDenom", 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.BaseAssetDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteAssetDenom", 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.QuoteAssetDenom = 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 *QueryPoolsWithFilterRequest) 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: QueryPoolsWithFilterRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPoolsWithFilterRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinLiquidity", 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.MinLiquidity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolType", 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.PoolType = 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 *QueryPoolsWithFilterResponse) 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: QueryPoolsWithFilterResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPoolsWithFilterResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pools", 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.Pools = append(m.Pools, &types.Any{}) + if err := m.Pools[len(m.Pools)-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 *QuerySpotPriceResponse) 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: QuerySpotPriceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySpotPriceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotPrice", 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.SpotPrice = 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 *QuerySwapExactAmountInRequest) 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: QuerySwapExactAmountInRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySwapExactAmountInRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", 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.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(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 Routes", 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.Routes = append(m.Routes, SwapAmountInRoute{}) + if err := m.Routes[len(m.Routes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySwapExactAmountInResponse) 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: QuerySwapExactAmountInResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySwapExactAmountInResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenOutAmount", 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.TokenOutAmount.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 *QuerySwapExactAmountOutRequest) 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: QuerySwapExactAmountOutRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySwapExactAmountOutRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", 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.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Routes", 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.Routes = append(m.Routes, SwapAmountOutRoute{}) + 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 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 postIndex > l { + return io.ErrUnexpectedEOF + } + m.TokenOut = 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 *QuerySwapExactAmountOutResponse) 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: QuerySwapExactAmountOutResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySwapExactAmountOutResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenInAmount", 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.TokenInAmount.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 *QueryTotalLiquidityRequest) 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: QueryTotalLiquidityRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTotalLiquidityRequest: 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 *QueryTotalLiquidityResponse) 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: QueryTotalLiquidityResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTotalLiquidityResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Liquidity", 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.Liquidity = append(m.Liquidity, types1.Coin{}) + if err := m.Liquidity[len(m.Liquidity)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/tests/interchaintest/osmosistypes/gamm/types/query.pb.gw.go b/tests/interchaintest/osmosistypes/gamm/types/query.pb.gw.go new file mode 100644 index 0000000..c1b4f7c --- /dev/null +++ b/tests/interchaintest/osmosistypes/gamm/types/query.pb.gw.go @@ -0,0 +1,1484 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: osmosis/gamm/v1beta1/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_Query_Pools_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Pools_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPoolsRequest + 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_Pools_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Pools(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Pools_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPoolsRequest + 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_Pools_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Pools(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_NumPools_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryNumPoolsRequest + var metadata runtime.ServerMetadata + + msg, err := client.NumPools(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_NumPools_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryNumPoolsRequest + var metadata runtime.ServerMetadata + + msg, err := server.NumPools(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_TotalLiquidity_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTotalLiquidityRequest + var metadata runtime.ServerMetadata + + msg, err := client.TotalLiquidity(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TotalLiquidity_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTotalLiquidityRequest + var metadata runtime.ServerMetadata + + msg, err := server.TotalLiquidity(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_PoolsWithFilter_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_PoolsWithFilter_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPoolsWithFilterRequest + 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_PoolsWithFilter_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.PoolsWithFilter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_PoolsWithFilter_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPoolsWithFilterRequest + 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_PoolsWithFilter_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.PoolsWithFilter(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Pool_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPoolRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + msg, err := client.Pool(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Pool_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPoolRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + msg, err := server.Pool(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_PoolType_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPoolTypeRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + msg, err := client.PoolType(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_PoolType_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPoolTypeRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + msg, err := server.PoolType(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_CalcJoinPoolShares_0 = &utilities.DoubleArray{Encoding: map[string]int{"pool_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_CalcJoinPoolShares_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCalcJoinPoolSharesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_CalcJoinPoolShares_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CalcJoinPoolShares(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_CalcJoinPoolShares_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCalcJoinPoolSharesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_CalcJoinPoolShares_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CalcJoinPoolShares(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_CalcExitPoolCoinsFromShares_0 = &utilities.DoubleArray{Encoding: map[string]int{"pool_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_CalcExitPoolCoinsFromShares_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCalcExitPoolCoinsFromSharesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_CalcExitPoolCoinsFromShares_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CalcExitPoolCoinsFromShares(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_CalcExitPoolCoinsFromShares_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCalcExitPoolCoinsFromSharesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_CalcExitPoolCoinsFromShares_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CalcExitPoolCoinsFromShares(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_PoolParams_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPoolParamsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + msg, err := client.PoolParams(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_PoolParams_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPoolParamsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + msg, err := server.PoolParams(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_TotalPoolLiquidity_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTotalPoolLiquidityRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + msg, err := client.TotalPoolLiquidity(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TotalPoolLiquidity_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTotalPoolLiquidityRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + msg, err := server.TotalPoolLiquidity(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_TotalShares_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTotalSharesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + msg, err := client.TotalShares(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TotalShares_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTotalSharesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + msg, err := server.TotalShares(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_SpotPrice_0 = &utilities.DoubleArray{Encoding: map[string]int{"pool_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_SpotPrice_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySpotPriceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_SpotPrice_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SpotPrice(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_SpotPrice_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySpotPriceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_SpotPrice_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SpotPrice(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_EstimateSwapExactAmountIn_0 = &utilities.DoubleArray{Encoding: map[string]int{"pool_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_EstimateSwapExactAmountIn_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySwapExactAmountInRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EstimateSwapExactAmountIn_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.EstimateSwapExactAmountIn(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_EstimateSwapExactAmountIn_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySwapExactAmountInRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EstimateSwapExactAmountIn_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.EstimateSwapExactAmountIn(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_EstimateSwapExactAmountOut_0 = &utilities.DoubleArray{Encoding: map[string]int{"pool_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_EstimateSwapExactAmountOut_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySwapExactAmountOutRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EstimateSwapExactAmountOut_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.EstimateSwapExactAmountOut(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_EstimateSwapExactAmountOut_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySwapExactAmountOutRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EstimateSwapExactAmountOut_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.EstimateSwapExactAmountOut(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Pools_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_Pools_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_Pools_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_NumPools_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_NumPools_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_NumPools_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TotalLiquidity_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_TotalLiquidity_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_TotalLiquidity_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_PoolsWithFilter_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_PoolsWithFilter_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_PoolsWithFilter_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Pool_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_Pool_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_Pool_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_PoolType_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_PoolType_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_PoolType_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CalcJoinPoolShares_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_CalcJoinPoolShares_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_CalcJoinPoolShares_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CalcExitPoolCoinsFromShares_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_CalcExitPoolCoinsFromShares_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_CalcExitPoolCoinsFromShares_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_PoolParams_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_PoolParams_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_PoolParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TotalPoolLiquidity_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_TotalPoolLiquidity_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_TotalPoolLiquidity_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TotalShares_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_TotalShares_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_TotalShares_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SpotPrice_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_SpotPrice_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_SpotPrice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_EstimateSwapExactAmountIn_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_EstimateSwapExactAmountIn_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_EstimateSwapExactAmountIn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_EstimateSwapExactAmountOut_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_EstimateSwapExactAmountOut_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_EstimateSwapExactAmountOut_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Pools_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_Pools_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_Pools_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_NumPools_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_NumPools_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_NumPools_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TotalLiquidity_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_TotalLiquidity_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_TotalLiquidity_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_PoolsWithFilter_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_PoolsWithFilter_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_PoolsWithFilter_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Pool_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_Pool_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_Pool_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_PoolType_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_PoolType_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_PoolType_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CalcJoinPoolShares_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_CalcJoinPoolShares_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_CalcJoinPoolShares_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CalcExitPoolCoinsFromShares_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_CalcExitPoolCoinsFromShares_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_CalcExitPoolCoinsFromShares_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_PoolParams_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_PoolParams_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_PoolParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TotalPoolLiquidity_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_TotalPoolLiquidity_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_TotalPoolLiquidity_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TotalShares_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_TotalShares_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_TotalShares_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SpotPrice_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_SpotPrice_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_SpotPrice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_EstimateSwapExactAmountIn_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_EstimateSwapExactAmountIn_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_EstimateSwapExactAmountIn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_EstimateSwapExactAmountOut_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_EstimateSwapExactAmountOut_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_EstimateSwapExactAmountOut_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Pools_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"osmosis", "gamm", "v1beta1", "pools"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_NumPools_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"osmosis", "gamm", "v1beta1", "num_pools"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_TotalLiquidity_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"osmosis", "gamm", "v1beta1", "total_liquidity"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_PoolsWithFilter_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"osmosis", "gamm", "v1beta1", "filtered_pools"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Pool_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"osmosis", "gamm", "v1beta1", "pools", "pool_id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_PoolType_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"osmosis", "gamm", "v1beta1", "pool_type", "pool_id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_CalcJoinPoolShares_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"osmosis", "gamm", "v1beta1", "pools", "pool_id", "join_swap_exact_in"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_CalcExitPoolCoinsFromShares_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"osmosis", "gamm", "v1beta1", "pools", "pool_id", "exit_swap_share_amount_in"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_PoolParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"osmosis", "gamm", "v1beta1", "pools", "pool_id", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_TotalPoolLiquidity_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"osmosis", "gamm", "v1beta1", "pools", "pool_id", "total_pool_liquidity"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_TotalShares_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"osmosis", "gamm", "v1beta1", "pools", "pool_id", "total_shares"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_SpotPrice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"osmosis", "gamm", "v1beta1", "pools", "pool_id", "prices"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_EstimateSwapExactAmountIn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 2, 5}, []string{"osmosis", "gamm", "v1beta1", "pool_id", "estimate", "swap_exact_amount_in"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_EstimateSwapExactAmountOut_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 2, 5}, []string{"osmosis", "gamm", "v1beta1", "pool_id", "estimate", "swap_exact_amount_out"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Pools_0 = runtime.ForwardResponseMessage + + forward_Query_NumPools_0 = runtime.ForwardResponseMessage + + forward_Query_TotalLiquidity_0 = runtime.ForwardResponseMessage + + forward_Query_PoolsWithFilter_0 = runtime.ForwardResponseMessage + + forward_Query_Pool_0 = runtime.ForwardResponseMessage + + forward_Query_PoolType_0 = runtime.ForwardResponseMessage + + forward_Query_CalcJoinPoolShares_0 = runtime.ForwardResponseMessage + + forward_Query_CalcExitPoolCoinsFromShares_0 = runtime.ForwardResponseMessage + + forward_Query_PoolParams_0 = runtime.ForwardResponseMessage + + forward_Query_TotalPoolLiquidity_0 = runtime.ForwardResponseMessage + + forward_Query_TotalShares_0 = runtime.ForwardResponseMessage + + forward_Query_SpotPrice_0 = runtime.ForwardResponseMessage + + forward_Query_EstimateSwapExactAmountIn_0 = runtime.ForwardResponseMessage + + forward_Query_EstimateSwapExactAmountOut_0 = runtime.ForwardResponseMessage +) diff --git a/tests/interchaintest/osmosistypes/gamm/types/tx.pb.go b/tests/interchaintest/osmosistypes/gamm/types/tx.pb.go new file mode 100644 index 0000000..8fc4ac6 --- /dev/null +++ b/tests/interchaintest/osmosistypes/gamm/types/tx.pb.go @@ -0,0 +1,4972 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: osmosis/gamm/v1beta1/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// ===================== MsgJoinPool +// This is really MsgJoinPoolNoSwap +type MsgJoinPool struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` + PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` + ShareOutAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=share_out_amount,json=shareOutAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"share_out_amount" yaml:"pool_amount_out"` + TokenInMaxs []types.Coin `protobuf:"bytes,4,rep,name=token_in_maxs,json=tokenInMaxs,proto3" json:"token_in_maxs" yaml:"token_in_max_amounts"` +} + +func (m *MsgJoinPool) Reset() { *m = MsgJoinPool{} } +func (m *MsgJoinPool) String() string { return proto.CompactTextString(m) } +func (*MsgJoinPool) ProtoMessage() {} +func (*MsgJoinPool) Descriptor() ([]byte, []int) { + return fileDescriptor_cfc8fd3ac7df3247, []int{0} +} +func (m *MsgJoinPool) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgJoinPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgJoinPool.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 *MsgJoinPool) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgJoinPool.Merge(m, src) +} +func (m *MsgJoinPool) XXX_Size() int { + return m.Size() +} +func (m *MsgJoinPool) XXX_DiscardUnknown() { + xxx_messageInfo_MsgJoinPool.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgJoinPool proto.InternalMessageInfo + +func (m *MsgJoinPool) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgJoinPool) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +func (m *MsgJoinPool) GetTokenInMaxs() []types.Coin { + if m != nil { + return m.TokenInMaxs + } + return nil +} + +type MsgJoinPoolResponse struct { + ShareOutAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=share_out_amount,json=shareOutAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"share_out_amount" yaml:"share_out_amount"` + TokenIn []types.Coin `protobuf:"bytes,2,rep,name=token_in,json=tokenIn,proto3" json:"token_in" yaml:"token_in"` +} + +func (m *MsgJoinPoolResponse) Reset() { *m = MsgJoinPoolResponse{} } +func (m *MsgJoinPoolResponse) String() string { return proto.CompactTextString(m) } +func (*MsgJoinPoolResponse) ProtoMessage() {} +func (*MsgJoinPoolResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cfc8fd3ac7df3247, []int{1} +} +func (m *MsgJoinPoolResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgJoinPoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgJoinPoolResponse.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 *MsgJoinPoolResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgJoinPoolResponse.Merge(m, src) +} +func (m *MsgJoinPoolResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgJoinPoolResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgJoinPoolResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgJoinPoolResponse proto.InternalMessageInfo + +func (m *MsgJoinPoolResponse) GetTokenIn() []types.Coin { + if m != nil { + return m.TokenIn + } + return nil +} + +// ===================== MsgExitPool +type MsgExitPool struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` + PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` + ShareInAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=share_in_amount,json=shareInAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"share_in_amount" yaml:"share_in_amount"` + TokenOutMins []types.Coin `protobuf:"bytes,4,rep,name=token_out_mins,json=tokenOutMins,proto3" json:"token_out_mins" yaml:"token_out_min_amounts"` +} + +func (m *MsgExitPool) Reset() { *m = MsgExitPool{} } +func (m *MsgExitPool) String() string { return proto.CompactTextString(m) } +func (*MsgExitPool) ProtoMessage() {} +func (*MsgExitPool) Descriptor() ([]byte, []int) { + return fileDescriptor_cfc8fd3ac7df3247, []int{2} +} +func (m *MsgExitPool) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExitPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExitPool.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 *MsgExitPool) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExitPool.Merge(m, src) +} +func (m *MsgExitPool) XXX_Size() int { + return m.Size() +} +func (m *MsgExitPool) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExitPool.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExitPool proto.InternalMessageInfo + +func (m *MsgExitPool) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgExitPool) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +func (m *MsgExitPool) GetTokenOutMins() []types.Coin { + if m != nil { + return m.TokenOutMins + } + return nil +} + +type MsgExitPoolResponse struct { + TokenOut []types.Coin `protobuf:"bytes,1,rep,name=token_out,json=tokenOut,proto3" json:"token_out" yaml:"token_out"` +} + +func (m *MsgExitPoolResponse) Reset() { *m = MsgExitPoolResponse{} } +func (m *MsgExitPoolResponse) String() string { return proto.CompactTextString(m) } +func (*MsgExitPoolResponse) ProtoMessage() {} +func (*MsgExitPoolResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cfc8fd3ac7df3247, []int{3} +} +func (m *MsgExitPoolResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExitPoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExitPoolResponse.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 *MsgExitPoolResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExitPoolResponse.Merge(m, src) +} +func (m *MsgExitPoolResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgExitPoolResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExitPoolResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExitPoolResponse proto.InternalMessageInfo + +func (m *MsgExitPoolResponse) GetTokenOut() []types.Coin { + if m != nil { + return m.TokenOut + } + return nil +} + +// ===================== MsgSwapExactAmountIn +type SwapAmountInRoute struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` + TokenOutDenom string `protobuf:"bytes,2,opt,name=token_out_denom,json=tokenOutDenom,proto3" json:"token_out_denom,omitempty" yaml:"token_out_denom"` +} + +func (m *SwapAmountInRoute) Reset() { *m = SwapAmountInRoute{} } +func (m *SwapAmountInRoute) String() string { return proto.CompactTextString(m) } +func (*SwapAmountInRoute) ProtoMessage() {} +func (*SwapAmountInRoute) Descriptor() ([]byte, []int) { + return fileDescriptor_cfc8fd3ac7df3247, []int{4} +} +func (m *SwapAmountInRoute) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SwapAmountInRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SwapAmountInRoute.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 *SwapAmountInRoute) XXX_Merge(src proto.Message) { + xxx_messageInfo_SwapAmountInRoute.Merge(m, src) +} +func (m *SwapAmountInRoute) XXX_Size() int { + return m.Size() +} +func (m *SwapAmountInRoute) XXX_DiscardUnknown() { + xxx_messageInfo_SwapAmountInRoute.DiscardUnknown(m) +} + +var xxx_messageInfo_SwapAmountInRoute proto.InternalMessageInfo + +func (m *SwapAmountInRoute) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +func (m *SwapAmountInRoute) GetTokenOutDenom() string { + if m != nil { + return m.TokenOutDenom + } + return "" +} + +type MsgSwapExactAmountIn struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` + Routes []SwapAmountInRoute `protobuf:"bytes,2,rep,name=routes,proto3" json:"routes"` + TokenIn types.Coin `protobuf:"bytes,3,opt,name=token_in,json=tokenIn,proto3" json:"token_in" yaml:"token_in"` + TokenOutMinAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=token_out_min_amount,json=tokenOutMinAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"token_out_min_amount" yaml:"token_out_min_amount"` +} + +func (m *MsgSwapExactAmountIn) Reset() { *m = MsgSwapExactAmountIn{} } +func (m *MsgSwapExactAmountIn) String() string { return proto.CompactTextString(m) } +func (*MsgSwapExactAmountIn) ProtoMessage() {} +func (*MsgSwapExactAmountIn) Descriptor() ([]byte, []int) { + return fileDescriptor_cfc8fd3ac7df3247, []int{5} +} +func (m *MsgSwapExactAmountIn) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSwapExactAmountIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSwapExactAmountIn.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 *MsgSwapExactAmountIn) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSwapExactAmountIn.Merge(m, src) +} +func (m *MsgSwapExactAmountIn) XXX_Size() int { + return m.Size() +} +func (m *MsgSwapExactAmountIn) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSwapExactAmountIn.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSwapExactAmountIn proto.InternalMessageInfo + +func (m *MsgSwapExactAmountIn) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgSwapExactAmountIn) GetRoutes() []SwapAmountInRoute { + if m != nil { + return m.Routes + } + return nil +} + +func (m *MsgSwapExactAmountIn) GetTokenIn() types.Coin { + if m != nil { + return m.TokenIn + } + return types.Coin{} +} + +type MsgSwapExactAmountInResponse struct { + TokenOutAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=token_out_amount,json=tokenOutAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"token_out_amount" yaml:"token_out_amount"` +} + +func (m *MsgSwapExactAmountInResponse) Reset() { *m = MsgSwapExactAmountInResponse{} } +func (m *MsgSwapExactAmountInResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSwapExactAmountInResponse) ProtoMessage() {} +func (*MsgSwapExactAmountInResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cfc8fd3ac7df3247, []int{6} +} +func (m *MsgSwapExactAmountInResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSwapExactAmountInResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSwapExactAmountInResponse.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 *MsgSwapExactAmountInResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSwapExactAmountInResponse.Merge(m, src) +} +func (m *MsgSwapExactAmountInResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSwapExactAmountInResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSwapExactAmountInResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSwapExactAmountInResponse proto.InternalMessageInfo + +// ===================== MsgSwapExactAmountOut +type SwapAmountOutRoute struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` + TokenInDenom string `protobuf:"bytes,2,opt,name=token_in_denom,json=tokenInDenom,proto3" json:"token_in_denom,omitempty" yaml:"token_out_denom"` +} + +func (m *SwapAmountOutRoute) Reset() { *m = SwapAmountOutRoute{} } +func (m *SwapAmountOutRoute) String() string { return proto.CompactTextString(m) } +func (*SwapAmountOutRoute) ProtoMessage() {} +func (*SwapAmountOutRoute) Descriptor() ([]byte, []int) { + return fileDescriptor_cfc8fd3ac7df3247, []int{7} +} +func (m *SwapAmountOutRoute) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SwapAmountOutRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SwapAmountOutRoute.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 *SwapAmountOutRoute) XXX_Merge(src proto.Message) { + xxx_messageInfo_SwapAmountOutRoute.Merge(m, src) +} +func (m *SwapAmountOutRoute) XXX_Size() int { + return m.Size() +} +func (m *SwapAmountOutRoute) XXX_DiscardUnknown() { + xxx_messageInfo_SwapAmountOutRoute.DiscardUnknown(m) +} + +var xxx_messageInfo_SwapAmountOutRoute proto.InternalMessageInfo + +func (m *SwapAmountOutRoute) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +func (m *SwapAmountOutRoute) GetTokenInDenom() string { + if m != nil { + return m.TokenInDenom + } + return "" +} + +type MsgSwapExactAmountOut struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` + Routes []SwapAmountOutRoute `protobuf:"bytes,2,rep,name=routes,proto3" json:"routes"` + TokenInMaxAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=token_in_max_amount,json=tokenInMaxAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"token_in_max_amount" yaml:"token_in_max_amount"` + TokenOut types.Coin `protobuf:"bytes,4,opt,name=token_out,json=tokenOut,proto3" json:"token_out" yaml:"token_out"` +} + +func (m *MsgSwapExactAmountOut) Reset() { *m = MsgSwapExactAmountOut{} } +func (m *MsgSwapExactAmountOut) String() string { return proto.CompactTextString(m) } +func (*MsgSwapExactAmountOut) ProtoMessage() {} +func (*MsgSwapExactAmountOut) Descriptor() ([]byte, []int) { + return fileDescriptor_cfc8fd3ac7df3247, []int{8} +} +func (m *MsgSwapExactAmountOut) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSwapExactAmountOut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSwapExactAmountOut.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 *MsgSwapExactAmountOut) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSwapExactAmountOut.Merge(m, src) +} +func (m *MsgSwapExactAmountOut) XXX_Size() int { + return m.Size() +} +func (m *MsgSwapExactAmountOut) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSwapExactAmountOut.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSwapExactAmountOut proto.InternalMessageInfo + +func (m *MsgSwapExactAmountOut) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgSwapExactAmountOut) GetRoutes() []SwapAmountOutRoute { + if m != nil { + return m.Routes + } + return nil +} + +func (m *MsgSwapExactAmountOut) GetTokenOut() types.Coin { + if m != nil { + return m.TokenOut + } + return types.Coin{} +} + +type MsgSwapExactAmountOutResponse struct { + TokenInAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=token_in_amount,json=tokenInAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"token_in_amount" yaml:"token_in_amount"` +} + +func (m *MsgSwapExactAmountOutResponse) Reset() { *m = MsgSwapExactAmountOutResponse{} } +func (m *MsgSwapExactAmountOutResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSwapExactAmountOutResponse) ProtoMessage() {} +func (*MsgSwapExactAmountOutResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cfc8fd3ac7df3247, []int{9} +} +func (m *MsgSwapExactAmountOutResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSwapExactAmountOutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSwapExactAmountOutResponse.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 *MsgSwapExactAmountOutResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSwapExactAmountOutResponse.Merge(m, src) +} +func (m *MsgSwapExactAmountOutResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSwapExactAmountOutResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSwapExactAmountOutResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSwapExactAmountOutResponse proto.InternalMessageInfo + +// ===================== MsgJoinSwapExternAmountIn +// TODO: Rename to MsgJoinSwapExactAmountIn +type MsgJoinSwapExternAmountIn struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` + PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` + TokenIn types.Coin `protobuf:"bytes,3,opt,name=token_in,json=tokenIn,proto3" json:"token_in" yaml:"token_in"` + ShareOutMinAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=share_out_min_amount,json=shareOutMinAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"share_out_min_amount" yaml:"share_out_min_amount"` +} + +func (m *MsgJoinSwapExternAmountIn) Reset() { *m = MsgJoinSwapExternAmountIn{} } +func (m *MsgJoinSwapExternAmountIn) String() string { return proto.CompactTextString(m) } +func (*MsgJoinSwapExternAmountIn) ProtoMessage() {} +func (*MsgJoinSwapExternAmountIn) Descriptor() ([]byte, []int) { + return fileDescriptor_cfc8fd3ac7df3247, []int{10} +} +func (m *MsgJoinSwapExternAmountIn) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgJoinSwapExternAmountIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgJoinSwapExternAmountIn.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 *MsgJoinSwapExternAmountIn) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgJoinSwapExternAmountIn.Merge(m, src) +} +func (m *MsgJoinSwapExternAmountIn) XXX_Size() int { + return m.Size() +} +func (m *MsgJoinSwapExternAmountIn) XXX_DiscardUnknown() { + xxx_messageInfo_MsgJoinSwapExternAmountIn.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgJoinSwapExternAmountIn proto.InternalMessageInfo + +func (m *MsgJoinSwapExternAmountIn) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgJoinSwapExternAmountIn) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +func (m *MsgJoinSwapExternAmountIn) GetTokenIn() types.Coin { + if m != nil { + return m.TokenIn + } + return types.Coin{} +} + +type MsgJoinSwapExternAmountInResponse struct { + ShareOutAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=share_out_amount,json=shareOutAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"share_out_amount" yaml:"share_out_amount"` +} + +func (m *MsgJoinSwapExternAmountInResponse) Reset() { *m = MsgJoinSwapExternAmountInResponse{} } +func (m *MsgJoinSwapExternAmountInResponse) String() string { return proto.CompactTextString(m) } +func (*MsgJoinSwapExternAmountInResponse) ProtoMessage() {} +func (*MsgJoinSwapExternAmountInResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cfc8fd3ac7df3247, []int{11} +} +func (m *MsgJoinSwapExternAmountInResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgJoinSwapExternAmountInResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgJoinSwapExternAmountInResponse.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 *MsgJoinSwapExternAmountInResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgJoinSwapExternAmountInResponse.Merge(m, src) +} +func (m *MsgJoinSwapExternAmountInResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgJoinSwapExternAmountInResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgJoinSwapExternAmountInResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgJoinSwapExternAmountInResponse proto.InternalMessageInfo + +// ===================== MsgJoinSwapShareAmountOut +type MsgJoinSwapShareAmountOut struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` + PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` + TokenInDenom string `protobuf:"bytes,3,opt,name=token_in_denom,json=tokenInDenom,proto3" json:"token_in_denom,omitempty" yaml:"token_in_denom"` + ShareOutAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=share_out_amount,json=shareOutAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"share_out_amount" yaml:"share_out_amount"` + TokenInMaxAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=token_in_max_amount,json=tokenInMaxAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"token_in_max_amount" yaml:"token_in_max_amount"` +} + +func (m *MsgJoinSwapShareAmountOut) Reset() { *m = MsgJoinSwapShareAmountOut{} } +func (m *MsgJoinSwapShareAmountOut) String() string { return proto.CompactTextString(m) } +func (*MsgJoinSwapShareAmountOut) ProtoMessage() {} +func (*MsgJoinSwapShareAmountOut) Descriptor() ([]byte, []int) { + return fileDescriptor_cfc8fd3ac7df3247, []int{12} +} +func (m *MsgJoinSwapShareAmountOut) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgJoinSwapShareAmountOut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgJoinSwapShareAmountOut.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 *MsgJoinSwapShareAmountOut) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgJoinSwapShareAmountOut.Merge(m, src) +} +func (m *MsgJoinSwapShareAmountOut) XXX_Size() int { + return m.Size() +} +func (m *MsgJoinSwapShareAmountOut) XXX_DiscardUnknown() { + xxx_messageInfo_MsgJoinSwapShareAmountOut.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgJoinSwapShareAmountOut proto.InternalMessageInfo + +func (m *MsgJoinSwapShareAmountOut) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgJoinSwapShareAmountOut) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +func (m *MsgJoinSwapShareAmountOut) GetTokenInDenom() string { + if m != nil { + return m.TokenInDenom + } + return "" +} + +type MsgJoinSwapShareAmountOutResponse struct { + TokenInAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=token_in_amount,json=tokenInAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"token_in_amount" yaml:"token_in_amount"` +} + +func (m *MsgJoinSwapShareAmountOutResponse) Reset() { *m = MsgJoinSwapShareAmountOutResponse{} } +func (m *MsgJoinSwapShareAmountOutResponse) String() string { return proto.CompactTextString(m) } +func (*MsgJoinSwapShareAmountOutResponse) ProtoMessage() {} +func (*MsgJoinSwapShareAmountOutResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cfc8fd3ac7df3247, []int{13} +} +func (m *MsgJoinSwapShareAmountOutResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgJoinSwapShareAmountOutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgJoinSwapShareAmountOutResponse.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 *MsgJoinSwapShareAmountOutResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgJoinSwapShareAmountOutResponse.Merge(m, src) +} +func (m *MsgJoinSwapShareAmountOutResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgJoinSwapShareAmountOutResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgJoinSwapShareAmountOutResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgJoinSwapShareAmountOutResponse proto.InternalMessageInfo + +// ===================== MsgExitSwapShareAmountIn +type MsgExitSwapShareAmountIn struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` + PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` + TokenOutDenom string `protobuf:"bytes,3,opt,name=token_out_denom,json=tokenOutDenom,proto3" json:"token_out_denom,omitempty" yaml:"token_out_denom"` + ShareInAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=share_in_amount,json=shareInAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"share_in_amount" yaml:"share_in_amount"` + TokenOutMinAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=token_out_min_amount,json=tokenOutMinAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"token_out_min_amount" yaml:"token_out_min_amount"` +} + +func (m *MsgExitSwapShareAmountIn) Reset() { *m = MsgExitSwapShareAmountIn{} } +func (m *MsgExitSwapShareAmountIn) String() string { return proto.CompactTextString(m) } +func (*MsgExitSwapShareAmountIn) ProtoMessage() {} +func (*MsgExitSwapShareAmountIn) Descriptor() ([]byte, []int) { + return fileDescriptor_cfc8fd3ac7df3247, []int{14} +} +func (m *MsgExitSwapShareAmountIn) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExitSwapShareAmountIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExitSwapShareAmountIn.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 *MsgExitSwapShareAmountIn) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExitSwapShareAmountIn.Merge(m, src) +} +func (m *MsgExitSwapShareAmountIn) XXX_Size() int { + return m.Size() +} +func (m *MsgExitSwapShareAmountIn) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExitSwapShareAmountIn.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExitSwapShareAmountIn proto.InternalMessageInfo + +func (m *MsgExitSwapShareAmountIn) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgExitSwapShareAmountIn) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +func (m *MsgExitSwapShareAmountIn) GetTokenOutDenom() string { + if m != nil { + return m.TokenOutDenom + } + return "" +} + +type MsgExitSwapShareAmountInResponse struct { + TokenOutAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=token_out_amount,json=tokenOutAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"token_out_amount" yaml:"token_out_amount"` +} + +func (m *MsgExitSwapShareAmountInResponse) Reset() { *m = MsgExitSwapShareAmountInResponse{} } +func (m *MsgExitSwapShareAmountInResponse) String() string { return proto.CompactTextString(m) } +func (*MsgExitSwapShareAmountInResponse) ProtoMessage() {} +func (*MsgExitSwapShareAmountInResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cfc8fd3ac7df3247, []int{15} +} +func (m *MsgExitSwapShareAmountInResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExitSwapShareAmountInResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExitSwapShareAmountInResponse.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 *MsgExitSwapShareAmountInResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExitSwapShareAmountInResponse.Merge(m, src) +} +func (m *MsgExitSwapShareAmountInResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgExitSwapShareAmountInResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExitSwapShareAmountInResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExitSwapShareAmountInResponse proto.InternalMessageInfo + +// ===================== MsgExitSwapExternAmountOut +type MsgExitSwapExternAmountOut struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` + PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` + TokenOut types.Coin `protobuf:"bytes,3,opt,name=token_out,json=tokenOut,proto3" json:"token_out" yaml:"token_out"` + ShareInMaxAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=share_in_max_amount,json=shareInMaxAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"share_in_max_amount" yaml:"share_in_max_amount"` +} + +func (m *MsgExitSwapExternAmountOut) Reset() { *m = MsgExitSwapExternAmountOut{} } +func (m *MsgExitSwapExternAmountOut) String() string { return proto.CompactTextString(m) } +func (*MsgExitSwapExternAmountOut) ProtoMessage() {} +func (*MsgExitSwapExternAmountOut) Descriptor() ([]byte, []int) { + return fileDescriptor_cfc8fd3ac7df3247, []int{16} +} +func (m *MsgExitSwapExternAmountOut) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExitSwapExternAmountOut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExitSwapExternAmountOut.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 *MsgExitSwapExternAmountOut) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExitSwapExternAmountOut.Merge(m, src) +} +func (m *MsgExitSwapExternAmountOut) XXX_Size() int { + return m.Size() +} +func (m *MsgExitSwapExternAmountOut) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExitSwapExternAmountOut.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExitSwapExternAmountOut proto.InternalMessageInfo + +func (m *MsgExitSwapExternAmountOut) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgExitSwapExternAmountOut) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +func (m *MsgExitSwapExternAmountOut) GetTokenOut() types.Coin { + if m != nil { + return m.TokenOut + } + return types.Coin{} +} + +type MsgExitSwapExternAmountOutResponse struct { + ShareInAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=share_in_amount,json=shareInAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"share_in_amount" yaml:"share_in_amount"` +} + +func (m *MsgExitSwapExternAmountOutResponse) Reset() { *m = MsgExitSwapExternAmountOutResponse{} } +func (m *MsgExitSwapExternAmountOutResponse) String() string { return proto.CompactTextString(m) } +func (*MsgExitSwapExternAmountOutResponse) ProtoMessage() {} +func (*MsgExitSwapExternAmountOutResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cfc8fd3ac7df3247, []int{17} +} +func (m *MsgExitSwapExternAmountOutResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExitSwapExternAmountOutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExitSwapExternAmountOutResponse.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 *MsgExitSwapExternAmountOutResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExitSwapExternAmountOutResponse.Merge(m, src) +} +func (m *MsgExitSwapExternAmountOutResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgExitSwapExternAmountOutResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExitSwapExternAmountOutResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExitSwapExternAmountOutResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgJoinPool)(nil), "osmosis.gamm.v1beta1.MsgJoinPool") + proto.RegisterType((*MsgJoinPoolResponse)(nil), "osmosis.gamm.v1beta1.MsgJoinPoolResponse") + proto.RegisterType((*MsgExitPool)(nil), "osmosis.gamm.v1beta1.MsgExitPool") + proto.RegisterType((*MsgExitPoolResponse)(nil), "osmosis.gamm.v1beta1.MsgExitPoolResponse") + proto.RegisterType((*SwapAmountInRoute)(nil), "osmosis.gamm.v1beta1.SwapAmountInRoute") + proto.RegisterType((*MsgSwapExactAmountIn)(nil), "osmosis.gamm.v1beta1.MsgSwapExactAmountIn") + proto.RegisterType((*MsgSwapExactAmountInResponse)(nil), "osmosis.gamm.v1beta1.MsgSwapExactAmountInResponse") + proto.RegisterType((*SwapAmountOutRoute)(nil), "osmosis.gamm.v1beta1.SwapAmountOutRoute") + proto.RegisterType((*MsgSwapExactAmountOut)(nil), "osmosis.gamm.v1beta1.MsgSwapExactAmountOut") + proto.RegisterType((*MsgSwapExactAmountOutResponse)(nil), "osmosis.gamm.v1beta1.MsgSwapExactAmountOutResponse") + proto.RegisterType((*MsgJoinSwapExternAmountIn)(nil), "osmosis.gamm.v1beta1.MsgJoinSwapExternAmountIn") + proto.RegisterType((*MsgJoinSwapExternAmountInResponse)(nil), "osmosis.gamm.v1beta1.MsgJoinSwapExternAmountInResponse") + proto.RegisterType((*MsgJoinSwapShareAmountOut)(nil), "osmosis.gamm.v1beta1.MsgJoinSwapShareAmountOut") + proto.RegisterType((*MsgJoinSwapShareAmountOutResponse)(nil), "osmosis.gamm.v1beta1.MsgJoinSwapShareAmountOutResponse") + proto.RegisterType((*MsgExitSwapShareAmountIn)(nil), "osmosis.gamm.v1beta1.MsgExitSwapShareAmountIn") + proto.RegisterType((*MsgExitSwapShareAmountInResponse)(nil), "osmosis.gamm.v1beta1.MsgExitSwapShareAmountInResponse") + proto.RegisterType((*MsgExitSwapExternAmountOut)(nil), "osmosis.gamm.v1beta1.MsgExitSwapExternAmountOut") + proto.RegisterType((*MsgExitSwapExternAmountOutResponse)(nil), "osmosis.gamm.v1beta1.MsgExitSwapExternAmountOutResponse") +} + +func init() { proto.RegisterFile("osmosis/gamm/v1beta1/tx.proto", fileDescriptor_cfc8fd3ac7df3247) } + +var fileDescriptor_cfc8fd3ac7df3247 = []byte{ + // 1121 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xce, 0xd8, 0x6e, 0x9a, 0x4c, 0x9a, 0xaf, 0x6d, 0xd2, 0x38, 0xdb, 0xd6, 0x4e, 0x07, 0x04, + 0x29, 0x55, 0x77, 0x9b, 0x14, 0x01, 0xe2, 0x02, 0x18, 0x82, 0x70, 0x85, 0xe5, 0x6a, 0x7b, 0xa9, + 0xb8, 0x58, 0xeb, 0x78, 0xe5, 0xae, 0x9a, 0x9d, 0xb1, 0x3c, 0xb3, 0xc1, 0x15, 0x12, 0x48, 0x7c, + 0xdc, 0x41, 0x88, 0x8f, 0x5f, 0x80, 0xf8, 0x0b, 0x1c, 0xe0, 0x00, 0x97, 0x1e, 0x7b, 0x83, 0x72, + 0xb0, 0x50, 0xf2, 0x0f, 0xfc, 0x0b, 0xd0, 0xee, 0xcc, 0x7e, 0x7a, 0x37, 0xf6, 0x26, 0x76, 0x73, + 0x4a, 0xbc, 0xf3, 0x7e, 0xbf, 0xcf, 0x3c, 0xef, 0xbb, 0x0b, 0xaf, 0x13, 0x6a, 0x11, 0x6a, 0x52, + 0xb5, 0xad, 0x5b, 0x96, 0x7a, 0xb8, 0xd3, 0x34, 0x98, 0xbe, 0xa3, 0xb2, 0x9e, 0xd2, 0xe9, 0x12, + 0x46, 0xa4, 0x35, 0x71, 0xac, 0x38, 0xc7, 0x8a, 0x38, 0x96, 0xd7, 0xda, 0xa4, 0x4d, 0x5c, 0x01, + 0xd5, 0xf9, 0x8f, 0xcb, 0xca, 0xa5, 0x7d, 0x57, 0x58, 0x6d, 0xea, 0xd4, 0xf0, 0x2d, 0xed, 0x13, + 0x13, 0xf3, 0x73, 0xf4, 0x7b, 0x0e, 0x2e, 0xd4, 0x68, 0xfb, 0x1e, 0x31, 0xf1, 0x7d, 0x42, 0x0e, + 0xa4, 0x9b, 0x70, 0x96, 0x1a, 0xb8, 0x65, 0x74, 0x8b, 0x60, 0x0b, 0x6c, 0xcf, 0x57, 0x56, 0x07, + 0xfd, 0xf2, 0xe2, 0x13, 0xdd, 0x3a, 0x78, 0x1b, 0xf1, 0xe7, 0x48, 0x13, 0x02, 0xd2, 0x2d, 0x78, + 0xb1, 0x43, 0xc8, 0x41, 0xc3, 0x6c, 0x15, 0x73, 0x5b, 0x60, 0xbb, 0x50, 0x91, 0x06, 0xfd, 0xf2, + 0x12, 0x97, 0x15, 0x07, 0x48, 0x9b, 0x75, 0xfe, 0xab, 0xb6, 0xa4, 0x2e, 0x5c, 0xa1, 0x8f, 0xf4, + 0xae, 0xd1, 0x20, 0x36, 0x6b, 0xe8, 0x16, 0xb1, 0x31, 0x2b, 0xe6, 0x5d, 0x0f, 0x1f, 0x3d, 0xed, + 0x97, 0x67, 0xfe, 0xed, 0x97, 0x5f, 0x69, 0x9b, 0xec, 0x91, 0xdd, 0x54, 0xf6, 0x89, 0xa5, 0x8a, + 0xa0, 0xf9, 0x9f, 0xdb, 0xb4, 0xf5, 0x58, 0x65, 0x4f, 0x3a, 0x06, 0x55, 0xaa, 0x98, 0x0d, 0xfa, + 0xe5, 0x2b, 0x21, 0x1f, 0xdc, 0x94, 0x63, 0x15, 0x69, 0x4b, 0xae, 0x87, 0xba, 0xcd, 0xde, 0x73, + 0x1f, 0x4a, 0x4d, 0xb8, 0xc8, 0xc8, 0x63, 0x03, 0x37, 0x4c, 0xdc, 0xb0, 0xf4, 0x1e, 0x2d, 0x16, + 0xb6, 0xf2, 0xdb, 0x0b, 0xbb, 0x9b, 0x0a, 0xb7, 0xab, 0x38, 0x35, 0xf1, 0xca, 0xa7, 0xbc, 0x4f, + 0x4c, 0x5c, 0x79, 0xc9, 0x89, 0x65, 0xd0, 0x2f, 0x5f, 0xe5, 0x1e, 0xc2, 0xda, 0xc2, 0x13, 0x45, + 0xda, 0x82, 0xfb, 0xb8, 0x8a, 0x6b, 0x7a, 0x8f, 0xa2, 0xe7, 0x00, 0x5e, 0x0e, 0xd5, 0x4f, 0x33, + 0x68, 0x87, 0x60, 0x6a, 0x48, 0x34, 0x21, 0x5f, 0x5e, 0xd1, 0x6a, 0xe6, 0x7c, 0x37, 0x44, 0xfd, + 0x63, 0xf6, 0x86, 0x13, 0xae, 0xc1, 0x39, 0x2f, 0xe4, 0x62, 0x6e, 0x54, 0xae, 0x1b, 0x22, 0xd7, + 0xe5, 0x68, 0xae, 0x48, 0xbb, 0x28, 0xf2, 0x43, 0x7f, 0x70, 0x6c, 0xec, 0xf5, 0x4c, 0x36, 0x55, + 0x6c, 0x74, 0xe0, 0x32, 0xcf, 0xcd, 0xc4, 0x13, 0x82, 0x46, 0xcc, 0x1c, 0xd2, 0x16, 0xdd, 0x27, + 0x55, 0x2c, 0x0a, 0x65, 0xc0, 0x25, 0x9e, 0xaf, 0x53, 0x4d, 0xcb, 0xc4, 0x63, 0x40, 0xe3, 0x65, + 0x51, 0xae, 0x6b, 0xe1, 0x72, 0x09, 0xf5, 0x00, 0x1b, 0x97, 0xdc, 0xe7, 0x75, 0x9b, 0xd5, 0x4c, + 0x4c, 0x51, 0xdb, 0xc5, 0x86, 0x57, 0x3f, 0x1f, 0x1b, 0xf7, 0xe1, 0xbc, 0xaf, 0x5e, 0x04, 0xa3, + 0x1c, 0x17, 0x85, 0xe3, 0x95, 0x98, 0x63, 0xa4, 0xcd, 0x79, 0xce, 0xd0, 0xd7, 0x00, 0xae, 0x3e, + 0xf8, 0x54, 0xef, 0xf0, 0xf4, 0xaa, 0x58, 0x23, 0x36, 0x33, 0xc2, 0x4d, 0x00, 0x23, 0x9b, 0x50, + 0x81, 0xcb, 0x41, 0x4e, 0x2d, 0x03, 0x13, 0xcb, 0xed, 0xdc, 0x7c, 0x45, 0x0e, 0xca, 0x1a, 0x13, + 0x40, 0xda, 0xa2, 0x17, 0xc1, 0x07, 0xee, 0xef, 0xbf, 0x73, 0x70, 0xad, 0x46, 0xdb, 0x4e, 0x24, + 0x7b, 0x3d, 0x7d, 0x9f, 0x79, 0xe1, 0x64, 0x41, 0xce, 0x1e, 0x9c, 0xed, 0x3a, 0xd1, 0x53, 0x81, + 0xe0, 0x57, 0x95, 0x24, 0xb6, 0x53, 0x86, 0xb2, 0xad, 0x14, 0x9c, 0x3a, 0x69, 0x42, 0x39, 0x72, + 0x15, 0x1c, 0x30, 0x9d, 0xed, 0x2a, 0x48, 0x9f, 0xc3, 0xb5, 0xa4, 0x8e, 0x17, 0x0b, 0x6e, 0x3a, + 0xb5, 0xcc, 0x38, 0xbd, 0x9a, 0x8e, 0x22, 0xa4, 0xad, 0x86, 0x40, 0xc4, 0x73, 0x44, 0xdf, 0x03, + 0x78, 0x2d, 0xa9, 0xb2, 0x61, 0xbe, 0x09, 0x8c, 0x4d, 0x86, 0x6f, 0xe2, 0xf6, 0x90, 0xb6, 0xe4, + 0x05, 0x26, 0xa2, 0xfa, 0x0a, 0x40, 0x29, 0x68, 0x44, 0xdd, 0x66, 0xa7, 0xc0, 0xdd, 0xbb, 0xde, + 0x55, 0x34, 0xf1, 0xd8, 0xb0, 0xbb, 0x24, 0xda, 0xc2, 0x51, 0xf7, 0x3c, 0x07, 0xd7, 0x87, 0x6b, + 0x53, 0xb7, 0x59, 0x16, 0xd8, 0x7d, 0x18, 0x83, 0xdd, 0xf6, 0x28, 0xd8, 0x79, 0xd9, 0xc6, 0x70, + 0xf7, 0x19, 0xbc, 0x9c, 0x30, 0x35, 0x04, 0x9f, 0x7d, 0x9c, 0xb9, 0x15, 0x72, 0xea, 0x20, 0x42, + 0xda, 0x4a, 0x30, 0x87, 0x04, 0xad, 0x45, 0x88, 0xa5, 0x30, 0x0a, 0xf5, 0xe3, 0x10, 0xcb, 0x77, + 0x00, 0x5e, 0x4f, 0xac, 0xad, 0x0f, 0xbc, 0x8e, 0xc7, 0x1b, 0xc1, 0xa5, 0x00, 0x67, 0x23, 0xef, + 0x98, 0x39, 0x8f, 0x65, 0x3c, 0xf2, 0x46, 0x7f, 0xe6, 0xe0, 0xa6, 0x18, 0xb9, 0x3c, 0x2e, 0x66, + 0x74, 0xf1, 0x69, 0xa8, 0x26, 0xd3, 0x90, 0x9a, 0x3c, 0xa1, 0x04, 0xf3, 0x7c, 0x72, 0x84, 0x92, + 0x64, 0x13, 0x69, 0xab, 0xde, 0x9e, 0x10, 0x10, 0xca, 0xcf, 0x00, 0xde, 0x48, 0x2d, 0xe2, 0xb9, + 0x6e, 0x31, 0xe8, 0x97, 0x7c, 0xa4, 0xbf, 0x0f, 0x9c, 0xd3, 0x53, 0xdd, 0xe9, 0x4c, 0xfd, 0x7d, + 0x67, 0x88, 0x87, 0xf8, 0x9d, 0xdd, 0x1c, 0xf4, 0xcb, 0xeb, 0x31, 0x60, 0x26, 0xd1, 0x50, 0x62, + 0xad, 0x0a, 0xd3, 0xde, 0xf8, 0x52, 0xe8, 0xe6, 0xc2, 0x8b, 0xa0, 0x1b, 0xf4, 0x43, 0x14, 0x43, + 0xd1, 0x46, 0x9d, 0x23, 0x41, 0xfc, 0x9a, 0x87, 0x45, 0xb1, 0x77, 0xc5, 0xe2, 0x9a, 0x22, 0x3f, + 0x24, 0xec, 0x4f, 0xf9, 0x8c, 0xfb, 0x53, 0xd2, 0x22, 0x5c, 0x98, 0xee, 0x22, 0x9c, 0xb6, 0xd7, + 0x5c, 0x78, 0x41, 0x7b, 0xcd, 0x4f, 0x00, 0x6e, 0xa5, 0xb5, 0xea, 0x7c, 0x77, 0x9b, 0xbf, 0x72, + 0x50, 0x0e, 0x45, 0x16, 0x26, 0xc8, 0x69, 0xd2, 0x50, 0x64, 0x84, 0xe7, 0x27, 0x30, 0xc2, 0x1d, + 0x8a, 0xf0, 0x51, 0x10, 0xa2, 0x88, 0xc2, 0xd9, 0x28, 0x22, 0xc1, 0x24, 0xd2, 0x56, 0x04, 0xb8, + 0x02, 0x8a, 0xf8, 0x11, 0x40, 0x94, 0x5e, 0xc5, 0x30, 0x47, 0xc4, 0x81, 0x0f, 0xa6, 0x0a, 0xfc, + 0xdd, 0xdf, 0x2e, 0xc2, 0x7c, 0x8d, 0xb6, 0xa5, 0x87, 0x70, 0xce, 0xff, 0xf6, 0x71, 0x23, 0x79, + 0xe7, 0x0b, 0xbd, 0xde, 0xcb, 0x37, 0x47, 0x8a, 0xf8, 0x39, 0x3d, 0x84, 0x73, 0xfe, 0x9b, 0x73, + 0xba, 0x65, 0x4f, 0xe4, 0x04, 0xcb, 0x43, 0xef, 0x8f, 0x94, 0xbf, 0xec, 0x45, 0x5f, 0xb1, 0x5e, + 0x4b, 0xd5, 0x1f, 0x92, 0x95, 0x77, 0xc7, 0x97, 0xf5, 0x9d, 0x1e, 0xf2, 0x55, 0x3f, 0xb6, 0x61, + 0xdf, 0x1a, 0xd7, 0x52, 0xdd, 0x66, 0xf2, 0xdd, 0x0c, 0xc2, 0xbe, 0xdf, 0x2f, 0x01, 0xbc, 0x92, + 0xb2, 0xea, 0xa9, 0x27, 0x36, 0x63, 0x58, 0x41, 0x7e, 0x33, 0xa3, 0x42, 0x62, 0x10, 0xb1, 0x7d, + 0x64, 0x74, 0x10, 0x51, 0x85, 0x31, 0x82, 0x48, 0x19, 0xa4, 0xdf, 0x00, 0xb8, 0x91, 0x46, 0x47, + 0x77, 0x4e, 0x44, 0x4f, 0x82, 0x86, 0xfc, 0x56, 0x56, 0x0d, 0x3f, 0x8e, 0x2f, 0xe0, 0x7a, 0xf2, + 0x68, 0x55, 0x46, 0x9a, 0x8c, 0xc8, 0xcb, 0x6f, 0x64, 0x93, 0xf7, 0x02, 0xa8, 0xdc, 0x7b, 0x7a, + 0x54, 0x02, 0xcf, 0x8e, 0x4a, 0xe0, 0xbf, 0xa3, 0x12, 0xf8, 0xf6, 0xb8, 0x34, 0xf3, 0xec, 0xb8, + 0x34, 0xf3, 0xcf, 0x71, 0x69, 0xe6, 0x93, 0x3b, 0x21, 0x9a, 0x10, 0xb6, 0x6f, 0x1f, 0xe8, 0x4d, + 0xea, 0xfd, 0x50, 0x0f, 0x77, 0x5e, 0x57, 0x7b, 0xfc, 0xb3, 0xaa, 0x4b, 0x1a, 0xcd, 0x59, 0xf7, + 0x33, 0xe8, 0xdd, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x26, 0xaf, 0xfa, 0x83, 0x73, 0x15, 0x00, + 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + JoinPool(ctx context.Context, in *MsgJoinPool, opts ...grpc.CallOption) (*MsgJoinPoolResponse, error) + ExitPool(ctx context.Context, in *MsgExitPool, opts ...grpc.CallOption) (*MsgExitPoolResponse, error) + SwapExactAmountIn(ctx context.Context, in *MsgSwapExactAmountIn, opts ...grpc.CallOption) (*MsgSwapExactAmountInResponse, error) + SwapExactAmountOut(ctx context.Context, in *MsgSwapExactAmountOut, opts ...grpc.CallOption) (*MsgSwapExactAmountOutResponse, error) + JoinSwapExternAmountIn(ctx context.Context, in *MsgJoinSwapExternAmountIn, opts ...grpc.CallOption) (*MsgJoinSwapExternAmountInResponse, error) + JoinSwapShareAmountOut(ctx context.Context, in *MsgJoinSwapShareAmountOut, opts ...grpc.CallOption) (*MsgJoinSwapShareAmountOutResponse, error) + ExitSwapExternAmountOut(ctx context.Context, in *MsgExitSwapExternAmountOut, opts ...grpc.CallOption) (*MsgExitSwapExternAmountOutResponse, error) + ExitSwapShareAmountIn(ctx context.Context, in *MsgExitSwapShareAmountIn, opts ...grpc.CallOption) (*MsgExitSwapShareAmountInResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) JoinPool(ctx context.Context, in *MsgJoinPool, opts ...grpc.CallOption) (*MsgJoinPoolResponse, error) { + out := new(MsgJoinPoolResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Msg/JoinPool", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ExitPool(ctx context.Context, in *MsgExitPool, opts ...grpc.CallOption) (*MsgExitPoolResponse, error) { + out := new(MsgExitPoolResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Msg/ExitPool", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) SwapExactAmountIn(ctx context.Context, in *MsgSwapExactAmountIn, opts ...grpc.CallOption) (*MsgSwapExactAmountInResponse, error) { + out := new(MsgSwapExactAmountInResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Msg/SwapExactAmountIn", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) SwapExactAmountOut(ctx context.Context, in *MsgSwapExactAmountOut, opts ...grpc.CallOption) (*MsgSwapExactAmountOutResponse, error) { + out := new(MsgSwapExactAmountOutResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Msg/SwapExactAmountOut", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) JoinSwapExternAmountIn(ctx context.Context, in *MsgJoinSwapExternAmountIn, opts ...grpc.CallOption) (*MsgJoinSwapExternAmountInResponse, error) { + out := new(MsgJoinSwapExternAmountInResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Msg/JoinSwapExternAmountIn", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) JoinSwapShareAmountOut(ctx context.Context, in *MsgJoinSwapShareAmountOut, opts ...grpc.CallOption) (*MsgJoinSwapShareAmountOutResponse, error) { + out := new(MsgJoinSwapShareAmountOutResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Msg/JoinSwapShareAmountOut", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ExitSwapExternAmountOut(ctx context.Context, in *MsgExitSwapExternAmountOut, opts ...grpc.CallOption) (*MsgExitSwapExternAmountOutResponse, error) { + out := new(MsgExitSwapExternAmountOutResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Msg/ExitSwapExternAmountOut", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ExitSwapShareAmountIn(ctx context.Context, in *MsgExitSwapShareAmountIn, opts ...grpc.CallOption) (*MsgExitSwapShareAmountInResponse, error) { + out := new(MsgExitSwapShareAmountInResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Msg/ExitSwapShareAmountIn", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + JoinPool(context.Context, *MsgJoinPool) (*MsgJoinPoolResponse, error) + ExitPool(context.Context, *MsgExitPool) (*MsgExitPoolResponse, error) + SwapExactAmountIn(context.Context, *MsgSwapExactAmountIn) (*MsgSwapExactAmountInResponse, error) + SwapExactAmountOut(context.Context, *MsgSwapExactAmountOut) (*MsgSwapExactAmountOutResponse, error) + JoinSwapExternAmountIn(context.Context, *MsgJoinSwapExternAmountIn) (*MsgJoinSwapExternAmountInResponse, error) + JoinSwapShareAmountOut(context.Context, *MsgJoinSwapShareAmountOut) (*MsgJoinSwapShareAmountOutResponse, error) + ExitSwapExternAmountOut(context.Context, *MsgExitSwapExternAmountOut) (*MsgExitSwapExternAmountOutResponse, error) + ExitSwapShareAmountIn(context.Context, *MsgExitSwapShareAmountIn) (*MsgExitSwapShareAmountInResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) JoinPool(ctx context.Context, req *MsgJoinPool) (*MsgJoinPoolResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method JoinPool not implemented") +} +func (*UnimplementedMsgServer) ExitPool(ctx context.Context, req *MsgExitPool) (*MsgExitPoolResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExitPool not implemented") +} +func (*UnimplementedMsgServer) SwapExactAmountIn(ctx context.Context, req *MsgSwapExactAmountIn) (*MsgSwapExactAmountInResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SwapExactAmountIn not implemented") +} +func (*UnimplementedMsgServer) SwapExactAmountOut(ctx context.Context, req *MsgSwapExactAmountOut) (*MsgSwapExactAmountOutResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SwapExactAmountOut not implemented") +} +func (*UnimplementedMsgServer) JoinSwapExternAmountIn(ctx context.Context, req *MsgJoinSwapExternAmountIn) (*MsgJoinSwapExternAmountInResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method JoinSwapExternAmountIn not implemented") +} +func (*UnimplementedMsgServer) JoinSwapShareAmountOut(ctx context.Context, req *MsgJoinSwapShareAmountOut) (*MsgJoinSwapShareAmountOutResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method JoinSwapShareAmountOut not implemented") +} +func (*UnimplementedMsgServer) ExitSwapExternAmountOut(ctx context.Context, req *MsgExitSwapExternAmountOut) (*MsgExitSwapExternAmountOutResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExitSwapExternAmountOut not implemented") +} +func (*UnimplementedMsgServer) ExitSwapShareAmountIn(ctx context.Context, req *MsgExitSwapShareAmountIn) (*MsgExitSwapShareAmountInResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExitSwapShareAmountIn not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_JoinPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgJoinPool) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).JoinPool(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Msg/JoinPool", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).JoinPool(ctx, req.(*MsgJoinPool)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ExitPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgExitPool) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ExitPool(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Msg/ExitPool", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ExitPool(ctx, req.(*MsgExitPool)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_SwapExactAmountIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSwapExactAmountIn) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SwapExactAmountIn(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Msg/SwapExactAmountIn", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SwapExactAmountIn(ctx, req.(*MsgSwapExactAmountIn)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_SwapExactAmountOut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSwapExactAmountOut) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SwapExactAmountOut(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Msg/SwapExactAmountOut", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SwapExactAmountOut(ctx, req.(*MsgSwapExactAmountOut)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_JoinSwapExternAmountIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgJoinSwapExternAmountIn) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).JoinSwapExternAmountIn(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Msg/JoinSwapExternAmountIn", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).JoinSwapExternAmountIn(ctx, req.(*MsgJoinSwapExternAmountIn)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_JoinSwapShareAmountOut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgJoinSwapShareAmountOut) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).JoinSwapShareAmountOut(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Msg/JoinSwapShareAmountOut", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).JoinSwapShareAmountOut(ctx, req.(*MsgJoinSwapShareAmountOut)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ExitSwapExternAmountOut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgExitSwapExternAmountOut) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ExitSwapExternAmountOut(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Msg/ExitSwapExternAmountOut", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ExitSwapExternAmountOut(ctx, req.(*MsgExitSwapExternAmountOut)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ExitSwapShareAmountIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgExitSwapShareAmountIn) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ExitSwapShareAmountIn(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Msg/ExitSwapShareAmountIn", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ExitSwapShareAmountIn(ctx, req.(*MsgExitSwapShareAmountIn)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "osmosis.gamm.v1beta1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "JoinPool", + Handler: _Msg_JoinPool_Handler, + }, + { + MethodName: "ExitPool", + Handler: _Msg_ExitPool_Handler, + }, + { + MethodName: "SwapExactAmountIn", + Handler: _Msg_SwapExactAmountIn_Handler, + }, + { + MethodName: "SwapExactAmountOut", + Handler: _Msg_SwapExactAmountOut_Handler, + }, + { + MethodName: "JoinSwapExternAmountIn", + Handler: _Msg_JoinSwapExternAmountIn_Handler, + }, + { + MethodName: "JoinSwapShareAmountOut", + Handler: _Msg_JoinSwapShareAmountOut_Handler, + }, + { + MethodName: "ExitSwapExternAmountOut", + Handler: _Msg_ExitSwapExternAmountOut_Handler, + }, + { + MethodName: "ExitSwapShareAmountIn", + Handler: _Msg_ExitSwapShareAmountIn_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "osmosis/gamm/v1beta1/tx.proto", +} + +func (m *MsgJoinPool) 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 *MsgJoinPool) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgJoinPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TokenInMaxs) > 0 { + for iNdEx := len(m.TokenInMaxs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TokenInMaxs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + { + size := m.ShareOutAmount.Size() + i -= size + if _, err := m.ShareOutAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.PoolId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgJoinPoolResponse) 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 *MsgJoinPoolResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgJoinPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TokenIn) > 0 { + for iNdEx := len(m.TokenIn) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TokenIn[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size := m.ShareOutAmount.Size() + i -= size + if _, err := m.ShareOutAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgExitPool) 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 *MsgExitPool) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExitPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TokenOutMins) > 0 { + for iNdEx := len(m.TokenOutMins) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TokenOutMins[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + { + size := m.ShareInAmount.Size() + i -= size + if _, err := m.ShareInAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.PoolId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgExitPoolResponse) 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 *MsgExitPoolResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExitPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TokenOut) > 0 { + for iNdEx := len(m.TokenOut) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TokenOut[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *SwapAmountInRoute) 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 *SwapAmountInRoute) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SwapAmountInRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TokenOutDenom) > 0 { + i -= len(m.TokenOutDenom) + copy(dAtA[i:], m.TokenOutDenom) + i = encodeVarintTx(dAtA, i, uint64(len(m.TokenOutDenom))) + i-- + dAtA[i] = 0x12 + } + if m.PoolId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgSwapExactAmountIn) 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 *MsgSwapExactAmountIn) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSwapExactAmountIn) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.TokenOutMinAmount.Size() + i -= size + if _, err := m.TokenOutMinAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size, err := m.TokenIn.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + 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 = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSwapExactAmountInResponse) 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 *MsgSwapExactAmountInResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSwapExactAmountInResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.TokenOutAmount.Size() + i -= size + if _, err := m.TokenOutAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *SwapAmountOutRoute) 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 *SwapAmountOutRoute) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SwapAmountOutRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TokenInDenom) > 0 { + i -= len(m.TokenInDenom) + copy(dAtA[i:], m.TokenInDenom) + i = encodeVarintTx(dAtA, i, uint64(len(m.TokenInDenom))) + i-- + dAtA[i] = 0x12 + } + if m.PoolId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgSwapExactAmountOut) 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 *MsgSwapExactAmountOut) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSwapExactAmountOut) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.TokenOut.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.TokenInMaxAmount.Size() + i -= size + if _, err := m.TokenInMaxAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + 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 = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSwapExactAmountOutResponse) 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 *MsgSwapExactAmountOutResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSwapExactAmountOutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.TokenInAmount.Size() + i -= size + if _, err := m.TokenInAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgJoinSwapExternAmountIn) 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 *MsgJoinSwapExternAmountIn) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgJoinSwapExternAmountIn) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.ShareOutMinAmount.Size() + i -= size + if _, err := m.ShareOutMinAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size, err := m.TokenIn.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.PoolId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgJoinSwapExternAmountInResponse) 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 *MsgJoinSwapExternAmountInResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgJoinSwapExternAmountInResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.ShareOutAmount.Size() + i -= size + if _, err := m.ShareOutAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgJoinSwapShareAmountOut) 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 *MsgJoinSwapShareAmountOut) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgJoinSwapShareAmountOut) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.TokenInMaxAmount.Size() + i -= size + if _, err := m.TokenInMaxAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size := m.ShareOutAmount.Size() + i -= size + if _, err := m.ShareOutAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.TokenInDenom) > 0 { + i -= len(m.TokenInDenom) + copy(dAtA[i:], m.TokenInDenom) + i = encodeVarintTx(dAtA, i, uint64(len(m.TokenInDenom))) + i-- + dAtA[i] = 0x1a + } + if m.PoolId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgJoinSwapShareAmountOutResponse) 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 *MsgJoinSwapShareAmountOutResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgJoinSwapShareAmountOutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.TokenInAmount.Size() + i -= size + if _, err := m.TokenInAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgExitSwapShareAmountIn) 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 *MsgExitSwapShareAmountIn) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExitSwapShareAmountIn) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.TokenOutMinAmount.Size() + i -= size + if _, err := m.TokenOutMinAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size := m.ShareInAmount.Size() + i -= size + if _, err := m.ShareInAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.TokenOutDenom) > 0 { + i -= len(m.TokenOutDenom) + copy(dAtA[i:], m.TokenOutDenom) + i = encodeVarintTx(dAtA, i, uint64(len(m.TokenOutDenom))) + i-- + dAtA[i] = 0x1a + } + if m.PoolId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgExitSwapShareAmountInResponse) 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 *MsgExitSwapShareAmountInResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExitSwapShareAmountInResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.TokenOutAmount.Size() + i -= size + if _, err := m.TokenOutAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgExitSwapExternAmountOut) 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 *MsgExitSwapExternAmountOut) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExitSwapExternAmountOut) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.ShareInMaxAmount.Size() + i -= size + if _, err := m.ShareInMaxAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size, err := m.TokenOut.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.PoolId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgExitSwapExternAmountOutResponse) 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 *MsgExitSwapExternAmountOutResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExitSwapExternAmountOutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.ShareInAmount.Size() + i -= size + if _, err := m.ShareInAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgJoinPool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.PoolId != 0 { + n += 1 + sovTx(uint64(m.PoolId)) + } + l = m.ShareOutAmount.Size() + n += 1 + l + sovTx(uint64(l)) + if len(m.TokenInMaxs) > 0 { + for _, e := range m.TokenInMaxs { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgJoinPoolResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ShareOutAmount.Size() + n += 1 + l + sovTx(uint64(l)) + if len(m.TokenIn) > 0 { + for _, e := range m.TokenIn { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgExitPool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.PoolId != 0 { + n += 1 + sovTx(uint64(m.PoolId)) + } + l = m.ShareInAmount.Size() + n += 1 + l + sovTx(uint64(l)) + if len(m.TokenOutMins) > 0 { + for _, e := range m.TokenOutMins { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgExitPoolResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.TokenOut) > 0 { + for _, e := range m.TokenOut { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *SwapAmountInRoute) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolId != 0 { + n += 1 + sovTx(uint64(m.PoolId)) + } + l = len(m.TokenOutDenom) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgSwapExactAmountIn) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Routes) > 0 { + for _, e := range m.Routes { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + l = m.TokenIn.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.TokenOutMinAmount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgSwapExactAmountInResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.TokenOutAmount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *SwapAmountOutRoute) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolId != 0 { + n += 1 + sovTx(uint64(m.PoolId)) + } + l = len(m.TokenInDenom) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgSwapExactAmountOut) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Routes) > 0 { + for _, e := range m.Routes { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + l = m.TokenInMaxAmount.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.TokenOut.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgSwapExactAmountOutResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.TokenInAmount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgJoinSwapExternAmountIn) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.PoolId != 0 { + n += 1 + sovTx(uint64(m.PoolId)) + } + l = m.TokenIn.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.ShareOutMinAmount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgJoinSwapExternAmountInResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ShareOutAmount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgJoinSwapShareAmountOut) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.PoolId != 0 { + n += 1 + sovTx(uint64(m.PoolId)) + } + l = len(m.TokenInDenom) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.ShareOutAmount.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.TokenInMaxAmount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgJoinSwapShareAmountOutResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.TokenInAmount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgExitSwapShareAmountIn) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.PoolId != 0 { + n += 1 + sovTx(uint64(m.PoolId)) + } + l = len(m.TokenOutDenom) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.ShareInAmount.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.TokenOutMinAmount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgExitSwapShareAmountInResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.TokenOutAmount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgExitSwapExternAmountOut) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.PoolId != 0 { + n += 1 + sovTx(uint64(m.PoolId)) + } + l = m.TokenOut.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.ShareInMaxAmount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgExitSwapExternAmountOutResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ShareInAmount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgJoinPool) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgJoinPool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgJoinPool: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShareOutAmount", 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.ShareOutAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenInMaxs", 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.TokenInMaxs = append(m.TokenInMaxs, types.Coin{}) + if err := m.TokenInMaxs[len(m.TokenInMaxs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgJoinPoolResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgJoinPoolResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgJoinPoolResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShareOutAmount", 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.ShareOutAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenIn", 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.TokenIn = append(m.TokenIn, types.Coin{}) + if err := m.TokenIn[len(m.TokenIn)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgExitPool) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgExitPool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExitPool: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShareInAmount", 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.ShareInAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenOutMins", 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.TokenOutMins = append(m.TokenOutMins, types.Coin{}) + if err := m.TokenOutMins[len(m.TokenOutMins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgExitPoolResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgExitPoolResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExitPoolResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenOut", 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.TokenOut = append(m.TokenOut, types.Coin{}) + if err := m.TokenOut[len(m.TokenOut)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SwapAmountInRoute) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SwapAmountInRoute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SwapAmountInRoute: 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) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenOutDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TokenOutDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSwapExactAmountIn) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSwapExactAmountIn: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSwapExactAmountIn: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Routes", 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.Routes = append(m.Routes, SwapAmountInRoute{}) + if err := m.Routes[len(m.Routes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenIn", 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.TokenIn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenOutMinAmount", 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.TokenOutMinAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSwapExactAmountInResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSwapExactAmountInResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSwapExactAmountInResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenOutAmount", 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.TokenOutAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SwapAmountOutRoute) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SwapAmountOutRoute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SwapAmountOutRoute: 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) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenInDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TokenInDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSwapExactAmountOut) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSwapExactAmountOut: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSwapExactAmountOut: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Routes", 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.Routes = append(m.Routes, SwapAmountOutRoute{}) + if err := m.Routes[len(m.Routes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenInMaxAmount", 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.TokenInMaxAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenOut", 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.TokenOut.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSwapExactAmountOutResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSwapExactAmountOutResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSwapExactAmountOutResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenInAmount", 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.TokenInAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgJoinSwapExternAmountIn) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgJoinSwapExternAmountIn: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgJoinSwapExternAmountIn: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenIn", 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.TokenIn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShareOutMinAmount", 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.ShareOutMinAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgJoinSwapExternAmountInResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgJoinSwapExternAmountInResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgJoinSwapExternAmountInResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShareOutAmount", 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.ShareOutAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgJoinSwapShareAmountOut) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgJoinSwapShareAmountOut: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgJoinSwapShareAmountOut: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenInDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TokenInDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShareOutAmount", 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.ShareOutAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenInMaxAmount", 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.TokenInMaxAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgJoinSwapShareAmountOutResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgJoinSwapShareAmountOutResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgJoinSwapShareAmountOutResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenInAmount", 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.TokenInAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgExitSwapShareAmountIn) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgExitSwapShareAmountIn: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExitSwapShareAmountIn: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenOutDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TokenOutDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShareInAmount", 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.ShareInAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenOutMinAmount", 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.TokenOutMinAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgExitSwapShareAmountInResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgExitSwapShareAmountInResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExitSwapShareAmountInResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenOutAmount", 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.TokenOutAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgExitSwapExternAmountOut) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgExitSwapExternAmountOut: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExitSwapExternAmountOut: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenOut", 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.TokenOut.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShareInMaxAmount", 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.ShareInMaxAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgExitSwapExternAmountOutResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgExitSwapExternAmountOutResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExitSwapExternAmountOutResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShareInAmount", 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.ShareInAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/tests/interchaintest/packet_foward_test.go b/tests/interchaintest/packet_foward_test.go index ac67d6e..f3b721e 100644 --- a/tests/interchaintest/packet_foward_test.go +++ b/tests/interchaintest/packet_foward_test.go @@ -2,6 +2,7 @@ package interchaintest import ( "context" + "fmt" "testing" "time" @@ -9,6 +10,7 @@ import ( "github.com/strangelove-ventures/interchaintest/v4/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v4/ibc" "github.com/strangelove-ventures/interchaintest/v4/testreporter" + "github.com/strangelove-ventures/interchaintest/v4/testutil" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" ) @@ -63,7 +65,8 @@ func TestPacketForwardMiddleware(t *testing.T) { Name: "osmosis", Version: "v15.0.0", ChainConfig: ibc.ChainConfig{ - GasPrices: "0.005uosmo", + GasPrices: "0.005uosmo", + EncodingConfig: osmosisEncoding(), }, NumValidators: &numVals, NumFullNodes: &numFullNodes, @@ -78,6 +81,7 @@ func TestPacketForwardMiddleware(t *testing.T) { r := interchaintest.NewBuiltinRelayerFactory( ibc.CosmosRly, zaptest.NewLogger(t), + // relayer.CustomDockerImage("ghcr.io/cosmos/relayer", "main", rly.RlyDefaultUidGid), ).Build(t, client, network) ic := interchaintest.NewInterchain(). @@ -110,7 +114,7 @@ func TestPacketForwardMiddleware(t *testing.T) { NetworkID: network, BlockDatabaseFile: interchaintest.DefaultBlockDatabaseFilepath(), - SkipPathCreation: false, + SkipPathCreation: true, })) t.Cleanup(func() { _ = ic.Close() @@ -119,20 +123,150 @@ func TestPacketForwardMiddleware(t *testing.T) { const userFunds = int64(10_000_000_000) users := interchaintest.GetAndFundTestUsers(t, ctx, t.Name(), userFunds, feeabs, gaia, osmosis) - feeabsGaiaChannel, err := ibc.GetTransferChannel(ctx, r, eRep, feeabs.Config().ChainID, gaia.Config().ChainID) + // rly feeabs-osmo + // Generate new path + err = r.GeneratePath(ctx, eRep, feeabs.Config().ChainID, osmosis.Config().ChainID, pathFeeabsOsmosis) + require.NoError(t, err) + // Create client + err = r.CreateClients(ctx, eRep, pathFeeabsOsmosis, ibc.DefaultClientOpts()) + require.NoError(t, err) + + err = testutil.WaitForBlocks(ctx, 5, feeabs, osmosis) + require.NoError(t, err) + + // Create connection + err = r.CreateConnections(ctx, eRep, pathFeeabsOsmosis) require.NoError(t, err) - gaiaFeeabsChannel := feeabsGaiaChannel.Counterparty - _ = gaiaFeeabsChannel - feeabsOsmosisChannel, err := ibc.GetTransferChannel(ctx, r, eRep, feeabs.Config().ChainID, osmosis.Config().ChainID) + err = testutil.WaitForBlocks(ctx, 5, feeabs, osmosis) + require.NoError(t, err) + // Create channel + err = r.CreateChannel(ctx, eRep, pathFeeabsOsmosis, ibc.CreateChannelOptions{ + SourcePortName: "transfer", + DestPortName: "transfer", + Order: ibc.Unordered, + Version: "ics20-1", + }) require.NoError(t, err) - osmosisFeeabsChannel := feeabsOsmosisChannel.Counterparty - _ = osmosisFeeabsChannel - osmosisGaiaChannel, err := ibc.GetTransferChannel(ctx, r, eRep, osmosis.Config().ChainID, gaia.Config().ChainID) + err = testutil.WaitForBlocks(ctx, 5, feeabs, osmosis) + require.NoError(t, err) + + channsFeeabs, err := r.GetChannels(ctx, eRep, feeabs.Config().ChainID) + require.NoError(t, err) + + channsOsmosis, err := r.GetChannels(ctx, eRep, osmosis.Config().ChainID) + require.NoError(t, err) + + require.Len(t, channsFeeabs, 1) + require.Len(t, channsOsmosis, 1) + + channFeeabsOsmosis := channsFeeabs[0] + require.NotEmpty(t, channFeeabsOsmosis.ChannelID) + channOsmosisFeeabs := channsOsmosis[0] + require.NotEmpty(t, channOsmosisFeeabs.ChannelID) + // rly feeabs-gaia + // Generate new path + err = r.GeneratePath(ctx, eRep, feeabs.Config().ChainID, gaia.Config().ChainID, pathFeeabsGaia) + require.NoError(t, err) + // Create clients + err = r.CreateClients(ctx, eRep, pathFeeabsGaia, ibc.DefaultClientOpts()) require.NoError(t, err) - gaiaOsmosisChannel := osmosisGaiaChannel.Counterparty - _ = gaiaOsmosisChannel + + err = testutil.WaitForBlocks(ctx, 5, feeabs, gaia) + require.NoError(t, err) + + // Create connection + err = r.CreateConnections(ctx, eRep, pathFeeabsGaia) + require.NoError(t, err) + + err = testutil.WaitForBlocks(ctx, 5, feeabs, gaia) + require.NoError(t, err) + + //Create channel + err = r.CreateChannel(ctx, eRep, pathFeeabsGaia, ibc.CreateChannelOptions{ + SourcePortName: "transfer", + DestPortName: "transfer", + Order: ibc.Unordered, + Version: "ics20-1", + }) + require.NoError(t, err) + + err = testutil.WaitForBlocks(ctx, 5, feeabs, gaia) + require.NoError(t, err) + + channsFeeabs, err = r.GetChannels(ctx, eRep, feeabs.Config().ChainID) + require.NoError(t, err) + + channsGaia, err := r.GetChannels(ctx, eRep, gaia.Config().ChainID) + require.NoError(t, err) + + require.Len(t, channsFeeabs, 2) + require.Len(t, channsGaia, 1) + + var channFeeabsGaia ibc.ChannelOutput + for _, chann := range channsFeeabs { + if chann.ChannelID != channFeeabsOsmosis.ChannelID { + channFeeabsGaia = chann + } + } + require.NotEmpty(t, channFeeabsGaia.ChannelID) + + channGaiaFeeabs := channsGaia[0] + require.NotEmpty(t, channGaiaFeeabs.ChannelID) + //rly osmo-gaia + // Generate new path + err = r.GeneratePath(ctx, eRep, osmosis.Config().ChainID, gaia.Config().ChainID, pathOsmosisGaia) + require.NoError(t, err) + // Create clients + err = r.CreateClients(ctx, eRep, pathOsmosisGaia, ibc.DefaultClientOpts()) + require.NoError(t, err) + + err = testutil.WaitForBlocks(ctx, 5, osmosis, gaia) + require.NoError(t, err) + // Create connection + err = r.CreateConnections(ctx, eRep, pathOsmosisGaia) + require.NoError(t, err) + + err = testutil.WaitForBlocks(ctx, 5, osmosis, gaia) + require.NoError(t, err) + // Create channel + err = r.CreateChannel(ctx, eRep, pathOsmosisGaia, ibc.CreateChannelOptions{ + SourcePortName: "transfer", + DestPortName: "transfer", + Order: ibc.Unordered, + Version: "ics20-1", + }) + require.NoError(t, err) + + err = testutil.WaitForBlocks(ctx, 5, osmosis, gaia) + require.NoError(t, err) + + channsOsmosis, err = r.GetChannels(ctx, eRep, osmosis.Config().ChainID) + require.NoError(t, err) + + channsGaia, err = r.GetChannels(ctx, eRep, gaia.Config().ChainID) + require.NoError(t, err) + + require.Len(t, channsOsmosis, 2) + require.Len(t, channsGaia, 2) + + var channOsmosisGaia ibc.ChannelOutput + var channGaiaOsmosis ibc.ChannelOutput + + for _, chann := range channsOsmosis { + if chann.ChannelID != channOsmosisFeeabs.ChannelID { + channOsmosisGaia = chann + } + } + require.NotEmpty(t, channOsmosisGaia) + + for _, chann := range channsGaia { + if chann.ChannelID != channGaiaFeeabs.ChannelID { + channGaiaOsmosis = chann + } + } + require.NotEmpty(t, channGaiaOsmosis) // Start the relayer on both paths err = r.StartRelayer(ctx, eRep, pathFeeabsGaia, pathFeeabsOsmosis, pathOsmosisGaia) @@ -175,22 +309,28 @@ func TestPacketForwardMiddleware(t *testing.T) { t.Run("forward a->b->a", func(t *testing.T) { // Setup contract on Osmosis // Store code crosschain Registry - crossChainRegistryContractID, err := feeabs.StoreContract(ctx, feeabsUser.KeyName, "./bytecode/crosschain_registry.wasm") + crossChainRegistryContractID, err := osmosis.StoreContract(ctx, osmosisUser.KeyName, "./bytecode/crosschain_registry.wasm") require.NoError(t, err) _ = crossChainRegistryContractID // // Instatiate - // owner := feeabsUser.Bech32Address(feeabs.Config().Bech32Prefix) - // swapRegistryInitMsg := fmt.Sprintf("{\"owner\":\"%s\"}", owner) - // address, err := feeabs.InstantiateContract(ctx, feeabsUser.KeyName, crossChainRegistryContractID, swapRegistryInitMsg, true) - // require.NoError(t, err) - // feeabs.FullNodes - // // Execute - // msg := fmt.Sprintf("{\"modify_chain_channel_links\": {\"operations\": [{\"operation\": \"set\",\"source_chain\": \"feeabs\",\"destination_chain\": \"osmosis\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"osmosis\",\"destination_chain\": \"feeabs\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"feeabs\",\"destination_chain\": \"gaia\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"gaia\",\"destination_chain\": \"feeabs\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"osmosis\",\"destination_chain\": \"gaia\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"gaia\",\"destination_chain\": \"osmosis\",\"channel_id\": \"%s\"}]}}", feeabsOsmosisChannel, osmosisFeeabsChannel, feeabsGaiaChannel, gaiaFeeabsChannel, osmosisGaiaChannel, gaiaOsmosisChannel) - // txHash, err := feeabs.ExecuteContract(ctx, feeabsUser.KeyName, address, msg) - // require.NoError(t, err) - // fmt.Printf("Hash----------------: %s", txHash) - // tx, err := feeabs.GetTransaction(txHash) - // fmt.Printf("tx----------------: %v", tx) + owner := osmosisUser.Bech32Address(osmosis.Config().Bech32Prefix) + swapRegistryInitMsg := fmt.Sprintf("{\"owner\":\"%s\"}", owner) + address, err := osmosis.InstantiateContract(ctx, osmosisUser.KeyName, crossChainRegistryContractID, swapRegistryInitMsg, true) + fmt.Printf("xcrAddress: %s\n", address) + require.NoError(t, err) + // Execute + msg := fmt.Sprintf("{\"modify_chain_channel_links\": {\"operations\": [{\"operation\": \"set\",\"source_chain\": \"feeabs\",\"destination_chain\": \"osmosis\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"osmosis\",\"destination_chain\": \"feeabs\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"feeabs\",\"destination_chain\": \"gaia\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"gaia\",\"destination_chain\": \"feeabs\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"osmosis\",\"destination_chain\": \"gaia\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"gaia\",\"destination_chain\": \"osmosis\",\"channel_id\": \"%s\"}]}}", + channFeeabsOsmosis.ChannelID, + channOsmosisFeeabs.ChannelID, + channFeeabsGaia.ChannelID, + channGaiaFeeabs.ChannelID, + channOsmosisGaia.ChannelID, + channGaiaOsmosis.ChannelID) + txHash, err := osmosis.ExecuteContract(ctx, osmosisUser.KeyName, address, msg) + require.NoError(t, err) + _ = txHash + tx, _ := osmosis.GetTransaction(txHash) + fmt.Printf("tx----------------: %v", tx) // Send Gaia uatom to Osmosis diff --git a/tests/interchaintest/setup.go b/tests/interchaintest/setup.go index b62fd64..189239f 100644 --- a/tests/interchaintest/setup.go +++ b/tests/interchaintest/setup.go @@ -2,8 +2,9 @@ package interchaintest import ( simappparams "github.com/cosmos/cosmos-sdk/simapp/params" + gammtypes "github.com/notional-labs/fee-abstraction/tests/interchaintest/osmosistypes/gamm/types" feeabstype "github.com/notional-labs/fee-abstraction/v2/x/feeabs/types" - "github.com/strangelove-ventures/interchaintest/v4/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v4/chain/cosmos/wasm" "github.com/strangelove-ventures/interchaintest/v4/ibc" ) @@ -45,10 +46,18 @@ var ( // feeabsEncoding registers the feeabs specific module codecs so that the associated types and msgs // will be supported when writing to the blocksdb sqlite database. func feeabsEncoding() *simappparams.EncodingConfig { - cfg := cosmos.DefaultEncoding() + cfg := wasm.WasmEncoding() // register custom types feeabstype.RegisterInterfaces(cfg.InterfaceRegistry) - return &cfg + return cfg +} + +func osmosisEncoding() *simappparams.EncodingConfig { + cfg := wasm.WasmEncoding() + + gammtypes.RegisterInterfaces(cfg.InterfaceRegistry) + + return cfg } From ac40ec56642685e46bcf82ce6d1486856b8373b7 Mon Sep 17 00:00:00 2001 From: GnaD Date: Tue, 18 Apr 2023 01:16:37 +0700 Subject: [PATCH 03/16] add balancer types and create pool msg --- .../gamm/balancer/balancerPool.pb.go | 1519 +++++++++++++++++ .../osmosistypes/gamm/balancer/codec.go | 30 + .../osmosistypes/gamm/balancer/msgs.go | 49 + .../osmosistypes/gamm/balancer/pool.go | 45 + .../osmosistypes/gamm/balancer/tx.pb.go | 1352 +++++++++++++++ tests/interchaintest/packet_foward_test.go | 72 +- tests/interchaintest/setup.go | 2 + 7 files changed, 3057 insertions(+), 12 deletions(-) create mode 100644 tests/interchaintest/osmosistypes/gamm/balancer/balancerPool.pb.go create mode 100644 tests/interchaintest/osmosistypes/gamm/balancer/codec.go create mode 100644 tests/interchaintest/osmosistypes/gamm/balancer/msgs.go create mode 100644 tests/interchaintest/osmosistypes/gamm/balancer/pool.go create mode 100644 tests/interchaintest/osmosistypes/gamm/balancer/tx.pb.go diff --git a/tests/interchaintest/osmosistypes/gamm/balancer/balancerPool.pb.go b/tests/interchaintest/osmosistypes/gamm/balancer/balancerPool.pb.go new file mode 100644 index 0000000..c0835cf --- /dev/null +++ b/tests/interchaintest/osmosistypes/gamm/balancer/balancerPool.pb.go @@ -0,0 +1,1519 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: osmosis/gamm/pool-models/balancer/balancerPool.proto + +// this is a legacy package that requires additional migration logic +// in order to use the correct packge. Decision made to use legacy package path +// until clear steps for migration logic and the unknowns for state breaking are +// investigated for changing proto package. + +package balancer + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types1 "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/x/auth/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + _ "github.com/gogo/protobuf/types" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Parameters for changing the weights in a balancer pool smoothly from +// a start weight and end weight over a period of time. +// Currently, the only smooth change supported is linear changing between +// the two weights, but more types may be added in the future. +// When these parameters are set, the weight w(t) for pool time `t` is the +// following: +// +// t <= start_time: w(t) = initial_pool_weights +// start_time < t <= start_time + duration: +// w(t) = initial_pool_weights + (t - start_time) * +// (target_pool_weights - initial_pool_weights) / (duration) +// t > start_time + duration: w(t) = target_pool_weights +type SmoothWeightChangeParams struct { + // The start time for beginning the weight change. + // If a parameter change / pool instantiation leaves this blank, + // it should be generated by the state_machine as the current time. + StartTime time.Time `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time" yaml:"start_time"` + // Duration for the weights to change over + Duration time.Duration `protobuf:"bytes,2,opt,name=duration,proto3,stdduration" json:"duration,omitempty" yaml:"duration"` + // The initial pool weights. These are copied from the pool's settings + // at the time of weight change instantiation. + // The amount PoolAsset.token.amount field is ignored if present, + // future type refactorings should just have a type with the denom & weight + // here. + InitialPoolWeights []PoolAsset `protobuf:"bytes,3,rep,name=initial_pool_weights,json=initialPoolWeights,proto3" json:"initial_pool_weights" yaml:"initial_pool_weights"` + // The target pool weights. The pool weights will change linearly with respect + // to time between start_time, and start_time + duration. The amount + // PoolAsset.token.amount field is ignored if present, future type + // refactorings should just have a type with the denom & weight here. + TargetPoolWeights []PoolAsset `protobuf:"bytes,4,rep,name=target_pool_weights,json=targetPoolWeights,proto3" json:"target_pool_weights" yaml:"target_pool_weights"` +} + +func (m *SmoothWeightChangeParams) Reset() { *m = SmoothWeightChangeParams{} } +func (m *SmoothWeightChangeParams) String() string { return proto.CompactTextString(m) } +func (*SmoothWeightChangeParams) ProtoMessage() {} +func (*SmoothWeightChangeParams) Descriptor() ([]byte, []int) { + return fileDescriptor_7e991f749f68c2a4, []int{0} +} +func (m *SmoothWeightChangeParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SmoothWeightChangeParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SmoothWeightChangeParams.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 *SmoothWeightChangeParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_SmoothWeightChangeParams.Merge(m, src) +} +func (m *SmoothWeightChangeParams) XXX_Size() int { + return m.Size() +} +func (m *SmoothWeightChangeParams) XXX_DiscardUnknown() { + xxx_messageInfo_SmoothWeightChangeParams.DiscardUnknown(m) +} + +var xxx_messageInfo_SmoothWeightChangeParams proto.InternalMessageInfo + +func (m *SmoothWeightChangeParams) GetStartTime() time.Time { + if m != nil { + return m.StartTime + } + return time.Time{} +} + +func (m *SmoothWeightChangeParams) GetDuration() time.Duration { + if m != nil { + return m.Duration + } + return 0 +} + +func (m *SmoothWeightChangeParams) GetInitialPoolWeights() []PoolAsset { + if m != nil { + return m.InitialPoolWeights + } + return nil +} + +func (m *SmoothWeightChangeParams) GetTargetPoolWeights() []PoolAsset { + if m != nil { + return m.TargetPoolWeights + } + return nil +} + +// PoolParams defined the parameters that will be managed by the pool +// governance in the future. This params are not managed by the chain +// governance. Instead they will be managed by the token holders of the pool. +// The pool's token holders are specified in future_pool_governor. +type PoolParams struct { + SwapFee github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=swap_fee,json=swapFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"swap_fee" yaml:"swap_fee"` + // N.B.: exit fee is disabled during pool creation in x/poolmanager. While old + // pools can maintain a non-zero fee. No new pool can be created with non-zero + // fee anymore + ExitFee github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=exit_fee,json=exitFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"exit_fee" yaml:"exit_fee"` + SmoothWeightChangeParams *SmoothWeightChangeParams `protobuf:"bytes,3,opt,name=smooth_weight_change_params,json=smoothWeightChangeParams,proto3" json:"smooth_weight_change_params,omitempty" yaml:"smooth_weight_change_params"` +} + +func (m *PoolParams) Reset() { *m = PoolParams{} } +func (m *PoolParams) String() string { return proto.CompactTextString(m) } +func (*PoolParams) ProtoMessage() {} +func (*PoolParams) Descriptor() ([]byte, []int) { + return fileDescriptor_7e991f749f68c2a4, []int{1} +} +func (m *PoolParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PoolParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PoolParams.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 *PoolParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_PoolParams.Merge(m, src) +} +func (m *PoolParams) XXX_Size() int { + return m.Size() +} +func (m *PoolParams) XXX_DiscardUnknown() { + xxx_messageInfo_PoolParams.DiscardUnknown(m) +} + +var xxx_messageInfo_PoolParams proto.InternalMessageInfo + +func (m *PoolParams) GetSmoothWeightChangeParams() *SmoothWeightChangeParams { + if m != nil { + return m.SmoothWeightChangeParams + } + return nil +} + +// Pool asset is an internal struct that combines the amount of the +// token in the pool, and its balancer weight. +// This is an awkward packaging of data, +// and should be revisited in a future state migration. +type PoolAsset struct { + // Coins we are talking about, + // the denomination must be unique amongst all PoolAssets for this pool. + Token types1.Coin `protobuf:"bytes,1,opt,name=token,proto3" json:"token" yaml:"token"` + // Weight that is not normalized. This weight must be less than 2^50 + Weight github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=weight,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"weight" yaml:"weight"` +} + +func (m *PoolAsset) Reset() { *m = PoolAsset{} } +func (m *PoolAsset) String() string { return proto.CompactTextString(m) } +func (*PoolAsset) ProtoMessage() {} +func (*PoolAsset) Descriptor() ([]byte, []int) { + return fileDescriptor_7e991f749f68c2a4, []int{2} +} +func (m *PoolAsset) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PoolAsset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PoolAsset.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 *PoolAsset) XXX_Merge(src proto.Message) { + xxx_messageInfo_PoolAsset.Merge(m, src) +} +func (m *PoolAsset) XXX_Size() int { + return m.Size() +} +func (m *PoolAsset) XXX_DiscardUnknown() { + xxx_messageInfo_PoolAsset.DiscardUnknown(m) +} + +var xxx_messageInfo_PoolAsset proto.InternalMessageInfo + +func (m *PoolAsset) GetToken() types1.Coin { + if m != nil { + return m.Token + } + return types1.Coin{} +} + +type Pool struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + PoolParams PoolParams `protobuf:"bytes,3,opt,name=pool_params,json=poolParams,proto3" json:"pool_params" yaml:"balancer_pool_params"` + // This string specifies who will govern the pool in the future. + // Valid forms of this are: + // {token name},{duration} + // {duration} + // where {token name} if specified is the token which determines the + // governor, and if not specified is the LP token for this pool.duration is + // a time specified as 0w,1w,2w, etc. which specifies how long the token + // would need to be locked up to count in governance. 0w means no lockup. + // TODO: Further improve these docs + FuturePoolGovernor string `protobuf:"bytes,4,opt,name=future_pool_governor,json=futurePoolGovernor,proto3" json:"future_pool_governor,omitempty" yaml:"future_pool_governor"` + // sum of all LP tokens sent out + TotalShares types1.Coin `protobuf:"bytes,5,opt,name=total_shares,json=totalShares,proto3" json:"total_shares" yaml:"total_shares"` + // These are assumed to be sorted by denomiation. + // They contain the pool asset and the information about the weight + PoolAssets []PoolAsset `protobuf:"bytes,6,rep,name=pool_assets,json=poolAssets,proto3" json:"pool_assets" yaml:"pool_assets"` + // sum of all non-normalized pool weights + TotalWeight github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=total_weight,json=totalWeight,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"total_weight" yaml:"total_weight"` +} + +func (m *Pool) Reset() { *m = Pool{} } +func (*Pool) ProtoMessage() {} +func (*Pool) Descriptor() ([]byte, []int) { + return fileDescriptor_7e991f749f68c2a4, []int{3} +} +func (m *Pool) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Pool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Pool.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 *Pool) XXX_Merge(src proto.Message) { + xxx_messageInfo_Pool.Merge(m, src) +} +func (m *Pool) XXX_Size() int { + return m.Size() +} +func (m *Pool) XXX_DiscardUnknown() { + xxx_messageInfo_Pool.DiscardUnknown(m) +} + +var xxx_messageInfo_Pool proto.InternalMessageInfo + +func init() { + proto.RegisterType((*SmoothWeightChangeParams)(nil), "osmosis.gamm.v1beta1.SmoothWeightChangeParams") + proto.RegisterType((*PoolParams)(nil), "osmosis.gamm.v1beta1.PoolParams") + proto.RegisterType((*PoolAsset)(nil), "osmosis.gamm.v1beta1.PoolAsset") + proto.RegisterType((*Pool)(nil), "osmosis.gamm.v1beta1.Pool") +} + +func init() { + proto.RegisterFile("osmosis/gamm/pool-models/balancer/balancerPool.proto", fileDescriptor_7e991f749f68c2a4) +} + +var fileDescriptor_7e991f749f68c2a4 = []byte{ + // 831 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x4f, 0x6f, 0xe3, 0x44, + 0x14, 0x8f, 0x93, 0xb4, 0xd9, 0x4e, 0x96, 0x45, 0x9d, 0xcd, 0xc1, 0x4d, 0x45, 0x5c, 0x0d, 0x12, + 0x5a, 0xa1, 0x8d, 0xad, 0x2c, 0x70, 0xd9, 0xcb, 0x6a, 0xd3, 0x16, 0xd4, 0x5b, 0x71, 0x91, 0x4a, + 0x51, 0x25, 0x6b, 0x92, 0x4c, 0x6c, 0xab, 0xb6, 0xc7, 0xf2, 0x4c, 0xd2, 0xf6, 0x1b, 0x70, 0xec, + 0xb1, 0xdc, 0x7a, 0xe7, 0x0a, 0xdf, 0xa1, 0x82, 0x4b, 0x8f, 0x88, 0x83, 0x41, 0x2d, 0x27, 0x8e, + 0xf9, 0x04, 0x68, 0xfe, 0x38, 0x49, 0x4b, 0x22, 0x5a, 0x71, 0xca, 0xbc, 0x37, 0xef, 0xfd, 0xde, + 0xef, 0xbd, 0xf7, 0x1b, 0x07, 0x7c, 0x4e, 0x59, 0x4c, 0x59, 0xc8, 0x1c, 0x1f, 0xc7, 0xb1, 0x93, + 0x52, 0x1a, 0xb5, 0x63, 0x3a, 0x20, 0x11, 0x73, 0x7a, 0x38, 0xc2, 0x49, 0x9f, 0x64, 0xd3, 0xc3, + 0x3e, 0xa5, 0x91, 0x9d, 0x66, 0x94, 0x53, 0xd8, 0xd0, 0x59, 0xb6, 0xc8, 0xb2, 0xc7, 0x9d, 0x1e, + 0xe1, 0xb8, 0xd3, 0xdc, 0xe8, 0x4b, 0xb7, 0x27, 0x63, 0x1c, 0x65, 0xa8, 0x84, 0x66, 0xc3, 0xa7, + 0x3e, 0x55, 0x7e, 0x71, 0xd2, 0xde, 0x96, 0x4f, 0xa9, 0x1f, 0x11, 0x47, 0x5a, 0xbd, 0xd1, 0xd0, + 0x19, 0x8c, 0x32, 0xcc, 0x43, 0x9a, 0xe8, 0x7b, 0xeb, 0xe1, 0x3d, 0x0f, 0x63, 0xc2, 0x38, 0x8e, + 0xd3, 0x02, 0x40, 0x15, 0x71, 0xf0, 0x88, 0x07, 0x8e, 0xa6, 0x21, 0x8d, 0x07, 0xf7, 0x3d, 0xcc, + 0xc8, 0xf4, 0xbe, 0x4f, 0x43, 0x5d, 0x00, 0xfd, 0x5a, 0x01, 0xe6, 0x41, 0x4c, 0x29, 0x0f, 0x0e, + 0x49, 0xe8, 0x07, 0x7c, 0x3b, 0xc0, 0x89, 0x4f, 0xf6, 0x71, 0x86, 0x63, 0x06, 0xbf, 0x05, 0x80, + 0x71, 0x9c, 0x71, 0x4f, 0x54, 0x35, 0x8d, 0x2d, 0xe3, 0x55, 0xfd, 0x4d, 0xd3, 0x56, 0x94, 0xec, + 0x82, 0x92, 0xfd, 0x4d, 0x41, 0xa9, 0xfb, 0xd1, 0x75, 0x6e, 0x95, 0x26, 0xb9, 0xb5, 0x7e, 0x8e, + 0xe3, 0xe8, 0x2d, 0x9a, 0xe5, 0xa2, 0x8b, 0x3f, 0x2c, 0xc3, 0x5d, 0x93, 0x0e, 0x11, 0x0e, 0x03, + 0xf0, 0xac, 0xe8, 0xd4, 0x2c, 0x4b, 0xdc, 0x8d, 0x7f, 0xe1, 0xee, 0xe8, 0x80, 0x6e, 0x47, 0xc0, + 0xfe, 0x9d, 0x5b, 0xb0, 0x48, 0x79, 0x4d, 0xe3, 0x90, 0x93, 0x38, 0xe5, 0xe7, 0x93, 0xdc, 0xfa, + 0x50, 0x15, 0x2b, 0xee, 0xd0, 0xa5, 0x28, 0x35, 0x45, 0x87, 0x63, 0xd0, 0x08, 0x93, 0x90, 0x87, + 0x38, 0xf2, 0xc4, 0x6e, 0xbd, 0x53, 0xd9, 0x26, 0x33, 0x2b, 0x5b, 0x95, 0x57, 0xf5, 0x37, 0x96, + 0xbd, 0x68, 0x8f, 0xb6, 0x58, 0xf4, 0x7b, 0xc6, 0x08, 0xef, 0x7e, 0xac, 0x5b, 0xda, 0x54, 0x55, + 0x16, 0x41, 0x21, 0x17, 0x6a, 0xb7, 0x48, 0x53, 0x63, 0x64, 0x90, 0x81, 0x97, 0x1c, 0x67, 0x3e, + 0xe1, 0xf7, 0xcb, 0x56, 0x1f, 0x57, 0x16, 0xe9, 0xb2, 0x4d, 0x55, 0x76, 0x01, 0x12, 0x72, 0xd7, + 0x95, 0x77, 0xae, 0x28, 0xfa, 0xab, 0x0c, 0x80, 0xb0, 0xf5, 0xfe, 0x8e, 0xc1, 0x33, 0x76, 0x8a, + 0x53, 0x6f, 0x48, 0xd4, 0xf6, 0xd6, 0xba, 0xef, 0x05, 0xee, 0xef, 0xb9, 0xf5, 0x89, 0x1f, 0xf2, + 0x60, 0xd4, 0xb3, 0xfb, 0x34, 0xd6, 0x32, 0xd5, 0x3f, 0x6d, 0x36, 0x38, 0x71, 0xf8, 0x79, 0x4a, + 0x98, 0xbd, 0x43, 0xfa, 0xb3, 0xf1, 0x16, 0x38, 0xc8, 0xad, 0x89, 0xe3, 0x97, 0x84, 0x08, 0x74, + 0x72, 0x16, 0x72, 0x89, 0x5e, 0xfe, 0x7f, 0xe8, 0x05, 0x0e, 0x72, 0x6b, 0xe2, 0x28, 0xd0, 0x7f, + 0x30, 0xc0, 0x26, 0x93, 0xc2, 0xd4, 0x1d, 0x7b, 0x7d, 0x29, 0x4d, 0x2f, 0x95, 0xbd, 0x99, 0x15, + 0xa9, 0x1a, 0x7b, 0xf1, 0x20, 0x97, 0x29, 0xba, 0xfb, 0xe9, 0x75, 0x6e, 0x19, 0x93, 0xdc, 0x42, + 0xba, 0xab, 0xe5, 0x05, 0x90, 0x6b, 0xb2, 0x25, 0x28, 0xe8, 0x47, 0x03, 0xac, 0x4d, 0x77, 0x05, + 0x77, 0xc1, 0x0a, 0xa7, 0x27, 0x24, 0xd1, 0x0f, 0x64, 0xc3, 0xd6, 0xef, 0x5e, 0x3c, 0xb9, 0x29, + 0xa3, 0x6d, 0x1a, 0x26, 0xdd, 0x86, 0xde, 0xea, 0x73, 0xbd, 0x55, 0x91, 0x85, 0x5c, 0x95, 0x0d, + 0x0f, 0xc1, 0xaa, 0xe2, 0xa1, 0x87, 0xf9, 0xee, 0x09, 0xc3, 0xdc, 0x4b, 0xf8, 0x24, 0xb7, 0x3e, + 0x50, 0xb0, 0x0a, 0x05, 0xb9, 0x1a, 0x0e, 0xfd, 0x5c, 0x05, 0x55, 0xc1, 0x16, 0xbe, 0x06, 0x35, + 0x3c, 0x18, 0x64, 0x84, 0x31, 0xad, 0x06, 0x38, 0xc9, 0xad, 0x17, 0x2a, 0x49, 0x5f, 0x20, 0xb7, + 0x08, 0x81, 0x2f, 0x40, 0x39, 0x1c, 0x48, 0x2e, 0x55, 0xb7, 0x1c, 0x0e, 0xe0, 0x10, 0xd4, 0xa5, + 0xfe, 0xee, 0xcd, 0x7f, 0x6b, 0xb9, 0x90, 0xf5, 0xc4, 0x1f, 0x3c, 0xa0, 0xe2, 0x53, 0xea, 0xcd, + 0x61, 0x21, 0x17, 0xa4, 0x33, 0xd1, 0x7e, 0x0d, 0x1a, 0xc3, 0x11, 0x1f, 0x65, 0x44, 0x85, 0xf8, + 0x74, 0x4c, 0xb2, 0x84, 0x66, 0x66, 0x55, 0x52, 0xb6, 0x66, 0x50, 0x8b, 0xa2, 0x90, 0x0b, 0x95, + 0x5b, 0x30, 0xf8, 0x4a, 0x3b, 0xe1, 0x11, 0x78, 0xce, 0x29, 0xc7, 0x91, 0xc7, 0x02, 0x9c, 0x11, + 0x66, 0xae, 0xfc, 0xd7, 0xa2, 0x36, 0x35, 0xe9, 0x97, 0xc5, 0xa2, 0x66, 0xc9, 0xc8, 0xad, 0x4b, + 0xf3, 0x40, 0x5a, 0xf0, 0x58, 0x4f, 0x05, 0x0b, 0x29, 0x30, 0x73, 0xf5, 0x71, 0xcf, 0xbb, 0xa9, + 0xf1, 0xa1, 0xc2, 0x9f, 0x43, 0xd0, 0xb3, 0x90, 0x61, 0x0c, 0x06, 0x05, 0x71, 0xad, 0x8c, 0x9a, + 0x9c, 0xc1, 0xee, 0x93, 0x95, 0x71, 0xaf, 0x8f, 0x42, 0x1f, 0xaa, 0x0f, 0x25, 0xef, 0xb7, 0xeb, + 0xdf, 0x5f, 0x59, 0xa5, 0xcb, 0x2b, 0xab, 0xf4, 0xcb, 0x4f, 0xed, 0x15, 0x41, 0x74, 0xaf, 0x7b, + 0x74, 0x7d, 0xdb, 0x32, 0x6e, 0x6e, 0x5b, 0xc6, 0x9f, 0xb7, 0x2d, 0xe3, 0xe2, 0xae, 0x55, 0xba, + 0xb9, 0x6b, 0x95, 0x7e, 0xbb, 0x6b, 0x95, 0xbe, 0x7b, 0x37, 0x57, 0x58, 0x77, 0xda, 0x8e, 0x70, + 0x8f, 0x15, 0x86, 0x33, 0xee, 0x7c, 0xe1, 0x9c, 0x2d, 0xff, 0x43, 0xed, 0xad, 0xca, 0x8f, 0xfc, + 0x67, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x5d, 0xc4, 0xe9, 0x0d, 0x7c, 0x07, 0x00, 0x00, +} + +func (m *SmoothWeightChangeParams) 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 *SmoothWeightChangeParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SmoothWeightChangeParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TargetPoolWeights) > 0 { + for iNdEx := len(m.TargetPoolWeights) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TargetPoolWeights[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBalancerPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.InitialPoolWeights) > 0 { + for iNdEx := len(m.InitialPoolWeights) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.InitialPoolWeights[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBalancerPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Duration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintBalancerPool(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x12 + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintBalancerPool(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *PoolParams) 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 *PoolParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PoolParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SmoothWeightChangeParams != nil { + { + size, err := m.SmoothWeightChangeParams.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBalancerPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + { + size := m.ExitFee.Size() + i -= size + if _, err := m.ExitFee.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintBalancerPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.SwapFee.Size() + i -= size + if _, err := m.SwapFee.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintBalancerPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *PoolAsset) 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 *PoolAsset) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PoolAsset) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Weight.Size() + i -= size + if _, err := m.Weight.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintBalancerPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Token.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBalancerPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Pool) 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 *Pool) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Pool) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.TotalWeight.Size() + i -= size + if _, err := m.TotalWeight.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintBalancerPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + if len(m.PoolAssets) > 0 { + for iNdEx := len(m.PoolAssets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PoolAssets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBalancerPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + { + size, err := m.TotalShares.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBalancerPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if len(m.FuturePoolGovernor) > 0 { + i -= len(m.FuturePoolGovernor) + copy(dAtA[i:], m.FuturePoolGovernor) + i = encodeVarintBalancerPool(dAtA, i, uint64(len(m.FuturePoolGovernor))) + i-- + dAtA[i] = 0x22 + } + { + size, err := m.PoolParams.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBalancerPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.Id != 0 { + i = encodeVarintBalancerPool(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x10 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintBalancerPool(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintBalancerPool(dAtA []byte, offset int, v uint64) int { + offset -= sovBalancerPool(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *SmoothWeightChangeParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime) + n += 1 + l + sovBalancerPool(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration) + n += 1 + l + sovBalancerPool(uint64(l)) + if len(m.InitialPoolWeights) > 0 { + for _, e := range m.InitialPoolWeights { + l = e.Size() + n += 1 + l + sovBalancerPool(uint64(l)) + } + } + if len(m.TargetPoolWeights) > 0 { + for _, e := range m.TargetPoolWeights { + l = e.Size() + n += 1 + l + sovBalancerPool(uint64(l)) + } + } + return n +} + +func (m *PoolParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.SwapFee.Size() + n += 1 + l + sovBalancerPool(uint64(l)) + l = m.ExitFee.Size() + n += 1 + l + sovBalancerPool(uint64(l)) + if m.SmoothWeightChangeParams != nil { + l = m.SmoothWeightChangeParams.Size() + n += 1 + l + sovBalancerPool(uint64(l)) + } + return n +} + +func (m *PoolAsset) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Token.Size() + n += 1 + l + sovBalancerPool(uint64(l)) + l = m.Weight.Size() + n += 1 + l + sovBalancerPool(uint64(l)) + return n +} + +func (m *Pool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovBalancerPool(uint64(l)) + } + if m.Id != 0 { + n += 1 + sovBalancerPool(uint64(m.Id)) + } + l = m.PoolParams.Size() + n += 1 + l + sovBalancerPool(uint64(l)) + l = len(m.FuturePoolGovernor) + if l > 0 { + n += 1 + l + sovBalancerPool(uint64(l)) + } + l = m.TotalShares.Size() + n += 1 + l + sovBalancerPool(uint64(l)) + if len(m.PoolAssets) > 0 { + for _, e := range m.PoolAssets { + l = e.Size() + n += 1 + l + sovBalancerPool(uint64(l)) + } + } + l = m.TotalWeight.Size() + n += 1 + l + sovBalancerPool(uint64(l)) + return n +} + +func sovBalancerPool(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozBalancerPool(x uint64) (n int) { + return sovBalancerPool(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *SmoothWeightChangeParams) 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 ErrIntOverflowBalancerPool + } + 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: SmoothWeightChangeParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SmoothWeightChangeParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialPoolWeights", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InitialPoolWeights = append(m.InitialPoolWeights, PoolAsset{}) + if err := m.InitialPoolWeights[len(m.InitialPoolWeights)-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 TargetPoolWeights", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TargetPoolWeights = append(m.TargetPoolWeights, PoolAsset{}) + if err := m.TargetPoolWeights[len(m.TargetPoolWeights)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBalancerPool(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBalancerPool + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PoolParams) 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 ErrIntOverflowBalancerPool + } + 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: PoolParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PoolParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SwapFee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + 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 ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SwapFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExitFee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + 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 ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ExitFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SmoothWeightChangeParams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SmoothWeightChangeParams == nil { + m.SmoothWeightChangeParams = &SmoothWeightChangeParams{} + } + if err := m.SmoothWeightChangeParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBalancerPool(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBalancerPool + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PoolAsset) 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 ErrIntOverflowBalancerPool + } + 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: PoolAsset: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PoolAsset: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + 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 ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Weight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBalancerPool(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBalancerPool + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Pool) 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 ErrIntOverflowBalancerPool + } + 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: Pool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Pool: 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 ErrIntOverflowBalancerPool + } + 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 ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolParams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PoolParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FuturePoolGovernor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + 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 ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FuturePoolGovernor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalShares", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TotalShares.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolAssets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PoolAssets = append(m.PoolAssets, PoolAsset{}) + if err := m.PoolAssets[len(m.PoolAssets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalWeight", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + 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 ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TotalWeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBalancerPool(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBalancerPool + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipBalancerPool(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthBalancerPool + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupBalancerPool + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthBalancerPool + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthBalancerPool = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowBalancerPool = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupBalancerPool = fmt.Errorf("proto: unexpected end of group") +) diff --git a/tests/interchaintest/osmosistypes/gamm/balancer/codec.go b/tests/interchaintest/osmosistypes/gamm/balancer/codec.go new file mode 100644 index 0000000..0d7673f --- /dev/null +++ b/tests/interchaintest/osmosistypes/gamm/balancer/codec.go @@ -0,0 +1,30 @@ +package balancer + +import ( + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +func RegisterInterfaces(registry codectypes.InterfaceRegistry) { + registry.RegisterImplementations( + (*sdk.Msg)(nil), + &MsgCreateBalancerPool{}, + &MsgMigrateSharesToFullRangeConcentratedPosition{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} + +var ( + amino = codec.NewLegacyAmino() + + // ModuleCdc references the global x/bank module codec. Note, the codec should + // ONLY be used in certain instances of tests and for JSON encoding as Amino is + // still used for that purpose. + // + // The actual codec used for serialization should be provided to x/staking and + // defined at the application level. + ModuleCdc = codec.NewAminoCodec(amino) +) diff --git a/tests/interchaintest/osmosistypes/gamm/balancer/msgs.go b/tests/interchaintest/osmosistypes/gamm/balancer/msgs.go new file mode 100644 index 0000000..75c7a7a --- /dev/null +++ b/tests/interchaintest/osmosistypes/gamm/balancer/msgs.go @@ -0,0 +1,49 @@ +package balancer + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/notional-labs/fee-abstraction/tests/interchaintest/osmosistypes/gamm/types" +) + +const ( + TypeMsgCreateBalancerPool = "create_balancer_pool" + TypeMsgMigrateShares = "migrate_shares" +) + +var ( + _ sdk.Msg = &MsgCreateBalancerPool{} +) + +func (msg MsgCreateBalancerPool) Route() string { return types.RouterKey } +func (msg MsgCreateBalancerPool) Type() string { return TypeMsgCreateBalancerPool } +func (msg MsgCreateBalancerPool) ValidateBasic() error { return nil } + +func (msg MsgCreateBalancerPool) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +func (msg MsgCreateBalancerPool) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +var _ sdk.Msg = &MsgMigrateSharesToFullRangeConcentratedPosition{} + +func (msg MsgMigrateSharesToFullRangeConcentratedPosition) Route() string { return types.RouterKey } +func (msg MsgMigrateSharesToFullRangeConcentratedPosition) Type() string { return TypeMsgMigrateShares } +func (msg MsgMigrateSharesToFullRangeConcentratedPosition) ValidateBasic() error { return nil } + +func (msg MsgMigrateSharesToFullRangeConcentratedPosition) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +func (msg MsgMigrateSharesToFullRangeConcentratedPosition) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} diff --git a/tests/interchaintest/osmosistypes/gamm/balancer/pool.go b/tests/interchaintest/osmosistypes/gamm/balancer/pool.go new file mode 100644 index 0000000..9f8c589 --- /dev/null +++ b/tests/interchaintest/osmosistypes/gamm/balancer/pool.go @@ -0,0 +1,45 @@ +package balancer + +import ( + "encoding/json" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type balancerPoolPretty struct { + Address sdk.AccAddress `json:"address" yaml:"address"` + Id uint64 `json:"id" yaml:"id"` + PoolParams PoolParams `json:"pool_params" yaml:"pool_params"` + FuturePoolGovernor string `json:"future_pool_governor" yaml:"future_pool_governor"` + TotalWeight sdk.Dec `json:"total_weight" yaml:"total_weight"` + TotalShares sdk.Coin `json:"total_shares" yaml:"total_shares"` + PoolAssets []PoolAsset `json:"pool_assets" yaml:"pool_assets"` +} + +func (p Pool) String() string { + out, err := p.MarshalJSON() + if err != nil { + panic(err) + } + return string(out) +} + +// MarshalJSON returns the JSON representation of a Pool. +func (p Pool) MarshalJSON() ([]byte, error) { + accAddr, err := sdk.AccAddressFromBech32(p.Address) + if err != nil { + return nil, err + } + + decTotalWeight := sdk.NewDecFromInt(p.TotalWeight) + + return json.Marshal(balancerPoolPretty{ + Address: accAddr, + Id: p.Id, + PoolParams: p.PoolParams, + FuturePoolGovernor: p.FuturePoolGovernor, + TotalWeight: decTotalWeight, + TotalShares: p.TotalShares, + PoolAssets: p.PoolAssets, + }) +} diff --git a/tests/interchaintest/osmosistypes/gamm/balancer/tx.pb.go b/tests/interchaintest/osmosistypes/gamm/balancer/tx.pb.go new file mode 100644 index 0000000..4429aeb --- /dev/null +++ b/tests/interchaintest/osmosistypes/gamm/balancer/tx.pb.go @@ -0,0 +1,1352 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: osmosis/gamm/pool-models/balancer/tx/tx.proto + +package balancer + +import ( + context "context" + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + _ "github.com/gogo/protobuf/types" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// ===================== MsgCreatePool +type MsgCreateBalancerPool struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` + PoolParams *PoolParams `protobuf:"bytes,2,opt,name=pool_params,json=poolParams,proto3" json:"pool_params,omitempty" yaml:"pool_params"` + PoolAssets []PoolAsset `protobuf:"bytes,3,rep,name=pool_assets,json=poolAssets,proto3" json:"pool_assets"` + FuturePoolGovernor string `protobuf:"bytes,4,opt,name=future_pool_governor,json=futurePoolGovernor,proto3" json:"future_pool_governor,omitempty" yaml:"future_pool_governor"` +} + +func (m *MsgCreateBalancerPool) Reset() { *m = MsgCreateBalancerPool{} } +func (m *MsgCreateBalancerPool) String() string { return proto.CompactTextString(m) } +func (*MsgCreateBalancerPool) ProtoMessage() {} +func (*MsgCreateBalancerPool) Descriptor() ([]byte, []int) { + return fileDescriptor_0647ee155de97433, []int{0} +} +func (m *MsgCreateBalancerPool) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateBalancerPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateBalancerPool.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 *MsgCreateBalancerPool) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateBalancerPool.Merge(m, src) +} +func (m *MsgCreateBalancerPool) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateBalancerPool) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateBalancerPool.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateBalancerPool proto.InternalMessageInfo + +func (m *MsgCreateBalancerPool) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgCreateBalancerPool) GetPoolParams() *PoolParams { + if m != nil { + return m.PoolParams + } + return nil +} + +func (m *MsgCreateBalancerPool) GetPoolAssets() []PoolAsset { + if m != nil { + return m.PoolAssets + } + return nil +} + +func (m *MsgCreateBalancerPool) GetFuturePoolGovernor() string { + if m != nil { + return m.FuturePoolGovernor + } + return "" +} + +// Returns the poolID +type MsgCreateBalancerPoolResponse struct { + PoolID uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` +} + +func (m *MsgCreateBalancerPoolResponse) Reset() { *m = MsgCreateBalancerPoolResponse{} } +func (m *MsgCreateBalancerPoolResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateBalancerPoolResponse) ProtoMessage() {} +func (*MsgCreateBalancerPoolResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0647ee155de97433, []int{1} +} +func (m *MsgCreateBalancerPoolResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateBalancerPoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateBalancerPoolResponse.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 *MsgCreateBalancerPoolResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateBalancerPoolResponse.Merge(m, src) +} +func (m *MsgCreateBalancerPoolResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateBalancerPoolResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateBalancerPoolResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateBalancerPoolResponse proto.InternalMessageInfo + +func (m *MsgCreateBalancerPoolResponse) GetPoolID() uint64 { + if m != nil { + return m.PoolID + } + return 0 +} + +// ===================== MsgMigrateSharesToFullRangeConcentratedPosition +type MsgMigrateSharesToFullRangeConcentratedPosition struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` + SharesToMigrate types.Coin `protobuf:"bytes,2,opt,name=shares_to_migrate,json=sharesToMigrate,proto3" json:"shares_to_migrate" yaml:"shares_to_migrate"` +} + +func (m *MsgMigrateSharesToFullRangeConcentratedPosition) Reset() { + *m = MsgMigrateSharesToFullRangeConcentratedPosition{} +} +func (m *MsgMigrateSharesToFullRangeConcentratedPosition) String() string { + return proto.CompactTextString(m) +} +func (*MsgMigrateSharesToFullRangeConcentratedPosition) ProtoMessage() {} +func (*MsgMigrateSharesToFullRangeConcentratedPosition) Descriptor() ([]byte, []int) { + return fileDescriptor_0647ee155de97433, []int{2} +} +func (m *MsgMigrateSharesToFullRangeConcentratedPosition) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgMigrateSharesToFullRangeConcentratedPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgMigrateSharesToFullRangeConcentratedPosition.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 *MsgMigrateSharesToFullRangeConcentratedPosition) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgMigrateSharesToFullRangeConcentratedPosition.Merge(m, src) +} +func (m *MsgMigrateSharesToFullRangeConcentratedPosition) XXX_Size() int { + return m.Size() +} +func (m *MsgMigrateSharesToFullRangeConcentratedPosition) XXX_DiscardUnknown() { + xxx_messageInfo_MsgMigrateSharesToFullRangeConcentratedPosition.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgMigrateSharesToFullRangeConcentratedPosition proto.InternalMessageInfo + +func (m *MsgMigrateSharesToFullRangeConcentratedPosition) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgMigrateSharesToFullRangeConcentratedPosition) GetSharesToMigrate() types.Coin { + if m != nil { + return m.SharesToMigrate + } + return types.Coin{} +} + +type MsgMigrateSharesToFullRangeConcentratedPositionResponse struct { + Amount0 github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=amount0,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount0" yaml:"amount0"` + Amount1 github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount1,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount1" yaml:"amount1"` + LiquidityCreated github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=liquidity_created,json=liquidityCreated,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"liquidity_created" yaml:"liquidity_created"` + JoinTime time.Time `protobuf:"bytes,4,opt,name=join_time,json=joinTime,proto3,stdtime" json:"join_time" yaml:"join_time"` +} + +func (m *MsgMigrateSharesToFullRangeConcentratedPositionResponse) Reset() { + *m = MsgMigrateSharesToFullRangeConcentratedPositionResponse{} +} +func (m *MsgMigrateSharesToFullRangeConcentratedPositionResponse) String() string { + return proto.CompactTextString(m) +} +func (*MsgMigrateSharesToFullRangeConcentratedPositionResponse) ProtoMessage() {} +func (*MsgMigrateSharesToFullRangeConcentratedPositionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0647ee155de97433, []int{3} +} +func (m *MsgMigrateSharesToFullRangeConcentratedPositionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgMigrateSharesToFullRangeConcentratedPositionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgMigrateSharesToFullRangeConcentratedPositionResponse.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 *MsgMigrateSharesToFullRangeConcentratedPositionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgMigrateSharesToFullRangeConcentratedPositionResponse.Merge(m, src) +} +func (m *MsgMigrateSharesToFullRangeConcentratedPositionResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgMigrateSharesToFullRangeConcentratedPositionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgMigrateSharesToFullRangeConcentratedPositionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgMigrateSharesToFullRangeConcentratedPositionResponse proto.InternalMessageInfo + +func (m *MsgMigrateSharesToFullRangeConcentratedPositionResponse) GetJoinTime() time.Time { + if m != nil { + return m.JoinTime + } + return time.Time{} +} + +func init() { + proto.RegisterType((*MsgCreateBalancerPool)(nil), "osmosis.gamm.poolmodels.balancer.v1beta1.MsgCreateBalancerPool") + proto.RegisterType((*MsgCreateBalancerPoolResponse)(nil), "osmosis.gamm.poolmodels.balancer.v1beta1.MsgCreateBalancerPoolResponse") + proto.RegisterType((*MsgMigrateSharesToFullRangeConcentratedPosition)(nil), "osmosis.gamm.poolmodels.balancer.v1beta1.MsgMigrateSharesToFullRangeConcentratedPosition") + proto.RegisterType((*MsgMigrateSharesToFullRangeConcentratedPositionResponse)(nil), "osmosis.gamm.poolmodels.balancer.v1beta1.MsgMigrateSharesToFullRangeConcentratedPositionResponse") +} + +func init() { + proto.RegisterFile("osmosis/gamm/pool-models/balancer/tx/tx.proto", fileDescriptor_0647ee155de97433) +} + +var fileDescriptor_0647ee155de97433 = []byte{ + // 721 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x95, 0xcf, 0x6e, 0xd3, 0x4a, + 0x14, 0xc6, 0xe3, 0xa6, 0x4a, 0x6f, 0x27, 0xba, 0xf7, 0xb6, 0x56, 0xef, 0x55, 0x08, 0x10, 0x47, + 0x46, 0x42, 0x41, 0x22, 0x33, 0x24, 0x80, 0x90, 0xd8, 0x14, 0xdc, 0xaa, 0x55, 0x91, 0x22, 0x15, + 0x53, 0x16, 0xed, 0x26, 0x9a, 0xc4, 0x53, 0xd7, 0x60, 0x7b, 0x82, 0x67, 0x52, 0xda, 0xb7, 0xe8, + 0x86, 0x2d, 0xcf, 0xc1, 0x96, 0x05, 0x52, 0x97, 0x5d, 0x22, 0x16, 0x06, 0xa5, 0x5b, 0x56, 0x79, + 0x02, 0x34, 0x7f, 0xec, 0x16, 0x48, 0x05, 0x51, 0xc5, 0x2a, 0xf6, 0xcc, 0x77, 0x7e, 0xdf, 0x99, + 0x33, 0xe7, 0x38, 0xa0, 0x49, 0x59, 0x44, 0x59, 0xc0, 0x90, 0x8f, 0xa3, 0x08, 0x0d, 0x28, 0x0d, + 0x9b, 0x11, 0xf5, 0x48, 0xc8, 0x50, 0x0f, 0x87, 0x38, 0xee, 0x93, 0x04, 0xf1, 0x03, 0xc4, 0x0f, + 0xe0, 0x20, 0xa1, 0x9c, 0x9a, 0x0d, 0x2d, 0x87, 0x42, 0x0e, 0x85, 0x5c, 0xa9, 0x61, 0xa6, 0x86, + 0xfb, 0xad, 0x1e, 0xe1, 0xb8, 0x55, 0x5d, 0xf2, 0xa9, 0x4f, 0x65, 0x10, 0x12, 0x4f, 0x2a, 0xbe, + 0x7a, 0xef, 0xd7, 0x76, 0xd9, 0xc3, 0x26, 0xa5, 0xa1, 0x8e, 0xaa, 0xf5, 0x65, 0x18, 0xea, 0x61, + 0x46, 0x90, 0x36, 0x40, 0x7d, 0x1a, 0xc4, 0x7a, 0xdf, 0xf2, 0x29, 0xf5, 0x43, 0x82, 0xe4, 0x5b, + 0x6f, 0xb8, 0x8b, 0x78, 0x10, 0x11, 0xc6, 0x71, 0x34, 0x50, 0x02, 0xfb, 0xdd, 0x0c, 0xf8, 0xaf, + 0xc3, 0xfc, 0x95, 0x84, 0x60, 0x4e, 0x9c, 0x73, 0x06, 0xe6, 0x2d, 0x50, 0x62, 0x24, 0xf6, 0x48, + 0x52, 0x31, 0xea, 0x46, 0x63, 0xde, 0x59, 0x1c, 0xa7, 0xd6, 0xdf, 0x87, 0x38, 0x0a, 0x1f, 0xda, + 0x6a, 0xdd, 0x76, 0xb5, 0xc0, 0xdc, 0x06, 0x65, 0x91, 0x70, 0x77, 0x80, 0x13, 0x1c, 0xb1, 0xca, + 0x4c, 0xdd, 0x68, 0x94, 0xdb, 0x75, 0xf8, 0x5d, 0x45, 0x74, 0x72, 0x50, 0xb0, 0x37, 0xa5, 0xce, + 0xf9, 0x7f, 0x9c, 0x5a, 0xa6, 0x22, 0x9e, 0x0b, 0xb7, 0x5d, 0x30, 0xc8, 0x35, 0xe6, 0x9a, 0x46, + 0x63, 0xc6, 0x08, 0x67, 0x95, 0x62, 0xbd, 0xd8, 0x28, 0xb7, 0xad, 0x8b, 0xd1, 0x8f, 0x85, 0xce, + 0x99, 0x3d, 0x4e, 0xad, 0x82, 0xe2, 0xc8, 0x05, 0x66, 0x3e, 0x05, 0x4b, 0xbb, 0x43, 0x3e, 0x4c, + 0x48, 0x57, 0xe2, 0x7c, 0xba, 0x4f, 0x92, 0x98, 0x26, 0x95, 0x59, 0x79, 0x36, 0x6b, 0x9c, 0x5a, + 0x57, 0x55, 0x26, 0x93, 0x54, 0xb6, 0x6b, 0xaa, 0x65, 0xe1, 0xb0, 0x9e, 0x2d, 0xae, 0x82, 0xeb, + 0x13, 0x2b, 0xe7, 0x12, 0x36, 0xa0, 0x31, 0x23, 0xe6, 0x0d, 0x30, 0x27, 0x31, 0x81, 0x27, 0x4b, + 0x38, 0xeb, 0x80, 0x51, 0x6a, 0x95, 0x84, 0x64, 0x63, 0xd5, 0x2d, 0x89, 0xad, 0x0d, 0xcf, 0xfe, + 0x60, 0x00, 0xd4, 0x61, 0x7e, 0x27, 0xf0, 0x13, 0xcc, 0xc9, 0xb3, 0x3d, 0x9c, 0x10, 0xb6, 0x45, + 0xd7, 0x86, 0x61, 0xe8, 0xe2, 0xd8, 0x27, 0x2b, 0x34, 0xee, 0x93, 0x98, 0x8b, 0x3d, 0x6f, 0x93, + 0xb2, 0x80, 0x07, 0x34, 0x9e, 0xe6, 0x6a, 0x7c, 0xb0, 0xc8, 0x24, 0xb3, 0xcb, 0x69, 0x37, 0x52, + 0x26, 0xfa, 0x82, 0xae, 0x40, 0xd5, 0x3c, 0x50, 0x34, 0x4f, 0x5e, 0xc4, 0x15, 0x1a, 0xc4, 0x4e, + 0x5d, 0xd4, 0x6f, 0x9c, 0x5a, 0x15, 0x0d, 0xfd, 0x91, 0x60, 0xbb, 0xff, 0x32, 0x9d, 0xa9, 0x4e, + 0xdc, 0x7e, 0x5f, 0x04, 0x0f, 0xa6, 0x3c, 0x47, 0x5e, 0xa8, 0x1d, 0x30, 0x87, 0x23, 0x3a, 0x8c, + 0xf9, 0x1d, 0x7d, 0xa0, 0x47, 0xc2, 0xff, 0x53, 0x6a, 0xdd, 0xf4, 0x03, 0xbe, 0x37, 0xec, 0xc1, + 0x3e, 0x8d, 0x90, 0xee, 0x74, 0xf5, 0xd3, 0x64, 0xde, 0x4b, 0xc4, 0x0f, 0x07, 0x84, 0xc1, 0x8d, + 0x98, 0x8f, 0x53, 0xeb, 0x1f, 0x95, 0xa9, 0xc6, 0xd8, 0x6e, 0x06, 0x3c, 0x63, 0xb7, 0xe4, 0xb1, + 0x2f, 0xcd, 0x6e, 0xe5, 0xec, 0x96, 0xf9, 0x1a, 0x2c, 0x86, 0xc1, 0xab, 0x61, 0xe0, 0x05, 0xfc, + 0xb0, 0xdb, 0x97, 0x8d, 0xe0, 0x55, 0x8a, 0xd2, 0xe5, 0xc9, 0x14, 0x2e, 0xab, 0xa4, 0x7f, 0x56, + 0xeb, 0x9f, 0x80, 0xb6, 0xbb, 0x90, 0xaf, 0xa9, 0x66, 0xf3, 0xcc, 0xe7, 0x60, 0xfe, 0x05, 0x0d, + 0xe2, 0xae, 0x98, 0x66, 0xd9, 0xc2, 0xe5, 0x76, 0x15, 0xaa, 0x51, 0x87, 0xd9, 0xa8, 0xc3, 0xad, + 0x6c, 0xd4, 0x9d, 0x6b, 0xfa, 0x3a, 0x17, 0x94, 0x45, 0x1e, 0x6a, 0x1f, 0x7d, 0xb6, 0x0c, 0xf7, + 0x2f, 0xf1, 0x2e, 0xc4, 0xed, 0x37, 0x45, 0x50, 0xec, 0x30, 0xdf, 0x7c, 0x6b, 0x00, 0x73, 0xc2, + 0x17, 0x61, 0x19, 0xfe, 0xee, 0x37, 0x0e, 0x4e, 0x1c, 0x8c, 0xea, 0xfa, 0x25, 0x01, 0x79, 0xc3, + 0x7c, 0x35, 0xc0, 0xed, 0xa9, 0x26, 0x66, 0x7b, 0x2a, 0xe7, 0x69, 0xd0, 0x55, 0xfc, 0xc7, 0xd0, + 0xd9, 0x71, 0x9d, 0xed, 0xe3, 0x51, 0xcd, 0x38, 0x19, 0xd5, 0x8c, 0x2f, 0xa3, 0x9a, 0x71, 0x74, + 0x5a, 0x2b, 0x9c, 0x9c, 0xd6, 0x0a, 0x1f, 0x4f, 0x6b, 0x85, 0x9d, 0xe5, 0x73, 0xed, 0xa5, 0xd3, + 0x68, 0x86, 0xb8, 0xc7, 0xb2, 0x17, 0xb4, 0xdf, 0xba, 0x8f, 0x0e, 0x2e, 0xfe, 0x4f, 0xe9, 0x95, + 0x64, 0xbb, 0xdc, 0xfd, 0x16, 0x00, 0x00, 0xff, 0xff, 0xb9, 0x46, 0x01, 0x17, 0xee, 0x06, 0x00, + 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + CreateBalancerPool(ctx context.Context, in *MsgCreateBalancerPool, opts ...grpc.CallOption) (*MsgCreateBalancerPoolResponse, error) + MigrateSharesToFullRangeConcentratedPosition(ctx context.Context, in *MsgMigrateSharesToFullRangeConcentratedPosition, opts ...grpc.CallOption) (*MsgMigrateSharesToFullRangeConcentratedPositionResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) CreateBalancerPool(ctx context.Context, in *MsgCreateBalancerPool, opts ...grpc.CallOption) (*MsgCreateBalancerPoolResponse, error) { + out := new(MsgCreateBalancerPoolResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.poolmodels.balancer.v1beta1.Msg/CreateBalancerPool", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) MigrateSharesToFullRangeConcentratedPosition(ctx context.Context, in *MsgMigrateSharesToFullRangeConcentratedPosition, opts ...grpc.CallOption) (*MsgMigrateSharesToFullRangeConcentratedPositionResponse, error) { + out := new(MsgMigrateSharesToFullRangeConcentratedPositionResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.poolmodels.balancer.v1beta1.Msg/MigrateSharesToFullRangeConcentratedPosition", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + CreateBalancerPool(context.Context, *MsgCreateBalancerPool) (*MsgCreateBalancerPoolResponse, error) + MigrateSharesToFullRangeConcentratedPosition(context.Context, *MsgMigrateSharesToFullRangeConcentratedPosition) (*MsgMigrateSharesToFullRangeConcentratedPositionResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) CreateBalancerPool(ctx context.Context, req *MsgCreateBalancerPool) (*MsgCreateBalancerPoolResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateBalancerPool not implemented") +} +func (*UnimplementedMsgServer) MigrateSharesToFullRangeConcentratedPosition(ctx context.Context, req *MsgMigrateSharesToFullRangeConcentratedPosition) (*MsgMigrateSharesToFullRangeConcentratedPositionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MigrateSharesToFullRangeConcentratedPosition not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_CreateBalancerPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateBalancerPool) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateBalancerPool(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.poolmodels.balancer.v1beta1.Msg/CreateBalancerPool", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateBalancerPool(ctx, req.(*MsgCreateBalancerPool)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_MigrateSharesToFullRangeConcentratedPosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgMigrateSharesToFullRangeConcentratedPosition) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).MigrateSharesToFullRangeConcentratedPosition(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.poolmodels.balancer.v1beta1.Msg/MigrateSharesToFullRangeConcentratedPosition", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).MigrateSharesToFullRangeConcentratedPosition(ctx, req.(*MsgMigrateSharesToFullRangeConcentratedPosition)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "osmosis.gamm.poolmodels.balancer.v1beta1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateBalancerPool", + Handler: _Msg_CreateBalancerPool_Handler, + }, + { + MethodName: "MigrateSharesToFullRangeConcentratedPosition", + Handler: _Msg_MigrateSharesToFullRangeConcentratedPosition_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "osmosis/gamm/pool-models/balancer/tx/tx.proto", +} + +func (m *MsgCreateBalancerPool) 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 *MsgCreateBalancerPool) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateBalancerPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FuturePoolGovernor) > 0 { + i -= len(m.FuturePoolGovernor) + copy(dAtA[i:], m.FuturePoolGovernor) + i = encodeVarintTx(dAtA, i, uint64(len(m.FuturePoolGovernor))) + i-- + dAtA[i] = 0x22 + } + if len(m.PoolAssets) > 0 { + for iNdEx := len(m.PoolAssets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PoolAssets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.PoolParams != nil { + { + size, err := m.PoolParams.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateBalancerPoolResponse) 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 *MsgCreateBalancerPoolResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateBalancerPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.PoolID != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.PoolID)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgMigrateSharesToFullRangeConcentratedPosition) 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 *MsgMigrateSharesToFullRangeConcentratedPosition) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgMigrateSharesToFullRangeConcentratedPosition) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.SharesToMigrate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgMigrateSharesToFullRangeConcentratedPositionResponse) 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 *MsgMigrateSharesToFullRangeConcentratedPositionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgMigrateSharesToFullRangeConcentratedPositionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.JoinTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.JoinTime):]) + if err3 != nil { + return 0, err3 + } + i -= n3 + i = encodeVarintTx(dAtA, i, uint64(n3)) + i-- + dAtA[i] = 0x22 + { + size := m.LiquidityCreated.Size() + i -= size + if _, err := m.LiquidityCreated.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.Amount1.Size() + i -= size + if _, err := m.Amount1.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Amount0.Size() + i -= size + if _, err := m.Amount0.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgCreateBalancerPool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.PoolParams != nil { + l = m.PoolParams.Size() + n += 1 + l + sovTx(uint64(l)) + } + if len(m.PoolAssets) > 0 { + for _, e := range m.PoolAssets { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.FuturePoolGovernor) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCreateBalancerPoolResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolID != 0 { + n += 1 + sovTx(uint64(m.PoolID)) + } + return n +} + +func (m *MsgMigrateSharesToFullRangeConcentratedPosition) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.SharesToMigrate.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgMigrateSharesToFullRangeConcentratedPositionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Amount0.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.Amount1.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.LiquidityCreated.Size() + n += 1 + l + sovTx(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.JoinTime) + n += 1 + l + sovTx(uint64(l)) + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgCreateBalancerPool) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateBalancerPool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateBalancerPool: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolParams", 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.PoolParams == nil { + m.PoolParams = &PoolParams{} + } + if err := m.PoolParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolAssets", 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.PoolAssets = append(m.PoolAssets, PoolAsset{}) + if err := m.PoolAssets[len(m.PoolAssets)-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 FuturePoolGovernor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FuturePoolGovernor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateBalancerPoolResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateBalancerPoolResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateBalancerPoolResponse: 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) + } + m.PoolID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgMigrateSharesToFullRangeConcentratedPosition) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgMigrateSharesToFullRangeConcentratedPosition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgMigrateSharesToFullRangeConcentratedPosition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SharesToMigrate", 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.SharesToMigrate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgMigrateSharesToFullRangeConcentratedPositionResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgMigrateSharesToFullRangeConcentratedPositionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgMigrateSharesToFullRangeConcentratedPositionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount0", 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.Amount0.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount1", 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.Amount1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LiquidityCreated", 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.LiquidityCreated.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JoinTime", 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 := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.JoinTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/tests/interchaintest/packet_foward_test.go b/tests/interchaintest/packet_foward_test.go index f3b721e..fc38743 100644 --- a/tests/interchaintest/packet_foward_test.go +++ b/tests/interchaintest/packet_foward_test.go @@ -6,6 +6,7 @@ import ( "testing" "time" + transfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" interchaintest "github.com/strangelove-ventures/interchaintest/v4" "github.com/strangelove-ventures/interchaintest/v4/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v4/ibc" @@ -306,7 +307,63 @@ func TestPacketForwardMiddleware(t *testing.T) { // secondHopEscrowAccount := transfertypes.GetEscrowAddress(feeabsosmosisChannel.PortID, feeabsosmosisChannel.ChannelID).String() // thirdHopEscrowAccount := transfertypes.GetEscrowAddress(osmosisgaiaChannel.PortID, osmosisgaiaChannel.ChannelID).String() - t.Run("forward a->b->a", func(t *testing.T) { + t.Run("xcs", func(t *testing.T) { + amountToSend := int64(1_000_000_000) + // Send Gaia uatom to Osmosis + gaiaUserBalance, err := gaia.GetBalance(ctx, gaiaUser.Bech32Address(gaia.Config().Bech32Prefix), gaia.Config().Denom) + require.NoError(t, err) + require.Equal(t, userFunds, gaiaUserBalance) + dstAddress := osmosisUser.Bech32Address(osmosis.Config().Bech32Prefix) + transfer := ibc.WalletAmount{ + Address: dstAddress, + Denom: gaia.Config().Denom, + Amount: amountToSend, + } + + tx, err := gaia.SendIBCTransfer(ctx, channGaiaOsmosis.ChannelID, gaiaUser.KeyName, transfer, ibc.TransferOptions{}) + require.NoError(t, err) + require.NoError(t, tx.Validate()) + + require.NoError(t, r.FlushPackets(ctx, eRep, pathOsmosisGaia, channOsmosisGaia.ChannelID)) + require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathOsmosisGaia, channGaiaOsmosis.ChannelID)) + + expectedBalance := gaiaUserBalance - amountToSend + gaiaUserBalance, err = gaia.GetBalance(ctx, gaiaUser.Bech32Address(gaia.Config().Bech32Prefix), gaia.Config().Denom) + require.NoError(t, err) + require.Equal(t, expectedBalance, gaiaUserBalance) + // Send Gaia uatom to Feeabs + + // gaiaUserBalance, err = gaia.GetBalance(ctx, gaiaUser.Bech32Address(gaia.Config().Bech32Prefix), gaia.Config().Denom) + // require.NoError(t, err) + + // dstAddress = feeabsUser.Bech32Address(feeabs.Config().Bech32Prefix) + // transfer = ibc.WalletAmount{ + // Address: dstAddress, + // Denom: gaia.Config().Denom, + // Amount: amountToSend, + // } + + // tx, err := gaia.SendIBCTransfer(ctx, channGaiaFeeabs.ChannelID) + + // Send Feeabs stake to Osmosis + + // Create pool Osmosis(uatom)/Osmosis(stake) on Osmosis + denomTrace := transfertypes.ParseDenomTrace(transfertypes.GetPrefixedDenom(channOsmosisGaia.PortID, channOsmosisGaia.ChannelID, gaia.Config().Denom)) + ibcDenom := denomTrace.IBCDenom() + + poolID, err := cosmos.OsmosisCreatePool(osmosis, ctx, osmosisUser.KeyName, cosmos.OsmosisPoolParams{ + Weights: fmt.Sprintf("5%s,5%s", ibcDenom, osmosis.Config().Denom), + InitialDeposit: fmt.Sprintf("500000000%s,500000000%s", ibcDenom, osmosis.Config().Denom), + SwapFee: "0.01", + ExitFee: "0", + FutureGovernor: "", + }) + require.NoError(t, err) + require.Equal(t, poolID, "1") + + ibcToken, err := osmosis.GetBalance(ctx, osmosisUser.Bech32Address(osmosis.Config().Bech32Prefix), ibcDenom) + require.NoError(t, err) + require.Equal(t, int64(500_000_000), ibcToken) // Setup contract on Osmosis // Store code crosschain Registry crossChainRegistryContractID, err := osmosis.StoreContract(ctx, osmosisUser.KeyName, "./bytecode/crosschain_registry.wasm") @@ -329,17 +386,8 @@ func TestPacketForwardMiddleware(t *testing.T) { txHash, err := osmosis.ExecuteContract(ctx, osmosisUser.KeyName, address, msg) require.NoError(t, err) _ = txHash - tx, _ := osmosis.GetTransaction(txHash) - fmt.Printf("tx----------------: %v", tx) - - // Send Gaia uatom to Osmosis - - // Send Gaia uatom to Feeabs - - // Send Feeabs stake to Osmosis - - // Create pool Osmosis(uatom)/Osmosis(stake) on Osmosis - + // txs, _ := osmosis.GetTransaction(txHash) + // fmt.Printf("txs----------------: %v", txs) // Swap Feeabs(uatom) to Osmosis }) } diff --git a/tests/interchaintest/setup.go b/tests/interchaintest/setup.go index 189239f..cf16c26 100644 --- a/tests/interchaintest/setup.go +++ b/tests/interchaintest/setup.go @@ -2,6 +2,7 @@ package interchaintest import ( simappparams "github.com/cosmos/cosmos-sdk/simapp/params" + balancertypes "github.com/notional-labs/fee-abstraction/tests/interchaintest/osmosistypes/gamm/balancer" gammtypes "github.com/notional-labs/fee-abstraction/tests/interchaintest/osmosistypes/gamm/types" feeabstype "github.com/notional-labs/fee-abstraction/v2/x/feeabs/types" "github.com/strangelove-ventures/interchaintest/v4/chain/cosmos/wasm" @@ -58,6 +59,7 @@ func osmosisEncoding() *simappparams.EncodingConfig { cfg := wasm.WasmEncoding() gammtypes.RegisterInterfaces(cfg.InterfaceRegistry) + balancertypes.RegisterInterfaces(cfg.InterfaceRegistry) return cfg } From 0c09bafb6b7359aff8b69bffa42feff732a5b1ed Mon Sep 17 00:00:00 2001 From: GnaD Date: Tue, 18 Apr 2023 17:36:42 +0700 Subject: [PATCH 04/16] add setup contract --- tests/interchaintest/packet_foward_test.go | 72 +++++++++++++--------- tests/interchaintest/setup.go | 2 +- 2 files changed, 45 insertions(+), 29 deletions(-) diff --git a/tests/interchaintest/packet_foward_test.go b/tests/interchaintest/packet_foward_test.go index fc38743..c5051ac 100644 --- a/tests/interchaintest/packet_foward_test.go +++ b/tests/interchaintest/packet_foward_test.go @@ -215,6 +215,11 @@ func TestPacketForwardMiddleware(t *testing.T) { channGaiaFeeabs := channsGaia[0] require.NotEmpty(t, channGaiaFeeabs.ChannelID) + fmt.Println("-----------------------------------") + fmt.Printf("channFeeabsOsmosis: %s\n", channFeeabsOsmosis.ChannelID) + fmt.Printf("channFeeabsGaia: %s\n", channFeeabsGaia.ChannelID) + fmt.Printf("channGaiaFeeabs: %s - %s\n", channGaiaFeeabs.ChannelID, channGaiaFeeabs.Counterparty.ChannelID) + fmt.Println("-----------------------------------") //rly osmo-gaia // Generate new path err = r.GeneratePath(ctx, eRep, osmosis.Config().ChainID, gaia.Config().ChainID, pathOsmosisGaia) @@ -288,27 +293,9 @@ func TestPacketForwardMiddleware(t *testing.T) { _ = gaiaUser _ = osmosisUser - // const transferAmount int64 = 100000 - - // Compose the prefixed denoms and ibc denom for asserting balances - // firstHopDenom := transfertypes.GetPrefixedDenom(gaiafeeabsChannel.PortID, gaiafeeabsChannel.ChannelID, feeabs.Config().Denom) - // secondHopDenom := transfertypes.GetPrefixedDenom(osmosisfeeabsChannel.PortID, osmosisfeeabsChannel.ChannelID, firstHopDenom) - // thirdHopDenom := transfertypes.GetPrefixedDenom(gaiaosmosisChannel.PortID, gaiaosmosisChannel.ChannelID, secondHopDenom) - - // firstHopDenomTrace := transfertypes.ParseDenomTrace(firstHopDenom) - // secondHopDenomTrace := transfertypes.ParseDenomTrace(secondHopDenom) - // thirdHopDenomTrace := transfertypes.ParseDenomTrace(thirdHopDenom) - - // firstHopIBCDenom := firstHopDenomTrace.IBCDenom() - // secondHopIBCDenom := secondHopDenomTrace.IBCDenom() - // thirdHopIBCDenom := thirdHopDenomTrace.IBCDenom() - - // firstHopEscrowAccount := transfertypes.GetEscrowAddress(feeabsgaiaChannel.PortID, feeabsgaiaChannel.ChannelID).String() - // secondHopEscrowAccount := transfertypes.GetEscrowAddress(feeabsosmosisChannel.PortID, feeabsosmosisChannel.ChannelID).String() - // thirdHopEscrowAccount := transfertypes.GetEscrowAddress(osmosisgaiaChannel.PortID, osmosisgaiaChannel.ChannelID).String() + const amountToSend = int64(1_000_000_000) t.Run("xcs", func(t *testing.T) { - amountToSend := int64(1_000_000_000) // Send Gaia uatom to Osmosis gaiaUserBalance, err := gaia.GetBalance(ctx, gaiaUser.Bech32Address(gaia.Config().Bech32Prefix), gaia.Config().Denom) require.NoError(t, err) @@ -332,20 +319,49 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, err) require.Equal(t, expectedBalance, gaiaUserBalance) // Send Gaia uatom to Feeabs + gaiaUserBalance, err = gaia.GetBalance(ctx, gaiaUser.Bech32Address(gaia.Config().Bech32Prefix), gaia.Config().Denom) + require.NoError(t, err) - // gaiaUserBalance, err = gaia.GetBalance(ctx, gaiaUser.Bech32Address(gaia.Config().Bech32Prefix), gaia.Config().Denom) - // require.NoError(t, err) + dstAddress = feeabsUser.Bech32Address(feeabs.Config().Bech32Prefix) + transfer = ibc.WalletAmount{ + Address: dstAddress, + Denom: gaia.Config().Denom, + Amount: amountToSend, + } - // dstAddress = feeabsUser.Bech32Address(feeabs.Config().Bech32Prefix) - // transfer = ibc.WalletAmount{ - // Address: dstAddress, - // Denom: gaia.Config().Denom, - // Amount: amountToSend, - // } + tx, err = gaia.SendIBCTransfer(ctx, channGaiaFeeabs.ChannelID, gaiaUser.KeyName, transfer, ibc.TransferOptions{}) + require.NoError(t, err) + require.NoError(t, tx.Validate()) - // tx, err := gaia.SendIBCTransfer(ctx, channGaiaFeeabs.ChannelID) + require.NoError(t, r.FlushPackets(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) + require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) + expectedBalance = gaiaUserBalance - amountToSend + gaiaUserBalance, err = gaia.GetBalance(ctx, gaiaUser.Bech32Address(gaia.Config().Bech32Prefix), gaia.Config().Denom) + require.NoError(t, err) + require.Equal(t, expectedBalance, gaiaUserBalance) // Send Feeabs stake to Osmosis + feeabsUserBalance, err := feeabs.GetBalance(ctx, feeabsUser.Bech32Address(feeabs.Config().Bech32Prefix), feeabs.Config().Denom) + require.NoError(t, err) + + dstAddress = osmosisUser.Bech32Address(osmosis.Config().Bech32Prefix) + transfer = ibc.WalletAmount{ + Address: dstAddress, + Denom: feeabs.Config().Denom, + Amount: amountToSend, + } + + tx, err = feeabs.SendIBCTransfer(ctx, channFeeabsOsmosis.ChannelID, feeabsUser.KeyName, transfer, ibc.TransferOptions{}) + require.NoError(t, err) + require.NoError(t, tx.Validate()) + + require.NoError(t, r.FlushPackets(ctx, eRep, pathFeeabsOsmosis, channOsmosisFeeabs.ChannelID)) + require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathFeeabsOsmosis, channFeeabsOsmosis.ChannelID)) + + expectedBalance = feeabsUserBalance - amountToSend + feeabsUserBalance, err = feeabs.GetBalance(ctx, feeabsUser.Bech32Address(feeabs.Config().Bech32Prefix), feeabs.Config().Denom) + require.NoError(t, err) + require.Equal(t, expectedBalance, feeabsUserBalance) // Create pool Osmosis(uatom)/Osmosis(stake) on Osmosis denomTrace := transfertypes.ParseDenomTrace(transfertypes.GetPrefixedDenom(channOsmosisGaia.PortID, channOsmosisGaia.ChannelID, gaia.Config().Denom)) diff --git a/tests/interchaintest/setup.go b/tests/interchaintest/setup.go index cf16c26..4681c6e 100644 --- a/tests/interchaintest/setup.go +++ b/tests/interchaintest/setup.go @@ -14,7 +14,7 @@ var ( feeabsImage = ibc.DockerImage{ Repository: "ghcr.io/notional-labs/fee-abstraction", - Version: "2.0.1", + Version: "2.0.3", UidGid: "1025:1025", } From c4b171816eee63f3278aa329dda3d563d4c535e7 Mon Sep 17 00:00:00 2001 From: GnaD Date: Wed, 19 Apr 2023 01:33:04 +0700 Subject: [PATCH 05/16] add create pool --- go.work.sum | 2 ++ tests/interchaintest/go.mod | 2 +- tests/interchaintest/go.sum | 5 +-- tests/interchaintest/packet_foward_test.go | 42 ++++++++-------------- 4 files changed, 20 insertions(+), 31 deletions(-) diff --git a/go.work.sum b/go.work.sum index a26fd13..8fd9825 100644 --- a/go.work.sum +++ b/go.work.sum @@ -779,6 +779,8 @@ github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJ github.com/neilotoole/errgroup v0.1.6/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= github.com/nishanths/exhaustive v0.8.3/go.mod h1:qj+zJJUgJ76tR92+25+03oYUhzF4R7/2Wk7fGTfCHmg= github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= +github.com/notional-labs/interchaintest/v4 v4.0.0 h1:tIR5AkZwhjmzZjm+gXPodFZFP6rSzBDbJZjRMMbjDbM= +github.com/notional-labs/interchaintest/v4 v4.0.0/go.mod h1:Na9KNE38VWqOKMSTpbIzXCICDkazn+6kFf4BG0ublCk= github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= diff --git a/tests/interchaintest/go.mod b/tests/interchaintest/go.mod index 1096536..f04402d 100644 --- a/tests/interchaintest/go.mod +++ b/tests/interchaintest/go.mod @@ -189,9 +189,9 @@ replace ( // interchaintest supports ICS features so we need this for now github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.45.13-ics github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 - // For this nested module, you always want to replace the parent reference with the current worktree. github.com/notional-labs/fee-abstraction => ../../ + github.com/strangelove-ventures/interchaintest/v4 => github.com/notional-labs/interchaintest/v4 v4.0.0 // use informal system fork of tendermint github.com/tendermint/tendermint => github.com/informalsystems/tendermint v0.34.26 diff --git a/tests/interchaintest/go.sum b/tests/interchaintest/go.sum index c28dc55..ce08e7b 100644 --- a/tests/interchaintest/go.sum +++ b/tests/interchaintest/go.sum @@ -583,6 +583,8 @@ github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/notional-labs/fee-abstraction/v2 v2.0.1 h1:w++wIzSIoMQk5scVGud96ZLU6IJLlectE13dN6eX9AY= github.com/notional-labs/fee-abstraction/v2 v2.0.1/go.mod h1:6xlQD2XVfVxYc6xJ9AGFkIE4b/b+cGbs3/D0jHhRyXw= +github.com/notional-labs/interchaintest/v4 v4.0.0 h1:tIR5AkZwhjmzZjm+gXPodFZFP6rSzBDbJZjRMMbjDbM= +github.com/notional-labs/interchaintest/v4 v4.0.0/go.mod h1:Na9KNE38VWqOKMSTpbIzXCICDkazn+6kFf4BG0ublCk= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -730,8 +732,6 @@ github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jH github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/strangelove-ventures/go-subkey v1.0.7 h1:cOP/Lajg3uxV/tvspu0m6+0Cu+DJgygkEAbx/s+f35I= github.com/strangelove-ventures/go-subkey v1.0.7/go.mod h1:E34izOIEm+sZ1YmYawYRquqBQWeZBjVB4pF7bMuhc1c= -github.com/strangelove-ventures/interchaintest/v4 v4.0.0-20230331040355-5d08aab13017 h1:ipXOC0b0g2652lmTn+E453sbWtpzqPrGa+jP50ymR3A= -github.com/strangelove-ventures/interchaintest/v4 v4.0.0-20230331040355-5d08aab13017/go.mod h1:Na9KNE38VWqOKMSTpbIzXCICDkazn+6kFf4BG0ublCk= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -1248,6 +1248,7 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/tests/interchaintest/packet_foward_test.go b/tests/interchaintest/packet_foward_test.go index c5051ac..efab18e 100644 --- a/tests/interchaintest/packet_foward_test.go +++ b/tests/interchaintest/packet_foward_test.go @@ -45,6 +45,7 @@ func TestPacketForwardMiddleware(t *testing.T) { // Create chain factory with Feeabs and Gaia numVals := 1 numFullNodes := 1 + gasAdjustment := 2.0 cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ { @@ -69,6 +70,7 @@ func TestPacketForwardMiddleware(t *testing.T) { GasPrices: "0.005uosmo", EncodingConfig: osmosisEncoding(), }, + GasAdjustment: &gasAdjustment, NumValidators: &numVals, NumFullNodes: &numFullNodes, }, @@ -314,14 +316,7 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, r.FlushPackets(ctx, eRep, pathOsmosisGaia, channOsmosisGaia.ChannelID)) require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathOsmosisGaia, channGaiaOsmosis.ChannelID)) - expectedBalance := gaiaUserBalance - amountToSend - gaiaUserBalance, err = gaia.GetBalance(ctx, gaiaUser.Bech32Address(gaia.Config().Bech32Prefix), gaia.Config().Denom) - require.NoError(t, err) - require.Equal(t, expectedBalance, gaiaUserBalance) // Send Gaia uatom to Feeabs - gaiaUserBalance, err = gaia.GetBalance(ctx, gaiaUser.Bech32Address(gaia.Config().Bech32Prefix), gaia.Config().Denom) - require.NoError(t, err) - dstAddress = feeabsUser.Bech32Address(feeabs.Config().Bech32Prefix) transfer = ibc.WalletAmount{ Address: dstAddress, @@ -335,15 +330,7 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, r.FlushPackets(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) - - expectedBalance = gaiaUserBalance - amountToSend - gaiaUserBalance, err = gaia.GetBalance(ctx, gaiaUser.Bech32Address(gaia.Config().Bech32Prefix), gaia.Config().Denom) - require.NoError(t, err) - require.Equal(t, expectedBalance, gaiaUserBalance) // Send Feeabs stake to Osmosis - feeabsUserBalance, err := feeabs.GetBalance(ctx, feeabsUser.Bech32Address(feeabs.Config().Bech32Prefix), feeabs.Config().Denom) - require.NoError(t, err) - dstAddress = osmosisUser.Bech32Address(osmosis.Config().Bech32Prefix) transfer = ibc.WalletAmount{ Address: dstAddress, @@ -357,29 +344,28 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, r.FlushPackets(ctx, eRep, pathFeeabsOsmosis, channOsmosisFeeabs.ChannelID)) require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathFeeabsOsmosis, channFeeabsOsmosis.ChannelID)) - - expectedBalance = feeabsUserBalance - amountToSend - feeabsUserBalance, err = feeabs.GetBalance(ctx, feeabsUser.Bech32Address(feeabs.Config().Bech32Prefix), feeabs.Config().Denom) - require.NoError(t, err) - require.Equal(t, expectedBalance, feeabsUserBalance) - // Create pool Osmosis(uatom)/Osmosis(stake) on Osmosis denomTrace := transfertypes.ParseDenomTrace(transfertypes.GetPrefixedDenom(channOsmosisGaia.PortID, channOsmosisGaia.ChannelID, gaia.Config().Denom)) - ibcDenom := denomTrace.IBCDenom() + uatomOnOsmosis := denomTrace.IBCDenom() + osmosisUserBalance, err := osmosis.GetBalance(ctx, osmosisUser.Bech32Address(osmosis.Config().Bech32Prefix), uatomOnOsmosis) + require.NoError(t, err) + require.Equal(t, amountToSend, osmosisUserBalance) + + denomTrace = transfertypes.ParseDenomTrace(transfertypes.GetPrefixedDenom(channOsmosisFeeabs.PortID, channOsmosisFeeabs.ChannelID, feeabs.Config().Denom)) + stakeOnOsmosis := denomTrace.IBCDenom() + osmosisUserBalance, err = osmosis.GetBalance(ctx, osmosisUser.Bech32Address(osmosis.Config().Bech32Prefix), stakeOnOsmosis) + require.NoError(t, err) + require.Equal(t, amountToSend, osmosisUserBalance) poolID, err := cosmos.OsmosisCreatePool(osmosis, ctx, osmosisUser.KeyName, cosmos.OsmosisPoolParams{ - Weights: fmt.Sprintf("5%s,5%s", ibcDenom, osmosis.Config().Denom), - InitialDeposit: fmt.Sprintf("500000000%s,500000000%s", ibcDenom, osmosis.Config().Denom), + Weights: fmt.Sprintf("5%s,5%s", stakeOnOsmosis, uatomOnOsmosis), + InitialDeposit: fmt.Sprintf("100000000%s,100000000%s", stakeOnOsmosis, uatomOnOsmosis), SwapFee: "0.01", ExitFee: "0", FutureGovernor: "", }) require.NoError(t, err) require.Equal(t, poolID, "1") - - ibcToken, err := osmosis.GetBalance(ctx, osmosisUser.Bech32Address(osmosis.Config().Bech32Prefix), ibcDenom) - require.NoError(t, err) - require.Equal(t, int64(500_000_000), ibcToken) // Setup contract on Osmosis // Store code crosschain Registry crossChainRegistryContractID, err := osmosis.StoreContract(ctx, osmosisUser.KeyName, "./bytecode/crosschain_registry.wasm") From abedf44267365fde86f62b129aee3960a4098fa8 Mon Sep 17 00:00:00 2001 From: GnaD Date: Wed, 19 Apr 2023 10:44:24 +0700 Subject: [PATCH 06/16] add contract for xcs --- tests/interchaintest/packet_foward_test.go | 110 ++++++++++++++------- tests/interchaintest/setup.go | 6 ++ 2 files changed, 80 insertions(+), 36 deletions(-) diff --git a/tests/interchaintest/packet_foward_test.go b/tests/interchaintest/packet_foward_test.go index efab18e..46541e1 100644 --- a/tests/interchaintest/packet_foward_test.go +++ b/tests/interchaintest/packet_foward_test.go @@ -299,9 +299,6 @@ func TestPacketForwardMiddleware(t *testing.T) { t.Run("xcs", func(t *testing.T) { // Send Gaia uatom to Osmosis - gaiaUserBalance, err := gaia.GetBalance(ctx, gaiaUser.Bech32Address(gaia.Config().Bech32Prefix), gaia.Config().Denom) - require.NoError(t, err) - require.Equal(t, userFunds, gaiaUserBalance) dstAddress := osmosisUser.Bech32Address(osmosis.Config().Bech32Prefix) transfer := ibc.WalletAmount{ Address: dstAddress, @@ -315,35 +312,69 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, r.FlushPackets(ctx, eRep, pathOsmosisGaia, channOsmosisGaia.ChannelID)) require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathOsmosisGaia, channGaiaOsmosis.ChannelID)) + testutil.WaitForBlocks(ctx, 5, gaia, osmosis) + // Setup contract on Osmosis + // Store code crosschain Registry + crossChainRegistryContractID, err := osmosis.StoreContract(ctx, osmosisUser.KeyName, "./bytecode/crosschain_registry.wasm") + require.NoError(t, err) + _ = crossChainRegistryContractID + // // Instatiate + owner := osmosisUser.Bech32Address(osmosis.Config().Bech32Prefix) + initMsg := fmt.Sprintf("{\"owner\":\"%s\"}", owner) + registryContractAddress, err := osmosis.InstantiateContract(ctx, osmosisUser.KeyName, crossChainRegistryContractID, initMsg, true) + require.NoError(t, err) + // Execute + msg := fmt.Sprintf("{\"modify_chain_channel_links\": {\"operations\": [{\"operation\": \"set\",\"source_chain\": \"feeabs\",\"destination_chain\": \"osmosis\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"osmosis\",\"destination_chain\": \"feeabs\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"feeabs\",\"destination_chain\": \"gaia\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"gaia\",\"destination_chain\": \"feeabs\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"osmosis\",\"destination_chain\": \"gaia\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"gaia\",\"destination_chain\": \"osmosis\",\"channel_id\": \"%s\"}]}}", + channFeeabsOsmosis.ChannelID, + channOsmosisFeeabs.ChannelID, + channFeeabsGaia.ChannelID, + channGaiaFeeabs.ChannelID, + channOsmosisGaia.ChannelID, + channGaiaOsmosis.ChannelID) + _, err = osmosis.ExecuteContract(ctx, osmosisUser.KeyName, registryContractAddress, msg) + require.NoError(t, err) - // Send Gaia uatom to Feeabs - dstAddress = feeabsUser.Bech32Address(feeabs.Config().Bech32Prefix) + // Send Feeabs stake to Osmosis + dstAddress = osmosisUser.Bech32Address(osmosis.Config().Bech32Prefix) transfer = ibc.WalletAmount{ Address: dstAddress, - Denom: gaia.Config().Denom, + Denom: feeabs.Config().Denom, Amount: amountToSend, } - tx, err = gaia.SendIBCTransfer(ctx, channGaiaFeeabs.ChannelID, gaiaUser.KeyName, transfer, ibc.TransferOptions{}) + tx, err = feeabs.SendIBCTransfer(ctx, channFeeabsOsmosis.ChannelID, feeabsUser.KeyName, transfer, ibc.TransferOptions{}) require.NoError(t, err) require.NoError(t, tx.Validate()) - require.NoError(t, r.FlushPackets(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) - require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) - // Send Feeabs stake to Osmosis - dstAddress = osmosisUser.Bech32Address(osmosis.Config().Bech32Prefix) + require.NoError(t, r.FlushPackets(ctx, eRep, pathFeeabsOsmosis, channOsmosisFeeabs.ChannelID)) + require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathFeeabsOsmosis, channFeeabsOsmosis.ChannelID)) + testutil.WaitForBlocks(ctx, 5, osmosis, feeabs) + + // Execute + msg = fmt.Sprintf("{\"modify_bech32_prefixes\": {\"operations\": [{\"operation\": \"set\", \"chain_name\": \"%s\", \"prefix\": \"feeabs\"},{\"operation\": \"set\", \"chain_name\": \"%s\", \"prefix\": \"osmo\"},{\"operation\": \"set\", \"chain_name\": \"%s\", \"prefix\": \"cosmos\"}]}}", + feeabs.Config().ChainID, + osmosis.Config().ChainID, + gaia.Config().ChainID, + ) + _, err = osmosis.ExecuteContract(ctx, osmosisUser.KeyName, registryContractAddress, msg) + require.NoError(t, err) + + // Send Gaia uatom to Feeabs + dstAddress = feeabsUser.Bech32Address(feeabs.Config().Bech32Prefix) transfer = ibc.WalletAmount{ Address: dstAddress, - Denom: feeabs.Config().Denom, + Denom: gaia.Config().Denom, Amount: amountToSend, } - tx, err = feeabs.SendIBCTransfer(ctx, channFeeabsOsmosis.ChannelID, feeabsUser.KeyName, transfer, ibc.TransferOptions{}) + tx, err = gaia.SendIBCTransfer(ctx, channGaiaFeeabs.ChannelID, gaiaUser.KeyName, transfer, ibc.TransferOptions{}) require.NoError(t, err) require.NoError(t, tx.Validate()) - require.NoError(t, r.FlushPackets(ctx, eRep, pathFeeabsOsmosis, channOsmosisFeeabs.ChannelID)) - require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathFeeabsOsmosis, channFeeabsOsmosis.ChannelID)) + require.NoError(t, r.FlushPackets(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) + require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) + testutil.WaitForBlocks(ctx, 5, gaia, feeabs) + // Create pool Osmosis(uatom)/Osmosis(stake) on Osmosis denomTrace := transfertypes.ParseDenomTrace(transfertypes.GetPrefixedDenom(channOsmosisGaia.PortID, channOsmosisGaia.ChannelID, gaia.Config().Denom)) uatomOnOsmosis := denomTrace.IBCDenom() @@ -359,37 +390,44 @@ func TestPacketForwardMiddleware(t *testing.T) { poolID, err := cosmos.OsmosisCreatePool(osmosis, ctx, osmosisUser.KeyName, cosmos.OsmosisPoolParams{ Weights: fmt.Sprintf("5%s,5%s", stakeOnOsmosis, uatomOnOsmosis), - InitialDeposit: fmt.Sprintf("100000000%s,100000000%s", stakeOnOsmosis, uatomOnOsmosis), + InitialDeposit: fmt.Sprintf("1000000000%s,1000000000%s", stakeOnOsmosis, uatomOnOsmosis), SwapFee: "0.01", ExitFee: "0", FutureGovernor: "", }) require.NoError(t, err) require.Equal(t, poolID, "1") - // Setup contract on Osmosis - // Store code crosschain Registry - crossChainRegistryContractID, err := osmosis.StoreContract(ctx, osmosisUser.KeyName, "./bytecode/crosschain_registry.wasm") + + // store swaprouter + swapRouterContractID, err := osmosis.StoreContract(ctx, osmosisUser.KeyName, "./bytecode/swaprouter.wasm") require.NoError(t, err) - _ = crossChainRegistryContractID - // // Instatiate - owner := osmosisUser.Bech32Address(osmosis.Config().Bech32Prefix) - swapRegistryInitMsg := fmt.Sprintf("{\"owner\":\"%s\"}", owner) - address, err := osmosis.InstantiateContract(ctx, osmosisUser.KeyName, crossChainRegistryContractID, swapRegistryInitMsg, true) - fmt.Printf("xcrAddress: %s\n", address) + // instantiate + swapRouterContractAddress, err := osmosis.InstantiateContract(ctx, osmosisUser.KeyName, swapRouterContractID, initMsg, true) require.NoError(t, err) - // Execute - msg := fmt.Sprintf("{\"modify_chain_channel_links\": {\"operations\": [{\"operation\": \"set\",\"source_chain\": \"feeabs\",\"destination_chain\": \"osmosis\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"osmosis\",\"destination_chain\": \"feeabs\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"feeabs\",\"destination_chain\": \"gaia\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"gaia\",\"destination_chain\": \"feeabs\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"osmosis\",\"destination_chain\": \"gaia\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"gaia\",\"destination_chain\": \"osmosis\",\"channel_id\": \"%s\"}]}}", - channFeeabsOsmosis.ChannelID, - channOsmosisFeeabs.ChannelID, - channFeeabsGaia.ChannelID, - channGaiaFeeabs.ChannelID, - channOsmosisGaia.ChannelID, - channGaiaOsmosis.ChannelID) - txHash, err := osmosis.ExecuteContract(ctx, osmosisUser.KeyName, address, msg) + fmt.Printf("swapRouterContractAddress: %s", swapRouterContractAddress) + + // execute + msg = fmt.Sprintf("{\"set_route\":{\"input_denom\":\"%s\",\"output_denom\":\"%s\",\"pool_route\":[{\"pool_id\":\"%s\",\"token_out_denom\":\"%s\"}]}}", + uatomOnOsmosis, + stakeOnOsmosis, + poolID, + stakeOnOsmosis, + ) + txHash, err := osmosis.ExecuteContract(ctx, osmosisUser.KeyName, swapRouterContractAddress, msg) require.NoError(t, err) _ = txHash - // txs, _ := osmosis.GetTransaction(txHash) - // fmt.Printf("txs----------------: %v", txs) + txs, _ := osmosis.GetTransaction(txHash) + fmt.Printf("txs----------------: %v", txs) + + // store xcs + xcsContractID, err := osmosis.StoreContract(ctx, osmosisUser.KeyName, "./bytecode/crosschain_swaps.wasm") + require.NoError(t, err) + // instantiate + initMsg = fmt.Sprintf("{\"swap_contract\":\"%s\",\"governor\": \"%s\"}", swapRouterContractAddress, owner) + xcsContractAddress, err := osmosis.InstantiateContract(ctx, osmosisUser.KeyName, xcsContractID, initMsg, true) + require.NoError(t, err) + fmt.Printf("--------------------xcsContractAddress %s", xcsContractAddress) // Swap Feeabs(uatom) to Osmosis + // Get feeabs module account }) } diff --git a/tests/interchaintest/setup.go b/tests/interchaintest/setup.go index 4681c6e..b26ca95 100644 --- a/tests/interchaintest/setup.go +++ b/tests/interchaintest/setup.go @@ -2,6 +2,7 @@ package interchaintest import ( simappparams "github.com/cosmos/cosmos-sdk/simapp/params" + "github.com/cosmos/cosmos-sdk/types" balancertypes "github.com/notional-labs/fee-abstraction/tests/interchaintest/osmosistypes/gamm/balancer" gammtypes "github.com/notional-labs/fee-abstraction/tests/interchaintest/osmosistypes/gamm/types" feeabstype "github.com/notional-labs/fee-abstraction/v2/x/feeabs/types" @@ -9,6 +10,11 @@ import ( "github.com/strangelove-ventures/interchaintest/v4/ibc" ) +type QueryFeeabsModuleBalacesResponse struct { + Balances types.Coins + Address string +} + var ( FeeabsMainRepo = "ghcr.io/notional-labs/fee-abstraction" From c48caea158c5d067bc1f54e4f1e3fef3bcdfbdfd Mon Sep 17 00:00:00 2001 From: GnaD Date: Wed, 19 Apr 2023 15:27:33 +0700 Subject: [PATCH 07/16] add xcs --- go.work.sum | 5 +-- tests/interchaintest/go.mod | 2 +- tests/interchaintest/go.sum | 4 +- tests/interchaintest/packet_foward_test.go | 50 ++++++++++++++++++++-- 4 files changed, 52 insertions(+), 9 deletions(-) diff --git a/go.work.sum b/go.work.sum index 8fd9825..a317470 100644 --- a/go.work.sum +++ b/go.work.sum @@ -779,8 +779,8 @@ github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJ github.com/neilotoole/errgroup v0.1.6/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= github.com/nishanths/exhaustive v0.8.3/go.mod h1:qj+zJJUgJ76tR92+25+03oYUhzF4R7/2Wk7fGTfCHmg= github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= -github.com/notional-labs/interchaintest/v4 v4.0.0 h1:tIR5AkZwhjmzZjm+gXPodFZFP6rSzBDbJZjRMMbjDbM= -github.com/notional-labs/interchaintest/v4 v4.0.0/go.mod h1:Na9KNE38VWqOKMSTpbIzXCICDkazn+6kFf4BG0ublCk= +github.com/notional-labs/interchaintest/v4 v4.0.1-0.20230419073816-a38fbcca50f2 h1:VUeAkXDqL21yF1mCdTOOYf2E7HYfWXG2T+c9nv09Z30= +github.com/notional-labs/interchaintest/v4 v4.0.1-0.20230419073816-a38fbcca50f2/go.mod h1:Na9KNE38VWqOKMSTpbIzXCICDkazn+6kFf4BG0ublCk= github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= @@ -1279,7 +1279,6 @@ gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= honnef.co/go/tools v0.3.3/go.mod h1:jzwdWgg7Jdq75wlfblQxO4neNaFFSvgc1tD5Wv8U0Yw= diff --git a/tests/interchaintest/go.mod b/tests/interchaintest/go.mod index f04402d..77c36a0 100644 --- a/tests/interchaintest/go.mod +++ b/tests/interchaintest/go.mod @@ -191,7 +191,7 @@ replace ( github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 // For this nested module, you always want to replace the parent reference with the current worktree. github.com/notional-labs/fee-abstraction => ../../ - github.com/strangelove-ventures/interchaintest/v4 => github.com/notional-labs/interchaintest/v4 v4.0.0 + github.com/strangelove-ventures/interchaintest/v4 => github.com/notional-labs/interchaintest/v4 v4.0.1-0.20230419073816-a38fbcca50f2 // use informal system fork of tendermint github.com/tendermint/tendermint => github.com/informalsystems/tendermint v0.34.26 diff --git a/tests/interchaintest/go.sum b/tests/interchaintest/go.sum index ce08e7b..7686c67 100644 --- a/tests/interchaintest/go.sum +++ b/tests/interchaintest/go.sum @@ -583,8 +583,8 @@ github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/notional-labs/fee-abstraction/v2 v2.0.1 h1:w++wIzSIoMQk5scVGud96ZLU6IJLlectE13dN6eX9AY= github.com/notional-labs/fee-abstraction/v2 v2.0.1/go.mod h1:6xlQD2XVfVxYc6xJ9AGFkIE4b/b+cGbs3/D0jHhRyXw= -github.com/notional-labs/interchaintest/v4 v4.0.0 h1:tIR5AkZwhjmzZjm+gXPodFZFP6rSzBDbJZjRMMbjDbM= -github.com/notional-labs/interchaintest/v4 v4.0.0/go.mod h1:Na9KNE38VWqOKMSTpbIzXCICDkazn+6kFf4BG0ublCk= +github.com/notional-labs/interchaintest/v4 v4.0.1-0.20230419073816-a38fbcca50f2 h1:VUeAkXDqL21yF1mCdTOOYf2E7HYfWXG2T+c9nv09Z30= +github.com/notional-labs/interchaintest/v4 v4.0.1-0.20230419073816-a38fbcca50f2/go.mod h1:Na9KNE38VWqOKMSTpbIzXCICDkazn+6kFf4BG0ublCk= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= diff --git a/tests/interchaintest/packet_foward_test.go b/tests/interchaintest/packet_foward_test.go index 46541e1..d693d8c 100644 --- a/tests/interchaintest/packet_foward_test.go +++ b/tests/interchaintest/packet_foward_test.go @@ -2,6 +2,7 @@ package interchaintest import ( "context" + "encoding/json" "fmt" "testing" "time" @@ -310,7 +311,9 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, err) require.NoError(t, tx.Validate()) + testutil.WaitForBlocks(ctx, 1, gaia, feeabs) require.NoError(t, r.FlushPackets(ctx, eRep, pathOsmosisGaia, channOsmosisGaia.ChannelID)) + testutil.WaitForBlocks(ctx, 1, gaia, feeabs) require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathOsmosisGaia, channGaiaOsmosis.ChannelID)) testutil.WaitForBlocks(ctx, 5, gaia, osmosis) // Setup contract on Osmosis @@ -346,7 +349,9 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, err) require.NoError(t, tx.Validate()) + testutil.WaitForBlocks(ctx, 1, gaia, feeabs) require.NoError(t, r.FlushPackets(ctx, eRep, pathFeeabsOsmosis, channOsmosisFeeabs.ChannelID)) + testutil.WaitForBlocks(ctx, 1, gaia, feeabs) require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathFeeabsOsmosis, channFeeabsOsmosis.ChannelID)) testutil.WaitForBlocks(ctx, 5, osmosis, feeabs) @@ -371,7 +376,9 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, err) require.NoError(t, tx.Validate()) + testutil.WaitForBlocks(ctx, 1, gaia, feeabs) require.NoError(t, r.FlushPackets(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) + testutil.WaitForBlocks(ctx, 1, gaia, feeabs) require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) testutil.WaitForBlocks(ctx, 5, gaia, feeabs) @@ -416,8 +423,8 @@ func TestPacketForwardMiddleware(t *testing.T) { txHash, err := osmosis.ExecuteContract(ctx, osmosisUser.KeyName, swapRouterContractAddress, msg) require.NoError(t, err) _ = txHash - txs, _ := osmosis.GetTransaction(txHash) - fmt.Printf("txs----------------: %v", txs) + // txs, _ := osmosis.GetTransaction(txHash) + // fmt.Printf("txs----------------: %v", txs) // store xcs xcsContractID, err := osmosis.StoreContract(ctx, osmosisUser.KeyName, "./bytecode/crosschain_swaps.wasm") @@ -428,6 +435,43 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, err) fmt.Printf("--------------------xcsContractAddress %s", xcsContractAddress) // Swap Feeabs(uatom) to Osmosis - // Get feeabs module account + // send ibc token to feeabs module account + feeabsModule, err := QueryFeeabsModuleAccountBalances(feeabs, ctx) + require.NoError(t, err) + fmt.Printf("Ibc Denom: %s\n", feeabsModule.Balances[0].Denom) + dstAddress = feeabsModule.Address + transfer = ibc.WalletAmount{ + Address: dstAddress, + Denom: gaia.Config().Denom, + Amount: amountToSend, + } + + tx, err = gaia.SendIBCTransfer(ctx, channGaiaFeeabs.ChannelID, gaiaUser.KeyName, transfer, ibc.TransferOptions{}) + require.NoError(t, err) + require.NoError(t, tx.Validate()) + + testutil.WaitForBlocks(ctx, 1, gaia, feeabs) + require.NoError(t, r.FlushPackets(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) + testutil.WaitForBlocks(ctx, 1, gaia, feeabs) + require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) + + // xcs + cosmos.FeeabsCrossChainSwap(feeabs, ctx, feeabsUser.KeyName, feeabsModule.Balances[0].Denom) }) } + +func QueryFeeabsModuleAccountBalances(c *cosmos.CosmosChain, ctx context.Context) (*QueryFeeabsModuleBalacesResponse, error) { + cmd := []string{"feeabs", "module-balances"} + stdout, _, err := c.ExecQuery(ctx, cmd) + if err != nil { + return &QueryFeeabsModuleBalacesResponse{}, err + } + + var feeabsModule QueryFeeabsModuleBalacesResponse + err = json.Unmarshal(stdout, &feeabsModule) + if err != nil { + return &QueryFeeabsModuleBalacesResponse{}, err + } + + return &feeabsModule, nil +} From f064cc76b8fd980b058646bfa0aab1a9d57e50ba Mon Sep 17 00:00:00 2001 From: GnaD Date: Wed, 19 Apr 2023 15:42:13 +0700 Subject: [PATCH 08/16] add check --- tests/interchaintest/packet_foward_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/interchaintest/packet_foward_test.go b/tests/interchaintest/packet_foward_test.go index d693d8c..cba30ac 100644 --- a/tests/interchaintest/packet_foward_test.go +++ b/tests/interchaintest/packet_foward_test.go @@ -455,8 +455,21 @@ func TestPacketForwardMiddleware(t *testing.T) { testutil.WaitForBlocks(ctx, 1, gaia, feeabs) require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) + denomTrace = transfertypes.ParseDenomTrace(transfertypes.GetPrefixedDenom(channFeeabsGaia.PortID, channFeeabsGaia.ChannelID, gaia.Config().Denom)) + uatomOnFeeabs := denomTrace.IBCDenom() + + moduleBalace, err := feeabs.GetBalance(ctx, feeabsModule.Address, uatomOnFeeabs) + require.NoError(t, err) + fmt.Printf("----------------moduleBalace %v\n", moduleBalace) + // xcs cosmos.FeeabsCrossChainSwap(feeabs, ctx, feeabsUser.KeyName, feeabsModule.Balances[0].Denom) + err = testutil.WaitForBlocks(ctx, 30, feeabs) + require.NoError(t, err) + moduleBalace, err = feeabs.GetBalance(ctx, feeabsModule.Address, feeabs.Config().Denom) + require.NoError(t, err) + fmt.Printf("----------------moduleBalace %v\n", moduleBalace) + require.Greater(t, moduleBalace, 1) }) } From a1c453f9c7d7ee5c6d4be5235254dc3086d0a2a2 Mon Sep 17 00:00:00 2001 From: GnaD Date: Wed, 19 Apr 2023 15:46:33 +0700 Subject: [PATCH 09/16] nit --- tests/interchaintest/packet_foward_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/interchaintest/packet_foward_test.go b/tests/interchaintest/packet_foward_test.go index cba30ac..5141026 100644 --- a/tests/interchaintest/packet_foward_test.go +++ b/tests/interchaintest/packet_foward_test.go @@ -438,7 +438,6 @@ func TestPacketForwardMiddleware(t *testing.T) { // send ibc token to feeabs module account feeabsModule, err := QueryFeeabsModuleAccountBalances(feeabs, ctx) require.NoError(t, err) - fmt.Printf("Ibc Denom: %s\n", feeabsModule.Balances[0].Denom) dstAddress = feeabsModule.Address transfer = ibc.WalletAmount{ Address: dstAddress, From cb512b268f3b2adc709e551ea1e153539174e80a Mon Sep 17 00:00:00 2001 From: GnaD Date: Wed, 19 Apr 2023 15:58:20 +0700 Subject: [PATCH 10/16] add log check --- tests/interchaintest/packet_foward_test.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tests/interchaintest/packet_foward_test.go b/tests/interchaintest/packet_foward_test.go index 5141026..f840a41 100644 --- a/tests/interchaintest/packet_foward_test.go +++ b/tests/interchaintest/packet_foward_test.go @@ -311,9 +311,7 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, err) require.NoError(t, tx.Validate()) - testutil.WaitForBlocks(ctx, 1, gaia, feeabs) require.NoError(t, r.FlushPackets(ctx, eRep, pathOsmosisGaia, channOsmosisGaia.ChannelID)) - testutil.WaitForBlocks(ctx, 1, gaia, feeabs) require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathOsmosisGaia, channGaiaOsmosis.ChannelID)) testutil.WaitForBlocks(ctx, 5, gaia, osmosis) // Setup contract on Osmosis @@ -349,9 +347,7 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, err) require.NoError(t, tx.Validate()) - testutil.WaitForBlocks(ctx, 1, gaia, feeabs) require.NoError(t, r.FlushPackets(ctx, eRep, pathFeeabsOsmosis, channOsmosisFeeabs.ChannelID)) - testutil.WaitForBlocks(ctx, 1, gaia, feeabs) require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathFeeabsOsmosis, channFeeabsOsmosis.ChannelID)) testutil.WaitForBlocks(ctx, 5, osmosis, feeabs) @@ -376,9 +372,7 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, err) require.NoError(t, tx.Validate()) - testutil.WaitForBlocks(ctx, 1, gaia, feeabs) require.NoError(t, r.FlushPackets(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) - testutil.WaitForBlocks(ctx, 1, gaia, feeabs) require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) testutil.WaitForBlocks(ctx, 5, gaia, feeabs) @@ -449,9 +443,7 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, err) require.NoError(t, tx.Validate()) - testutil.WaitForBlocks(ctx, 1, gaia, feeabs) require.NoError(t, r.FlushPackets(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) - testutil.WaitForBlocks(ctx, 1, gaia, feeabs) require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) denomTrace = transfertypes.ParseDenomTrace(transfertypes.GetPrefixedDenom(channFeeabsGaia.PortID, channFeeabsGaia.ChannelID, gaia.Config().Denom)) @@ -462,8 +454,11 @@ func TestPacketForwardMiddleware(t *testing.T) { fmt.Printf("----------------moduleBalace %v\n", moduleBalace) // xcs - cosmos.FeeabsCrossChainSwap(feeabs, ctx, feeabsUser.KeyName, feeabsModule.Balances[0].Denom) + fmt.Printf("----------------testttttttttttttttttttttttttttt\n") + cosmos.FeeabsCrossChainSwap(feeabs, ctx, feeabsUser.KeyName, uatomOnFeeabs) + fmt.Printf("----------------testttttttttttttttttttttttttttt\n") err = testutil.WaitForBlocks(ctx, 30, feeabs) + fmt.Printf("----------------testttttttttttttttttttttttttttt\n") require.NoError(t, err) moduleBalace, err = feeabs.GetBalance(ctx, feeabsModule.Address, feeabs.Config().Denom) require.NoError(t, err) From cb1e491ca59f5cb52ce956df8a67385c9039c4cf Mon Sep 17 00:00:00 2001 From: GnaD Date: Wed, 19 Apr 2023 16:08:22 +0700 Subject: [PATCH 11/16] add wait for block --- tests/interchaintest/packet_foward_test.go | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/interchaintest/packet_foward_test.go b/tests/interchaintest/packet_foward_test.go index f840a41..982b295 100644 --- a/tests/interchaintest/packet_foward_test.go +++ b/tests/interchaintest/packet_foward_test.go @@ -311,9 +311,11 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, err) require.NoError(t, tx.Validate()) + testutil.WaitForBlocks(ctx, 1, osmosis, feeabs) require.NoError(t, r.FlushPackets(ctx, eRep, pathOsmosisGaia, channOsmosisGaia.ChannelID)) + testutil.WaitForBlocks(ctx, 1, osmosis, feeabs) require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathOsmosisGaia, channGaiaOsmosis.ChannelID)) - testutil.WaitForBlocks(ctx, 5, gaia, osmosis) + testutil.WaitForBlocks(ctx, 1, osmosis, feeabs) // Setup contract on Osmosis // Store code crosschain Registry crossChainRegistryContractID, err := osmosis.StoreContract(ctx, osmosisUser.KeyName, "./bytecode/crosschain_registry.wasm") @@ -347,10 +349,11 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, err) require.NoError(t, tx.Validate()) + testutil.WaitForBlocks(ctx, 1, osmosis, feeabs) require.NoError(t, r.FlushPackets(ctx, eRep, pathFeeabsOsmosis, channOsmosisFeeabs.ChannelID)) + testutil.WaitForBlocks(ctx, 1, osmosis, feeabs) require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathFeeabsOsmosis, channFeeabsOsmosis.ChannelID)) - testutil.WaitForBlocks(ctx, 5, osmosis, feeabs) - + testutil.WaitForBlocks(ctx, 1, osmosis, feeabs) // Execute msg = fmt.Sprintf("{\"modify_bech32_prefixes\": {\"operations\": [{\"operation\": \"set\", \"chain_name\": \"%s\", \"prefix\": \"feeabs\"},{\"operation\": \"set\", \"chain_name\": \"%s\", \"prefix\": \"osmo\"},{\"operation\": \"set\", \"chain_name\": \"%s\", \"prefix\": \"cosmos\"}]}}", feeabs.Config().ChainID, @@ -372,9 +375,11 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, err) require.NoError(t, tx.Validate()) + testutil.WaitForBlocks(ctx, 1, osmosis, feeabs) require.NoError(t, r.FlushPackets(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) + testutil.WaitForBlocks(ctx, 1, osmosis, feeabs) require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) - testutil.WaitForBlocks(ctx, 5, gaia, feeabs) + testutil.WaitForBlocks(ctx, 1, gaia, feeabs) // Create pool Osmosis(uatom)/Osmosis(stake) on Osmosis denomTrace := transfertypes.ParseDenomTrace(transfertypes.GetPrefixedDenom(channOsmosisGaia.PortID, channOsmosisGaia.ChannelID, gaia.Config().Denom)) @@ -443,8 +448,11 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, err) require.NoError(t, tx.Validate()) + testutil.WaitForBlocks(ctx, 1, osmosis, feeabs) require.NoError(t, r.FlushPackets(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) + testutil.WaitForBlocks(ctx, 1, osmosis, feeabs) require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) + testutil.WaitForBlocks(ctx, 1, osmosis, feeabs) denomTrace = transfertypes.ParseDenomTrace(transfertypes.GetPrefixedDenom(channFeeabsGaia.PortID, channFeeabsGaia.ChannelID, gaia.Config().Denom)) uatomOnFeeabs := denomTrace.IBCDenom() From 2eb189db378e57afd681e3388a9a95585a62240a Mon Sep 17 00:00:00 2001 From: GnaD Date: Thu, 20 Apr 2023 00:56:34 +0700 Subject: [PATCH 12/16] add proposl --- scripts/host_zone.json | 12 +- scripts/proposal.json | 8 +- tests/interchaintest/packet_foward_test.go | 140 ++++++++++++------- tests/interchaintest/proposal/host_zone.json | 12 ++ tests/interchaintest/proposal/proposal.json | 32 +++++ tests/interchaintest/setup.go | 8 +- 6 files changed, 146 insertions(+), 66 deletions(-) create mode 100644 tests/interchaintest/proposal/host_zone.json create mode 100644 tests/interchaintest/proposal/proposal.json diff --git a/scripts/host_zone.json b/scripts/host_zone.json index 3a89016..e9c66af 100644 --- a/scripts/host_zone.json +++ b/scripts/host_zone.json @@ -3,16 +3,10 @@ "description": "Add Fee Abbtraction Host Zone", "host_chain_fee_abs_config": { - "ibc_denom": "ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518", - "osmosis_pool_token_denom_in": "uosmo", - "middleware_address": "", - "ibc_transfer_channel":"channel-0", - "host_zone_ibc_transfer_channel":"", - "crosschain_swap_address":"", + "ibc_denom": "ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9", + "osmosis_pool_token_denom_in": "ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9", "pool_id": "1", - "is_osmosis": true, - "frozen": false, - "osmosis_query_channel": "channel-1" + "frozen": false }, "deposit": "100000000stake" } \ No newline at end of file diff --git a/scripts/proposal.json b/scripts/proposal.json index 1a76eda..27fbebf 100644 --- a/scripts/proposal.json +++ b/scripts/proposal.json @@ -2,7 +2,11 @@ "title": "Enable Fee Abtraction", "description": "Change params for enable fee abstraction", "changes": [ - + { + "subspace": "feeabs", + "key": "chainname", + "value": "feeabs" + }, { "subspace": "feeabs", "key": "nativeibcedinosmosis", @@ -11,7 +15,7 @@ { "subspace": "feeabs", "key": "chainname", - "value": "feeappd-t1" + "value": "feeabs-2" }, { "subspace": "feeabs", diff --git a/tests/interchaintest/packet_foward_test.go b/tests/interchaintest/packet_foward_test.go index 982b295..6c8325e 100644 --- a/tests/interchaintest/packet_foward_test.go +++ b/tests/interchaintest/packet_foward_test.go @@ -4,6 +4,8 @@ import ( "context" "encoding/json" "fmt" + "os" + "path" "testing" "time" @@ -300,6 +302,8 @@ func TestPacketForwardMiddleware(t *testing.T) { t.Run("xcs", func(t *testing.T) { // Send Gaia uatom to Osmosis + gaiaHeight, err := gaia.Height(ctx) + require.NoError(t, err) dstAddress := osmosisUser.Bech32Address(osmosis.Config().Bech32Prefix) transfer := ibc.WalletAmount{ Address: dstAddress, @@ -311,33 +315,14 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, err) require.NoError(t, tx.Validate()) - testutil.WaitForBlocks(ctx, 1, osmosis, feeabs) - require.NoError(t, r.FlushPackets(ctx, eRep, pathOsmosisGaia, channOsmosisGaia.ChannelID)) - testutil.WaitForBlocks(ctx, 1, osmosis, feeabs) - require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathOsmosisGaia, channGaiaOsmosis.ChannelID)) - testutil.WaitForBlocks(ctx, 1, osmosis, feeabs) - // Setup contract on Osmosis - // Store code crosschain Registry - crossChainRegistryContractID, err := osmosis.StoreContract(ctx, osmosisUser.KeyName, "./bytecode/crosschain_registry.wasm") + _, err = testutil.PollForAck(ctx, gaia, gaiaHeight, gaiaHeight+30, tx.Packet) require.NoError(t, err) - _ = crossChainRegistryContractID - // // Instatiate - owner := osmosisUser.Bech32Address(osmosis.Config().Bech32Prefix) - initMsg := fmt.Sprintf("{\"owner\":\"%s\"}", owner) - registryContractAddress, err := osmosis.InstantiateContract(ctx, osmosisUser.KeyName, crossChainRegistryContractID, initMsg, true) - require.NoError(t, err) - // Execute - msg := fmt.Sprintf("{\"modify_chain_channel_links\": {\"operations\": [{\"operation\": \"set\",\"source_chain\": \"feeabs\",\"destination_chain\": \"osmosis\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"osmosis\",\"destination_chain\": \"feeabs\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"feeabs\",\"destination_chain\": \"gaia\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"gaia\",\"destination_chain\": \"feeabs\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"osmosis\",\"destination_chain\": \"gaia\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"gaia\",\"destination_chain\": \"osmosis\",\"channel_id\": \"%s\"}]}}", - channFeeabsOsmosis.ChannelID, - channOsmosisFeeabs.ChannelID, - channFeeabsGaia.ChannelID, - channGaiaFeeabs.ChannelID, - channOsmosisGaia.ChannelID, - channGaiaOsmosis.ChannelID) - _, err = osmosis.ExecuteContract(ctx, osmosisUser.KeyName, registryContractAddress, msg) + err = testutil.WaitForBlocks(ctx, 1, feeabs, gaia, osmosis) require.NoError(t, err) // Send Feeabs stake to Osmosis + feeabsHeight, err := feeabs.Height(ctx) + require.NoError(t, err) dstAddress = osmosisUser.Bech32Address(osmosis.Config().Bech32Prefix) transfer = ibc.WalletAmount{ Address: dstAddress, @@ -349,21 +334,14 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, err) require.NoError(t, tx.Validate()) - testutil.WaitForBlocks(ctx, 1, osmosis, feeabs) - require.NoError(t, r.FlushPackets(ctx, eRep, pathFeeabsOsmosis, channOsmosisFeeabs.ChannelID)) - testutil.WaitForBlocks(ctx, 1, osmosis, feeabs) - require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathFeeabsOsmosis, channFeeabsOsmosis.ChannelID)) - testutil.WaitForBlocks(ctx, 1, osmosis, feeabs) - // Execute - msg = fmt.Sprintf("{\"modify_bech32_prefixes\": {\"operations\": [{\"operation\": \"set\", \"chain_name\": \"%s\", \"prefix\": \"feeabs\"},{\"operation\": \"set\", \"chain_name\": \"%s\", \"prefix\": \"osmo\"},{\"operation\": \"set\", \"chain_name\": \"%s\", \"prefix\": \"cosmos\"}]}}", - feeabs.Config().ChainID, - osmosis.Config().ChainID, - gaia.Config().ChainID, - ) - _, err = osmosis.ExecuteContract(ctx, osmosisUser.KeyName, registryContractAddress, msg) + _, err = testutil.PollForAck(ctx, feeabs, feeabsHeight, feeabsHeight+30, tx.Packet) + require.NoError(t, err) + err = testutil.WaitForBlocks(ctx, 1, feeabs, gaia, osmosis) require.NoError(t, err) // Send Gaia uatom to Feeabs + gaiaHeight, err = gaia.Height(ctx) + require.NoError(t, err) dstAddress = feeabsUser.Bech32Address(feeabs.Config().Bech32Prefix) transfer = ibc.WalletAmount{ Address: dstAddress, @@ -375,11 +353,34 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, err) require.NoError(t, tx.Validate()) - testutil.WaitForBlocks(ctx, 1, osmosis, feeabs) - require.NoError(t, r.FlushPackets(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) - testutil.WaitForBlocks(ctx, 1, osmosis, feeabs) - require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) - testutil.WaitForBlocks(ctx, 1, gaia, feeabs) + _, err = testutil.PollForAck(ctx, gaia, gaiaHeight, gaiaHeight+30, tx.Packet) + require.NoError(t, err) + err = testutil.WaitForBlocks(ctx, 1, feeabs, gaia, osmosis) + require.NoError(t, err) + // Setup contract on Osmosis + // Store code crosschain Registry + crossChainRegistryContractID, err := osmosis.StoreContract(ctx, osmosisUser.KeyName, "./bytecode/crosschain_registry.wasm") + require.NoError(t, err) + _ = crossChainRegistryContractID + // // Instatiate + owner := osmosisUser.Bech32Address(osmosis.Config().Bech32Prefix) + initMsg := fmt.Sprintf("{\"owner\":\"%s\"}", owner) + registryContractAddress, err := osmosis.InstantiateContract(ctx, osmosisUser.KeyName, crossChainRegistryContractID, initMsg, true) + require.NoError(t, err) + // Execute + msg := fmt.Sprintf("{\"modify_chain_channel_links\": {\"operations\": [{\"operation\": \"set\",\"source_chain\": \"feeabs\",\"destination_chain\": \"osmosis\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"osmosis\",\"destination_chain\": \"feeabs\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"feeabs\",\"destination_chain\": \"gaia\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"gaia\",\"destination_chain\": \"feeabs\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"osmosis\",\"destination_chain\": \"gaia\",\"channel_id\": \"%s\"},{\"operation\": \"set\",\"source_chain\": \"gaia\",\"destination_chain\": \"osmosis\",\"channel_id\": \"%s\"}]}}", + channFeeabsOsmosis.ChannelID, + channOsmosisFeeabs.ChannelID, + channFeeabsGaia.ChannelID, + channGaiaFeeabs.ChannelID, + channOsmosisGaia.ChannelID, + channGaiaOsmosis.ChannelID) + _, err = osmosis.ExecuteContract(ctx, osmosisUser.KeyName, registryContractAddress, msg) + require.NoError(t, err) + // Execute + msg = fmt.Sprintf("{\"modify_bech32_prefixes\": {\"operations\": [{\"operation\": \"set\", \"chain_name\": \"feeabs\", \"prefix\": \"feeabs\"},{\"operation\": \"set\", \"chain_name\": \"osmosis\", \"prefix\": \"osmo\"},{\"operation\": \"set\", \"chain_name\": \"gaia\", \"prefix\": \"cosmos\"}]}}") + _, err = osmosis.ExecuteContract(ctx, osmosisUser.KeyName, registryContractAddress, msg) + require.NoError(t, err) // Create pool Osmosis(uatom)/Osmosis(stake) on Osmosis denomTrace := transfertypes.ParseDenomTrace(transfertypes.GetPrefixedDenom(channOsmosisGaia.PortID, channOsmosisGaia.ChannelID, gaia.Config().Denom)) @@ -422,8 +423,6 @@ func TestPacketForwardMiddleware(t *testing.T) { txHash, err := osmosis.ExecuteContract(ctx, osmosisUser.KeyName, swapRouterContractAddress, msg) require.NoError(t, err) _ = txHash - // txs, _ := osmosis.GetTransaction(txHash) - // fmt.Printf("txs----------------: %v", txs) // store xcs xcsContractID, err := osmosis.StoreContract(ctx, osmosisUser.KeyName, "./bytecode/crosschain_swaps.wasm") @@ -435,6 +434,8 @@ func TestPacketForwardMiddleware(t *testing.T) { fmt.Printf("--------------------xcsContractAddress %s", xcsContractAddress) // Swap Feeabs(uatom) to Osmosis // send ibc token to feeabs module account + gaiaHeight, err = gaia.Height(ctx) + require.NoError(t, err) feeabsModule, err := QueryFeeabsModuleAccountBalances(feeabs, ctx) require.NoError(t, err) dstAddress = feeabsModule.Address @@ -448,30 +449,61 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, err) require.NoError(t, tx.Validate()) - testutil.WaitForBlocks(ctx, 1, osmosis, feeabs) - require.NoError(t, r.FlushPackets(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) - testutil.WaitForBlocks(ctx, 1, osmosis, feeabs) - require.NoError(t, r.FlushAcknowledgements(ctx, eRep, pathFeeabsGaia, channFeeabsGaia.ChannelID)) - testutil.WaitForBlocks(ctx, 1, osmosis, feeabs) + _, err = testutil.PollForAck(ctx, gaia, gaiaHeight, gaiaHeight+30, tx.Packet) + require.NoError(t, err) + err = testutil.WaitForBlocks(ctx, 1, feeabs, gaia, osmosis) + require.NoError(t, err) denomTrace = transfertypes.ParseDenomTrace(transfertypes.GetPrefixedDenom(channFeeabsGaia.PortID, channFeeabsGaia.ChannelID, gaia.Config().Denom)) uatomOnFeeabs := denomTrace.IBCDenom() - moduleBalace, err := feeabs.GetBalance(ctx, feeabsModule.Address, uatomOnFeeabs) + fmt.Printf("-----------------------------uatomOnFeeabs: %s\n", uatomOnFeeabs) + fmt.Printf("-----------------------------uatomOnOsmosis: %s\n", uatomOnOsmosis) + fmt.Printf("-----------------------------stakeOnOsmosis: %s\n", stakeOnOsmosis) + + feeabsModule, err = QueryFeeabsModuleAccountBalances(feeabs, ctx) + require.NoError(t, err) + fmt.Printf("----------------moduleBalace %v\n", feeabsModule.Balances) + + current_directory, _ := os.Getwd() + param_change_path := path.Join(current_directory, "proposal", "proposal.json") + + paramTx, err := feeabs.ParamChangeProposal(ctx, feeabsUser.KeyName, param_change_path) + require.NoError(t, err, "error submitting param change proposal tx") + + err = feeabs.VoteOnProposalAllValidators(ctx, paramTx.ProposalID, cosmos.ProposalVoteYes) + require.NoError(t, err, "failed to submit votes") + + height, _ := feeabs.Height(ctx) + _, err = cosmos.PollForProposalStatus(ctx, feeabs, height, height+10, paramTx.ProposalID, cosmos.ProposalStatusPassed) + require.NoError(t, err, "proposal status did not change to passed in expected number of blocks") + + _, err = cosmos.FeeabsAddHostZoneProposal(feeabs, ctx, feeabsUser.KeyName, "./proposal/host_zone.json") require.NoError(t, err) - fmt.Printf("----------------moduleBalace %v\n", moduleBalace) + + err = feeabs.VoteOnProposalAllValidators(ctx, "2", cosmos.ProposalVoteYes) + require.NoError(t, err, "failed to submit votes") + + height, _ = feeabs.Height(ctx) + _, err = cosmos.PollForProposalStatus(ctx, feeabs, height, height+10, paramTx.ProposalID, cosmos.ProposalStatusPassed) + require.NoError(t, err, "proposal status did not change to passed in expected number of blocks") // xcs fmt.Printf("----------------testttttttttttttttttttttttttttt\n") - cosmos.FeeabsCrossChainSwap(feeabs, ctx, feeabsUser.KeyName, uatomOnFeeabs) + txhash, _ := cosmos.FeeabsCrossChainSwap(feeabs, ctx, feeabsUser.KeyName, uatomOnFeeabs) + + txRes, err := feeabs.GetTransaction(txhash) + fmt.Printf("-------------------txRes: %v", txRes) + require.NoError(t, err) + fmt.Printf("----------------testttttttttttttttttttttttttttt\n") - err = testutil.WaitForBlocks(ctx, 30, feeabs) + err = testutil.WaitForBlocks(ctx, 30, feeabs, gaia, osmosis) fmt.Printf("----------------testttttttttttttttttttttttttttt\n") require.NoError(t, err) - moduleBalace, err = feeabs.GetBalance(ctx, feeabsModule.Address, feeabs.Config().Denom) + feeabsModule, err = QueryFeeabsModuleAccountBalances(feeabs, ctx) require.NoError(t, err) - fmt.Printf("----------------moduleBalace %v\n", moduleBalace) - require.Greater(t, moduleBalace, 1) + fmt.Printf("----------------moduleBalace %v\n", feeabsModule.Balances) + // require.Greater(t, moduleBalace, 1) }) } diff --git a/tests/interchaintest/proposal/host_zone.json b/tests/interchaintest/proposal/host_zone.json new file mode 100644 index 0000000..47f4654 --- /dev/null +++ b/tests/interchaintest/proposal/host_zone.json @@ -0,0 +1,12 @@ +{ + "title": "Add Fee Abbtraction Host Zone Proposal", + "description": "Add Fee Abbtraction Host Zone", + "host_chain_fee_abs_config": + { + "ibc_denom": "ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518", + "osmosis_pool_token_denom_in": "uosmo", + "pool_id": "1", + "frozen": false + }, + "deposit": "100000000stake" +} \ No newline at end of file diff --git a/tests/interchaintest/proposal/proposal.json b/tests/interchaintest/proposal/proposal.json new file mode 100644 index 0000000..fd7c1f4 --- /dev/null +++ b/tests/interchaintest/proposal/proposal.json @@ -0,0 +1,32 @@ +{ + "title": "Enable Fee Abtraction", + "description": "Change params for enable fee abstraction", + "changes": [ + { + "subspace": "feeabs", + "key": "nativeibcedinosmosis", + "value": "ibc/C053D637CCA2A2BA030E2C5EE1B28A16F71CCB0E45E8BE52766DC1B241B77878" + }, + { + "subspace": "feeabs", + "key": "chainname", + "value": "feeabs-2" + }, + { + "subspace": "feeabs", + "key": "ibctransferchannel", + "value": "channel-0" + }, + { + "subspace": "feeabs", + "key": "ibcqueryicqchannel", + "value": "channel-1" + }, + { + "subspace": "feeabs", + "key": "osmosiscrosschainswapaddress", + "value": "osmo17p9rzwnnfxcjp32un9ug7yhhzgtkhvl9jfksztgw5uh69wac2pgs5yczr8" + } + ], + "deposit": "5000000000stake" + } \ No newline at end of file diff --git a/tests/interchaintest/setup.go b/tests/interchaintest/setup.go index b26ca95..1519a9a 100644 --- a/tests/interchaintest/setup.go +++ b/tests/interchaintest/setup.go @@ -6,6 +6,7 @@ import ( balancertypes "github.com/notional-labs/fee-abstraction/tests/interchaintest/osmosistypes/gamm/balancer" gammtypes "github.com/notional-labs/fee-abstraction/tests/interchaintest/osmosistypes/gamm/types" feeabstype "github.com/notional-labs/fee-abstraction/v2/x/feeabs/types" + "github.com/strangelove-ventures/interchaintest/v4/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v4/chain/cosmos/wasm" "github.com/strangelove-ventures/interchaintest/v4/ibc" ) @@ -15,6 +16,11 @@ type QueryFeeabsModuleBalacesResponse struct { Address string } +const ( + votingPeriod = "10s" + maxDepositPeriod = "10s" +) + var ( FeeabsMainRepo = "ghcr.io/notional-labs/fee-abstraction" @@ -39,7 +45,7 @@ var ( NoHostMount: false, SkipGenTx: false, PreGenesis: nil, - ModifyGenesis: nil, + ModifyGenesis: cosmos.ModifyGenesisProposalTime(votingPeriod, maxDepositPeriod), ConfigFileOverrides: nil, EncodingConfig: feeabsEncoding(), } From a6d97c19beaefcd478841fee02b59196b2d7c14d Mon Sep 17 00:00:00 2001 From: GnaD Date: Thu, 20 Apr 2023 03:45:27 +0700 Subject: [PATCH 13/16] add setup --- tests/interchaintest/go.mod | 2 +- tests/interchaintest/go.sum | 4 +- tests/interchaintest/packet_foward_test.go | 125 ++++++++++++++++--- tests/interchaintest/proposal/host_zone.json | 4 +- tests/interchaintest/proposal/proposal.json | 2 +- tests/interchaintest/setup.go | 4 + 6 files changed, 117 insertions(+), 24 deletions(-) diff --git a/tests/interchaintest/go.mod b/tests/interchaintest/go.mod index 77c36a0..5287217 100644 --- a/tests/interchaintest/go.mod +++ b/tests/interchaintest/go.mod @@ -191,7 +191,7 @@ replace ( github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 // For this nested module, you always want to replace the parent reference with the current worktree. github.com/notional-labs/fee-abstraction => ../../ - github.com/strangelove-ventures/interchaintest/v4 => github.com/notional-labs/interchaintest/v4 v4.0.1-0.20230419073816-a38fbcca50f2 + github.com/strangelove-ventures/interchaintest/v4 => github.com/notional-labs/interchaintest/v4 v4.0.1-0.20230419203226-62f4ab72a646 // use informal system fork of tendermint github.com/tendermint/tendermint => github.com/informalsystems/tendermint v0.34.26 diff --git a/tests/interchaintest/go.sum b/tests/interchaintest/go.sum index 7686c67..45d4531 100644 --- a/tests/interchaintest/go.sum +++ b/tests/interchaintest/go.sum @@ -583,8 +583,8 @@ github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/notional-labs/fee-abstraction/v2 v2.0.1 h1:w++wIzSIoMQk5scVGud96ZLU6IJLlectE13dN6eX9AY= github.com/notional-labs/fee-abstraction/v2 v2.0.1/go.mod h1:6xlQD2XVfVxYc6xJ9AGFkIE4b/b+cGbs3/D0jHhRyXw= -github.com/notional-labs/interchaintest/v4 v4.0.1-0.20230419073816-a38fbcca50f2 h1:VUeAkXDqL21yF1mCdTOOYf2E7HYfWXG2T+c9nv09Z30= -github.com/notional-labs/interchaintest/v4 v4.0.1-0.20230419073816-a38fbcca50f2/go.mod h1:Na9KNE38VWqOKMSTpbIzXCICDkazn+6kFf4BG0ublCk= +github.com/notional-labs/interchaintest/v4 v4.0.1-0.20230419203226-62f4ab72a646 h1:D6eUZPmagbBFZBbVDCpxcj5M35SNt1GPrrwGkah5oH0= +github.com/notional-labs/interchaintest/v4 v4.0.1-0.20230419203226-62f4ab72a646/go.mod h1:Na9KNE38VWqOKMSTpbIzXCICDkazn+6kFf4BG0ublCk= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= diff --git a/tests/interchaintest/packet_foward_test.go b/tests/interchaintest/packet_foward_test.go index 6c8325e..adbef68 100644 --- a/tests/interchaintest/packet_foward_test.go +++ b/tests/interchaintest/packet_foward_test.go @@ -220,11 +220,6 @@ func TestPacketForwardMiddleware(t *testing.T) { channGaiaFeeabs := channsGaia[0] require.NotEmpty(t, channGaiaFeeabs.ChannelID) - fmt.Println("-----------------------------------") - fmt.Printf("channFeeabsOsmosis: %s\n", channFeeabsOsmosis.ChannelID) - fmt.Printf("channFeeabsGaia: %s\n", channFeeabsGaia.ChannelID) - fmt.Printf("channGaiaFeeabs: %s - %s\n", channGaiaFeeabs.ChannelID, channGaiaFeeabs.Counterparty.ChannelID) - fmt.Println("-----------------------------------") //rly osmo-gaia // Generate new path err = r.GeneratePath(ctx, eRep, osmosis.Config().ChainID, gaia.Config().ChainID, pathOsmosisGaia) @@ -279,6 +274,15 @@ func TestPacketForwardMiddleware(t *testing.T) { } require.NotEmpty(t, channGaiaOsmosis) + fmt.Println("-----------------------------------") + fmt.Printf("channFeeabsOsmosis: %s - %s\n", channFeeabsOsmosis.ChannelID, channFeeabsOsmosis.Counterparty.ChannelID) + fmt.Printf("channOsmosisFeeabs: %s - %s\n", channOsmosisFeeabs.ChannelID, channOsmosisFeeabs.Counterparty.ChannelID) + fmt.Printf("channFeeabsGaia: %s - %s\n", channFeeabsGaia.ChannelID, channFeeabsGaia.Counterparty.ChannelID) + fmt.Printf("channGaiaFeeabs: %s - %s\n", channGaiaFeeabs.ChannelID, channGaiaFeeabs.Counterparty.ChannelID) + fmt.Printf("channOsmosisGaia: %s - %s\n", channOsmosisGaia.ChannelID, channOsmosisGaia.Counterparty.ChannelID) + fmt.Printf("channGaiaOsmosis: %s - %s\n", channGaiaOsmosis.ChannelID, channGaiaOsmosis.Counterparty.ChannelID) + fmt.Println("-----------------------------------") + // Start the relayer on both paths err = r.StartRelayer(ctx, eRep, pathFeeabsGaia, pathFeeabsOsmosis, pathOsmosisGaia) require.NoError(t, err) @@ -378,7 +382,17 @@ func TestPacketForwardMiddleware(t *testing.T) { _, err = osmosis.ExecuteContract(ctx, osmosisUser.KeyName, registryContractAddress, msg) require.NoError(t, err) // Execute - msg = fmt.Sprintf("{\"modify_bech32_prefixes\": {\"operations\": [{\"operation\": \"set\", \"chain_name\": \"feeabs\", \"prefix\": \"feeabs\"},{\"operation\": \"set\", \"chain_name\": \"osmosis\", \"prefix\": \"osmo\"},{\"operation\": \"set\", \"chain_name\": \"gaia\", \"prefix\": \"cosmos\"}]}}") + msg = `{ + "modify_bech32_prefixes": + { + "operations": + [ + {"operation": "set", "chain_name": "feeabs", "prefix": "feeabs"}, + {"operation": "set", "chain_name": "osmosis", "prefix": "osmo"}, + {"operation": "set", "chain_name": "gaia", "prefix": "cosmos"} + ] + } + }` _, err = osmosis.ExecuteContract(ctx, osmosisUser.KeyName, registryContractAddress, msg) require.NoError(t, err) @@ -457,10 +471,6 @@ func TestPacketForwardMiddleware(t *testing.T) { denomTrace = transfertypes.ParseDenomTrace(transfertypes.GetPrefixedDenom(channFeeabsGaia.PortID, channFeeabsGaia.ChannelID, gaia.Config().Denom)) uatomOnFeeabs := denomTrace.IBCDenom() - fmt.Printf("-----------------------------uatomOnFeeabs: %s\n", uatomOnFeeabs) - fmt.Printf("-----------------------------uatomOnOsmosis: %s\n", uatomOnOsmosis) - fmt.Printf("-----------------------------stakeOnOsmosis: %s\n", stakeOnOsmosis) - feeabsModule, err = QueryFeeabsModuleAccountBalances(feeabs, ctx) require.NoError(t, err) fmt.Printf("----------------moduleBalace %v\n", feeabsModule.Balances) @@ -485,21 +495,84 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, err, "failed to submit votes") height, _ = feeabs.Height(ctx) - _, err = cosmos.PollForProposalStatus(ctx, feeabs, height, height+10, paramTx.ProposalID, cosmos.ProposalStatusPassed) + _, err = cosmos.PollForProposalStatus(ctx, feeabs, height, height+10, "2", cosmos.ProposalStatusPassed) require.NoError(t, err, "proposal status did not change to passed in expected number of blocks") + hostZoneConfig, err := QueryFeeabsHostZoneConfig(feeabs, ctx) + require.NoError(t, err) + fmt.Printf("---------------------hostZoneConfig: %v\n", hostZoneConfig) // xcs - fmt.Printf("----------------testttttttttttttttttttttttttttt\n") - txhash, _ := cosmos.FeeabsCrossChainSwap(feeabs, ctx, feeabsUser.KeyName, uatomOnFeeabs) + // memo := ` + // { + // "wasm": + // { + // "contract":"osmo17p9rzwnnfxcjp32un9ug7yhhzgtkhvl9jfksztgw5uh69wac2pgs5yczr8", + // "msg": + // { + // "osmosis_swap": + // { + // "output_denom":"ibc/C053D637CCA2A2BA030E2C5EE1B28A16F71CCB0E45E8BE52766DC1B241B77878", + // "slippage": + // { + // "twap": + // { + // "slippage_percentage":"20", + // "window_seconds":10 + // } + // }, + // "receiver":"feeabs/feeabs1efd63aw40lxf3n4mhf7dzhjkr453axurwrhrrw", + // "on_failed_delivery":"do_nothing", + // "next_memo":{} + // } + // } + // } + // }` + + // feeabsHeight, err = feeabs.Height(ctx) + // require.NoError(t, err) + + // transfer = ibc.WalletAmount{ + // Address: xcsContractAddress, + // Denom: uatomOnFeeabs, + // Amount: 1_000_000, + // } + + // transferTx, err := feeabs.SendIBCTransfer(ctx, channFeeabsOsmosis.ChannelID, feeabsUser.KeyName, transfer, ibc.TransferOptions{Memo: string(memo)}) + // require.NoError(t, err) + // _, err = testutil.PollForAck(ctx, feeabs, feeabsHeight, feeabsHeight+25, transferTx.Packet) + // require.NoError(t, err) + // err = testutil.WaitForBlocks(ctx, 1, feeabs) + // require.NoError(t, err) + + secondHopDenom := transfertypes.GetPrefixedDenom(channFeeabsOsmosis.PortID, channFeeabsOsmosis.ChannelID, uatomOnFeeabs) + secondHopDenomTrace := transfertypes.ParseDenomTrace(secondHopDenom) + secondHopIBCDenom := secondHopDenomTrace.IBCDenom() + + contractBalance, err := osmosis.GetBalance(ctx, xcsContractAddress, secondHopIBCDenom) + require.NoError(t, err) + fmt.Printf("---------------contractBalance %v\n", contractBalance) - txRes, err := feeabs.GetTransaction(txhash) - fmt.Printf("-------------------txRes: %v", txRes) + feeabsHeight, err = feeabs.Height(ctx) require.NoError(t, err) - fmt.Printf("----------------testttttttttttttttttttttttttttt\n") - err = testutil.WaitForBlocks(ctx, 30, feeabs, gaia, osmosis) - fmt.Printf("----------------testttttttttttttttttttttttttttt\n") + transferTx, err := cosmos.FeeabsCrossChainSwap(feeabs, ctx, feeabsUser.KeyName, uatomOnFeeabs) require.NoError(t, err) + _, err = testutil.PollForAck(ctx, feeabs, feeabsHeight, feeabsHeight+25, transferTx.Packet) + require.NoError(t, err) + err = testutil.WaitForBlocks(ctx, 1, feeabs) + require.NoError(t, err) + + // txRes, err := feeabs.GetTransaction(txhash) + // fmt.Printf("-------------------txRes: %v", txRes) + // require.NoError(t, err) + + err = testutil.WaitForBlocks(ctx, 50, feeabs, gaia, osmosis) + require.NoError(t, err) + + // balace, err := feeabs.GetBalance(ctx, "feeabs1efd63aw40lxf3n4mhf7dzhjkr453axurwrhrrw", feeabs.Config().Denom) + // require.NoError(t, err) + // fmt.Printf("---------------balace %v\n", balace) + feeabsModule, err = QueryFeeabsModuleAccountBalances(feeabs, ctx) require.NoError(t, err) fmt.Printf("----------------moduleBalace %v\n", feeabsModule.Balances) @@ -507,6 +580,22 @@ func TestPacketForwardMiddleware(t *testing.T) { }) } +func QueryFeeabsHostZoneConfig(c *cosmos.CosmosChain, ctx context.Context) (*QueryHostChainConfigRespone, error) { + cmd := []string{"feeabs", "all-host-chain-config"} + stdout, _, err := c.ExecQuery(ctx, cmd) + if err != nil { + return &QueryHostChainConfigRespone{}, err + } + + var hostZoneConfig QueryHostChainConfigRespone + err = json.Unmarshal(stdout, &hostZoneConfig) + if err != nil { + return &QueryHostChainConfigRespone{}, err + } + + return &hostZoneConfig, nil +} + func QueryFeeabsModuleAccountBalances(c *cosmos.CosmosChain, ctx context.Context) (*QueryFeeabsModuleBalacesResponse, error) { cmd := []string{"feeabs", "module-balances"} stdout, _, err := c.ExecQuery(ctx, cmd) diff --git a/tests/interchaintest/proposal/host_zone.json b/tests/interchaintest/proposal/host_zone.json index 47f4654..e9c66af 100644 --- a/tests/interchaintest/proposal/host_zone.json +++ b/tests/interchaintest/proposal/host_zone.json @@ -3,8 +3,8 @@ "description": "Add Fee Abbtraction Host Zone", "host_chain_fee_abs_config": { - "ibc_denom": "ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518", - "osmosis_pool_token_denom_in": "uosmo", + "ibc_denom": "ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9", + "osmosis_pool_token_denom_in": "ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9", "pool_id": "1", "frozen": false }, diff --git a/tests/interchaintest/proposal/proposal.json b/tests/interchaintest/proposal/proposal.json index fd7c1f4..f3ebee3 100644 --- a/tests/interchaintest/proposal/proposal.json +++ b/tests/interchaintest/proposal/proposal.json @@ -10,7 +10,7 @@ { "subspace": "feeabs", "key": "chainname", - "value": "feeabs-2" + "value": "feeabs" }, { "subspace": "feeabs", diff --git a/tests/interchaintest/setup.go b/tests/interchaintest/setup.go index 1519a9a..a2b705e 100644 --- a/tests/interchaintest/setup.go +++ b/tests/interchaintest/setup.go @@ -16,6 +16,10 @@ type QueryFeeabsModuleBalacesResponse struct { Address string } +type QueryHostChainConfigRespone struct { + HostChainConfig cosmos.HostChainFeeAbsConfig `protobuf:"bytes,1,opt,name=host_chain_config,json=hostChainConfig,proto3" json:"host_chain_config" yaml:"host_chain_config"` +} + const ( votingPeriod = "10s" maxDepositPeriod = "10s" From a3f65e84a74c8d2d8baaf61efcc526a648615eb5 Mon Sep 17 00:00:00 2001 From: GnaD Date: Thu, 20 Apr 2023 11:06:15 +0700 Subject: [PATCH 14/16] nit --- tests/interchaintest/packet_foward_test.go | 104 ++++++++++----------- tests/interchaintest/setup.go | 2 +- 2 files changed, 51 insertions(+), 55 deletions(-) diff --git a/tests/interchaintest/packet_foward_test.go b/tests/interchaintest/packet_foward_test.go index adbef68..6bc72a8 100644 --- a/tests/interchaintest/packet_foward_test.go +++ b/tests/interchaintest/packet_foward_test.go @@ -502,66 +502,58 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, err) fmt.Printf("---------------------hostZoneConfig: %v\n", hostZoneConfig) // xcs - // memo := ` - // { - // "wasm": - // { - // "contract":"osmo17p9rzwnnfxcjp32un9ug7yhhzgtkhvl9jfksztgw5uh69wac2pgs5yczr8", - // "msg": - // { - // "osmosis_swap": - // { - // "output_denom":"ibc/C053D637CCA2A2BA030E2C5EE1B28A16F71CCB0E45E8BE52766DC1B241B77878", - // "slippage": - // { - // "twap": - // { - // "slippage_percentage":"20", - // "window_seconds":10 - // } - // }, - // "receiver":"feeabs/feeabs1efd63aw40lxf3n4mhf7dzhjkr453axurwrhrrw", - // "on_failed_delivery":"do_nothing", - // "next_memo":{} - // } - // } - // } - // }` - - // feeabsHeight, err = feeabs.Height(ctx) - // require.NoError(t, err) - - // transfer = ibc.WalletAmount{ - // Address: xcsContractAddress, - // Denom: uatomOnFeeabs, - // Amount: 1_000_000, - // } - - // transferTx, err := feeabs.SendIBCTransfer(ctx, channFeeabsOsmosis.ChannelID, feeabsUser.KeyName, transfer, ibc.TransferOptions{Memo: string(memo)}) - // require.NoError(t, err) - // _, err = testutil.PollForAck(ctx, feeabs, feeabsHeight, feeabsHeight+25, transferTx.Packet) - // require.NoError(t, err) - // err = testutil.WaitForBlocks(ctx, 1, feeabs) - // require.NoError(t, err) - - secondHopDenom := transfertypes.GetPrefixedDenom(channFeeabsOsmosis.PortID, channFeeabsOsmosis.ChannelID, uatomOnFeeabs) - secondHopDenomTrace := transfertypes.ParseDenomTrace(secondHopDenom) - secondHopIBCDenom := secondHopDenomTrace.IBCDenom() - - contractBalance, err := osmosis.GetBalance(ctx, xcsContractAddress, secondHopIBCDenom) - require.NoError(t, err) - fmt.Printf("---------------contractBalance %v\n", contractBalance) - + memo := ` + { + "wasm": + { + "contract":"osmo17p9rzwnnfxcjp32un9ug7yhhzgtkhvl9jfksztgw5uh69wac2pgs5yczr8", + "msg": + { + "osmosis_swap": + { + "output_denom":"ibc/C053D637CCA2A2BA030E2C5EE1B28A16F71CCB0E45E8BE52766DC1B241B77878", + "slippage": + { + "twap": + { + "slippage_percentage":"20", + "window_seconds":10 + } + }, + "receiver":"feeabs/feeabs1efd63aw40lxf3n4mhf7dzhjkr453axurwrhrrw", + "on_failed_delivery":"do_nothing", + "next_memo":{} + } + } + } + }` + // "next_memo":{} feeabsHeight, err = feeabs.Height(ctx) require.NoError(t, err) - transferTx, err := cosmos.FeeabsCrossChainSwap(feeabs, ctx, feeabsUser.KeyName, uatomOnFeeabs) + transfer = ibc.WalletAmount{ + Address: xcsContractAddress, + Denom: uatomOnFeeabs, + Amount: 1_000_000, + } + + transferTx, err := feeabs.SendIBCTransfer(ctx, channFeeabsOsmosis.ChannelID, feeabsUser.KeyName, transfer, ibc.TransferOptions{Memo: string(memo)}) require.NoError(t, err) _, err = testutil.PollForAck(ctx, feeabs, feeabsHeight, feeabsHeight+25, transferTx.Packet) require.NoError(t, err) err = testutil.WaitForBlocks(ctx, 1, feeabs) require.NoError(t, err) + // feeabsHeight, err = feeabs.Height(ctx) + // require.NoError(t, err) + + // transferTx, err := cosmos.FeeabsCrossChainSwap(feeabs, ctx, feeabsUser.KeyName, uatomOnFeeabs) + // require.NoError(t, err) + // _, err = testutil.PollForAck(ctx, feeabs, feeabsHeight, feeabsHeight+50, transferTx.Packet) + // require.NoError(t, err) + // err = testutil.WaitForBlocks(ctx, 1, feeabs) + // require.NoError(t, err) + // txRes, err := feeabs.GetTransaction(txhash) // fmt.Printf("-------------------txRes: %v", txRes) // require.NoError(t, err) @@ -569,9 +561,13 @@ func TestPacketForwardMiddleware(t *testing.T) { err = testutil.WaitForBlocks(ctx, 50, feeabs, gaia, osmosis) require.NoError(t, err) - // balace, err := feeabs.GetBalance(ctx, "feeabs1efd63aw40lxf3n4mhf7dzhjkr453axurwrhrrw", feeabs.Config().Denom) - // require.NoError(t, err) - // fmt.Printf("---------------balace %v\n", balace) + // secondHopDenom := transfertypes.GetPrefixedDenom(channFeeabsOsmosis.PortID, channFeeabsOsmosis.ChannelID, uatomOnFeeabs) + // secondHopDenomTrace := transfertypes.ParseDenomTrace(secondHopDenom) + // secondHopIBCDenom := secondHopDenomTrace.IBCDenom() + + contractBalance, err := feeabs.GetBalance(ctx, "feeabs1efd63aw40lxf3n4mhf7dzhjkr453axurwrhrrw", feeabs.Config().Denom) + require.NoError(t, err) + fmt.Printf("---------------contractBalance %v\n", contractBalance) feeabsModule, err = QueryFeeabsModuleAccountBalances(feeabs, ctx) require.NoError(t, err) diff --git a/tests/interchaintest/setup.go b/tests/interchaintest/setup.go index a2b705e..192eda1 100644 --- a/tests/interchaintest/setup.go +++ b/tests/interchaintest/setup.go @@ -30,7 +30,7 @@ var ( feeabsImage = ibc.DockerImage{ Repository: "ghcr.io/notional-labs/fee-abstraction", - Version: "2.0.3", + Version: "2.0.4", UidGid: "1025:1025", } From cf836b23d4dbac42947e725f3dc702cbc948255a Mon Sep 17 00:00:00 2001 From: GnaD Date: Thu, 20 Apr 2023 13:38:24 +0700 Subject: [PATCH 15/16] done --- tests/interchaintest/packet_foward_test.go | 75 +++------------------- 1 file changed, 8 insertions(+), 67 deletions(-) diff --git a/tests/interchaintest/packet_foward_test.go b/tests/interchaintest/packet_foward_test.go index 6bc72a8..a3611e1 100644 --- a/tests/interchaintest/packet_foward_test.go +++ b/tests/interchaintest/packet_foward_test.go @@ -87,7 +87,6 @@ func TestPacketForwardMiddleware(t *testing.T) { r := interchaintest.NewBuiltinRelayerFactory( ibc.CosmosRly, zaptest.NewLogger(t), - // relayer.CustomDockerImage("ghcr.io/cosmos/relayer", "main", rly.RlyDefaultUidGid), ).Build(t, client, network) ic := interchaintest.NewInterchain(). @@ -425,7 +424,6 @@ func TestPacketForwardMiddleware(t *testing.T) { // instantiate swapRouterContractAddress, err := osmosis.InstantiateContract(ctx, osmosisUser.KeyName, swapRouterContractID, initMsg, true) require.NoError(t, err) - fmt.Printf("swapRouterContractAddress: %s", swapRouterContractAddress) // execute msg = fmt.Sprintf("{\"set_route\":{\"input_denom\":\"%s\",\"output_denom\":\"%s\",\"pool_route\":[{\"pool_id\":\"%s\",\"token_out_denom\":\"%s\"}]}}", @@ -444,8 +442,8 @@ func TestPacketForwardMiddleware(t *testing.T) { // instantiate initMsg = fmt.Sprintf("{\"swap_contract\":\"%s\",\"governor\": \"%s\"}", swapRouterContractAddress, owner) xcsContractAddress, err := osmosis.InstantiateContract(ctx, osmosisUser.KeyName, xcsContractID, initMsg, true) + _ = xcsContractAddress require.NoError(t, err) - fmt.Printf("--------------------xcsContractAddress %s", xcsContractAddress) // Swap Feeabs(uatom) to Osmosis // send ibc token to feeabs module account gaiaHeight, err = gaia.Height(ctx) @@ -456,7 +454,7 @@ func TestPacketForwardMiddleware(t *testing.T) { transfer = ibc.WalletAmount{ Address: dstAddress, Denom: gaia.Config().Denom, - Amount: amountToSend, + Amount: 1_000_000, } tx, err = gaia.SendIBCTransfer(ctx, channGaiaFeeabs.ChannelID, gaiaUser.KeyName, transfer, ibc.TransferOptions{}) @@ -473,7 +471,6 @@ func TestPacketForwardMiddleware(t *testing.T) { feeabsModule, err = QueryFeeabsModuleAccountBalances(feeabs, ctx) require.NoError(t, err) - fmt.Printf("----------------moduleBalace %v\n", feeabsModule.Balances) current_directory, _ := os.Getwd() param_change_path := path.Join(current_directory, "proposal", "proposal.json") @@ -498,81 +495,25 @@ func TestPacketForwardMiddleware(t *testing.T) { _, err = cosmos.PollForProposalStatus(ctx, feeabs, height, height+10, "2", cosmos.ProposalStatusPassed) require.NoError(t, err, "proposal status did not change to passed in expected number of blocks") - hostZoneConfig, err := QueryFeeabsHostZoneConfig(feeabs, ctx) + _, err = QueryFeeabsHostZoneConfig(feeabs, ctx) require.NoError(t, err) - fmt.Printf("---------------------hostZoneConfig: %v\n", hostZoneConfig) // xcs - memo := ` - { - "wasm": - { - "contract":"osmo17p9rzwnnfxcjp32un9ug7yhhzgtkhvl9jfksztgw5uh69wac2pgs5yczr8", - "msg": - { - "osmosis_swap": - { - "output_denom":"ibc/C053D637CCA2A2BA030E2C5EE1B28A16F71CCB0E45E8BE52766DC1B241B77878", - "slippage": - { - "twap": - { - "slippage_percentage":"20", - "window_seconds":10 - } - }, - "receiver":"feeabs/feeabs1efd63aw40lxf3n4mhf7dzhjkr453axurwrhrrw", - "on_failed_delivery":"do_nothing", - "next_memo":{} - } - } - } - }` - // "next_memo":{} feeabsHeight, err = feeabs.Height(ctx) require.NoError(t, err) - transfer = ibc.WalletAmount{ - Address: xcsContractAddress, - Denom: uatomOnFeeabs, - Amount: 1_000_000, - } - - transferTx, err := feeabs.SendIBCTransfer(ctx, channFeeabsOsmosis.ChannelID, feeabsUser.KeyName, transfer, ibc.TransferOptions{Memo: string(memo)}) + transferTx, err := cosmos.FeeabsCrossChainSwap(feeabs, ctx, feeabsUser.KeyName, uatomOnFeeabs) require.NoError(t, err) - _, err = testutil.PollForAck(ctx, feeabs, feeabsHeight, feeabsHeight+25, transferTx.Packet) + _, err = testutil.PollForAck(ctx, feeabs, feeabsHeight, feeabsHeight+100, transferTx.Packet) require.NoError(t, err) err = testutil.WaitForBlocks(ctx, 1, feeabs) require.NoError(t, err) - // feeabsHeight, err = feeabs.Height(ctx) - // require.NoError(t, err) - - // transferTx, err := cosmos.FeeabsCrossChainSwap(feeabs, ctx, feeabsUser.KeyName, uatomOnFeeabs) - // require.NoError(t, err) - // _, err = testutil.PollForAck(ctx, feeabs, feeabsHeight, feeabsHeight+50, transferTx.Packet) - // require.NoError(t, err) - // err = testutil.WaitForBlocks(ctx, 1, feeabs) - // require.NoError(t, err) - - // txRes, err := feeabs.GetTransaction(txhash) - // fmt.Printf("-------------------txRes: %v", txRes) - // require.NoError(t, err) - - err = testutil.WaitForBlocks(ctx, 50, feeabs, gaia, osmosis) - require.NoError(t, err) - - // secondHopDenom := transfertypes.GetPrefixedDenom(channFeeabsOsmosis.PortID, channFeeabsOsmosis.ChannelID, uatomOnFeeabs) - // secondHopDenomTrace := transfertypes.ParseDenomTrace(secondHopDenom) - // secondHopIBCDenom := secondHopDenomTrace.IBCDenom() - - contractBalance, err := feeabs.GetBalance(ctx, "feeabs1efd63aw40lxf3n4mhf7dzhjkr453axurwrhrrw", feeabs.Config().Denom) + err = testutil.WaitForBlocks(ctx, 100, feeabs, gaia, osmosis) require.NoError(t, err) - fmt.Printf("---------------contractBalance %v\n", contractBalance) - feeabsModule, err = QueryFeeabsModuleAccountBalances(feeabs, ctx) + balance, err := feeabs.GetBalance(ctx, feeabsModule.Address, feeabs.Config().Denom) require.NoError(t, err) - fmt.Printf("----------------moduleBalace %v\n", feeabsModule.Balances) - // require.Greater(t, moduleBalace, 1) + require.Greater(t, balance, 1) }) } From 102d0d97eea3efc3cec93339330d44c2cbba30e1 Mon Sep 17 00:00:00 2001 From: GnaD Date: Thu, 20 Apr 2023 13:50:22 +0700 Subject: [PATCH 16/16] nit --- tests/interchaintest/packet_foward_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/interchaintest/packet_foward_test.go b/tests/interchaintest/packet_foward_test.go index a3611e1..b5c8ac3 100644 --- a/tests/interchaintest/packet_foward_test.go +++ b/tests/interchaintest/packet_foward_test.go @@ -513,7 +513,7 @@ func TestPacketForwardMiddleware(t *testing.T) { balance, err := feeabs.GetBalance(ctx, feeabsModule.Address, feeabs.Config().Denom) require.NoError(t, err) - require.Greater(t, balance, 1) + require.Greater(t, balance, int64(1)) }) }