Crates.io | omniflix-std |
lib.rs | omniflix-std |
version | 1.0.2-beta |
source | src |
created_at | 2023-10-19 13:20:34.698411 |
updated_at | 2024-10-28 11:12:08.062775 |
description | Standard library for Omniflix cosmwasm contracts |
homepage | |
repository | |
max_upload_size | |
id | 1007829 |
size | 986,645 |
The omniflix-std
crate includes generated Rust types and macros to facilitate the creation of Stargate messages and queries.
To use this crate in your Rust project, add the following to your Cargo.toml
file:
[dependencies]
omniflix-std = { version = "" }
use omniflix_std::types::omniflix::onft::v1beta1::MsgCreateDenom;
pub fn create_collection(deps, _env, msg) {
let collection_details = msg.collection_details;
let {
id,
creation_fee,
description,
name,
preview_uri,
schema,
sender,
symbol,
uri,
uri_hash,
data,
} = collection_details;
let msg: CosmosMsg = MsgCreateDenom {
id,
creation_fee: fee_coin.into(),
description,
name,
preview_uri,
schema,
sender,
symbol,
uri,
uri_hash,
data,
}
.into();
Ok(Response::new().add_message(msg))
}
use omniflix_std::types::omniflix::onft::v1beta1::OnftQuerier;
use omniflix_std::types::omniflix::onft::v1beta1::QueryParamsResponse;
let onft_querier = OnftQuerier::new(&deps.querier);
let res: QueryParamsResponse = onft_querier.params()?;