This repository is based on Token Bindings
This repository provides CosmWasm smart contract bindings for the Kiichain blockchain, exposing custom messages and queries.
Located in contracts/reflect, this smart contract demonstrates how to:
- Send
CosmosMsg<KiichainMsg>andSubMsg<KiichainMsg>. - Use
QueryRequest<KiichainQuery>for custom chain queries. - Proxy messages and handle submessage replies.
- Change and query contract ownership.
{}{
"reflect_msg": {
"msgs": [
{
"custom": {
"token_factory": {
"mint_tokens": {
"denom": "...",
"amount": "...",
"mint_to_address": "..."
}
}
}
}
]
}
}{
"chain": {
"request": {
"custom": {
"token_factory": {
"admin": {
"denom": "factory/..."
}
}
}
}
}
}- Rust (with
wasm32-unknown-unknowntarget) cargo-generatewasmdor compatible chain like Kiichain
# Install dependencies
cargo build
# Run schema export for bindings
cargo run --example schema
# Build compressed
./scripts/build_release.shTo use the Kiichain bindings in your contract:
# In your Cargo.toml
[dependencies]
kiichain-bindings = { path = "../packages/bindings" }And in your contract code:
use token_bindings::{KiichainMsg, KiichainQuery};Have questions? Check out the FAQ for common answers and explanations.