Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example for connecting to Polygon Mumbai test network please? ☺️ #2222

Closed
webhype opened this issue Oct 25, 2021 · 4 comments
Closed

Example for connecting to Polygon Mumbai test network please? ☺️ #2222

webhype opened this issue Oct 25, 2021 · 4 comments
Labels
documentation Documentation related issue.

Comments

@webhype
Copy link

webhype commented Oct 25, 2021

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! ❤️

@webhype webhype added the documentation Documentation related issue. label Oct 25, 2021
@emnul
Copy link

emnul commented Oct 28, 2021

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

@krungle-mataman
Copy link

hey, stupid question - i know. but where can i get the minimizer-version for that release :-()

@ricmoo
Copy link
Member

ricmoo commented Feb 3, 2022

I probably won't include a Mumbai specific example, but the changes in #2242 will go up soon, which should help. :)

@ricmoo
Copy link
Member

ricmoo commented Feb 3, 2022

Merged the changes in #22242.

Thanks! :)

@ricmoo ricmoo closed this as completed Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation related issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants