Cargo Features

[dependencies]
cosmwasm-std = { version = "2.2.0-rc.3", default-features = false, features = ["std", "abort", "iterator", "staking", "stargate", "cosmwasm_1_1", "cosmwasm_1_2", "cosmwasm_1_3", "cosmwasm_1_4", "cosmwasm_2_0", "cosmwasm_2_1", "cosmwasm_2_2"] }
default = abort, iterator, std

These default features are set whenever cosmwasm-std is added without default-features = false somewhere in the dependency tree.

std default
abort default

Affects imports::handle_panic, panic::install_panic_handler

iterator default

iterator allows us to iterate over all DB items in a given range optional as some merkle stores (like tries) don't support this given Ethereum 1.0, 2.0, Substrate, and other major projects use Tries we keep this optional, to allow possible future integration (or different Cosmos Backends)

Affects memory::get_optional_region_address, traits::Storage.range, traits::Storage.range_keys, traits::Storage.range_values

staking

staking exposes bindings to a required staking moudle in the runtime, via new CosmosMsg types, and new QueryRequest types. This should only be enabled on contracts that require these types, so other contracts can be used on systems with eg. PoA consensus

Affects cosmos_msg::StakingMsg, cosmos_msg::DistributionMsg, mock::MockQuerier.staking, mock::StakingQuerier

stargate

stargate enables stargate-dependent messages and queries, like raw protobuf messages as well as ibc-related functionality

Affects exports::do_ibc_channel_open, exports::do_ibc_channel_connect, exports::do_ibc_channel_close, exports::do_ibc_packet_receive, exports::do_ibc_packet_ack, exports::do_ibc_packet_timeout, cosmos_msg::GovMsg, cosmos_msg::VoteOption, mock::mock_ibc_channel, mock::mock_ibc_channel_open_init, mock::mock_ibc_channel_open_try, mock::mock_ibc_channel_connect_ack, mock::mock_ibc_channel_connect_confirm, mock::mock_ibc_channel_close_init, mock::mock_ibc_channel_close_confirm, mock::mock_ibc_packet_recv, mock::mock_ibc_packet_ack, mock::mock_ibc_packet_timeout, mock::MockQuerier.ibc, mock::IbcQuerier

cosmwasm_1_1 cosmwasm_1_2?

This feature makes BankQuery::Supply available for the contract to call, but requires the host blockchain to run CosmWasm 1.1.0 or higher.

cosmwasm_1_2 cosmwasm_1_3? = cosmwasm_1_1

This feature makes GovMsg::VoteWeighted available for the contract to call, but requires the host blockchain to run CosmWasm 1.2.0 or higher.

Affects cosmos_msg::WeightedVoteOption

cosmwasm_1_3 cosmwasm_1_4? = cosmwasm_1_2

This feature makes BankQuery::DenomMetadata available for the contract to call, but requires the host blockchain to run CosmWasm 1.3.0 or higher.

Affects mock::MockQuerier.distribution, mock::DistributionQuerier

cosmwasm_1_4 cosmwasm_2_0? = cosmwasm_1_3

Together with the iterator feature this enables additional imports for more efficient iteration over DB keys or values. It also makes DistributionQuery::{DelegationRewards, DelegationTotalRewards, DelegatorValidators} available for the contract to call. It requires the host blockchain to run CosmWasm 1.4.0 or higher.

cosmwasm_2_0 cosmwasm_2_1? = cosmwasm_1_4

This enables functionality that is only available on 2.0 chains. It adds CosmosMsg::Any, replacing CosmosMsg::Stargate. It also adds QueryRequest::Grpc.

cosmwasm_2_1 cosmwasm_2_2? = cosmwasm_2_0

This enables functionality that is only available on 2.1 chains.
It adds verification and key recovery for the secp256r1 elliptic curve.

cosmwasm_2_2 = cosmwasm_2_1

This enables functionality that is only available on 2.2 chains. It adds IbcMsg::PayPacketFee and IbcMsg::PayPacketFeeAsync.

Affects exports::do_migrate_with_info