-
Notifications
You must be signed in to change notification settings - Fork 0
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
Pauser and renounceAdmin Drips tests #18
Conversation
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
672ce0f
to
b2af40e
Compare
test/RadworksDripsGovernance.t.sol
Outdated
_upgradeToBravoGovernor(); | ||
} | ||
|
||
function _proposePassAndExecuteDripsProposal(string memory _description, bytes memory _callData) |
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.
Is this method necessary? It seems like a little less generic version of _queueAndVoteAndExecuteProposalWithBravoGovernor
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.
Also the ProposalBuilder
could help with the array boilerplate neeed to setup proposals.
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.
Done: 0d211b9
b2af40e
to
354cfbc
Compare
354cfbc
to
bf76141
Compare
bf76141
to
fe8a3aa
Compare
4b6aa36
to
3e82389
Compare
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.
looks good, mostly nits.
just double checking, is the granting/revoking of pauser (and then the admin renouncement) the only functionality we need to test? if so, looks great.
test/helpers/ProposalTest.sol
Outdated
@@ -57,25 +59,29 @@ abstract contract ProposalTest is RadworksGovernorTest { | |||
// a cheat for fuzzing addresses that are payable only | |||
// Why is this no longer in standard cheats? JJF | |||
// see https://github.com/foundry-rs/foundry/issues/3631 | |||
function assumePayable(address addr) internal virtual { | |||
(bool success,) = payable(addr).call{value: 0}(""); | |||
function assumePayable(address _addr) internal virtual { |
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.
nit: consistency may suggest an underscore prefix
test/helpers/ProposalTest.sol
Outdated
vm.assume(success); | ||
} | ||
|
||
function _assumeReceiver(address _receiver) internal { | ||
assumePayable(_receiver); | ||
function assummeNotTimelock(address _addr) internal virtual { |
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.
nit: consistency may suggest an underscore prefix. Also, assume
not assumme
There is a separate PR for testing the changing of admin as well as upgrade of the Drips protocol |
Added a commit that adds .DS_Store to .gitignore file for smoother MacOS git operations bf585a1 |
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.
i'm scraping the bottom of the barrel on my nits now. think this one's ready for merge
|
||
function testFuzz_grantedPauserCanPauseAndUnPause(address _newPauser) public { | ||
_assumeNotTimelock(_newPauser); | ||
|
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.
nit: inconsistent newline
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.
Fixed in a PR farther up the stack, to avoid rebases related to test filename changes: 01e2252
This PR contains test for testing manipulation (via governance) of the "pauser" and "renounceAdmin" related functions of the Drips protocol.
Additional PR(s) will test the ability (via governance) to change the "admin" of the Drips protocol.