osmosis-labs / osmosis-rust

Rust libraries for osmosis
Apache License 2.0
59 stars 52 forks source link

Issue with osmosis.poolmanager.v1beta1.MsgSwapExactAmountIn #76

Closed tandn37 closed 1 year ago

tandn37 commented 1 year ago

I'm switching from gamm.v1beta1.MsgSwapExactAmountIn to poolmanager.v1beta1.MsgSwapExactAmountIn but got this error when broadcast the message (via cosmwasm) on osmosis local.

The message is constructed using osmosis-rust/osmosis-std branch autobuild-main (since we don't have v15 yet) -> CosmosMsg { let route = SwapAmountInRoute { pool_id, token_out_denom }; MsgSwapExactAmountIn { sender routes token_in token_out_min_amount }.into() }

Error after sending the message:

Error: status: Unknown, message: "failed to execute message; message index: 0: dispatch: submessages: Cannot unpack proto message with type URL: /osmosis.poolmanager.v1beta1.MsgSwapExactAmountIn: invalid CosmosMsg from the contract", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc", "x-cosmos-block-height": "33829"} }

The gamm.v1beta1.MsgSwapExactAmountIn work fine. Is this library issue or issue with the chain? Should I stick to gamm.v1beta1.MsgSwapExactAmountIn? Will it be deprecated in the future?

iboss-ptk commented 1 year ago

gamm.v1beta1.MsgSwapExactAmountIn will be deprecated in the future, please update localosmosis, which version are you on?

tandn37 commented 1 year ago

@iboss-ptk oh I forgot to close the issue, it's the chain issue.