openzeppelin-contracts icon indicating copy to clipboard operation
openzeppelin-contracts copied to clipboard

Introduce ReentrancyGuardLib allowing more agile function accessibility control

Open k06a opened this issue 3 years ago • 1 comments

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

k06a avatar Dec 02 '22 09:12 k06a

@frangio what do you think?

k06a avatar Dec 25 '22 08:12 k06a

@Amxx please check out the PR, I believe it is good improvement because it can bring more granular support to this feature.

k06a avatar Jul 07 '23 09:07 k06a

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.

k06a avatar Jul 07 '23 18:07 k06a