punk-wallet icon indicating copy to clipboard operation
punk-wallet copied to clipboard

Use useStaticJson hook from scaffold-eth instead of using one rpc url

Open technophile-04 opened this issue 2 years ago • 0 comments

Current :

We are just using one static rpc-url and sometimes the eth-price is not populated if it's down also it burdens the one rpc node.

const scaffoldEthProvider = new StaticJsonRpcProvider("https://rpc.scaffoldeth.io:48544");

Proposed solution :

use useStaticJsonRpc hook from scaffold-eth to pick suitable rpc from given rpc's url array and inturn decreases the load on one rpc.

technophile-04 avatar Oct 05 '22 14:10 technophile-04