I have an issue with getEthToTokenInputPrice Here is part of my code that is not working.
const web3_utils = require('web3-utils')
const Web3 = require('web3')
const ETH_AMOUNT = web3_utils.toWei('1', 'Ether')
const exchangeContract = new web3.eth.contract(EXCHANGE_ABI, EXCHANGE_ADDRESS);
const daiAmount = await exchangeContract.methods.getEthToTokenInputPrice(ETH_AMOUNT).call()
But I am getting this error:
TypeError: Cannot read properties of undefined (reading 'getTokenToEthInputPrice')
From this documentation https://docs.uniswap.org/protocol/V1/reference/exchange it seems right but it's failing on getTokenToEthInputPrice. Any help will be appreciated.