Closed jununifi closed 1 year ago
I filed https://github.com/cosmos/cosmos-rust/issues/407 which basically says that in its current form cosmrs cannot be used in CosmWasm. But maybe https://github.com/cosmos/cosmos-rust/tree/main/cosmos-sdk-proto is sufficient? This has fewer dependencies.
Closing as out of scope for this repository. I think cosmos-rust is a better place to discuss the two crates.
In general, wasm-bindgen cannot be used in CosmWasm since it is only for Wasm in a JavaScript environment such as browsers.
The key problematic lines in cosmrs are: https://github.com/cosmos/cosmos-rust/blob/main/cosmrs/Cargo.toml#L31-L32 which brings in randomness.
This is needed to sign a transaction (which is the main purpose of the cosmrs crate). It is not needed to parse a transaction nor to verify a signature. I would suggest looking just at the proto types in cosmos-sdk-proto
for parsing, and if a few items are missing (Any lookups), copy one or two files from cosmrs to your local repo.
We are building ICA cosmwasm contract that connect to icahost port of other Cosmos chain without any specific wasm binding. So far, we were able to create ICA account on other chain through IBC channel creation.
cosmrs
package supports Cosmos messages protobuf encoding in rust and was going to use this for ICA tx message broadcasting.We will need to support infinite number of protobuf encodings that are not default Cosmos messages as well, and it's hard to support all of these messages in wasm binding.
When using cosmrs package we get following issue when trying to deploy the contract.
Adding the version info for more details
wasmd version - v0.40.0 for the chain
Is there any specific way to resolve this issue with version management or is it unsupported?
If it is intended to be supported, we can provide the path to reproduce the issue.