Skip to content

Consider using ethers sub-packages to reduce bundle sizes #771

Description

@smartcontracts

Hi! Optimism is in the process of trying to reduce bundle sizes for down-stream users of our contract packages. TypeChain currently imports ethers in its entirety into typing files but could instead import specific sub-packages. For example, contract type files import the following:

import type { Listener } from "@ethersproject/providers";
import type { Event, EventFilter } from "ethers";

This can be replaced with

import type { Listener } from "@ethersproject/providers";
import type { Event, EventFilter } from "@ethersproject/contracts";

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions