Skip to content

[A02-3] [LOW] BurnerNotOwner duplicated in ErrFlow.sol and IFlowERC721V4.sol #276

@thedavidmeister

Description

@thedavidmeister

Description

BurnerNotOwner() is declared in two places:

  • src/error/ErrFlow.sol:24
  • src/interface/deprecated/v4/IFlowERC721V4.sol:40

Both declarations have identical signature (so identical 4-byte selector), but Solidity treats them as distinct top-level symbols. A consumer that imports both files transitively gets an ambiguity error; a consumer that imports only one will see "the right" error only if it picked the right file.

Even after the parallel finding to remove unused errors, if either declaration is kept the canonical location should be ErrFlow.sol (the dedicated error file). The deprecated interface should import { BurnerNotOwner } from ErrFlow.sol rather than redeclaring.

Location

  • src/error/ErrFlow.sol:24
  • src/interface/deprecated/v4/IFlowERC721V4.sol:40

Proposed fix

If the error is retained, keep one declaration in ErrFlow.sol and re-export from the interface:

 //forge-lint: disable-next-line(unused-import)
 import {RAIN_FLOW_SENTINEL} from "./IFlowV4.sol";
+import {BurnerNotOwner} from "../../../error/ErrFlow.sol";

-/// Thrown when burner of tokens is not the owner of tokens.
-error BurnerNotOwner();
-

If the error is removed (per the unused-errors finding), drop both declarations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    auditAudit findinglowSeverity: lowpass1Audit Pass 1: Security

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions