I installed Geth in my local environment, and successfully synchronized with ETH Mainnet. The command I used to start Geth is as follows:
geth --ethash.dagdir F:\Ethereum\Ethash --datadir F:\Ethereum --http --graphql --http --http.corsdomain "*" --http.api personal,eth,net,web3
However, when I try to connect to this local Ethereum node using ethers provider:
let provider = new ethers.providers.JsonRpcProvider();
And then try to use this provider to fetch pair information with Uniswap SDK:
var pair = await uniswap.Fetcher.fetchPairData(tokens.WETH, tokens.DAI, provider);
Below error message was shown:
(node:32252) UnhandledPromiseRejectionWarning: Error: call revert exception (method="getReserves()", errorArgs=null, errorName=null, errorSignature=null, reason=null, code=CALL_EXCEPTION, version=abi/5.4.0)
Could someone help to advise whether it is related to the incorrect setup of the Geth Ethereum node, or related to the incorrect use of ethers local ETH node provider with the uniswap SDK (above works perfectly fine when I used an Infura endpoint) ?