#cosmwasm #terra #bindings #module #contracts #msg #call

terra-bindings

Bindings for CosmWasm contracts to call into custom modules of Terra Core

1 unstable release

1.0.0 Jul 6, 2020
0.1.0 Jul 6, 2020

#17 in #terra

Apache-2.0

8KB
140 lines

Terra Binding for CosmWasm Contracts

How to use querier

use cosmwasm_std::Coin;
use terra_bindings::TerraQuerier;

let res: Coin = TerraQuerier::new(&deps.querier).query_swap(offer.clone(), ask)?;

How to use msg creator

use cosmwasm_std::CosmosMsg;
use terra_bindings::{create_swap_msg, TerraMsgWrapper};

let msg: CosmosMsg<TerraMsgWrapper> = create_swap_msg(contract_addr, offer_coin, ask_denom);

Dependencies

~4.5MB
~98K SLoC