beefy-v2
beefy-v2 copied to clipboard
Implement user-definable RPCs
Beefy's dapp config defines a single system RPC for each network which relies on the connection between the end user and that RPC.
Because routing (and overall uptime) of our chosen RPC endpoints are highly variable, this frequently results in one or more RPCs failing, with little recourse available. Allowing end-users to define their own endpoints in the case of an error (or simply improve throughput) would mitigate these issues.
These overridden values would be contained in localStorage, alongside other application data, and considered when fetching RPC URLs from the core configuration.
I imagine this could be done in three defined stages:
- Defining the format for
localStorageand updating application code to consider the values. - A UI component to interface with
localStorage, displaying and allowing updates to those values (with appropriate sanitation, and validation usingeth_chainId), as well as a control on the dapp to access this menu. - Hooks that reload applicable RPC calls when a new value is stored, avoiding having to refresh the page.