Replies: 2 comments
-
I just tried this, and seems to be working. Can you once confirm if the env variables are set correctly by console logging them? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I've realized that it's a problem with dotenv and webpack rather than ethers. Sorry about that. Thanks anyway. We can close this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I still get the "Request-Rate Exceeded" message even though I passed an object containing the keys as specified in ethers.getDefaultProvider
Here is my code:
provider = ethers.getDefaultProvider(chainId, { etherscan: process.env.ETHERSCAN_API_KEY, infura: process.env.INFURA_API_KEY, alchemy: process.env.ALCHEMY_API_KEY, pocket: process.env.POCKET_API_KEY })
When I inspect the
provider
object (e.g. simplyconsole.log(JSON.stringify(provider))
) I see thatprovider.providerConfigs
has keys that are not the same asprocess.env.INFURA_API_KEY
,process.env.ALCHEMY_API_KEY
, andprocess.env.POCKET_API_KEY
.Is this a bug?
Beta Was this translation helpful? Give feedback.
All reactions