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 msgpack;
33mod never;
34mod pagination;
35mod panic;
36mod query;
37mod results;
38mod sections;
39mod serde;
40mod stdack;
41mod storage;
42mod timestamp;
43mod traits;
44mod types;
45
46pub(crate) mod prelude;
48
49pub mod storage_keys;
53
54pub use crate::addresses::{instantiate2_address, Addr, CanonicalAddr, Instantiate2AddressError};
55pub use crate::binary::Binary;
56pub use crate::checksum::{Checksum, ChecksumError};
57pub use crate::coin::{coin, coins, has_coins, Coin};
58pub use crate::coins::Coins;
59pub use crate::deps::{Deps, DepsMut, OwnedDeps};
60pub use crate::encoding::{from_base64, from_hex, to_base64, to_hex};
61pub use crate::errors::{
62 AggregationError, CheckedFromRatioError, CheckedMultiplyFractionError,
63 CheckedMultiplyRatioError, CoinFromStrError, CoinsError, ConversionOverflowError,
64 DivideByZeroError, DivisionError, OverflowError, OverflowOperation, PairingEqualityError,
65 RecoverPubkeyError, RoundDownOverflowError, RoundUpOverflowError, StdError, StdResult,
66 SystemError, VerificationError,
67};
68pub use crate::hex_binary::HexBinary;
69pub use crate::ibc::IbcChannelOpenResponse;
70#[allow(deprecated)]
71pub use crate::ibc::IbcFee;
72pub use crate::ibc::{
73 Ibc3ChannelOpenResponse, IbcAckCallbackMsg, IbcAcknowledgement, IbcBasicResponse,
74 IbcCallbackRequest, IbcChannel, IbcChannelCloseMsg, IbcChannelConnectMsg, IbcChannelOpenMsg,
75 IbcDestinationCallbackMsg, IbcDstCallback, IbcEndpoint, IbcMsg, IbcOrder, IbcPacket,
76 IbcPacketAckMsg, IbcPacketReceiveMsg, IbcPacketTimeoutMsg, IbcReceiveResponse,
77 IbcSourceCallbackMsg, IbcSrcCallback, IbcTimeout, IbcTimeoutBlock, IbcTimeoutCallbackMsg,
78 TransferMsgBuilder,
79};
80#[cfg(feature = "iterator")]
81pub use crate::iterator::{Order, Record};
82pub use crate::math::{
83 Decimal, Decimal256, Decimal256RangeExceeded, DecimalRangeExceeded, Fraction, Int128, Int256,
84 Int512, Int64, Isqrt, SignedDecimal, SignedDecimal256, SignedDecimal256RangeExceeded,
85 SignedDecimalRangeExceeded, Uint128, Uint256, Uint512, Uint64,
86};
87pub use crate::metadata::{DenomMetadata, DenomUnit};
88pub use crate::msgpack::{from_msgpack, to_msgpack_binary, to_msgpack_vec};
89pub use crate::never::Never;
90pub use crate::pagination::PageRequest;
91#[allow(deprecated)]
92pub use crate::query::FeeEnabledChannelResponse;
93pub use crate::query::{
94 AllBalanceResponse, AllDelegationsResponse, AllDenomMetadataResponse, AllValidatorsResponse,
95 BalanceResponse, BankQuery, BondedDenomResponse, ChannelResponse, CodeInfoResponse,
96 ContractInfoResponse, CustomQuery, DecCoin, Delegation, DelegationResponse,
97 DelegationRewardsResponse, DelegationTotalRewardsResponse, DelegatorReward,
98 DelegatorValidatorsResponse, DelegatorWithdrawAddressResponse, DenomMetadataResponse,
99 DistributionQuery, FullDelegation, GrpcQuery, IbcQuery, ListChannelsResponse, PortIdResponse,
100 QueryRequest, StakingQuery, SupplyResponse, Validator, ValidatorResponse, WasmQuery,
101};
102#[cfg(all(feature = "stargate", feature = "cosmwasm_1_2"))]
103pub use crate::results::WeightedVoteOption;
104pub use crate::results::{
105 attr, wasm_execute, wasm_instantiate, AnyMsg, Attribute, BankMsg, ContractResult, CosmosMsg,
106 CustomMsg, Empty, Event, MsgResponse, QueryResponse, Reply, ReplyOn, Response, SubMsg,
107 SubMsgResponse, SubMsgResult, SystemResult, WasmMsg,
108};
109#[cfg(feature = "staking")]
110pub use crate::results::{DistributionMsg, StakingMsg};
111#[cfg(feature = "stargate")]
112pub use crate::results::{GovMsg, VoteOption};
113#[allow(deprecated)]
114pub use crate::serde::{
115 from_binary, from_json, from_slice, to_binary, to_json_binary, to_json_string, to_json_vec,
116 to_vec,
117};
118pub use crate::stdack::StdAck;
119pub use crate::storage::MemoryStorage;
120pub use crate::timestamp::Timestamp;
121pub use crate::traits::{Api, HashFunction, Querier, QuerierResult, QuerierWrapper, Storage};
122pub use crate::types::{BlockInfo, ContractInfo, Env, MessageInfo, MigrateInfo, TransactionInfo};
123
124#[cfg(feature = "abort")]
125mod _warning {
126 #[must_use = "cosmwasm-std feature `abort` is deprecated and will be removed in the next major release. You can just remove the feature as this functionality is now the default"]
127 struct CompileWarning;
128
129 #[allow(dead_code)]
130 fn trigger_warning() {
131 let _ = CompileWarning;
132 }
133}
134
135#[cfg(target_arch = "wasm32")]
137mod exports;
138#[cfg(target_arch = "wasm32")]
139mod imports;
140#[cfg(target_arch = "wasm32")]
141mod memory; #[cfg(all(feature = "cosmwasm_2_2", target_arch = "wasm32"))]
144pub use crate::exports::do_migrate_with_info;
145#[cfg(target_arch = "wasm32")]
146pub use crate::exports::{
147 do_execute, do_ibc_destination_callback, do_ibc_source_callback, do_instantiate, do_migrate,
148 do_query, do_reply, do_sudo,
149};
150#[cfg(all(feature = "stargate", target_arch = "wasm32"))]
151pub use crate::exports::{
152 do_ibc_channel_close, do_ibc_channel_connect, do_ibc_channel_open, do_ibc_packet_ack,
153 do_ibc_packet_receive, do_ibc_packet_timeout,
154};
155#[cfg(target_arch = "wasm32")]
156pub use crate::imports::{ExternalApi, ExternalQuerier, ExternalStorage};
157
158#[cfg(not(target_arch = "wasm32"))]
161pub mod testing;
162
163pub use cosmwasm_core::{BLS12_381_G1_GENERATOR, BLS12_381_G2_GENERATOR};
164
165pub use cosmwasm_derive::entry_point;