Skip to content

feat: implement LibNonReentrancy#147

Merged
mudgen merged 3 commits into
Perfect-Abstractions:mainfrom
akronim26:lib/reentrancy-guard
Oct 30, 2025
Merged

feat: implement LibNonReentrancy#147
mudgen merged 3 commits into
Perfect-Abstractions:mainfrom
akronim26:lib/reentrancy-guard

Conversation

@akronim26

@akronim26 akronim26 commented Oct 28, 2025

Copy link
Copy Markdown
Contributor

Summary

Implemented a LIbNonReentrant to prevent reentrancy into functions. It fixes #146

Changes Made

Implemented the functions enter() and exit() that helps in unlocking and locking of a function.

Checklist

Before submitting this PR, please ensure:

  • Code follows the Solidity feature ban - No inheritance, constructors, modifiers, public/private variables, external library functions, using for directives, or selfdestruct

  • Code follows Design Principles - Readable, uses diamond storage, favors composition over inheritance

  • Code matches the codebase style - Consistent formatting, documentation, and patterns (e.g. ERC20Facet.sol)

  • Code is formatted with forge fmt

  • Tests are included - All new functionality has comprehensive tests

  • All tests pass - Run forge test and ensure everything works

  • Documentation updated - If applicable, update relevant documentation

Make sure to follow the CONTRIBUTING.md guidelines.

Additional Notes

@akronim26 akronim26 changed the title Lib/reentrancy guard feat: implement LibNonReentrancy Oct 28, 2025
@github-actions

github-actions Bot commented Oct 28, 2025

Copy link
Copy Markdown
Contributor

Coverage Report

Coverage

Metric Coverage Details
Lines 44% 485/1092 lines
Functions 60% 120/200 functions
Branches 28% 51/179 branches

Last updated: Thu, 30 Oct 2025 11:59:48 GMT for commit 5f840a3

@akronim26

Copy link
Copy Markdown
Contributor Author

Just checking in regarding this PR, is there anything else to add to this PR, or does it look to merge as it is?

@mudgen mudgen self-requested a review October 29, 2025 16:04

@mudgen mudgen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akronim26 Thanks for submitting this! Please review my comments.

Comment thread src/libraries/LibNonReentrancy.sol Outdated
Comment thread src/libraries/LibNonReentrancy.sol Outdated
@akronim26

akronim26 commented Oct 29, 2025

Copy link
Copy Markdown
Contributor Author

@akronim26 Thanks for submitting this! Please review my comments.

@mudgen Thanks for reviewing. I have addressed your comments.

@mudgen

mudgen commented Oct 30, 2025

Copy link
Copy Markdown
Contributor

@akronim26 Very good! I appreciate your work here, thank you.

@mudgen mudgen merged commit abca9fb into Perfect-Abstractions:main Oct 30, 2025
3 checks passed
JackieXu pushed a commit to JackieXu/Compose that referenced this pull request Nov 6, 2025
…ancy-guard

feat: implement LibNonReentrancy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Implement a LibNonReentrancy.sol library

2 participants