Update the example onlyOwnersGuard to use O(1) owner lookup instead of O(n)
The test for the guard's "happy" path was incorrect because it signed a transaction with user2, which wasn't an owner and the safe instance was still connected to the owner's signer. The transaction failed with GS026, Safe's built-in error for an incorrect owner. The guard actually didn't stop the transaction
This PR:
onlyOwnersGuard
to useO(1)
owner lookup instead ofO(n)
safe
instance was still connected to the owner's signer. The transaction failed withGS026
, Safe's built-in error for an incorrect owner. The guard actually didn't stop the transaction