Skip to content

Releases: mars-protocol/cw-asset

v3.1.0

11 Jan 10:26
4aced43
Compare
Choose a tag to compare

Changes

  • Add some useful implementations to AssetInfo (#22)
  • Bump dependencies (#23)

v3.0.0

03 Feb 16:25
465ec00
Compare
Choose a tag to compare

Compared to v2.4.0:

Major changes

  • Remove support for cw1155 which is no longer maintained
  • Implement PrimaryKey and KeyDeserialize traits for &AssetInfo; delete AddressInfoKey
  • Implement a custom error type AssetError instead of using StdError everywhere
  • Use cw_address_like::AddressLike trait to enforce that the generic T in AssetInfo<T> can only be String or Addr

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

02 Feb 16:10
b1ba69f
Compare
Choose a tag to compare
v3.0.0-rc1 Pre-release
Pre-release

This is a preview for cw-asset v3.

Major changes

  • Remove support for cw1155 which is no longer maintained
  • Implement PrimaryKey and KeyDeserialize traits for &AssetInfo; delete AddressInfoKey
  • Implement a custom error type AssetError instead of using StdError everywhere
  • Use cw_address_like::AddressLike trait to enforce that the generic T in AssetInfo<T> can only be String or Addr

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

08 Nov 04:26
90c9bf6
Compare
Choose a tag to compare
  • bump cosmwasm-std to v1.1
  • bump cw-plus to v0.16
  • use cosmwasm-schema
  • add github CI, editor settings, and rustfmt settings

v2.3.0

05 Sep 11:40
2de872e
Compare
Choose a tag to compare

v2.2.0

10 Jul 23:37
18af528
Compare
Choose a tag to compare
  • add support for cw1155 (#11)
  • when doing check for cw20, remove the casting of the contract address to lowercase. this was necessary previously as cosmwasm-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 an AssetUnchecked instance from a cosmos-sdk coin string, which is the format {amount}{denom}

v2.1.0

28 Jun 17:19
b1d04d8
Compare
Choose a tag to compare

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();

v2.0.0

19 May 01:37
3541ed9
Compare
Choose a tag to compare
  • Bump cosmwasm-std to v1.0 and cw-plus to 0.13
  • Fix clippy issues
  • Remove trailing whitespaces
  • Support for legacy asset types (Astroport and Mars) are dropped, since they use an older cosmwasm-std version (0.16)

v1.0.3

24 Mar 16:48
Compare
Choose a tag to compare
  • Use crates.io for importing mars-core package
  • Fix an import statement in asset_list.rs

v1.0.2

12 Feb 02:48
Compare
Choose a tag to compare

New features

  • Implement std::str::FromStr trait for the unchecked types (#4)

Bug fixes

  • When converting an AssetInfoUnchecked::Cw20 instance to AssetInfo by invoking check, the contract address is converted to lowercase (#3)