The Swan.sol
contract redundantly imports OwnableUpgradeable
, even though it already inherits this functionality through SwanManager
. This redundancy may create initialization conflicts or ambiguity within the contract. Removing the import from Swan.sol
resolves this issue, streamlining the contract’s structure and reducing the risk of unexpected behavior related to ownership management.
In the Swan.sol
contract, OwnableUpgradeable
from OpenZeppelin is imported redundantly despite already being inherited by SwanManager
. Since Swan.sol
inherits from SwanManager
, it inherits OwnableUpgradeable
indirectly. This duplicate import could introduce potential conflicts or ambiguity in the contract’s ownership management, especially if initialization is attempted from both SwanManager
and Swan.sol
.
While the import does not lead to an immediate security vulnerability, it introduces unnecessary complexity in dependency resolution and contract maintenance. Furthermore, redundant imports of upgradeable modules can lead to unexpected conflicts during initialization, potentially causing the contract to initialize the wrong instance of OwnableUpgradeable
and thus impacting ownership functionality.
Manual review
Remove the redundant OwnableUpgradeable
import from Swan.sol
. With OwnableUpgradeable
imported solely in SwanManager
, the dependency is correctly managed, and Swan.sol
can safely inherit the upgradeable ownership features from SwanManager
.
Proposed Code Change:
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.