Skip to content

Conversation

@SynnekOG
Copy link

@SynnekOG SynnekOG commented Sep 9, 2025

PR Description

Summary

This PR introduces custom Solidity errors to LiquidityManagerV2.sol for more gas-efficient and descriptive error handling.

Changes

  • Added Natspec Header Section for custom errors.
  • Implemented the following errors:
    • LiquidityManager__PoolAlreadyInitialized
    • LiquidityManager__PoolNotInitialized
    • LiquidityManager__InvalidTokenAddress

Motivation

Using custom errors instead of require with strings:

  • Saves gas by avoiding long revert messages.
  • Provides clearer error categorization.
  • Improves maintainability and debugging in development.

Notes

These custom errors will be integrated into core liquidity management logic in upcoming commits to replace generic require checks.

@SynnekOG SynnekOG added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 9, 2025
@Neros0 Neros0 self-requested a review September 9, 2025 16:48
@Neros0 Neros0 merged commit 8e121c8 into main Sep 9, 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.

3 participants