I want to connect with my API keys to several providers. I use this code:
export const provider = ethers.getDefaultProvider(NETWORK, {
etherscan: ETHERSCAN_API_TOKEN,
infura: { applicationId: INFURA_PROJECT_ID, applicationSecretKey: INFURA_SECRET_KEY },
pocket: { applicationId: POCKET_PORTAL_ID, applicationSecretKey: POCKET_SECRET_KEY },
});
When I log out the variable, I get this:
providerConfigs: [
{
provider: [InfuraProvider],
weight: 1,
stallTimeout: 2000,
priority: 1
},
{
provider: [EtherscanProvider],
weight: 1,
stallTimeout: 750,
priority: 1
},
{
provider: [AlchemyProvider],
weight: 1,
stallTimeout: 2000,
priority: 1
}
],
So the pocket key was ignored and the AlchemyProvider comes out of nowhere, which makes me think that this way does not work. Is there another one?