-
Notifications
You must be signed in to change notification settings - Fork 497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test SafeCallback #220
test SafeCallback #220
Conversation
vm.startPrank(caller); | ||
if (caller != address(manager)) vm.expectRevert(SafeCallback.NotPoolManager.selector); | ||
safeCallback.unlockCallback(data); | ||
vm.stopPrank(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is pretty neat from foundry, when fuzzing for addresses the fuzzer includes deployed contracts from setup! 😲
safeCallback = new MockSafeCallback(manager); | ||
} | ||
|
||
function test_unlock(uint256 num) public { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we also just add an assert that the pool manager in SafeCallback is the address we expect/the pool manager address we initialized it with
Related Issue
Closes #183
Description of changes
Added a mock contract and tested that
SafeCallback.unlockCallback()
is only accessible from PoolManager