The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.5.0 - 2023-10-31
- cosmwasm-std: Add
addr_make
andwith_prefix
forcosmwasm_std::testing::MockApi
(#1905). - cosmwasm-std: Add
abs
andunsigned_abs
forInt{64,128,256,512}
(#1854). - cosmwasm-std: Add
From<Int{64,128,256}>
forInt512
,TryFrom<Int{128,256,512}>
forInt64
,TryFrom<Int{256,512}>
forInt128
,TryFrom<Int512>
forInt256
andInt256::from_i128
for const contexts (#1861). - cosmwasm-std: Add
Int{64,128,256}::{checked_multiply_ratio, full_mul}
(#1866) - cosmwasm-std: Add
is_negative
forInt{64,128,256,512}
(#1867). - cosmwasm-std: Add
TryFrom<Uint{256,512}> for Uint64
andTryFrom<Uint{A}> for Int{B}
whereA >= B
(#1870). - cosmwasm-std: Add
to_json_{vec,binary,string}
andfrom_json
and deprecateto_{vec,binary}
in favor ofto_json_{vec,binary}
andfrom_{slice,binary}
in favor offrom_json
. (#1886) - cosmwasm-std: Add
SignedDecimal
andSignedDecimal256
(#1807). - cosmwasm-vm: Allow float operations with NaN canonicalization (#1864).
- cosmwasm-vm: Added
.module
extension to file names in the file system cache (#1913).
1.4.1 - 2023-10-09
- cosmwasm-vm: Fix a 1.3.x -> 1.4.0 regression bug leading to a Wasmer runtime error: RuntimeError: out of bounds memory access in cases when the Wasm file is re-compiled and used right away. (#1907)
- cosmwasm-check: Use "=" for pinning the versions of cosmwasm-vm and
cosmwasm-std dependencies. This ensures that you can use an older version of
cosmwasm-check together with the VM of the same version by doing
cargo install [email protected]
. A typical use case would be to check a contract with CosmWasm 1.4, 1.5 and 2.0. Note that other dependencies are still upgraded when usingcargo install
which may lead to API, behavioural or compiler incompatibilities. The --locked feature allows you use the versions locked when the release was created.
1.4.0 - 2023-09-04
- cosmwasm-std: Implement
Not
forUint{64,128,256}
(#1799). - cosmwasm-std: Add iterators for
Coins
(#1806). - cosmwasm-std: Make
abs_diff
const forUint{256,512}
andInt{64,128,256,512}
. It is now const for all integer types. - cosmwasm-std: Implement
TryFrom<Decimal256>
forDecimal
(#1832) - cosmwasm-std: Add
StdAck
. (#1512) - cosmwasm-std: Add new imports
db_next_{key, value}
for iterating storage keys / values only and makeStorage::{range_keys, range_values}
more efficient. This requires thecosmwasm_1_4
feature to be enabled. (#1834) - cosmwasm-std: Add
DistributionQuery::{DelegationRewards, DelegationTotalRewards, DelegatorValidators}
. This requires thecosmwasm_1_4
feature to be enabled. (#1788)
- cosmwasm-vm: Avoid using loupe for getting the
Module
size in the file system cache to prepare for the Wasmer 3 upgrade. - cosmwasm-vm: When enabling
print_debug
the debug logs are now printed to STDERR instead of STDOUT by default (#1667). - cosmwasm-vm: Add
Instance::set_debug_handler
/unset_debug_handler
to allow customizing the handling of debug messages emitted by the contract (#1667). - cosmwasm-vm: Upgrade Wasmer to version 4.1. (#1674, #1693, #1701, #1793)
- cosmwasm-check: Update clap dependency to version 4 (#1677)
- cosmwasm-vm: Use
wasmparser
for initial validation instead ofparity-wasm
(#1786) - cosmwasm-std: Make constructors
Decimal{,256}::{percent,permille,bps}
const - cosmwasm-std: Use new
db_next_key
import to makeskip
andnth
implementation ofrange
iterators more efficient. This requires thecosmwasm_1_4
feature to be enabled. (#1838)
1.3.3 - 2023-08-22
- cosmwasm-std: Implement
into_empty
forQuerierWrapper
,Deps
andDepsMut
.
1.3.2 - 2023-08-15
- cosmwasm-std: Export
CoinFromStrError
,CoinsError
andDivisionError
1.3.1 - 2023-07-26
- cosmwasm-std: Export
DelegatorWithdrawAddressResponse
,DenomMetadataResponse
andAllDenomMetadataResponse
which were added in1.3.0
(#1795).
- cosmwasm-std: Query responses are now exported, even if the corresponding cargo feature is not enabled (#1795).
1.3.0 - 2023-07-17
- cosmwasm-vm: Add missing cache stats increment when calling
pin
.
- cosmwasm-std: Implement
BankQuery::AllDenomMetadata
to allow querying all the denom metadata andBankQuery::DenomMetadata
to query a specific one. In order to use this query in a contract, thecosmwasm_1_3
feature needs to be enabled for thecosmwasm_std
dependency. This makes the contract incompatible with chains running anything lower than CosmWasm1.3.0
. (#1647) - cosmwasm-std: Add
DistributionQuery::DelegatorWithdrawAddress
. Also needs thecosmwasm_1_3
feature (see above). (#1593) - cosmwasm-std: Add
DistributionMsg::FundCommunityPool
. Also needs thecosmwasm_1_3
feature (see above). (#1747) - cosmwasm-std: Add
FromStr
impl forCoin
. (#1684) - cosmwasm-std: Add
Coins
helper to handle multiple coins. (#1687) - cosmwasm-vm: Add
Cache::save_wasm_unchecked
to save Wasm blobs that have been checked before. This is useful for state-sync where we know the Wasm code was checked when it was first uploaded. (#1635) - cosmwasm-vm: Allow sign extension Wasm opcodes in static validation. This allows contracts to be compiled with Rust 1.70.0 and above. (#1727)
- cosmwasm-std: Add trait functions
Storage::range_keys
andStorage::range_values
. The default implementations just useStorage::range
. Later this can be implemented more efficiently. (#1748) - cosmwasm-std: Add
Int64
,Int128
,Int256
andInt512
signed integer types. (#1718)
- cosmwasm-vm: Add checks for table section of Wasm blob (#1631).
- cosmwasm-vm: Limit number of imports during static validation (#1629).
- cosmwasm-vm: Add target (triple + CPU features) into the module cache
directory to avoid using modules compiled for a different system. Bump
MODULE_SERIALIZATION_VERSION
to "v6". (#1664) - cosmwasm-vm: Add
.wasm
extension to stored wasm files (#1686).
- cosmwasm-storage: All exports are deprecated because this crate will be removed with CosmWasm 2.0 (#1596).
1.2.7 - 2023-06-19
- cosmwasm-std: Add
<<
and<<=
implementation forUint{64,128,256,512}
types. (#1723) - cosmwasm-std: Add
Timestamp::{plus,minus}_{minutes, hours, days}
. (#1729) - cosmwasm-std: Add
Decimal::bps
andDecimal256::bps
to create a decimal from a basis point value (#1715).
- cosmwasm-std: Coin uses shorter
Coin { 123 "ucosm" }
format for Debug (#1704)
1.2.6 - 2023-06-05
- cosmwasm-vm: Bumped module serialization version from v4 to v5 to invalidate potentially corrupted caches caused by Rust update. See CosmWasm/wasmvm#426 for more information. (#1708)
1.2.5 - 2023-05-02
- cosmwasm-std: Implement
PartialEq
forAddr == &Addr
and&Addr == Addr
as well asEvent == &Event
and&Event == Event
(#1672). - cosmwasm-std: Add
#[must_use]
annotations toUint64
,Uint128
,Uint256
,Uint512
,Decimal
andDecimal256
math operations (#1678)
- cosmwasm-std: The PartialEq implementations between
Addr
and&str
/String
are deprecated because they are not considered to be safe. In almost all cases you want to convert both sides of the equation toAddr
first. If you really want to do a string comparison, useAddr::as_str()
explicitly. (#1671)
1.2.4 - 2023-04-17
- cosmwasm-vm: Add call depths limit
1.2.3 - 2023-03-22
- cosmwasm-vm: Use saturating increments for
Stats
fields to ensure we don't run into overflow issues.
1.2.2 - 2023-03-08
- cosmwasm-std: Add an IBC querier implementation to
testing::MockQuerier
(#1620, #1624). - cosmwasm-std: Add
#[must_use]
annotations toTimestamp
math functions.
- all: Fix
backtraces
feature for newer versions of Rust. This still requires Rust nightly (#1613). - cosmwasm-std: Add missing export
CheckedMultiplyFractionError
(#1608).
1.2.1 - 2023-01-30
- cosmwasm-std: Add
Decimal{,256}::to_uint_floor
and::to_uint_ceil
for efficient and explicit decimal to uint conversion (#1603).
- cosmwasm-std: Make fields of
WeightedVoteOption
public to allow constructing it (#1597).
- cosmwasm-std: Improve readability of
Debug
output forDecimal
andDecimal256
(#1600).
1.2.0 - 2023-01-24
- cosmwasm-std: Add
GovMsg::VoteWeighted
. In order to use this in a contract, thecosmwasm_1_2
feature needs to be enabled for thecosmwasm_std
dependency. This makes the contract incompatible with chains running versions of CosmWasm earlier than 1.2.0 (#1481). - cosmwasm-std: Add
instantiate2_address
which allows calculating the predictable addresses forMsgInstantiateContract2
(#1437, #1554). - cosmwasm-std: Add
WasmMsg::Instantiate2
(requirescosmwasm_1_2
, seeGovMsg::VoteWeighted
above) to instantiate contracts at a predictable address (#1436, #1554)). - cosmwasm-schema: In contracts,
cosmwasm schema
will now output a separate JSON Schema file for each entrypoint in theraw
subdirectory (#1478, #1533). - cosmwasm-std: Upgrade
serde-json-wasm
dependency to 0.5.0 which adds map support toto_vec
/to_binary
and friends. - cosmwasm-std: Implement
AsRef<[u8]>
forBinary
andHexBinary
(#1550). - cosmwasm-std: Allow constructing
SupplyResponse
via aDefault
implementation (#1552, #1560). - cosmwasm-std: Add
Never
type which cannot be instantiated. This can be used as the error type foribc_packet_receive
oribc_packet_ack
to gain confidence that the implementations never errors and the transaction does not get reverted. (#1513) - cosmwasm-std: Add new
WasmQuery::CodeInfo
to get the checksum of a code ID (#1561). - cosmwasm-vm: Add
Cache::remove_wasm
to remove obsolete Wasm blobs and their compiled modules. - cosmwasm-std: Implement fraction multiplication and division. Assists with Uint & Decimal arithmetic and exposes methods for flooring/ceiling result (#1485, #1566).
- cosmwasm-vm: Avoid exposing OS specific file system errors in order to test cosmwasm-vm on Windows. This gives us confidence for integrating cosmwasm-vm in a libwasmvm build on Windows. This change is likely to be consensus breaking as error messages change. (#1406)
- cosmwasm-vm: Use
Display
representation for embedding WasmerInstantiationError
s (#1508).
- cosmwasm-schema: Nested QueryMsg with generics is now supported by the QueryResponses macro (#1516).
- cosmwasm-schema: A nested QueryMsg no longer causes runtime errors if it contains doc comments.
- cosmwasm-std/cosmwasm-vm: Increase length limit for address conversion in
MockApi
to support addresses longer than 54 bytes (#1529).
1.1.9 - 2022-12-06
- cosmwasm-schema: Fix type fully qualified path to symbol
QueryResponses
in macrocosmwasm_schema::generate_api!
(#1527).
1.1.8 - 2022-11-22
- cosmwasm-schema: Fix type params on
QueryMsg
causing a compiler error when used with theQueryResponses
derive macro.
1.1.6 - 2022-11-16
- cosmwasm-std: Add
From
implementations to convert betweenCanonicalAddr
/Binary
as well asCanonicalAddr
/HexBinary
(#1463). - cosmwasm-std: Add
From
implementations to convertu8
arrays toCanonicalAddr
(#1463). - cosmwasm-std: Implement
PartialEq
betweenCanonicalAddr
andHexBinary
/Binary
(#1463).
- all: Bump a few dependency versions to make the codebase compile with
-Zminimal-versions
(#1465). - cosmwasm-profiler: Package was removed 🪦. It served its job showing us that we cannot properly measure different runtimes for differet Wasm opcodes.
- cosmwasm-schema: schema generation is now locked to produce strictly
draft-07
schemas - cosmwasm-schema:
QueryResponses
derive now sets theJsonSchema
trait bound on the generatedimpl
block. This allows the contract dev to not add aJsonSchema
trait bound on the type itself.
1.1.5 - 2022-10-17
- cosmwasm-std: Add
wrapping_add
,wrapping_sub
,wrapping_mul
andwrapping_pow
toUint256
/Uint512
. - cosmwasm-schema: Better error messaging when attempting to compile schema
generator for
wasm32
- cosmwasm-vm: In the
secp256k1_verify
,secp256k1_recover_pubkey
,ed25519_verify
anded25519_batch_verify
import implementations we now exit early if the gas left is not sufficient to perform the operation.
- cosmwasm-std: Remove
non_exhaustive
from IBC typesIbcChannelOpenMsg
,IbcChannelConnectMsg
andIbcChannelCloseMsg
in order to allow exhaustive matching over the possible scenarios without an unused fallback case (#1449).
1.1.4 - 2022-10-03
- cosmwasm-schema: Properly analyze schemas generated for
untagged
enums
1.1.3 - 2022-09-29
- cosmwasm-schema:
IntegrityError
is now public
1.1.2 - 2022-09-19
- cosmwasm-std: Add testing macro
assert_approx_eq!
for comparing two integers to be relatively close to each other (#1417). - cosmwasm-std: Add
HexBinary
which is likeBinary
but encodes to hex strings in JSON. AddStdError::InvalidHex
error case. (#1425)
- cosmwasm-vm: Bump
MODULE_SERIALIZATION_VERSION
to "v4" because the module serialization format changed between Wasmer 2.2 and 2.3 (#1426). - cosmwasm-schema: The
QueryResponses
derive macro now supportsQueryMsg
s with generics. (#1429)
1.1.1 - 2022-09-15
- cosmwasm-schema: Using
QueryResponses
with aQueryMsg
containing a unit-like variant will no longer crash. The different variant types in Rust are:It's still recommended to only use struct variants, even if there are no fields.enum QueryMsg { UnitLike, Tuple(), Struct {}, }
- cosmwasm-schema: It is no longer necessary to specify
serde
orschemars
as a dependency in order to makecosmwasm-schema
macros work.
1.1.0 - 2022-09-05
- cosmwasm-std: Implement PartialEq for
Binary
andu8
arrays. - cosmwasm-std: Add
Uint{64,128,256,512}::one
. - cosmwasm-std: Add
Uint{64,128,256,512}::abs_diff
andDecimal{,256}::abs_diff
(#1334). - cosmwasm-std: Implement
From<Decimal> for Decimal256
. - cosmwasm-std: Implement
Rem
/RemAssign
forDecimal
/Decimal256
. - cosmwasm-std: Implement
checked_add
/_sub
/_div
/_rem
forDecimal
/Decimal256
. - cosmwasm-std: Implement
pow
/saturating_pow
forDecimal
/Decimal256
. - cosmwasm-std: Implement
ceil
/floor
forDecimal
/Decimal256
. - cosmwasm-std: Implement
PartialEq
for reference on one side and owned value on the other for allUint
andDecimal
types - cosmwasm-std: Implement
saturating_add
/sub
/mul
forDecimal
/Decimal256
. - cosmwasm-std: Implement
BankQuery::Supply
to allow querying the total supply of a native token. In order to use this query in a contract, thecosmwasm_1_1
feature needs to be enabled for thecosmwasm_std
dependency. This makes the contract incompatible with chains running CosmWasm1.0
. (#1356) - cosmwasm-std: Implement
MIN
const value for allUint
andDecimal
types - cosmwasm-std: Implement
checked_div_euclid
forUint256
/Uint512
- cosmwasm-std: Add
QuerierWrapper::query_wasm_contract_info
- this is just a convenience helper for queryingWasmQuery::ContractInfo
. - cosmwasm-check: This is a new binary package that allows running various CosmWasm compatibility checks on compiled .wasm files. See https://crates.io/crates/cosmwasm-check for usage info.
- cosmwasm-vm/cosmwasm-profiler: Upgrade Wasmer to 2.3.0.
- cosmwasm-std: Enable the
abort
feature by default. This provides more helpful panic messages via a custom panic handler. - cosmwasm-std: Make
Decimal{,256}::DECIMAL_PLACES
a publicu32
value. - cosmwasm-crypto: Bumped
k256
0.10.4 -> 0.11
anddigest
0.9 -> 0.10
(#1374). - cosmwasm-vm: Rename features to capabilities, including
features_from_csv
tocapabilities_from_csv
;CacheOptions::supported_features
toCacheOptions::available_capabilities
;MockInstanceOptions::supported_features
toMockInstanceOptions::available_capabilities
Instance::required_features
toInstance::required_capabilities
AnalysisReport::required_features
toAnalysisReport::required_capabilities
.
- cosmwasm-vm: The
check_contract
example was deprecated. Please use the new crate cosmwasm-check instead (#1371).
1.0.0 - 2022-05-14
- cosmwasm-std: Export
DelegationResponse
(#1301). - cosmwasm-std: When the new
abort
feature is enabled, cosmwasm-std installs a panic handler that aborts the contract and passes the panic message to the host. Theabort
feature can only be used when deploying to chains that implement the import. For this reason, it's not yet enabled by default. (#1299) - cosmwasm-vm: A new import
abort
is created to abort contract execution when requested by the contract. (#1299) - cosmwasm-std: Add new
ibc3
feature that allows to use IBC-Go V3 features, like version negotiation and exposing relayer address to the contract. Requires a compatible wasmd runtime (v0.27.0+) (#1302)
The CHANGELOG for versions before 1.0.0 was moved to CHANGELOG-pre1.0.0.md.