-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Open
Description
Using flattener (both truffle or hardhat) all the custom errors from draft-IERC6093.sol
are imported into the flattened file also if unused.
I mean using the ERC20 contract we will find also the IERC721Errors
and IERC1155Errors
into the code.
It should import only the required (and necessary) file in import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";
instead of importing the whole file.
Is there a way to avoid this behavior?
Is this a flattener issue and should we reference it there?
To reproduce simply run:
npx hardhat flatten contracts/token/ERC20/ERC20.sol > ERC20.flat.sol