Downloads MetaMask from GitHub, patches it for EIP-7702 delegation, and produces a standalone unpacked extension. Never touches installed extensions.
./patch.sh # download + patch MetaMask v13.16.1
./patch.sh 13.17.0 # use a different versionThen load in browser:
- Go to
chrome://extensions→ enable Developer Mode - Click Load unpacked → select the
metamask-patched/directory - Pin the patched MetaMask and use it alongside or instead of the store version
MetaMask blocks dapp-initiated EIP-7702 (setCode) transactions with 5 guards. Three are bugs ("0x04" !== "0x4" string comparison), two are intentional blocks.
| # | Description | Root Cause |
|---|---|---|
| 1 | External EIP-7702 transactions are not supported |
Intentional block |
| 2 | External signature requests ... not supported |
Intentional block |
| 3 | Invalid transaction envelope type: "0x04" |
"0x04" !== "0x4" bug |
| 4 | authorizationList requires type: "0x4" |
Same bug |
| 5 | maxFeePerGas requires type: "0x2, 0x4" |
Same bug |
- Downloads official Chrome build from GitHub Releases
- Extracts to
metamask-patched/ - Auto-detects which JS file contains each guard (
find_guard_file) - Guards 1–2: fixed-string replacement (error messages)
- Guards 3–5: regex with perl backreferences (handles minified variable name changes)
- Downloads cached in
.cache/— re-runs don't re-download
| Version | Guards | Notes |
|---|---|---|
| v13.15.0 | 5/5 ✅ | Guard 2 in common-3.js |
| v13.16.1 | 5/5 ✅ | Guard 1 in common-5.js |
| v13.17.0 | 5/5 ✅ | Guard 1 moved to common-6.js |
curl, unzip, perl
Warning
This disables security checks. Use for development only. MetaMask may enable EIP-7702 natively in a future release.