Skip to content

raymondpulver/ethers-to-web3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ethers-to-web3

Exports a function which takes an ethers.js Signer or Provider of any type, and gives you a Web3-compatible provider you can use with libraries which need it.

Usage

const { Wallet } = require('@ethersproject/wallet');
const { InfuraProvider } = require('@ethersproject/providers');
const signer = new Wallet(pvtKey).connect(new InfuraProvider('mainnet'));
const toWeb3Provider = require('ethers-to-web3');

const web3Provider = toWeb3Provider(signer); // now you can use this with Web3 or something that needs a Web3 provider

Author

Raymond Pulver IV

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published