Crates.io | juno-std |
lib.rs | juno-std |
version | 28.0.2 |
created_at | 2025-03-25 20:05:50.82114+00 |
updated_at | 2025-04-07 20:19:50.67199+00 |
description | Standard library for Juno with CosmWasm support included. This package is a modified copy of the osmosis package - https://github.com/osmosis-labs/osmosis-rust/tree/main/packages/osmosis-std |
homepage | https://junonetwork.io |
repository | https://github.com/CosmosContracts/juno-std |
max_upload_size | |
id | 1605705 |
size | 1,273,363 |
Proto-generated types and helpers for interacting with Juno. Compatible with CosmWasm.
You can find all types and queriers generated from Juno's Protobuffers in their respective module in juno_std
.
use cosmwasm_std::{CosmosMsg, Response, Env};
use juno_std::types::osmosis::tokenfactory::v1beta1::MsgCreateDenom;
pub fn try_create_denom(env: Env, subdenom: String) -> Result<Response, ContractError> {
let sender = env.contract.address.into();
// construct message and convert them into cosmos message
// (notice `CosmosMsg` type and `.into()`)
let msg_create_denom: CosmosMsg = MsgCreateDenom { sender, subdenom }.into();
Ok(Response::new()
.add_message(msg_create_denom)
.add_attribute("method", "try_create_denom"))
}