MetaMask / MetaMask/metamask-extension
Prevent tx submission when custom gas limit is significantly below MetaMask's estimate
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
[This issue](https://github.com/MetaMask/metamask-extension/issues/7382) happened when a tx was submitted with a gas limit of 21000. We should prevent tx submission in cases where customized limits are significantly below our estimated required gas.
Determining what constitutes "significantly below" is an open question. We can definitely prevent this is cases where we know we are sending to a contract, or when data is provided, and the gas limit is 21000.
Contributor guide
Research direction
Start by reading the linked issue 7382 and tracing MetaMask's transaction submission and gas-estimation entry points. Clarify what counts as significantly below the estimate, including the stated contract, data, and 21000-gas cases; done means unsafe submissions are prevented with coverage for the agreed rules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100