Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.
This repository was archived by the owner on Oct 20, 2024. It is now read-only.

BigNumber undefined #104

Open
Open

Description

@saugion

I receive the following error when I build my application:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'from')

It comes from
exports.DEFAULT_VERIFICATION_GAS_LIMIT = ethers_1.ethers.BigNumber.from(70000);
in builder.js

userop version is 0.3.3, ethers is 6.7.1, the latest.

Also constants like ethers.constants.ZeroAddress, ethers.constants.Zero, ethers.utils.hexlify , ethers_1.ethers.providers.JsonRpcProvider are not present in the latest ethers version.

I've also tried different versions but the issue persists. Could it be a conflict with other libraries? Thanks

Activity

  1. saugion commented on Sep 5, 2023

    @saugion
    Author

    I think the issue appears because i'm using ethers v6 in my project, but userop has a dependency to ethers v5. The framework i'm using seems to override the v5 with v6 at build time. It would be for userop to use ethers v6.

  2. ketanjog commented on Dec 23, 2023

    @ketanjog

    Got the same issue and you're right its bc ethers deprecated their use of BigNumber. I got around this by just going in and either swapping or wrapping with javascript's BigInt. Not sure if it'll work everytime but worth a try

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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