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";
Hi! Optimism is in the process of trying to reduce bundle sizes for down-stream users of our contract packages. TypeChain currently imports
ethersin its entirety into typing files but could instead import specific sub-packages. For example, contract type files import the following:This can be replaced with