cosmwasm-std 2.0.3

Standard library for Wasm based smart contracts on Cosmos blockchains
Documentation
[package]
name = "cosmwasm-std"
version.workspace = true
authors = ["Ethan Frey <ethanfrey@users.noreply.github.com>"]
edition = "2021"
description = "Standard library for Wasm based smart contracts on Cosmos blockchains"
repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/std"
license = "Apache-2.0"
readme = "README.md"

[package.metadata.docs.rs]
features = ["abort", "stargate", "staking", "cosmwasm_2_0"]

[features]
default = ["iterator", "abort", "std"]
abort = []
# This feature can be used in the future to provide support for no_std environments,
# but disabling it will not provide any benefit at the moment. Even with this feature disabled,
# we currently require an std environment.
# You probably want to keep this enabled for now to avoid possible breaking changes later.
std = ["serde/std", "serde-json-wasm/std"]
# 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)
iterator = []
# 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
staking = []
# stargate enables stargate-dependent messages and queries, like raw protobuf messages
# as well as ibc-related functionality
stargate = []
# 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_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.
cosmwasm_1_2 = ["cosmwasm_1_1"]
# This feature makes `BankQuery::DenomMetadata` available for the contract to call, but requires
# the host blockchain to run CosmWasm `1.3.0` or higher.
cosmwasm_1_3 = ["cosmwasm_1_2"]
# 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_1_4 = ["cosmwasm_1_3"]
# 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_0 = ["cosmwasm_1_4"]

[dependencies]
base64 = "0.21.0"
cosmwasm-derive = { path = "../derive", version = "2.0.3" }
derivative = { version = "2", features = ["use_core"] }
forward_ref = "1"
hex = "0.4"
schemars = "0.8.3"
sha2 = "0.10.3"
serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] }
serde-json-wasm = { version = "1.0.1", default-features = false }
thiserror = "1.0.26"
bnum = "0.10.0"
static_assertions = "1.1.0"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
bech32 = "0.9.1"
cosmwasm-crypto = { path = "../crypto", version = "2.0.3" }

[dev-dependencies]
cosmwasm-schema = { path = "../schema" }
# The chrono dependency is only used in an example, which Rust compiles for us. If this causes trouble, remove it.
chrono = { version = "0.4", default-features = false, features = ["alloc", "std"] }
crc32fast = "1.3.2"
hex-literal = "0.3.1"
serde_json = "1.0.81"