-
Notifications
You must be signed in to change notification settings - Fork 361
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
feat(contracts): add REZ
token to Hyperlane AVS
#4786
base: audit-q3-2024
Are you sure you want to change the base?
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## audit-q3-2024 #4786 +/- ##
================================================
Coverage ? 73.74%
================================================
Files ? 100
Lines ? 1436
Branches ? 189
================================================
Hits ? 1059
Misses ? 356
Partials ? 21
|
uint256 totalStrategies = newQuorum.strategies.length; | ||
uint96 baseMultiplier = uint96(10000 / totalStrategies); | ||
|
||
uint96 remainder = 10000 % uint96(totalStrategies); | ||
|
||
for (uint256 i = 0; i < currentQuorum.strategies.length; i++) { | ||
newQuorum.strategies[i] = currentQuorum.strategies[i]; | ||
newQuorum.strategies[i].multiplier = baseMultiplier; | ||
} |
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 really want to apply a prorate quorum for REZ?
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.
Doesn't matter, we'll read it manually for ISM config.
bytes memory encodedCall = abi.encodeWithSelector( | ||
stakeRegistry.updateQuorumConfig.selector, | ||
newQuorum, | ||
new address[](0) |
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.
whats this param?
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.
Update operator weights, if we give an empty array, it doesn't update it.
Description
Drive-by changes
None
Related issues
Backward compatibility
Yes
Testing
Fork test on ethereum mainnet