Skip to content

TypeError: BigInt is not a constructor when using example code #1

@michaeldev5

Description

@michaeldev5

Hello,

I am trying to use SDK and run example code but I always encounter this error:

TypeError: BigInt is not a constructor
 ❯ node_modules/.pnpm/@zenlink-dex+sdk-core@0.0.3/node_modules/@zenlink-dex/sdk-core/build/esm/entities/stableSwap.js:7:25
      5| const A_PRECISION = new BigInt(100);
      6| const POOL_TOKEN_COMMON_DECIMALS = new BigInt(18);
      7| export class StableSwap {
       |                         ^
      8|   constructor(chainId, contract, pooledTokens, lpToken, totalSupply, balances, fee, adminFee, A, virtualPrice) {
      9|     this.chainId = chainId;
 ❯ node_modules/.pnpm/@zenlink-dex+sdk-core@0.0.3/node_modules/@zenlink-dex/sdk-core/build/esm/entities/index.js:41:32

Do you know what may be the cause?

Best regards,
Michael.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions