-
Notifications
You must be signed in to change notification settings - Fork 342
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
fix: fix the false comments at DistributionWrapper.sol #1348
Conversation
Signed-off-by: tianqi <58348113+ethisscam@users.noreply.github.com>
WalkthroughThe Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ? TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- contracts/src/testing/DistributionWrapper.sol (2 hunks)
Additional comments: 2
contracts/src/testing/DistributionWrapper.sol (2)
63-64: The updated comment for
setWithdrawAddress
function now accurately describes its purpose as per the PR objective. It clarifies that the caller can set the address to receive delegation rewards.80-81: The updated comment for the
delegate
function correctly describes the new functionality, which aligns with the PR objective and the AI-generated summary.
Signed-off-by: tianqi <58348113+ethisscam@users.noreply.github.com>
it seems the name of Deploy.sol contract is false too. |
@@ -60,8 +60,8 @@ contract DistributionWrapper { | |||
} | |||
|
|||
/** | |||
* @dev Withdraw the rewrads accumulated by the caller(msg.sender). | |||
* @param _withdrawAddress The address of the delegator. | |||
* @dev The caller (msg.sender) can set the address that will receive the deligation rewards. |
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.
delegation**
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.
typo
Signed-off-by: tianqi <58348113+ethisscam@users.noreply.github.com>
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- contracts/src/testing/DistributionWrapper.sol (2 hunks)
Additional comments: 4
contracts/src/testing/DistributionWrapper.sol (4)
63-64: The updated comments for the
setWithdrawAddress
function now correctly describe its purpose, which is to allow the caller to set the address that will receive delegation rewards. This aligns with the PR objective to ensure comments accurately describe the functionality.80-80: The updated comment for the
delegate
function now specifies thatmsg.sender
delegates themsg.value
of tokens to a validator, which aligns with the PR objective to correct inaccuracies in the comments.66-67: The hunk shows that the
setWithdrawAddress
function's logic and control flow remain unchanged; only the comments have been updated. This is consistent with the PR objective, which is to update comments for accuracy.83-83: The hunk shows that the
delegate
function's logic and control flow remain unchanged; only the comments have been updated. This is consistent with the PR objective, which is to update comments for accuracy.
wait a minute. I directly copy the comment from Distribution.sol so there must be typo there too. Will submit later. |
Signed-off-by: tianqi <58348113+ethisscam@users.noreply.github.com>
Sg |
The comments of setWithdrawAddress and delegate functions are wrong. I fix them with comments from Distribution.sol and Staking.sol <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Users can now set a specific address to receive delegation rewards in the `DistributionWrapper` contract. - Enhanced the `delegate` function to allow users to delegate tokens directly to a validator. - **Documentation** - Corrected spelling errors in the documentation comments for the `IDistributionModule` interface. - **Refactor** - Updated function descriptions and comments for clarity in the `DistributionWrapper` contract. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: tianqi <58348113+ethisscam@users.noreply.github.com> (cherry picked from commit bcf046e)
… (#1349) This is an automatic backport of pull request #1348 done by [Mergify](https://mergify.com). --- <details> <summary>Mergify commands and options</summary> <br /> More conditions and actions can be found in the [documentation](https://docs.mergify.com/). You can also trigger Mergify actions by commenting on this pull request: - `@Mergifyio refresh` will re-evaluate the rules - `@Mergifyio rebase` will rebase this PR on its base branch - `@Mergifyio update` will merge the base branch into this PR - `@Mergifyio backport <destination>` will backport this PR on `<destination>` branch Additionally, on Mergify [dashboard](https://dashboard.mergify.com) you can: - look at your merge queues - generate the Mergify configuration with the config editor. Finally, you can contact us on https://mergify.com </details> Co-authored-by: tianqi <58348113+ethisscam@users.noreply.github.com>
The comments of setWithdrawAddress and delegate functions are wrong. I fix them with comments from Distribution.sol and Staking.sol
Summary by CodeRabbit
New Features
DistributionWrapper
contract.delegate
function to allow users to delegate tokens directly to a validator.Documentation
IDistributionModule
interface.Refactor
DistributionWrapper
contract.