1#![cfg_attr(feature = "backtraces", feature(backtrace))]
2
3mod addresses;
6mod binary;
7mod coins;
8mod conversion;
9mod deps;
10mod entry_points;
11mod errors;
12mod ibc;
13mod import_helpers;
14#[cfg(feature = "iterator")]
15mod iterator;
16mod math;
17mod query;
18mod results;
19mod sections;
20mod serde;
21mod storage;
22mod timestamp;
23mod traits;
24mod types;
25
26#[allow(deprecated)]
27pub use crate::addresses::{Addr, CanonicalAddr, HumanAddr};
28pub use crate::binary::Binary;
29pub use crate::coins::{coin, coins, has_coins, Coin};
30pub use crate::deps::{Deps, DepsMut, OwnedDeps};
31pub use crate::errors::{
32 ConversionOverflowError, OverflowError, OverflowOperation, RecoverPubkeyError, StdError,
33 StdResult, SystemError, VerificationError,
34};
35#[cfg(feature = "stargate")]
36pub use crate::ibc::{
37 IbcAcknowledgement, IbcBasicResponse, IbcChannel, IbcChannelCloseMsg, IbcChannelConnectMsg,
38 IbcChannelOpenMsg, IbcEndpoint, IbcMsg, IbcOrder, IbcPacket, IbcPacketAckMsg,
39 IbcPacketReceiveMsg, IbcPacketTimeoutMsg, IbcReceiveResponse, IbcTimeout, IbcTimeoutBlock,
40};
41#[cfg(feature = "iterator")]
42#[allow(deprecated)]
43pub use crate::iterator::{Order, Pair, KV};
44pub use crate::math::{Decimal, Decimal256, Fraction, Uint128, Uint256, Uint512, Uint64};
45pub use crate::query::{
46 AllBalanceResponse, BalanceResponse, BankQuery, CustomQuery, QueryRequest, WasmQuery,
47};
48#[cfg(feature = "staking")]
49pub use crate::query::{
50 AllDelegationsResponse, AllValidatorsResponse, BondedDenomResponse, Delegation, FullDelegation,
51 StakingQuery, Validator, ValidatorResponse,
52};
53#[cfg(feature = "stargate")]
54pub use crate::query::{ChannelResponse, IbcQuery, ListChannelsResponse, PortIdResponse, StargateResponse};
55pub use crate::results::{
56 attr, wasm_execute, wasm_instantiate, Attribute, BankMsg, ContractResult, CosmosMsg, Empty,
57 Event, QueryResponse, Reply, ReplyOn, Response, SubMsg, SubMsgExecutionResponse, SystemResult,
58 WasmMsg,
59};
60#[cfg(feature = "staking")]
61pub use crate::results::{DistributionMsg, StakingMsg};
62#[cfg(feature = "stargate")]
63pub use crate::results::{GovMsg, VoteOption};
64pub use crate::serde::{from_binary, from_slice, to_binary, to_vec};
65pub use crate::storage::MemoryStorage;
66pub use crate::timestamp::Timestamp;
67pub use crate::traits::{Api, Querier, QuerierResult, QuerierWrapper, Storage};
68pub use crate::types::{BlockInfo, ContractInfo, Env, MessageInfo};
69
70#[cfg(target_arch = "wasm32")]
73mod exports;
74#[cfg(target_arch = "wasm32")]
75mod imports;
76#[cfg(target_arch = "wasm32")]
77mod memory; #[cfg(target_arch = "wasm32")]
80pub use crate::exports::{do_execute, do_instantiate, do_migrate, do_query, do_reply, do_sudo};
81#[cfg(target_arch = "wasm32")]
82pub use crate::imports::{ExternalApi, ExternalQuerier, ExternalStorage};
83
84#[cfg(all(feature = "stargate", target_arch = "wasm32"))]
85mod ibc_exports;
86#[cfg(all(feature = "stargate", target_arch = "wasm32"))]
87pub use crate::ibc_exports::{
88 do_ibc_channel_close, do_ibc_channel_connect, do_ibc_channel_open, do_ibc_packet_ack,
89 do_ibc_packet_receive, do_ibc_packet_timeout,
90};
91
92#[cfg(not(target_arch = "wasm32"))]
96mod mock;
97#[cfg(not(target_arch = "wasm32"))]
98pub mod testing {
99 #[cfg(feature = "staking")]
100 pub use crate::mock::StakingQuerier;
101 pub use crate::mock::{
102 digit_sum, mock_dependencies, mock_dependencies_with_balances, mock_env, mock_info,
103 mock_wasmd_attr, riffle_shuffle, BankQuerier, MockApi, MockQuerier,
104 MockQuerierCustomHandlerResult, MockStorage, MOCK_CONTRACT_ADDR,
105 };
106 #[cfg(feature = "stargate")]
107 pub use crate::mock::{
108 mock_ibc_channel, mock_ibc_channel_close_confirm, mock_ibc_channel_close_init,
109 mock_ibc_channel_connect_ack, mock_ibc_channel_connect_confirm, mock_ibc_channel_open_init,
110 mock_ibc_channel_open_try, mock_ibc_packet_ack, mock_ibc_packet_recv,
111 mock_ibc_packet_timeout,
112 };
113}
114
115pub use cosmwasm_derive::entry_point;