Skip to main content

New answers tagged

1 vote

TypeError: glob is not a function after updating typechain-hardhat to @typechain/hardhat

To clarify the previous comment: the problem is that you have a /typechain folder in your project. This causes an error when trying to destructure glob: const { glob } = await Promise.resolve().then(()...
Franco Mangone Sanmartín's user avatar
1 vote

cannot estimate gas of route swap with Uniswap v3

Seems a bit going on. Looks like swapExactTokensForTokens is the the first function being called, which is for v2 swaps. But you refer to v3 on several occasions, and there doesn't seem to be a v2 ...
Maka's user avatar
  • 1,220
0 votes

cannot estimate gas of route swap with Uniswap v3

You can estimate gas manually and build your transaction: const tx = { data: route.methodParameters?.calldata, to: V3_SWAP_ROUTER_ADDRESS, value: ethers.utils.parseUnits("0.001", ...
Rafael's user avatar
  • 382
0 votes

How to get proper typesafe version from ethers.getContractAt or any other alternative method

Found an answer here: basically, we need to do const diamondLoupeFacet = (await ethers.getContractAt("DiamondLoupeFacet", diamondAddress)) ...
Somjit's user avatar
  • 265

Top 50 recent answers are included