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

new multiclam function with test #27

Merged
merged 5 commits into from
Feb 21, 2024

Conversation

asserules
Copy link
Contributor

No description provided.

Copy link

openzeppelin-code bot commented Feb 20, 2024

new multiclam function with test

Generated at commit: 2822ed17c58c3e75e1d8a6778382b9f1e15fc0b3

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
1
0
0
3
21
25
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
2
56
58

For more details view the full report in OpenZeppelin Code Inspector

for (uint256 i; i < dLength;) {
uint256 dropId = _dropIds[i];

for (uint256 i; i < _dropIds.length;) {
Copy link
Contributor

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

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;) {
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

@@ -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 {
Copy link
Contributor

Choose a reason for hiding this comment

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

nice

@asserules asserules merged commit d99367e into ab723-newRoyalty Feb 21, 2024
1 check passed
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.

2 participants