(err: &str)
| 194 | } |
| 195 | |
| 196 | pub fn parse_from_hex_str(err: &str) -> Result<ParsedError, ParseContractError> { |
| 197 | let bytes = const_hex::decode(err) |
| 198 | .map_err(|e| ParseContractError::ErrorNotHexStr(e.to_string()))?; |
| 199 | Self::parse_from_bytes(bytes.as_slice()) |
| 200 | } |
| 201 | |
| 202 | /// Legacy method for backward compatibility |
| 203 | pub fn parse_from_bytes_legacy(bytes: &[u8]) -> Result<String, ParseContractError> { |