You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was unable to google one example to connect via ethers.js to polygon-mumbai network on Infura. Do you guys have any?
By trial and error, I found that this doesn't crash, but doesn't quite "work" either (later steps don't work, which could be for all kinds of reasons, but trying to rule out a "bad" connection to Infura):
const provider = new ethers.providers.InfuraProvider(null, {
network: "polygon-mumbai", // this wasn't even documented but apparently makes it not crash
projectId: "0x1234567890abcdef",
projectSecret: "0xfedcba9876543210"
});
Am I connecting correctly to the polygon-mumbai test network?
What about connecting to polygon-mainnet? Is that correct?
const provider = new ethers.providers.InfuraProvider(null, {
network: "polygon-mainnet", // this wasn't even documented but apparently makes it not crash
projectId: "0x1234567890abcdef",
projectSecret: "0xfedcba9876543210"
});
The ethers.js documention is so ultra brief and poor in rich, real-world examples of various non-Ethereum, non-mainnet examples (what's up with "homestead"? 😃 Why not call it "mainnet" if that's what you mean? lol, took me hours to figure out).
Not trying to be snarky, it's an awesome library, but just a few extra lines, with real-world examples, would go a long way (this message goes equally to Infura). Thanks! ❤️
The text was updated successfully, but these errors were encountered:
From packages/providers/src.ts/infura-provider.ts in this repo network = "matic" corresponds to polygon mainnet and network = "maticmum" corresponds to the mumbai testnet although the docs haven't been updated to reflect this. I can submit a quick PR
I was unable to google one example to connect via ethers.js to polygon-mumbai network on Infura. Do you guys have any?
By trial and error, I found that this doesn't crash, but doesn't quite "work" either (later steps don't work, which could be for all kinds of reasons, but trying to rule out a "bad" connection to Infura):
Am I connecting correctly to the polygon-mumbai test network?
What about connecting to polygon-mainnet? Is that correct?
The ethers.js documention is so ultra brief and poor in rich, real-world examples of various non-Ethereum, non-mainnet examples (what's up with "homestead"? 😃 Why not call it "mainnet" if that's what you mean? lol, took me hours to figure out).
Not trying to be snarky, it's an awesome library, but just a few extra lines, with real-world examples, would go a long way (this message goes equally to Infura). Thanks! ❤️
The text was updated successfully, but these errors were encountered: