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

feat: add Quicknode provider

Open alyavasilyeva opened this issue 3 years ago • 1 comments

Gm! We were adding Quicknode as an RPC provider recently, it was different than adding other providers because Quicknode endpoints are customizable.

So we had to create a QuicknodeProvider class that accepts connection url instead of an apiKey. Here is the use example:

const quicknodeConnectionUrl = 'https://{YOUR_QUICKNODE_ENDPOINT}/{YOUR_QUICKNODE_API_KEY}/'
const provider = new QuicknodeProvider(network, quicknodeConnectionUrl)

I took UrlJsonRpcProvider class as the base and rewrote it a bit.

I thought that this class might be helpful for others too and can be included in the library. If not, your feedback is welcome anyway, especially on class inheritance (was this a good idea to extend from StaticJsonRpcProvider?) and methods overriding 🙂

alyavasilyeva avatar Aug 01 '22 14:08 alyavasilyeva

This is awesome!

abunsen avatar Aug 23 '22 17:08 abunsen

FYI. QuickNodeProvider is available in v6, and will be likely added in the next minor release of v5. :)

ricmoo avatar Feb 03 '23 09:02 ricmoo