if (!(BigInt.prototype as any).toJSON) { (BigInt.prototype as any).toJSON = function () { return this.toString(); }; } // Shim for @uniswap/v4-sdk compatibility with ethers v6 // The v4-sdk expects ethers v5 constants which don't exist in v6 import * as ethers from 'ethers'; if (!(ethers as any).constants) { (ethers as any).constants = { AddressZero: ethers.ZeroAddress, HashZero: ethers.ZeroHash, MaxUint256: ethers.MaxUint256, }; }