osmosis-std

Rust library for interacting with osmosis. CosmWasm compatible.

Use with CosmWasm

You can find all types generated from osmosis's protobuf in their respective module in osmosis_std for example.

rs use osmosis_std::tokenfactory::v1beta1::MsgCreateDenom;

With this, you can convert them to CosmosMsg. It is CosmosMsg::Stargate variant, so you need to add features = ["stargate"] to cosmwasm-std

For example:

```toml

Cargo.toml

[dependencies] cosmwasm-std = {version = "1.0.0", features = ["stargate"]} ```

```rs pub fn execute( deps: DepsMut, env: Env, _info: MessageInfo, msg: ExecuteMsg, ) -> Result { match msg { ExecuteMsg::CreateDenom { subdenom } => trycreate_denom(env, subdenom), } }

pub fn trycreatedenom(env: Env, subdenom: String) -> Result { let sender = env.contract.address.into(); let msgcreatedenom: CosmosMsg = MsgCreateDenom { sender, subdenom }.into();

Ok(Response::new()
    .add_message(msg_create_denom)
    .add_attribute("method", "try_create_denom"))

}

```