Cargo Features
secret-cosmwasm-std has no features set by default.
[dependencies]
secret-cosmwasm-std = { version = "1.1.11", features = ["abort", "iterator", "staking", "backtraces", "stargate", "ibc3", "cosmwasm_1_1", "random"] }
- abort
-
Affects
imports::handle_panic
,panic::install_panic_handler
… - iterator
-
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
… - 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::StakingQuerier
… - backtraces
-
backtraces provides much better context at runtime errors (in non-wasm code)
at the cost of a bit of code size and performance.
This feature requires Rust nightly because it depends on the unstable backtrace feature. - stargate ibc3?
-
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
… - ibc3 = stargate
-
ibc3 extends ibc messages with ibc-v3 only features. This should only be enabled on contracts that require these types. Without this, they get the smaller ibc-v1 API.
Affects
ibc::IbcChannelOpenResponse
,ibc::IbcPacketReceiveMsg.relayer
,ibc::IbcPacketAckMsg.relayer
,ibc::IbcPacketTimeoutMsg.relayer
… - cosmwasm_1_1
-
This feature makes
BankQuery::Supply
available for the contract to call, but requires the host blockchain to run CosmWasm1.1.0
or higher.Affects
bank::SupplyResponse
… - random
-
Add random seed to env in inits and executes
Affects
types::BlockInfo.random
…