1#[cfg(not(feature = "std"))]
2core::compile_error!(
3 r#"Please enable `cosmwasm-std`'s `std` feature, as we might move existing functionality to that feature in the future.
4Builds without the std feature are currently not expected to work. If you need no_std support see #1484.
5"#
6);
7
8#[macro_use]
9extern crate alloc;
10
11mod __internal;
14mod addresses;
15mod assertions;
16mod binary;
17mod checksum;
18mod coin;
19mod coins;
20mod conversion;
21mod deps;
22mod encoding;
23mod errors;
24mod forward_ref;
25mod hex_binary;
26mod ibc;
27mod import_helpers;
28#[cfg(feature = "iterator")]
29mod iterator;
30mod math;
31mod metadata;
32mod never;
33mod pagination;
34mod panic;
35mod query;
36mod results;
37mod sections;
38mod serde;
39mod stdack;
40mod storage;
41mod timestamp;
42mod traits;
43mod types;
44
45pub(crate) mod prelude;
47
48pub mod storage_keys;
52
53pub use crate::addresses::{instantiate2_address, Addr, CanonicalAddr, Instantiate2AddressError};
54pub use crate::binary::Binary;
55pub use crate::checksum::{Checksum, ChecksumError};
56pub use crate::coin::{coin, coins, has_coins, Coin};
57pub use crate::coins::Coins;
58pub use crate::deps::{Deps, DepsMut, OwnedDeps};
59pub use crate::encoding::{from_base64, from_hex, to_base64, to_hex};
60pub use crate::errors::{
61 AggregationError, CheckedFromRatioError, CheckedMultiplyFractionError,
62 CheckedMultiplyRatioError, CoinFromStrError, CoinsError, ConversionOverflowError,
63 DivideByZeroError, DivisionError, OverflowError, OverflowOperation, PairingEqualityError,
64 RecoverPubkeyError, RoundDownOverflowError, RoundUpOverflowError, StdError, StdResult,
65 SystemError, VerificationError,
66};
67pub use crate::hex_binary::HexBinary;
68pub use crate::ibc::IbcChannelOpenResponse;
69pub use crate::ibc::{
70 Ibc3ChannelOpenResponse, IbcAckCallbackMsg, IbcAcknowledgement, IbcBasicResponse,
71 IbcCallbackRequest, IbcChannel, IbcChannelCloseMsg, IbcChannelConnectMsg, IbcChannelOpenMsg,
72 IbcDestinationCallbackMsg, IbcDstCallback, IbcEndpoint, IbcMsg, IbcOrder, IbcPacket,
73 IbcPacketAckMsg, IbcPacketReceiveMsg, IbcPacketTimeoutMsg, IbcReceiveResponse,
74 IbcSourceCallbackMsg, IbcSrcCallback, IbcTimeout, IbcTimeoutBlock, IbcTimeoutCallbackMsg,
75 TransferMsgBuilder,
76};
77#[cfg(feature = "iterator")]
78pub use crate::iterator::{Order, Record};
79pub use crate::math::{
80 Decimal, Decimal256, Decimal256RangeExceeded, DecimalRangeExceeded, Fraction, Int128, Int256,
81 Int512, Int64, Isqrt, SignedDecimal, SignedDecimal256, SignedDecimal256RangeExceeded,
82 SignedDecimalRangeExceeded, Uint128, Uint256, Uint512, Uint64,
83};
84pub use crate::metadata::{DenomMetadata, DenomUnit};
85pub use crate::never::Never;
86pub use crate::pagination::PageRequest;
87pub use crate::query::{
88 AllBalanceResponse, AllDelegationsResponse, AllDenomMetadataResponse, AllValidatorsResponse,
89 BalanceResponse, BankQuery, BondedDenomResponse, ChannelResponse, CodeInfoResponse,
90 ContractInfoResponse, CustomQuery, DecCoin, Delegation, DelegationResponse,
91 DelegationRewardsResponse, DelegationTotalRewardsResponse, DelegatorReward,
92 DelegatorValidatorsResponse, DelegatorWithdrawAddressResponse, DenomMetadataResponse,
93 DistributionQuery, FullDelegation, GrpcQuery, IbcQuery, ListChannelsResponse, PortIdResponse,
94 QueryRequest, StakingQuery, SupplyResponse, Validator, ValidatorResponse, WasmQuery,
95};
96#[cfg(all(feature = "stargate", feature = "cosmwasm_1_2"))]
97pub use crate::results::WeightedVoteOption;
98pub use crate::results::{
99 attr, wasm_execute, wasm_instantiate, AnyMsg, Attribute, BankMsg, ContractResult, CosmosMsg,
100 CustomMsg, Empty, Event, MsgResponse, QueryResponse, Reply, ReplyOn, Response, SubMsg,
101 SubMsgResponse, SubMsgResult, SystemResult, WasmMsg,
102};
103#[cfg(feature = "staking")]
104pub use crate::results::{DistributionMsg, StakingMsg};
105#[cfg(feature = "stargate")]
106pub use crate::results::{GovMsg, VoteOption};
107#[allow(deprecated)]
108pub use crate::serde::{
109 from_binary, from_json, from_slice, to_binary, to_json_binary, to_json_string, to_json_vec,
110 to_vec,
111};
112pub use crate::stdack::StdAck;
113pub use crate::storage::MemoryStorage;
114pub use crate::timestamp::Timestamp;
115pub use crate::traits::{Api, HashFunction, Querier, QuerierResult, QuerierWrapper, Storage};
116pub use crate::types::{BlockInfo, ContractInfo, Env, MessageInfo, TransactionInfo};
117
118#[cfg(target_arch = "wasm32")]
121mod exports;
122#[cfg(target_arch = "wasm32")]
123mod imports;
124#[cfg(target_arch = "wasm32")]
125mod memory; #[cfg(target_arch = "wasm32")]
128pub use crate::exports::{
129 do_execute, do_ibc_destination_callback, do_ibc_source_callback, do_instantiate, do_migrate,
130 do_query, do_reply, do_sudo,
131};
132#[cfg(all(feature = "stargate", target_arch = "wasm32"))]
133pub use crate::exports::{
134 do_ibc_channel_close, do_ibc_channel_connect, do_ibc_channel_open, do_ibc_packet_ack,
135 do_ibc_packet_receive, do_ibc_packet_timeout,
136};
137#[cfg(target_arch = "wasm32")]
138pub use crate::imports::{ExternalApi, ExternalQuerier, ExternalStorage};
139
140#[cfg(not(target_arch = "wasm32"))]
143pub mod testing;
144
145pub use cosmwasm_core::{BLS12_381_G1_GENERATOR, BLS12_381_G2_GENERATOR};
146
147pub use cosmwasm_derive::entry_point;