Enable clone()
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- api
Research direction
Read Web3 Issue 3573 and inspect the MetamaskInpageProvider implementation and its request-queue behavior. Define clone() so it produces an independent provider with separate request queues, then verify that direct web3 calls and TruffleContract calls can overlap without sharing provider state.
Written by the indexing model from the issue text.
Description
As identified in Web3 Issue 3573, when using both TruffleContract and web3 functions it is important that they have separate Provider objects.
In the browser, the injected web3 has a web3.currentProvider which is a MetamaskInpageProvider, but passing this same object to a TruffleContract's setProvider function seems likely to produce issues like that one identified in web3.
To address this, the MetamaskInpageProvider might benefit from a clone() function producing another copy of the object, so that there can be independent queues serving overlapping sequences of requests from calls to the web3 object directly + calls to TruffleContract objects.
- Dominant language
- TypeScript
- Stars
- 268
- Forks
- 130
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MetaMask/providers
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
-
Difficulty 1/5 Under an hour Newbie friendliness 58/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
All issues in MetaMask/providers
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·