-
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
Initial tests and architecture #5
Conversation
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
} | ||
} | ||
|
||
abstract contract Propose is ProposalTest { |
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 can be handled in a separate pr, but these tests seems to be testing the Alpha Governor rather than the RadworksGovernor. Maybe, reorganizing them could make this distinction clearer.
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.
Created an issue for this: #6
a0845f0
to
60195ce
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.
Looking good John my only feedback are some solidity version bumps
script/Deploy.s.sol
Outdated
|
||
pragma solidity 0.8.20; | ||
// SPDX-License-Identifier: AGPL-3.0-only | ||
pragma solidity ^0.8.18; |
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.
It would be good to keep the minimum solidity version the same for these deploy files. So, ^0.8.20
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 3b3a686
script/Propose.s.sol
Outdated
@@ -0,0 +1,54 @@ | |||
// SPDX-License-Identifier: AGPL-3.0-only | |||
pragma solidity ^0.8.18; |
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.
version bump
test/Constants.sol
Outdated
@@ -0,0 +1,22 @@ | |||
// SPDX-License-Identifier: AGPL-3.0-only | |||
pragma solidity ^0.8.18; |
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.
Version bump
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 3b3a686
test/RadworksGovernor.t.sol
Outdated
@@ -0,0 +1,176 @@ | |||
// SPDX-License-Identifier: AGPL-3.0-only | |||
pragma solidity ^0.8.18; |
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.
Version bump
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 3b3a686
test/helpers/Proposal.sol
Outdated
@@ -0,0 +1,26 @@ | |||
// SPDX-License-Identifier: AGPL-3.0-only | |||
pragma solidity ^0.8.18; |
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.
Version bump
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 3b3a686
test/helpers/ProposalTest.sol
Outdated
@@ -0,0 +1,336 @@ | |||
// SPDX-License-Identifier: AGPL-3.0-only | |||
pragma solidity ^0.8.18; |
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.
Version bump
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 3b3a686
@@ -0,0 +1,70 @@ | |||
// SPDX-License-Identifier: AGPL-3.0-only | |||
pragma solidity ^0.8.18; |
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.
Version bump
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 3b3a686
@@ -0,0 +1,14 @@ | |||
// SPDX-License-Identifier: AGPL-3.0-only | |||
pragma solidity ^0.8.17; |
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.
Version bump
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 3b3a686
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.
hey @jferas, thank you. Got a few nits for you.
script/Propose.s.sol
Outdated
import {RadworksGovernor} from "src/RadworksGovernor.sol"; | ||
import {IGovernorAlpha} from "src/interfaces/IGovernorAlpha.sol"; | ||
|
||
contract Propose is Script { |
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.
It would be nice to include some natspec on what purpose this script serves. It seems though that it'll be used to make 1 proposal specifically: the upgrade proposal. is that true? Further nitting, perhaps we should change the name to something like ProposeNewGovernor.s.sol
. anyway, this shouldn't block merge, so i'll track in an issue, and from there we could ignore or PR.
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.
Added natspec: ce8bc2a
vm.assume(success); | ||
} | ||
|
||
function _assumeReceiver(address _receiver) internal { |
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.
love the comments in this section. it may be more explicit to name this method _assumeValidReceiver
, but current works too
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 was the name used in the PoolTogether code.. keeping for consistency with that.
assumeNoPrecompiles(_receiver); | ||
} | ||
|
||
function _randomERC20Token(uint256 _seed) internal pure returns (IERC20 _token) { |
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.
another name that i think is fine as-is, yet here i am trying to optimize. perhaps _selectERC20Token
expresses more the fact we're pulling these from a list.
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 was the name used in the PoolTogether code.. keeping for consistency with that.
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.
did a review of just the changes made and they look good, so lgtm
@jferas i think it's worth reconsidering the "consistency with prior codebase" idea if we have a better name for something, but it's not merge blocking! Think this one's ready for merge.
Initial tests and test architecture.