-
Notifications
You must be signed in to change notification settings - Fork 105
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
Bump hardhat to 2.20 #1254
base: develop
Are you sure you want to change the base?
Bump hardhat to 2.20 #1254
Conversation
905c47b
to
6181c43
Compare
529bfe9
to
5271c41
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.
Make arguments to getMetatransactionNonce consistent among contracts
If this is the goal, then I believe you have missed:
- ColonyNetworkAuction
- IBasicMetaTransaction
- CoinMachine
- FundingQueue
- TokenSupplier
- Whitelist
- VotingReputationStorage
- VotingReputationMisaligned
- TokenLocking
Did you not touch incrementMetatransactionNonce
because it's internal, or some other reason?
Fun to see a refactor that reduces duplication to the extent the coverage thresholds fail so more tests have to be written, that's good to see 😄
selfdestruct(colonyNetwork); | ||
// Send ether to the metaColony | ||
// slither-disable-next-line arbitrary-send-eth | ||
payable(metaColonyAddress).transfer(address(this).balance); |
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.
We should test that this is done (for all places where we do it, not just here). A good rule of thumb is that if you can remove a line of code and the tests still pass, you need to write more tests.
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 suppose. I would argue that we never tested the ether-returning function for selfdestruct
, and so shouldn't need to test this now. But I can add an ether transfer check.
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.
You're right, but we did test that it self-destructed (and then trusted that the opcode did the rest of what it was meant to do). We could not include this functionality, but I think that's a much worse outcome.
@@ -34,7 +34,7 @@ abstract contract ColonyExtension is DSAuth, DSMath, PatriciaTreeProofs, Multica | |||
|
|||
event ExtensionInitialised(); | |||
|
|||
address resolver; // Align storage with EtherRouter | |||
address public resolver; // Align storage with EtherRouter |
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 am sure I don't need to remind you of my distaste for changing code in order to accommodate the tests! This isn't necessary, as we can just instantiate a contract as an EtherRouter like we do in other tests:
colonyNetwork/test/contracts-network/colony-expenditure.js
Lines 337 to 338 in 5fdb870
const colonyNetworkAsEtherRouter = await EtherRouter.at(colonyNetwork.address); | |
const latestResolver = await colonyNetworkAsEtherRouter.resolver(); |
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 tried that earlier and it did not work, for the reason that extensions instantiated directly (like CoinMachine.new
) don't in fact inherit from EtherRouter
. Alternatives would be to add a getResolver
view function in ColonyExtension.sol
or to access the storage slot directly, which wouldn't be my preference.
63a8b23
to
1c3d108
Compare
Thinking about this more, I'm not sure if there's much benefit to including
I say this because we already have a If anything, the |
d22629a
to
6a868d1
Compare
53eae80
to
867a618
Compare
867a618
to
913f7ad
Compare
Main
cancun
hardforkselfdestruct
and update uninstall behavior for extensionsColonyExtension.sol
base class and remove boilerplate from extension contractsColonyExtension.resolver
public to facilitate testing of new uninstall behaviorMisc
reputation-test-non-gnosis
Circle job to reduce total build timesgetMetatransactionNonce
consistent among affected contracts