Skip to content

Conversation

@Neros0
Copy link
Contributor

@Neros0 Neros0 commented Oct 4, 2025

Description

This PR enhances observability and debugging capabilities within TestArbitrage by introducing a new TradeFailed event. This complements existing trade lifecycle events (TradeInitiated, TradeCompleted) by explicitly surfacing failure scenarios with structured context.


✅ What’s New

🛑 TradeFailed Event Added

A fully Natspec-documented event that captures granular failure insights:

/// @notice Emitted when a trade fails with detailed error information
/// @param tradeId Unique identifier for this trade
/// @param reason Error message describing the failure
/// @param step Which step of the process failed (1=first swap, 2=second swap, 3=repayment)
/// @param gasUsed Gas consumed before failure
event TradeFailed(uint256 indexed tradeId, string reason, uint8 step, uint256 gasUsed);

@Neros0 Neros0 self-assigned this Oct 4, 2025
@Neros0 Neros0 added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 4, 2025
@Neros0 Neros0 merged commit f45faa6 into main Oct 4, 2025
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants