You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
When updating to the latest version 4.1.1 it gives me this error, when using the Uniswap Quoter (previously with web3 4.0.3 using old dependencies it used to work)
TypeError: check is not a function
at Object.eval [as refinement] (index.mjs:693:1)
at executeRefinement (index.mjs:3422:1)
at ZodEffects._parse (index.mjs:3442:1)
at eval (index.mjs:2846:1)
at Array.map (<anonymous>)
at ZodTuple._parse (index.mjs:2842:1)
at ZodTuple._parseSync (index.mjs:622:1)
at ZodTuple.safeParse (index.mjs:652:1)
at Validator.validate (validator.js:60:1)
at Web3Validator.validate (web3_validator.js:32:1)
at Object.eval (contract.js:457:26)
at eval (uniswapService.js:468:64)
at step (tslib.es6.mjs:147:1)
at Object.eval [as next] (tslib.es6.mjs:128:44)
at asyncGeneratorStep (_async_to_generator.js:3:1)
at _next (_async_to_generator.js:20:1)
In order to test this code can be used:
import SWAP_QUOTER_ABI from "@uniswap/v3-periphery/artifacts/contracts/lens/Quoter.sol/Quoter.json";
try {
const quoterContract = new web3.eth.Contract(SWAP_QUOTER_ABI.abi, "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6");
// call the quoter contract to determine the amount in of a swap, given an amount out
let quotedAmountIn = await quoterContract.methods.quoteExactOutputSingle(
"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
"0x22043fDdF353308B4F2e7dA2e5284E4D087449e1",
3000,
150000,
0
).call();
} catch (err) {
console.log(err);
}