• Returns an ethers.Contract object for the given name, connected to the appropriate address for the given L2 chain ID. Users can also provide a custom address to connect the contract to instead. If the chain ID is not known then the user MUST provide a custom address or this function will throw an error.

    Parameters

    • contractName: (keyof OEL1Contracts) | (keyof OEL2Contracts)

      Name of the contract to connect to.

    • l2ChainId: number

      Chain ID for the L2 network.

    • opts: {
          address?: AddressLike;
          signerOrProvider?: Provider | Signer;
      } = {}

      Additional options for connecting to the contract.

      • Optional address?: AddressLike

        Custom address to connect to the contract.

      • Optional signerOrProvider?: Provider | Signer

        Signer or provider to connect to the contract.

    Returns Contract

    An ethers.Contract object connected to the appropriate address and interface.

Generated using TypeDoc