(hex_str: &str)
| 219 | } |
| 220 | |
| 221 | fn hex_decode(hex_str: &str) -> Result<Vec<u8>> { |
| 222 | hex::decode(hex_str.trim_start_matches("0x")).context("Invalid hex string") |
| 223 | } |
| 224 | |
| 225 | fn cmd_extend(extend_args: ExtendArgs) -> Result<()> { |
| 226 | let payload = hex_decode(&extend_args.payload).context("Failed to decode payload")?; |