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;
70pub use crate::ibc::{
71 Ibc3ChannelOpenResponse, IbcAckCallbackMsg, IbcAcknowledgement, IbcBasicResponse,
72 IbcCallbackRequest, IbcChannel, IbcChannelCloseMsg, IbcChannelConnectMsg, IbcChannelOpenMsg,
73 IbcDestinationCallbackMsg, IbcDstCallback, IbcEndpoint, IbcFee, IbcMsg, IbcOrder, IbcPacket,
74 IbcPacketAckMsg, IbcPacketReceiveMsg, IbcPacketTimeoutMsg, IbcReceiveResponse,
75 IbcSourceCallbackMsg, IbcSrcCallback, IbcTimeout, IbcTimeoutBlock, IbcTimeoutCallbackMsg,
76 TransferMsgBuilder,
77};
78#[cfg(feature = "iterator")]
79pub use crate::iterator::{Order, Record};
80pub use crate::math::{
81 Decimal, Decimal256, Decimal256RangeExceeded, DecimalRangeExceeded, Fraction, Int128, Int256,
82 Int512, Int64, Isqrt, SignedDecimal, SignedDecimal256, SignedDecimal256RangeExceeded,
83 SignedDecimalRangeExceeded, Uint128, Uint256, Uint512, Uint64,
84};
85pub use crate::metadata::{DenomMetadata, DenomUnit};
86pub use crate::msgpack::{from_msgpack, to_msgpack_binary, to_msgpack_vec};
87pub use crate::never::Never;
88pub use crate::pagination::PageRequest;
89pub use crate::query::{
90 AllBalanceResponse, AllDelegationsResponse, AllDenomMetadataResponse, AllValidatorsResponse,
91 BalanceResponse, BankQuery, BondedDenomResponse, ChannelResponse, CodeInfoResponse,
92 ContractInfoResponse, CustomQuery, DecCoin, Delegation, DelegationResponse,
93 DelegationRewardsResponse, DelegationTotalRewardsResponse, DelegatorReward,
94 DelegatorValidatorsResponse, DelegatorWithdrawAddressResponse, DenomMetadataResponse,
95 DistributionQuery, FeeEnabledChannelResponse, FullDelegation, GrpcQuery, IbcQuery,
96 ListChannelsResponse, PortIdResponse, QueryRequest, StakingQuery, SupplyResponse, Validator,
97 ValidatorResponse, WasmQuery,
98};
99#[cfg(all(feature = "stargate", feature = "cosmwasm_1_2"))]
100pub use crate::results::WeightedVoteOption;
101pub use crate::results::{
102 attr, wasm_execute, wasm_instantiate, AnyMsg, Attribute, BankMsg, ContractResult, CosmosMsg,
103 CustomMsg, Empty, Event, MsgResponse, QueryResponse, Reply, ReplyOn, Response, SubMsg,
104 SubMsgResponse, SubMsgResult, SystemResult, WasmMsg,
105};
106#[cfg(feature = "staking")]
107pub use crate::results::{DistributionMsg, StakingMsg};
108#[cfg(feature = "stargate")]
109pub use crate::results::{GovMsg, VoteOption};
110#[allow(deprecated)]
111pub use crate::serde::{
112 from_binary, from_json, from_slice, to_binary, to_json_binary, to_json_string, to_json_vec,
113 to_vec,
114};
115pub use crate::stdack::StdAck;
116pub use crate::storage::MemoryStorage;
117pub use crate::timestamp::Timestamp;
118pub use crate::traits::{Api, HashFunction, Querier, QuerierResult, QuerierWrapper, Storage};
119pub use crate::types::{BlockInfo, ContractInfo, Env, MessageInfo, MigrateInfo, TransactionInfo};
120
121#[cfg(feature = "abort")]
122mod _warning {
123 #[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"]
124 struct CompileWarning;
125
126 #[allow(dead_code)]
127 fn trigger_warning() {
128 CompileWarning;
129 }
130}
131
132#[cfg(target_arch = "wasm32")]
134mod exports;
135#[cfg(target_arch = "wasm32")]
136mod imports;
137#[cfg(target_arch = "wasm32")]
138mod memory; #[cfg(all(feature = "cosmwasm_2_2", target_arch = "wasm32"))]
141pub use crate::exports::do_migrate_with_info;
142#[cfg(target_arch = "wasm32")]
143pub use crate::exports::{
144 do_execute, do_ibc_destination_callback, do_ibc_source_callback, do_instantiate, do_migrate,
145 do_query, do_reply, do_sudo,
146};
147#[cfg(all(feature = "stargate", target_arch = "wasm32"))]
148pub use crate::exports::{
149 do_ibc_channel_close, do_ibc_channel_connect, do_ibc_channel_open, do_ibc_packet_ack,
150 do_ibc_packet_receive, do_ibc_packet_timeout,
151};
152#[cfg(target_arch = "wasm32")]
153pub use crate::imports::{ExternalApi, ExternalQuerier, ExternalStorage};
154
155#[cfg(not(target_arch = "wasm32"))]
158pub mod testing;
159
160pub use cosmwasm_core::{BLS12_381_G1_GENERATOR, BLS12_381_G2_GENERATOR};
161
162pub use cosmwasm_derive::entry_point;