appkit icon indicating copy to clipboard operation
appkit copied to clipboard

[docs] Custom RPC URLs to avoid rate-limits or lock-ins on blockchain api are is either not working or not documented

Open coderodigital opened this issue 2 years ago • 5 comments

Summary

When specifying a custom transport in Wagmi (which works fine with previous versions of web3modal), e.g. to use a paid RPC endpoint like Alchemy to avoid rate limits for Wagmi clients, it seems like custom transports are ignored with the new AppKit configuration and blockchain API endpoints are always enforced. The blockchain API endpoint appears to be enforced in the entire app even when providing a custom transport config to WagmiAdapter, which does accept the transport property.

There is a need for documentation updates regarding using a custom RPC URL with standard networks, as it does not seem to work correctly. For instance, if Reown were to enforce their own, likely paid, blockchain API service, this should be clearly highlighted in the documentation for developers. In production apps, hitting those rate limits can happen very quickly.

I had to revert to web3modal in my (very heavily used) production application as I must admit, I have overseen that my custom RPC is not used by wagmi as it was on web3modal.

I suggest you provide a working example of using Ethereum with custom WSS or HTTP endpoints - ASAP, so that I can upgrade again without spending hours digging through the AppKit codebase.

Link to the related docs page

https://docs.reown.com/appkit/react/core/installation

coderodigital avatar Oct 10 '24 07:10 coderodigital

Duplicate / related to: https://github.com/reown-com/appkit/issues/2910

coderodigital avatar Oct 10 '24 07:10 coderodigital

This line used to be the culprit and overwrite the url (@reown/appkit-adapter-wagmi @1.0.1). Seems like that tag does not exist anymore.

It has been updated to this (as of @reown/appkit-adapter-wagmi @1.0.7): https://github.com/reown-com/appkit/blob/152aefe463e530adcb37e59334cba84271b15b6c/packages/adapters/wagmi/src/client.ts#L151

Maybe worth installing the latest and seeing if it works? Looks like it only overwrites if it's a Wallet Connect RPC now.

kevtechi avatar Oct 10 '24 07:10 kevtechi

We are going to solve it ASAP and make custom RPC available. Sorry for the inconvenience.

https://linear.app/reown/issue/APKT-1293/clarify-if-custom-rpc-usage-is-allowed-for-developers

rtomas avatar Oct 11 '24 12:10 rtomas

Awesome, @rtomas - I just double-checked with the latest release (@kevtechi) - the issue seems to be still given. Also, @rtomas, I hit the rate limit quite quickly as my DApp is updating with every second block, and with an active community, that happened quickly. I guess custom RPC endpoints in combination with wagmi is a must. The most powerful argument for me to use web3modal: the superb wallet connect UX with being able to use my custom RPC and the convenience of wagmi and viem throughout the DApp.

With my current project ID, using wallet connect QR codes seems broken due to rate-limit errors. Can you clarify that in the docs as well? Which RPC / endpoint is used for what? Is there a way to reset those rate limits? Do you know if I have to contact support for Blockchain-API?

coderodigital avatar Oct 11 '24 12:10 coderodigital

Did you get the issue resolved?

I still have this issue in 1.5.3. rpc url got overwritten with walletconnect's instead of the transport in wagmi adapter.

SCR-20241207-qfdb

songkeys avatar Dec 07 '24 10:12 songkeys