-
Notifications
You must be signed in to change notification settings - Fork 75
feat: Add _distributeRelayerRefund unit tests #401
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
Conversation
| address[] memory refundAddresses, | ||
| uint256[] memory refundAmounts | ||
| ) internal view { | ||
| if (_chainId != chainId()) revert InvalidChainId(); |
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 moved these two checks so that they're closer to the logic that uses the variables checked
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.
+1 good for readability
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!
| address[] memory refundAddresses, | ||
| uint256[] memory refundAmounts | ||
| ) internal view { | ||
| if (_chainId != chainId()) revert InvalidChainId(); |
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.
+1 good for readability
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
Also refactors the SpokePool.sol code so that the validation of merkle leaf properties are done as close to their usage within the logic as possible