-
Notifications
You must be signed in to change notification settings - Fork 0
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
new multiclam function with test #27
new multiclam function with test #27
Conversation
new multiclam function with test
🚨 Report Summary
For more details view the full report in OpenZeppelin Code Inspector |
src/royalty/ABClaim.sol
Outdated
for (uint256 i; i < dLength;) { | ||
uint256 dropId = _dropIds[i]; | ||
|
||
for (uint256 i; i < _dropIds.length;) { |
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.
have you tried to store _dropIds.length in a var ?
does it give you stack too deep ?
if not, it could gas optimize a little
src/royalty/ABClaim.sol
Outdated
for (uint256 j; j < _tokenIds[i].length;) { | ||
// Enforce token ownership | ||
if (ownerOf[dropId][_tokenIds[i][j]] != _user) revert ABErrors.NOT_TOKEN_OWNER(); | ||
for (uint256 j; j < tokenIds.length;) { |
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.
same here
test/royalty/ABClaim.t.sol
Outdated
@@ -940,6 +940,59 @@ contract ABClaimTest is Test { | |||
assertEq(abClaim.getClaimableAmount(dropIds, uTokenIds), 0); | |||
} | |||
|
|||
function test_claim_multiScaleBaseDrop(address _sender, address u1, uint256 scaleAmount) public { |
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.
nice
No description provided.