-
Notifications
You must be signed in to change notification settings - Fork 706
Open
Description
Hi,
I was trying to deploy contracts (Factory pattern) via OpenZeppelin's Clones library. My implementation contract uses Solmate's ReentrancyGuard. When I was trying to execute some methods on the cloned contract that has the nonReentrant modifier, it always reverts with the following error:
Error: VM Exception while processing transaction: reverted with reason string 'REENTRANCY'Possible workaround:
Change the condition from require(locked == 1, "REENTRANCY"); to require(locked < 2, "REENTRANCY"); so that it doesn't affect the gas cost and it also becomes compatible with Clones by default by eliminating the necessity of manually setting the storage slot to 1. Not sure if its the correct solution for the issue^^
Is it worth creating a PR for this?
Please let me know your thoughts.
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels