-
Notifications
You must be signed in to change notification settings - Fork 4
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
base: main
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,377 @@ | |||
// SPDX-License-Identifier: UNLICENSED | |||
pragma solidity ^0.8.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.
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
.
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.
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) { |
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.
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.
No description provided.