How to use the @ethersproject/providers.Web3Provider function in @ethersproject/providers

To help you get started, we’ve selected a few @ethersproject/providers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Mrtenz / FindETH / src / components / Main / Main.tsx View on Github external
const initialize = () => {
    const provider =
      window.web3 && window.web3.currentProvider
        ? new Web3Provider(window.web3.currentProvider)
        : new FallbackProvider([
            new JsonRpcProvider('https://api.mycryptoapi.com/eth'),
            new InfuraProvider(),
            new EtherscanProvider()
          ]);

    handleConnect(provider);
  };
github NoahZinsmeister / web3-react / example / index.tsx View on Github external
function getLibrary(provider: any): Web3Provider {
  const library = new Web3Provider(provider)
  library.pollingInterval = 8000
  return library
}

@ethersproject/providers

Ethereum Providers for ethers.

MIT
Latest version published 2 years ago

Package Health Score

59 / 100
Full package analysis