Releases: Concordium/concordium-rust-sdk
concordium-rust-sdk 5.0.0
Summary
Support the upcoming release of Concordium node 7.x and Concordium Protocol Version 7, which changes the behavior of cooldown of stake for validators and delegators and uses a new smart contract wasm module compilation with better performance.
Changes
- Update the
ContractClient
to optionally include a schema. - Update the
create
method to theContractClient
to look up the embedded schema from the chain. - Add the
new_with_schema
method to theContractClient
to create aContractClient
with a given schema. - Add
dry_run_update_with_reject_reason_info
anddry_run_update_raw_with_reject_reason_info
methods to theContractClient
. They are like thedry_run_update
anddry_run_update_raw
methods but in case of a reject, decode the reject reason into a human-readable error. - Add
decode_concordium_std_error
anddecode_smart_contract_revert
functions to facilitate reject reason decoding of failed transactions. - Add
cis3
module andCis3Contract
for interacting with CIS3 contracts. - Updated the
concordium-base
to version 6 to incorporate protocol 7 changes (cooldown and baker pool status changes).
Specifically, this changes the following public types:AccountInfo
: Now has two new fields,cooldown: Vec<Cooldown>
andavailable_balance: Amount
.
Thecooldown
field specifies the stake currently in cooldown for the account.
Theavailable_balance
field denotes the total amount available to the account for transfers.BakerPoolStatus
: Thebaker_equity_capital
,delegated_capital
,delegated_capital_cap
,pool_info
andbaker_stake_pending_change
fields are moved into a new type,ActiveBakerPoolStatus
. A new field is added
toBakerPoolStatus
which includes these fields, namelyactive_baker_pool_status: Option<ActiveBakerPoolStatus>
.
This field isSome(..)
iffpool_info
is included in the node'sPoolInfoResponse
.
DelegationEvent
adds aBakerRemoved
case, asConfigureDelegation
can replace a
baker with delegation from protocol 7.BakerEvent
adds aDelegationRemove
case, asConfigureBaker
can replace a delegator
with a baker from protocol 7.- Removed the
postgres
feature and all associated functionality. The intent is for this to be part of the transaction logger instead.
concordium-rust-sdk 4.3.0
Summary
This is a maintenance release that mainly updates dependencies.
Changes
- Bump MSRV to 1.73
- Update dependencies. In particular
concordium-base
andconcordium-smart-contract-engine
are bumped to version 5.
concordium-rust-sdk 4.2.0
Summary
This release adds more helper functionality for writing indexers, allowing the user to focus on just the data manipulations.
Due to changes in transitive dependencies the minimum supported rust version is bumped to 1.72.
Changes
- Add a
ProcessorConfig
struct dual to theTraverseConfig
to help in writing
indexers. - Bump MSRV to 1.72
concordium-rust-sdk 4.1.1
Summary
Fix incorrect calculation of the micro_ccd_per_nrg helper.
concordium-rust-sdk 4.1.0
Summary
This release adds helpers to streamline deployment and initialization of smart contracts.
Changes
- Add
ContractInitBuilder
for more ergonomic initialization of new smart
contract instances with automatic NRG cost estimation. - Add
ModuleDeployBuilder
for more ergonomic deployment of contract modules
with automatic dry run and validation.
concordium-rust-sdk 4.0.0
Summary
This is a major release that updates some of the core dependencies, removes the V1 API, and adds some more convenience features in particular for updating smart contracts.
The key dependencies that are likely to affect users are
rand
is updated from0.7
to0.8
tonic
is updated from0.8
to0.10
Detailed list of changes follows.
Changes
- Add a
From<&AccountInfo>
instance forAccountAccessStructure
to ease verification of signatures usingGetAccountInfo
response. - Add a
get_finalized_block_item
method to theClient
to retrieve a finalized block item from the node. - Remove the V1 API.
- Add
Display
implementation toBlockIdentifier
. - Add
Display
andFromStr
implementations forAccountIdentifier
. - Rename
find_first_finalized_block_no_later_than
into
find_first_finalized_block_no_earlier_than
since that correctly reflects its
semantics with respect to time and is much clearer. - Make the
Client::new
method slightly more general by accepting a
TryInto<Endpoint>
. This allows passing URLs as strings directly. - Add a new
indexer
module that provides boilerplate for robustly traversing
the chain. - Support protocol version 7.
- Support for smart contract debugging when running locally.
- Remove JSON serialization support of BlockSummary.
- Add an additional
indexer
to index all transaction outcomes and special events. - Make the
energy
field ofContractContext
optional since it is no longer
required by the node. - Add
dry_run_update
anddry_run_update_raw
methods to theContractClient
to simulate smart contract updates. The return values of these can be used to
immediately sign and send a transaction. - Update
rand
dependency to0.8
. - Update
tonic
to 0.10.
concordium-rust-sdk 3.2.0
Summary of changes
- The SDK now requires a
rustc
version at least 1.67 (Before it required version 1.66). - Add a
contract_update
helper analogous tocontract_init
to extract an
execution tree from a smart contract update transaction. - Add a
ccd_cost
helper toChainParameters
to convert NRG cost to CCD. - Add support for
DryRun
. Requires a node version at least 6.2.
concordium-rust-sdk 3.1.0
Summary
Add support for node version 6.1 API and a number of utility functions.
Changes
- Add a
commission_rates
field toCurrentPaydayBakerPoolStatus
which yields the commission rates
of the baker for the reward period. Requires a node version at least 6.1. - Add support for
GetWinningBakersEpoch
. Requires a node version at least 6.1. - Add Support for
GetFirstBlockEpoch
. Requires a node version at least 6.1. - Add support for
GetBakersRewardPeriod
endpoint. Requires a node version at least 6.1. - Add Support for
GetBakerEarliestWinTime
endpoint. Requires a node version at least 6.1. - Add support for
GetBlockCertificates
. Requires a node version at least 6.1. - Add
make_update
andmake_update_raw
methods to theContractClient
. They
are likeupdate
andupdate_raw
but instead of sending a transaction they
only construct it and return it. - Add
make_register_credential
,make_revoke_credential_as_issuer
and
make_revoke_credential_other
to the CIS4 client. These are like the methods
without themake_
prefix, except that they only construct the transaction,
they do not send it. - Add
make_transfer
andmake_update_operator
functions to the CIS2 client.
These are like the methods without themake_
, except that they only
construct the transaction. - Update minimum supported rust version to
1.66
.
concordium-rust-sdk 3.0.1
Summary
Update concordium-base dependency to at least 3.0.1.
concordium-rust-sdk 3.0.0
Summary
This major release adds support for protocol 6, and deprecates the V1 GRPC client.
The V1 client will be removed in a release in the beginning of November.
Changes
- The SDK requires node version 6 or later.
- Support relative and absolute block height as the block identifier in block queries.
- Add field
protocol_version
toBlockInfo
which is the protocol version of the queried block. - Extend enum
PendingUpdateEffect
with variants for protocol version 6. - Introduce
ChainParametersV2
struct for protocol version 6. - Introduce generic
gas_reward
inRewardParametersSkeleton
for supporting different versions of GASRewards. - Add
find_account_creation
helper to find a block where the account was
created. - Deprecate
find_earliest_finalized
and replace it with
find_at_lowest_height
that avoids an extra call to the node. This is making
use of the new API. - Re-export
http::Scheme
fromhttp
crate since it is often needed when
configuring endpoints. - Add a new
ContractClient
that supports operations on smart contract
instances such as queries and updates. - Add a
Cis4Contract
for interacting with Cis4 contracts. - Add a new
web3id
module that contains types and functionality for
construcing Web3ID credentials and verifying Web3ID proofs. - Deprecate the client for V1 of the node's API.