Skip to content

Releases: Concordium/concordium-rust-sdk

concordium-rust-sdk 5.0.0

09 Sep 12:18
1e98372
Compare
Choose a tag to compare

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 the ContractClient to look up the embedded schema from the chain.
  • Add the new_with_schema method to the ContractClient to create a ContractClient with a given schema.
  • Add dry_run_update_with_reject_reason_info and dry_run_update_raw_with_reject_reason_info methods to the ContractClient. They are like the dry_run_update and dry_run_update_raw methods but in case of a reject, decode the reject reason into a human-readable error.
  • Add decode_concordium_std_error and decode_smart_contract_revert functions to facilitate reject reason decoding of failed transactions.
  • Add cis3 module and Cis3Contract 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> and available_balance: Amount.
      The cooldown field specifies the stake currently in cooldown for the account.
      The available_balance field denotes the total amount available to the account for transfers.
    • BakerPoolStatus: The baker_equity_capital, delegated_capital, delegated_capital_cap, pool_info
      and baker_stake_pending_change fields are moved into a new type, ActiveBakerPoolStatus. A new field is added
      to BakerPoolStatus which includes these fields, namely active_baker_pool_status: Option<ActiveBakerPoolStatus>.
      This field is Some(..) iff pool_info is included in the node's PoolInfoResponse.
  • DelegationEvent adds a BakerRemoved case, as ConfigureDelegation can replace a
    baker with delegation from protocol 7.
  • BakerEvent adds a DelegationRemove case, as ConfigureBaker 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

25 Mar 09:34
Compare
Choose a tag to compare

Summary

This is a maintenance release that mainly updates dependencies.

Changes

  • Bump MSRV to 1.73
  • Update dependencies. In particular concordium-base and concordium-smart-contract-engine are bumped to version 5.

concordium-rust-sdk 4.2.0

15 Feb 10:07
Compare
Choose a tag to compare

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 the TraverseConfig to help in writing
    indexers.
  • Bump MSRV to 1.72

concordium-rust-sdk 4.1.1

08 Feb 13:55
Compare
Choose a tag to compare

Summary

Fix incorrect calculation of the micro_ccd_per_nrg helper.

concordium-rust-sdk 4.1.0

07 Feb 08:17
Compare
Choose a tag to compare

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

22 Jan 11:59
Compare
Choose a tag to compare

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 from 0.7 to 0.8
  • tonic is updated from 0.8 to 0.10

Detailed list of changes follows.

Changes

  • Add a From<&AccountInfo> instance for AccountAccessStructure to ease verification of signatures using GetAccountInfo response.
  • Add a get_finalized_block_item method to the Client to retrieve a finalized block item from the node.
  • Remove the V1 API.
  • Add Display implementation to BlockIdentifier.
  • Add Display and FromStr implementations for AccountIdentifier.
  • 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 of ContractContext optional since it is no longer
    required by the node.
  • Add dry_run_update and dry_run_update_raw methods to the ContractClient
    to simulate smart contract updates. The return values of these can be used to
    immediately sign and send a transaction.
  • Update rand dependency to 0.8.
  • Update tonic to 0.10.

concordium-rust-sdk 3.2.0

23 Nov 07:55
Compare
Choose a tag to compare

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 to contract_init to extract an
    execution tree from a smart contract update transaction.
  • Add a ccd_cost helper to ChainParameters to convert NRG cost to CCD.
  • Add support for DryRun. Requires a node version at least 6.2.

concordium-rust-sdk 3.1.0

18 Oct 13:55
Compare
Choose a tag to compare

Summary

Add support for node version 6.1 API and a number of utility functions.

Changes

  • Add a commission_rates field to CurrentPaydayBakerPoolStatus 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 and make_update_raw methods to the ContractClient. They
    are like update and update_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 the make_ prefix, except that they only construct the transaction,
    they do not send it.
  • Add make_transfer and make_update_operator functions to the CIS2 client.
    These are like the methods without the make_, except that they only
    construct the transaction.
  • Update minimum supported rust version to 1.66.

concordium-rust-sdk 3.0.1

28 Aug 09:34
Compare
Choose a tag to compare

Summary

Update concordium-base dependency to at least 3.0.1.

concordium-rust-sdk 3.0.0

21 Aug 10:18
Compare
Choose a tag to compare

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 to BlockInfo 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 in RewardParametersSkeleton 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 from http 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.