Issue setting up POSClient with ethers.js and getting erc20 balance #355
Unanswered
tylerpashigian
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Could you provide me a reproducable repo please ? @tylerpashigian |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to use the POSClient for the first time and set up a few dev wallets while walking through this tutorial combined with the Polygon docs and matic.js examples and I believe I have set up everything for using the Mumbai testnet.
I am trying to just do a simple erc20.getBalance() of an address of one of the addresses I loaded dummy erc20 on via the mumbai faucet, but I am getting the following error:
erc20.getBalance()): Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.0)
. I ended up creating a contract and provider using raw ethers.js and successfully read the balance, but would really like to use the matic.js client if possible. I assume the rpc's I was using are the issue since the address and token contract seem to be working fine. I will provide the network info I was using below to see if anyone can see a problem. Please let me know if anyone has ideas, thanks!Network Info In .env File - Network Info Source
ROOT_RPC = https://rpc.goerli.mudit.blog
MATIC_RPC = https://rpc-mumbai.matic.today
Beta Was this translation helpful? Give feedback.
All reactions