Description
The following errors are declared in src/error/ErrFlow.sol but never reverted or referenced anywhere in src/ or test/:
- L10
UnsupportedNativeFlow()
- L24
BurnerNotOwner() (also separately declared in src/interface/deprecated/v4/IFlowERC721V4.sol:40, see below)
- L26
UnsupportedHandleTransferInputs()
- L27
InsufficientHandleTransferOutputs()
- L28
UnsupportedTokenURIInputs()
- L29
InsufficientTokenURIOutputs()
grep -rn across src/ and test/ shows zero revert sites for any of these. They are declared but unreachable from any code path — dead surface that integrators may import expecting them to be thrown.
BurnerNotOwner is additionally redeclared in the deprecated v4 interface (IFlowERC721V4.sol:40). That redeclaration is itself unused, so both copies are dead.
Location
src/error/ErrFlow.sol:10
src/error/ErrFlow.sol:24
src/error/ErrFlow.sol:26-29
Proposed fix
Delete the unused error declarations from ErrFlow.sol:
-/// Thrown for unsupported native transfers.
-error UnsupportedNativeFlow();
-
/// Thrown for unsupported erc20 transfers.
error UnsupportedERC20Flow();
-/// Thrown when burner of tokens is not the owner of tokens.
-error BurnerNotOwner();
-
-error UnsupportedHandleTransferInputs();
-error InsufficientHandleTransferOutputs();
-error UnsupportedTokenURIInputs();
-error InsufficientTokenURIOutputs();
error UnsupportedFlowInputs();
error InsufficientFlowOutputs();
If any of these are intended to be thrown by a current code path that is currently missing the revert, that path should be added in the same change. Otherwise drop them. Also remove the duplicate BurnerNotOwner in src/interface/deprecated/v4/IFlowERC721V4.sol:40 if BurnerNotOwner is dropped.
Description
The following errors are declared in
src/error/ErrFlow.solbut neverreverted or referenced anywhere insrc/ortest/:UnsupportedNativeFlow()BurnerNotOwner()(also separately declared insrc/interface/deprecated/v4/IFlowERC721V4.sol:40, see below)UnsupportedHandleTransferInputs()InsufficientHandleTransferOutputs()UnsupportedTokenURIInputs()InsufficientTokenURIOutputs()grep -rnacrosssrc/andtest/shows zerorevertsites for any of these. They are declared but unreachable from any code path — dead surface that integrators may import expecting them to be thrown.BurnerNotOwneris additionally redeclared in the deprecated v4 interface (IFlowERC721V4.sol:40). That redeclaration is itself unused, so both copies are dead.Location
src/error/ErrFlow.sol:10src/error/ErrFlow.sol:24src/error/ErrFlow.sol:26-29Proposed fix
Delete the unused error declarations from
ErrFlow.sol:If any of these are intended to be thrown by a current code path that is currently missing the
revert, that path should be added in the same change. Otherwise drop them. Also remove the duplicateBurnerNotOwnerinsrc/interface/deprecated/v4/IFlowERC721V4.sol:40ifBurnerNotOwneris dropped.