openzeppelin-contracts
openzeppelin-contracts copied to clipboard
Introduce ReentrancyGuardLib allowing more agile function accessibility control
Consider having this kind of library, this would allow to have reentrancy guard in different smart contracts and will make it more agile in case of inheriting from multiple contract who use it for different purposes.
PR Checklist
To be done...
- [ ] Tests
- [ ] Documentation
- [ ] Changelog entry
@frangio what do you think?
@Amxx please check out the PR, I believe it is good improvement because it can bring more granular support to this feature.
We used this guardian in one of ERC20 extensions, it’s obvious not a good idea to use singleton guardian for multiple different extensions, so using separate struct makes a lot of sense.