Releases: mars-protocol/cw-asset
Releases · mars-protocol/cw-asset
v3.1.0
v3.0.0
Compared to v2.4.0:
Major changes
- Remove support for cw1155 which is no longer maintained
- Implement
PrimaryKey
andKeyDeserialize
traits for&AssetInfo
; deleteAddressInfoKey
- Implement a custom error type
AssetError
instead of usingStdError
everywhere - Use
cw_address_like::AddressLike
trait to enforce that the genericT
inAssetInfo<T>
can only beString
orAddr
Minor changes
- Bump cosmwasm-std to 1.2
- Bump cw20 and cw-storage-plus to v1.0
- Improve Github CI
- Improve formatter settings
- Fix all clippy warnings
v3.0.0-rc1
This is a preview for cw-asset v3.
Major changes
- Remove support for cw1155 which is no longer maintained
- Implement
PrimaryKey
andKeyDeserialize
traits for&AssetInfo
; deleteAddressInfoKey
- Implement a custom error type
AssetError
instead of usingStdError
everywhere - Use
cw_address_like::AddressLike
trait to enforce that the genericT
inAssetInfo<T>
can only beString
orAddr
Minor changes
- Bump cosmwasm-std to 1.2
- Bump cw20 and cw-storage-plus to v1.0
- Improve Github CI
- Improve formatter settings
- Fix all clippy warnings
v2.4.0
v2.3.0
v2.2.0
- add support for cw1155 (#11)
- when doing
check
for cw20, remove the casting of the contract address to lowercase. this was necessary previously ascosmwasm-std
contained a bug that made it not able to raise an error when the address is not normalized. the bug has since been fixed, meaning the force-casting is no longer necessary - empty asset lists now stringify to
[]
instead of an empty string (``) - introduce a new function
AssetUnchecked::from_sdk_str
for creating anAssetUnchecked
instance from a cosmos-sdk coin string, which is the format{amount}{denom}
v2.1.0
Implement a new struct AssetInfoKey
, which allows AssetInfo
to be used as storage keys in maps:
use cosmwasm_std::testing::mock_dependencies;
use cw_asset::{AssetInfo, AssetInfoKey};
use cw_storage_plus::Map;
let deps = mock_dependencies();
let map: Map<AssetInfoKey, u64> = Map::new("map");
map.save(
deps.as_mut().storage,
AssetInfo::native("uosmo").into(), // cast AssetInfo into AssetInfoKey
&12345,
)
.unwrap();