propagate trace parse error in extract_sload_slots#4515
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors extract_sload_slots to return a Result instead of a vector, replacing the previous unwrap_or_default fallback with explicit error propagation and warning logs when trace parsing fails. Callers in approval/mod.rs and balance/mod.rs have been updated to propagate these errors. No critical issues found.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
This pull request has been marked as stale because it has been inactive a while. Please update this pull request or it will be automatically closed. |
Description
extract_sload_slotspreviously calledunwrap_or_default()on the gethtrace parse, silently treating non-default frame variants as empty traces.
This caused parse failures to surface as
DetectionError::NotFoundratherthan a distinct simulation error, making root cause analysis harder.
Changes
extract_sload_slotsreturn type toResult<Vec<(Address, B256)>, SimulationError>unwrap_or_default()with explicittry_into_default_frame()error propagationapprovalandbalancedetectors via?balance: movetokento a tracing field