ethers.js icon indicating copy to clipboard operation
ethers.js copied to clipboard

Add AStar to the AlchemyProvider

Open deric-alchemy opened this issue 3 years ago • 2 comments

deric-alchemy avatar Aug 12 '22 00:08 deric-alchemy

Hey! Could we get this added as quickly as possible? We're opening up support for AStar and would love it to work out of the box on Ethers.js!

deric-alchemy avatar Aug 12 '22 17:08 deric-alchemy

I generally do no add networks that aren’t among the most used directly to the library. Otherwise the library quickly bloats as it is littered with chainIds, network names and urls to networks that remain fairly obscure, and everyone who uses ethers has to incur this cost. I get a lot if requests for random networks.

That is why ethers makes it easy use custom networks, which is what I’d recommend in this case.

In v6, the network object has been expanded and with provider plugins it will be much easier for custom networks to have their own custom functionality without bloating the core.

Make sense?

ricmoo avatar Aug 12 '22 18:08 ricmoo

@deric-alchemy when the network doesn't exist, you can use JsonRpcProvider instead Alchemy Provider, you need only pass the ALCHEMY HTTPS KEY, and all works.

const ethersAlchemyProvider = new ethers.JsonRpcProvider(
    "https://eth-goerli.g.alchemy.com/v2/dsasdasdasdasdasdasdasd"
  ); 

paulobordignon avatar Jul 16 '23 18:07 paulobordignon