Skip to content

Fix Switch level deployment failure - Issue #837#840

Open
JunaidCD wants to merge 1 commit intoOpenZeppelin:masterfrom
JunaidCD:first-contribution
Open

Fix Switch level deployment failure - Issue #837#840
JunaidCD wants to merge 1 commit intoOpenZeppelin:masterfrom
JunaidCD:first-contribution

Conversation

@JunaidCD
Copy link

@JunaidCD JunaidCD commented Feb 8, 2026

Bug Fix Summary

  • Fixed Switch level deployment failures caused by insufficient gas limits
  • Updated deprecated MetaMask sendAsync to modern ethereum.request()
  • Added proper error handling to prevent frontend crashes
  • Increased instanceGas from 250,000 to 1,000,000 for Switch level

Issue Reference

Fixes #837 where Switch level instance deployment fails with transaction reverts and frontend crashes.

Changes Made

  • client/src/utils/ethutil.js:
    Updated MetaMask integration from deprecated sendAsync to modern ethereum.request() with proper error handling
  • client/src/gamedata/gamedata.json:
    Increased Switch level instanceGas from 250,000 to 1,000,000

… increase gas limit

- Replace deprecated sendAsync with modern ethereum.request() method
- Add proper error handling for MetaMask signing failures
- Increase Switch level instanceGas from 250000 to 1000000 to prevent deployment failures
- Add fallback support for older providers

Fixes issue OpenZeppelin#837 where Switch level instance deployment fails with transaction reverts and frontend crashes.
@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2026

Thank you for your contribution to OpenZeppelin Ethernaut. Before being able to integrate those changes, we would like you to sign our Contributor License Agreement.
You can sign the CLA by just posting a Pull Request Comment with the sentence below. Thanks.


I confirm that I have read and hereby agree to the OpenZeppelin Contributor License Agreement


First Contributor seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@JunaidCD
Copy link
Author

JunaidCD commented Feb 9, 2026

I confirm that I have read and hereby agree to the OpenZeppelin Contributor License Agreement

@JunaidCD JunaidCD closed this Feb 9, 2026
@JunaidCD JunaidCD reopened this Feb 9, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Feb 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch Level Instance Deployment Fails

1 participant