diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a7f8776b..41f25c56e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added +- Improved error message for Strings as CLI arguments - [#1492](https://github.com/paritytech/cargo-contract/pull/1492) - Add a user-friendly view of contract storage data in the form of a table - [#1414](https://github.com/paritytech/cargo-contract/pull/1414) - Add `rpc` command - [#1458](https://github.com/paritytech/cargo-contract/pull/1458) diff --git a/crates/transcode/src/encode.rs b/crates/transcode/src/encode.rs index 32bbf4cec..709e47d09 100644 --- a/crates/transcode/src/encode.rs +++ b/crates/transcode/src/encode.rs @@ -284,7 +284,9 @@ impl<'a> Encoder<'a> { s.encode_to(output); Ok(()) } else { - Err(anyhow::anyhow!("Expected a String value")) + Err(anyhow::anyhow!("Expected a String value\n\ + On the command-line, String values need to be wrapped in escaped quotes: \ + \\\"…\\\".")) } } TypeDefPrimitive::U8 => encode_uint::(value, "u8", output),