-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standard web3 global API interface #81
Comments
I'm in the process of adding a web3 bridge right now that will allow web3 apps to work on top of ethers.js. It will be allow full support in Ethers Wallet (iOS) for Web3 apps. The API calls may change, and I welcome suggestions or concerns, but I'm thinking it will look like: // To go from ethers.js to Web3 API
var web3 = new Web3(ethers.providers.bridgeToWeb3(providerOrSigner))
// To go from Web3 to ethers.js API.
var signer = ethers.providers.brigdeWeb3Signer(web3);
var provider = new ethers.providers.Web3BridgeProvider(web3.currentProvider); This will make it easier for anyone with an existing web3 app to "just use" ethers.js, while they migrate. It is mostly straight forward, the difficulties come from the JSON-RPC/Web3 Events API which has lots of internal state to maintain, which is what the ethers.js providers specifically attempted to prevent. It's coming. :) |
awesome @ricmoo ! thanks. Please update whenever you push a branch with the work I can try on a dapp |
hi @ricmoo I was just wondering if you had any progress on the MM bridge or an alpha version? I'm eager to use ethers in my next project but without any MM support I can't move forward. thank you and happy holidays!! |
This has been added in EthersWallet-iOS. It is just a matter of posting it over to ethers.js, which I'm hoping to get to this week. |
as of ethers v2.2.3 the web3.currentProvider surface API is supported! see #59 (comment) for usage |
Hello,
I haven't dabbled with ethers.js just yet, but I intend to try it on my next dapp project. So forgive me if my question isn't relevant.
I was wondering if ethers.js is planning an interface compatible with web3.currentProvider ?
as described in https://github.com/MetaMask/faq/blob/master/detecting_metamask.md#web3-deprecation where MetaMask is deprecating web3.js injection, and instead will allow dapps to bring their own clients, but use a smaller but standard interface of web3 - does ethers.js plan to fit this kind of support as well?
The text was updated successfully, but these errors were encountered: