| 268 | |
| 269 | #[test] |
| 270 | fn test_parse_error_not_found() { |
| 271 | // a random error selector that definitely doesn't exist |
| 272 | let err_bytes = const_hex::decode("ffffffff").unwrap(); |
| 273 | |
| 274 | let result = ContractErrorParser::parse_from_bytes(err_bytes.as_ref()); |
| 275 | assert!(result.is_err()); |
| 276 | if let Err(ParseContractError::ErrorNotFound { selector }) = result { |
| 277 | assert_eq!(selector, "ffffffff"); |
| 278 | } else { |
| 279 | panic!("Expected ErrorNotFound error"); |
| 280 | } |
| 281 | } |
| 282 | |
| 283 | #[test] |
| 284 | fn test_legacy_compatibility() { |