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

Create StakingERC721 Module #14

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

deep-quality-dev
Copy link

No description provided.

@@ -0,0 +1,377 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Your module minimum version is 0.8.9, compile errors occur when you use ^0.8.0 here, but if you use hardhat compiler 0.8.0. please update version to ^0.8.9.

Copy link
Author

Choose a reason for hiding this comment

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

We can follow the order of functions as following:
https://docs.soliditylang.org/en/v0.8.17/style-guide.html#order-of-functions


uint256 amount;
uint256 length = tokenIds.length;
for (uint256 i = 0; i < length; ++i) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Calls inside a loop
Severity: Low
Confidence: Medium
Description
Calls inside a loop might lead to a denial-of-service attack.

If one of the destinations has a fallback function that reverts, bad will always revert.

Recommendation
Favor pull over push strategy for external calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants