MCPcopy Create free account
hub / github.com/base/base / missing_method_detects_empty_revert

Function missing_method_detects_empty_revert

crates/proof/contracts/src/error.rs:118–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

116
117 #[test]
118 fn missing_method_detects_empty_revert() {
119 let source =
120 AlloyContractError::TransportError(alloy_transport::TransportError::ErrorResp(
121 serde_json::from_str(r#"{"code":3,"message":"execution reverted","data":"0x"}"#)
122 .unwrap(),
123 ));
124
125 let error = ContractError::call("probe failed", source);
126 assert!(error.is_missing_method());
127 assert!(!error.is_execution_revert());
128 }
129
130 #[test]
131 fn missing_method_rejects_nonempty_revert() {

Callers

nothing calls this directly

Calls 2

TransportErrorEnum · 0.85
callFunction · 0.85

Tested by

no test coverage detected