Project

One World
NFTDeFi
15,000 USDC
View results
Submission Details
Severity: low
Invalid

Unnecessary inheritance in OWPIdentity

Summary

OWPIdentity unnecessary implements ERC1155Burnable.

Vulnerability Details

ERC1155Burnable have two functions - burn() and burnBatch() which are also overridden in OWPIdentity and none of the functionalities from ERC1155Burnable are actually used as the overridden functions directly use _burn() and _burnBatch from inherited ERC1155 contract.

contract OWPIdentity is ERC1155, AccessControl, ERC1155Burnable, ERC1155Supply, NativeMetaTransaction

abstract contract ERC1155Burnable is ERC1155 {
function burn(address account, uint256 id, uint256 value) public virtual {
if (account != _msgSender() && !isApprovedForAll(account, _msgSender())) {
revert ERC1155MissingApprovalForAll(_msgSender(), account);
}
_burn(account, id, value);
}
function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual {
if (account != _msgSender() && !isApprovedForAll(account, _msgSender())) {
revert ERC1155MissingApprovalForAll(_msgSender(), account);
}
_burnBatch(account, ids, values);
}
}

Impact

Unnecessary inheritance

Tools Used

Manual review.

Recommendations

ERC1155Burnable can be removed from inheritance tree.

Updates

Lead Judging Commences

0xbrivan2 Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement
0xbrivan2 Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.