#cosmwasm #smart-contracts #nft #com #tree #message #package #osmosis #labs #std

juno-std

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

2 stable releases

28.0.2 Apr 7, 2025
28.0.1 Mar 25, 2025

#6 in #labs

Download history 97/week @ 2025-03-24 7/week @ 2025-03-31 117/week @ 2025-04-07 5/week @ 2025-04-14

135 downloads per month

Apache-2.0

1.5MB
35K SLoC

juno-std

juno-std on crates.io Docs

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.

Executing messages from CosmWasm

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"))
}

Dependencies

~19MB
~392K SLoC