-
Notifications
You must be signed in to change notification settings - Fork 47
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
Balancer pause helper #1211
base: main
Are you sure you want to change the base?
Balancer pause helper #1211
Conversation
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.
First pass; didn't look at the tests yet.
Co-authored-by: EndymionJkb <[email protected]>
Co-authored-by: EndymionJkb <[email protected]>
Co-authored-by: EndymionJkb <[email protected]>
Co-authored-by: EndymionJkb <[email protected]>
Co-authored-by: EndymionJkb <[email protected]>
Co-authored-by: EndymionJkb <[email protected]>
Co-authored-by: EndymionJkb <[email protected]>
…alancer-v3-monorepo into balancer-pause-helper
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.
Shaping up; some naming and style suggestions. Some comments from earlier might have gotten lost.
Co-authored-by: EndymionJkb <[email protected]>
Co-authored-by: EndymionJkb <[email protected]>
Co-authored-by: EndymionJkb <[email protected]>
Co-authored-by: EndymionJkb <[email protected]>
Co-authored-by: EndymionJkb <[email protected]>
Co-authored-by: EndymionJkb <[email protected]>
Co-authored-by: EndymionJkb <[email protected]>
…alancer-v3-monorepo into balancer-pause-helper
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.
LGTM!
Co-authored-by: bohendo <[email protected]> Co-authored-by: João Bruno <[email protected]> Co-authored-by: Jeff Bennett <[email protected]>
Co-authored-by: Juan Ignacio Ubeira <[email protected]> Co-authored-by: EndymionJkb <[email protected]> Co-authored-by: Steffen Schuldenzucker <[email protected]>
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.
Agree it would be good to also define an interface; we usually do for these kinds of contracts. Also had a note on potentially renaming to PausePoolHelper, and some function/comment suggestions
* @param to End index | ||
* @return pools List of pools | ||
*/ | ||
function getPools(uint256 from, uint256 to) public view returns (address[] memory pools) { |
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.
Do we also want a getPoolAt(uint256 index)
?
Could also have a getPools() returns (address[] memory pools)
that just returns them all.
That way it supports 3 ways of using it:
- simple
getPools()
if you know there isn't a pagination issue; - generic iteration: for(i = 0; i < getPoolsCount(); ++i) { address pool = getPoolAt(i); }
- pagination if needed, using getPools(from, to);
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 couldn't come up with a reason why getPoolAt(uint256 index)
might be needed. It seems unnecessary to me.
As for getPools()
, I think that if it can potentially break at some point, it's better not to implement such a function.
# Conflicts: # pkg/pool-gyro/contracts/Gyro2CLPPool.sol # pkg/pool-gyro/test/foundry/utils/Gyro2ClpPoolDeployer.sol
Description
A helper to stop pools. Only pools that are added to the list can be stopped. The Hypernative keeper must be added to Authentication to access the PauseHelper. The PauseHelper must be added to Authentication to access the Vault pausePool.
Type of change
Checklist:
main
, or there's a description of how to mergeIssue Resolution
Closes #1209