MetaMask / MetaMask/test-dapp

Add button that uses Web3 provider to send transaction

Open
#137 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
642
Forks
369
PR merge metrics
No merged PRs in 30d

Description

Currently, the test dapp only uses ethers.js for instantiating a provider. We need to also use web3.js, because many dapps use that exclusively. For us to properly test and QA MetaMask, we should test against the same tools that dapps use. Also, some functionality (e.g. batch transactions) are better supported by web3.js than ethers.

To start, let's just allow the test dapp to use web3 in place of ethers wherever it is currently used
- add a radio button toggle somewhere on the top of the page. The options in the toggle should be "web3" and "ethers"
- the toggle should default to ethers
- if ethers is selected, the create token and deploy contract buttons should behave as they do today
- if web3 is selected, create token and deploy contract should use web3 instead of the current "factories" created by the ethers provider, however the transactions created by the buttons should be the same

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in the test dapp at the existing ethers provider and the create token and deploy contract button entry points. Trace how their current factories create transactions, then identify where a top-of-page web3/ethers toggle can select the implementation. Done means ethers remains the default, web3 produces the same transactions, and both buttons work in either mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
blockchain, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.