ethers.js
ethers.js copied to clipboard
Updated the pocket-provider to align with more recent updates
While the original pocket provider provided some really great work-arounds to how the Pocket Portal handled it's RPC service, a lot of those unique quirks have since changed, and pocket now provides a more consistent experience.
The big changes to how the Pocket Portal manages it's RPC are as follows:
- Different networks can all now use the same API key and Secret Key, no need for separate keys for each network.
- All endpoints are now load balanced, this is no longer conditional on the specific network.
Since the last update, Pocket Network now supports the following ethers.js supported networks:
- Kovan
- Gnosis (xDAI)
- Polygon (Matic)
- Binance Smart Chain (bnb)
As well as now supporting the following other likely future compatible networks:
- Avalanche
- DFKchain
- Fantom
- FUSE
- Harmony
- IoTeX
- OKExChain
- Solana
These will always be tracked live here.
Additionally, Pocket Network provides public community RPC resources available for the following supported chains:
- homestead - https://eth-rpc.gateway.pokt.network
- Gnosis (xDAI) - https://xdai-rpc.gateway.pokt.network
- Polygon (Matic) - https://poly-rpc.gateway.pokt.network/
- Avalanche - https://avax-mainnet.gateway.pokt.network/v1/lb/605238bf6b986eea7cf36d5e/ext/bc/C/rpc
- Binance Smart Chain (bnb) - https://bsc-mainnet.gateway.pokt.network/v1/lb/6136201a7bad1500343e248d
As well as the following unsupported chains:
- Fuse - https://fuse-rpc.gateway.pokt.network/
- Harmony - https://harmony-0-rpc.gateway.pokt.network
- IoTeX - https://iotex-mainnet.gateway.pokt.network/v1/lb/6176f902e19001003499f492
- DFKchain - https://avax-dfk.gateway.pokt.network/v1/lb/6244818c00b9f0003ad1b619/ext/bc/q2aTwKuyzgs8pynF7UXBZCU7DejbZbZ6EUyHr3JQzYgwNPUPi/rpc
- Fantom - https://fantom-mainnet.gateway.pokt.network/v1/lb/6261a8a154c745003bcdb0f8
All of which will be available here
I'm not sure if these above links constitute a community resource by the ethers definition, but unfortunately, the current means of identifying them is rather hodge-podge at the moment. I've currently left the isCommunityResource() method as false, but am happy to go back and figure out the logic for determining that if the above public RPCs do qualify as a community resource.
Thanks! I'll look into this shortly. :)
Hey, feel free to let me know if there's anything on my end I can do to help validate this for you. Happy to push through the proper isCommunityResource() method if it is the case that public RPCs count as community resources, and run any tests against the implementation that you would need.
@blockjoe Heya! Can you e-mail [email protected] when you get a chance? I haven't been able to get ahold of my regular contact at Pocket and have some issues with getting this PR sorted...