Error connecting to BSC Mainnet Archive

Hi there, I was connected and running fine on the mainnet archive just a couple days ago. Then today (not having changed code) as soon as I ran my tests I got this error:

ProviderError: the method net_version does not exist/is not available
at HttpProvider.request

This was on a normal const Token = await ethers.getContractFactory("Token") call.
I tried with a simple contract (just an vanilla openzeppelin ERC20 with _mint and it did not work.
I also tried with different blocknumbers just in case but no good :โ€™(

Then I tried on another speedy node (testnet archive) and it deployed fine.

Thanks!

Hey @theo

Which version of ethers do you use?
Why do you use getContractFactory instead of ContractFactory?
image

Hey @Yomoo

The issue seems to have fixed itsself (havenโ€™t changed any code just gave it a couple days break) so it must have been an issue with the archive node as I donโ€™t make any other API calls elsewhere.

FWIW
Iโ€™m using ethers 5.4.1 and getContractFactory is a function injected into ethers by hardhat. Itโ€™s their recommended way of getting access to the contract

1 Like

Hey @theo

Yesterday devs added support of net_version method

FWIW
Iโ€™m using ethers 5.4.1 and getContractFactory is a function injected into ethers by hardhat. Itโ€™s their recommended way of getting access to the contract

I thought you have tried to deploy it from the frontend :grinning:

Happy BUIDLing :man_factory_worker:

2 Likes