Releases: Concordium/concordium-rust-smart-contracts
Releases · Concordium/concordium-rust-smart-contracts
Release concordium-std-derive 3.1.0
concordium-std-derive 3.1.0 (2022-08-04)
- Removed derive(Serial) and derive(Deserial) (moved to concordium-contracts-common-derive).
Release concordium-std 3.0.0
concordium-std 3.0.0 (2022-05-17)
- Remove support for v0 smart contracts and add support for v1:
- Replace message passing with synchronous calls:
- Remove the
Actiontype. - Add
HasHost, which has (synchronous) functions for making
transfers,invoke_transfer, and calling other contracts,invoke_contract.
- Remove the
- Enable arbitary, serializable, return values for contract functions.
- Overhaul test infrastructure to support v1 contracts:
- Add ability to mock contract invocations.
- Add a number of helper functions and types to ease testing.
- Change of the contract state works
- Make the state a tree of byte arrays instead of a bytearray.
- Remove the 16kb limit to state size.
- Introduce high-level abstractions over the new state, including the
StateBuilder,StateMap,StateSet, andStateBox. - Add new traits for the low-level state interaction:
HasStateApiandHasStateEntry.
- The Seek trait now works with i32 instead of i64. This is more efficient,
and sufficient for the target architecture.
- Replace message passing with synchronous calls:
- Expose the module of primitive host functions with an unsafe API.
- Add cryptographic primitives:
- Add a new attribute
crypto-primitives(on both init and receive functions), which gives the function an additional parameter,&impl HasCryptoPrimitives. - Add the trait
HasCryptoPrimitiveswith two implementations (host-backed + test). - For the test implementation, the default option uses mocks. But the actual implementations can be used if you enable the feature
crypto-primitives. - Add new feature flag
crypto-primitives.
- Add a new attribute
Release concordium-std-derive 3.0.0
concordium-std-derive 3.0.0 (2022-05-17)
- Add
#[concordium_cfg_not_test]macro, that excludes parts of code for testing. - Add
derive(Deletable)macro for deriving theDeletabletrait. - Add
derive(DeserialWithState)macro. - Change
receiveandinitmacros to support the new V1 contract state and
sync calls.
Release concordium-std 2.0.0
concordium-std 2.0.0 (2022-01-05)
- Update references to token to match token name (CCD).
- Improve claim_eq and claim_ne macros such that:
- Arguments are only evaluated once.
- Type inference works as you would expect.
Release concordium-std-derive 2.0.0
concordium-std-derive 2.0.0 (2022-01-05)
- Update references to token to match token name (CCD).
Release concordium-std 1.0.0
concordium-std 1.0.0 (2021-10-05)
- Add error codes for the new cases in NewContractNameError and NewReceiveNameError:
NewContractNameError::ContainsDotis mapped toi32::MIN + 9NewContractNameError::InvalidCharactersis mapped toi32::MIN + 10NewReceiveNameError::InvalidCharactersis mapped toi32::MIN + 11
- Change error code for when a contract that was not marked as payable received
tokens. The error code is nowi32::MIN + 12, changed from the previous-1. - Export
HashMapandHashSetfromcontract-commonincollectionsmodule. - Added implementation of
SerialCtxforVec. - Export
Boxwhen nostdfeature. - Bump minimum supported Rust version to 1.51.
- Deriving SchemaType supports types with generics.
Release concordium-std-derive 1.0.0
concordium-std-derive 1.0.0 (2021-10-05)
- Validate contract and receive names
- Improve precision of error locations in init and receive_workers
- Improve precision of error locations for
size_length - Unify the
map_size_length,set_size_length, andstring_size_length
intosize_length. - Make
ensure_orderedwork without having to specify a size length.
Release concordium-std 0.5.0
concordium-std 0.5.0 (2021-05-12)
- Make Write implementation for ContractStateTest resize the state automatically
to be consistent with the Write implementation for ContractState. - Use little-endian encoding for sender contract addresses in receive contexts. This
reverts the change in concordium-std 0.4.1. - Change the
receive_nameparameter ofHasActions::sendto useReceiveName
instead ofstr. - Rename
sendtosend_rawinHasActions. - Rename
log_bytestolog_rawinHasLogger. - Add
send, a wrapper forHasActions::send_raw, which automatically
serializesparameter(usingSerial). - Allow init and receive methods to return custom error codes that will be displayed to the user
if a smart-contract invocation fails. - Add i128 and u128 support to serialization and schema.
Release concordium-std-derive 0.5.0
concordium-std-derive 0.5.0 (2021-05-12)
- Add macros for deriving error implementations.
- Make derive macros slightly more hygienic.