The mintProfile function in the smart contract has a variable shadowing issue where the name parameter conflicts with the name() function inherited from ERC721. This can cause unintended behavior and make the contract difficult to maintain.
The ERC721
contract has a function name()
that returns the token collection's name.
The mintProfile
function introduces a parameter called name
, which shadows the inherited name()
function.
Because of this, any reference to name
within mintProfile
will point to the function parameter instead of the intended ERC721.name()
function.
Potential Misuse of name()
Any calls to name()
within mintProfile
or related functions may not behave as expected.
Confusion in Code Maintenance
Developers might expect name
to refer to ERC721.name()
, leading to debugging challenges and potential errors.
Unintended Behavior in Inheritance
If other functions rely on ERC721.name()
, they might not work correctly due to the shadowing.
Solidity Visual Developer
Rename the name
to _name
parameter in mintProfile
to avoid conflicts.
You have to point a real root-cause leading to a bug. "If, may, could, unexpected behavior, incoherent" are not describing a real concrete bug. Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.