diff --git a/CHANGELOG.md b/CHANGELOG.md index 1649f9344..60fe5f881 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## Unreleased changes +- Update the `ContractClient` to optionally include a schema. Cloning of the `ContractClient` can get expensive with large schemas as a result. +- Update the `create` method to the `ContractClient` to look up the embedded schema from the chain. +- 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 submodule to incorporate protocol 7 changes (cooldown and baker pool status changes). Specifically, this changes the following public types: diff --git a/src/contract_client.rs b/src/contract_client.rs index ccbae5720..7af1bafbf 100644 --- a/src/contract_client.rs +++ b/src/contract_client.rs @@ -759,7 +759,7 @@ pub fn decode_concordium_std_error(reject_reason: i32) -> Option { /// Extract the error schema for the given `receive_name` and `contract_name` /// from the provided `schema`. -pub fn get_error_schema( +fn get_error_schema( schema: &VersionedModuleSchema, receive_name: OwnedReceiveName, contract_name: &OwnedContractName,