Skip to content
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

Resolve Certik v3 Reports #437

Merged
merged 4 commits into from
May 5, 2023
Merged

Resolve Certik v3 Reports #437

merged 4 commits into from
May 5, 2023

Conversation

leric7
Copy link
Collaborator

@leric7 leric7 commented May 2, 2023

Description

Certik v3 report is asking to write more comprehensive documentation about bulkPayout function for clarity.

Summary of changes

  • Fix unnecessary usage of SafeMath utils in HMToken.sol.
  • Add meaningful comments to bulkPayout function of Escrow.sol.

How test the changes

Related issues

Keywords for linking issues

Closes #438

Operational checklist

  • All new functionality is covered by tests
  • Any related documentation has been changed or added

@vercel
Copy link

vercel bot commented May 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
escrow-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 5, 2023 1:49pm
faucet-server ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 5, 2023 1:49pm
fortune-exchange-oracle-server ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 5, 2023 1:49pm
5 Ignored Deployments
Name Status Preview Comments Updated (UTC)
fortune-exchange-oracle ⬜️ Ignored (Inspect) May 5, 2023 1:49pm
fortune-job-launcher-client ⬜️ Ignored (Inspect) May 5, 2023 1:49pm
fortune-job-launcher-server ⬜️ Ignored (Inspect) May 5, 2023 1:49pm
fortune-recording-oracle ⬜️ Ignored (Inspect) May 5, 2023 1:49pm
fortune-reputation-oracle ⬜️ Ignored (Inspect) May 5, 2023 1:49pm

Copy link
Contributor

@mrhouzlane mrhouzlane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modifiers comments (optional)

@mrhouzlane
Copy link
Contributor

Besides @dev tag this looks good to me.

packages/core/contracts/Escrow.sol Show resolved Hide resolved
portuu3
portuu3 previously approved these changes May 5, 2023
@vercel vercel bot temporarily deployed to Preview – fortune-exchange-oracle-server May 5, 2023 13:45 Inactive
@leric7 leric7 requested a review from portuu3 May 5, 2023 13:46
@leric7 leric7 merged commit e9be7cc into develop May 5, 2023
leric7 added a commit that referenced this pull request May 5, 2023
* fix unnecessary math utils, and add comments to bulkPayout function

* update doc and add missing require for amount in bulkpayout

* use modifier

* fix test
@@ -182,8 +180,21 @@ contract Escrow is IEscrow, ReentrancyGuard {
}

/**
* @dev Bulk payout workers
* Should fail if any of the transaction is failing.
* @dev Performs bulk payout to multiple workers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should stay @notice : Explain to an end user what this doe
@dev is the tag to : Explain to a developer any extra details
@notice : Performs bulk payout to multiple workers
@dev Escrow needs to be completed ...

I think certik wanted to have a clear comments :

  • solc --devdoc --pretty-json Escrow.sol will return details with comments.

to check [https://coinsbench.com/natspec-the-right-way-to-comment-ethereum-smart-contracts-6762082252d4]

@leric7 leric7 deleted the certik-v3 branch May 9, 2023 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants