nestjs-ethers
nestjs-ethers copied to clipboard
Exception when using MUMBAI_NETWORK
I'm submitting a...
[ ] Regression
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
When setting most of the networks constants in config options, the module connects just fine. Except when using MUMBAI_NETWORK
I receive this error.
[Nest] 64120 - 08/04/2022, 4:12:18 PM ERROR [ExceptionHandler] unsupported getDefaultProvider network (operation="getDefaultProvider", network={"name":"maticmum","chainId":80001,"ensAddress":null,"_defaultProvider":null}, code=NETWORK_ERROR, version=providers/5.6.8)
Expected behavior
I expect the module to connect to Polygon Mumbai. All other tested network constants did not throw an error.
Minimal reproduction of the problem with instructions
EthersModule.forRoot({
network: MUMBAI_NETWORK,
}),
What is the motivation / use case for changing the behavior?
Environment
Nest version: ^8.0.0
Nest Ethers version: ^1.0.3
For Tooling issues:
- Node version: v16.14.2
- Platform: Mac
- Server: Express
Others:
I get a similar error for setting network to `http://localhost:8545` as described in options docs, when trying to connect to local hardhat node. `npm hardhat node`
`[Nest] 70323 - 08/04/2022, 5:28:08 PM ERROR [ExceptionHandler] Invalid network http://localhost:8545.`
@vanb. I will take a look.
I believe I was able to resolve this by setting use default provider to false and setting an alchemy key. If that's required then perhaps I missed it in the docs.
Prefect. I will close this issue for now