MetaMask / MetaMask/metamask-extension
Not supported chain id 2345
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
### What is this about?
When we use `"https://gas.api.cx.metamask.io/networks/2345/suggestedGasFees"` for [GOAT Network](explorer.goat.network) to get the estimated gas, it responds:
```
{
"statusCode": 400,
"message": "'2345' is not a supported chain id."
}
```
We have listed GOAT on chainlist at [https://chainlist.org/chain/2345](https://chainlist.org/chain/2345).
### Scenario
When the user add GOAT Network into their metamask, but Metamask can not get the correct gas for their transaction.
### Design
_No response_
### Technical Details
We dived into the issue and found that `https://gas.api.cx.metamask.io/networks/2345/suggestedGasFees` doesn't work. and from this comment (https://github.com/MetaMask/metamask-extension/issues/25655#issuecomment-2270524318), it says `suggestedGasFees` doesn't use the chain's `eth_estimateGas`.
**We need to use our own `eth_estimateGas` because GOAT Network is a Bitcoin L2, and the gas token is wrapped BTC**.
GOAT Network:
* Explorer: [explorer.goat.network](explorer.goat.network)
* RPC: [rpc.goat.network](rpc.goat.network)
### Threat Modeling Framework
_No response_
### Acceptance Criteria
_No response_
### Stakeholder review needed before the work gets merged
- [x] Engineering (needed in most cases)
- [ ] Design
- [ ] Product
- [ ] QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
- [ ] Security
- [ ] Legal
- [ ] Marketing
- [ ] Management (please specify)
- [ ] Other (please specify)
### References
_No response_
Contributor guide
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.
Research direction
Start by tracing the MetaMask gas-estimation path that calls https://gas.api.cx.metamask.io/networks/2345/suggestedGasFees, then compare it with the GOAT Network RPC at https://rpc.goat.network. Done means GOAT Network chain ID 2345 can receive a correct gas estimate using its own eth_estimateGas behavior, including its wrapped BTC gas token.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend-api-design, blockchain
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100