Releases: Concordium/concordium-rust-smart-contracts
Releases · Concordium/concordium-rust-smart-contracts
concordium-cis2 4.0.0
Summary
Bump concordium-std to version 7 and internal restructuring.
concordium-std 6.2.0
Summary
This release adds helpers and makes the crate work with recent nightly versions.
Changes
- Add
write_root
helper function to write the root of the state trie. This is
useful in migrations when upgrading smart contracts. - Bump Rust edition to
2021
. - Remove the use of
alloc_error_handler
since the feature is no longer
available in recent nightly builds of the compiler. This can increase the
smart contract size slightly. - Set minimum Rust version to 1.60.
concordium-std-derive 5.2.0
Summary
- Fix
derive(SchemaType)
macro so that it allows theconcordium
attribute. - Bump Rust edition to
2021
.
concordium-cis2 3.1.0
Summary
This is a minor release adding quality of life improvements.
Changes
- Derive
PartialEq
andEq
for theMetadataUrl
from the CIS2 library. - Update
concordium-std
dependency to 6.2.
Release concordium-std 6.1.1
This update contains only internal restructuring. As a result it bumps contracts-common dependency to 5.3.1
Release concordium-std 6.1.0
This is a minor release that exposes additional quality of life helpers, and some additional functionality that was only available in concordium-std
until now.
There are some minor breaking API changes that should affect very few users. The changelog below lists them.
Changelog
- Add
Display
implementation forOwnedParameter
andParameter
, which uses
hex encoding. - Replace
From<Vec<u8>>
instance forOwnedParameter
/Parameter
with aTryFrom
,
which ensures a valid length, and the unchecked methodnew_unchecked
.- Migrate from
From
/Into
: Usenew_unchecked
instead (if known to be
valid length).
- Migrate from
- Make inner field in
OwnedParameter
/Parameter
private, but add aFrom
implementation for getting the raw bytes.- Migrate from
parameter.0
: useparameter.into()
instead (for both of the affected
types).
- Migrate from
- For
ModuleReference
, replaceAsRef<[u8;32]>
withAsRef<[u8]>
and make
innerbytes
field public.- The change was necessary for internal reasons.
- Migrate from
module_reference.as_ref()
: use&module_reference.bytes
instead.
- Replace
OwnedParameter::new
withOwnedParameter::from_serial
, which also
ensures a valid length.- Migrate from
new(x)
: Usefrom_serial(x).unwrap()
(if known to be valid length).
- Migrate from
- Add an
empty
method for bothOwnedParameter
andParameter
. - Implement
Default
forParameter
. - Add
StateBuilder::new_state_container
method which allows contract developers to use
their own container types atop blockchain storage - Move the type
AccountBalance
toconcordium-contracts-common
.
Release concordium-std 6.0.1
Release concordium-std 6.0.0
concordium-std 6.0.0 (2023-02-08)
wee_alloc
is no
longer set as the allocator inconcordium-std
but can be enabled via the
featurewee_alloc
. The consequence is that unlessstd
feature is
enabled eitherwee_alloc
must be enabled, or another global allocator
must be set in the smart contract. Instd
builds, unlesswee_alloc
feature is used, the allocator provided by the Rust standard library is used.
Release concordium-cis2 3.0.0
concordium-cis2 3.0.0 (2023-02-08)
- Update
concordium-std
to version 6.
No other changes in functionality.
Release concordium-std 5.1.0
concordium-std 5.1.0 (2022-12-14)
- Add a new primitive
get_random
for generating random numbers in Wasm code testing;get_random
can be used in tests only, not available for smart contracts on the chain. - Fix a linking issue when compiling contracts to native code on Windows and OSX.