Skip to content

add Pectra/EIP-7702 check to deploy_precheck.sh#147

Merged
david-uniswap merged 1 commit into
mainfrom
david-nick/precheck-pectra-7702
May 29, 2026
Merged

add Pectra/EIP-7702 check to deploy_precheck.sh#147
david-uniswap merged 1 commit into
mainfrom
david-nick/precheck-pectra-7702

Conversation

@david-uniswap

Copy link
Copy Markdown
Collaborator

Summary

Adds a Pectra/EIP-7702 probe to the deployment precheck script, following the same init-code pattern as the existing PUSH0 (Shanghai) and TSTORE (Cancun) tests.

The probe uses the BLS12-381 G1ADD precompile at address `0x0b` (EIP-2537) as a proxy for Pectra activation — EIP-2537 and EIP-7702 ship in the same hardfork, so a positive signal here implies 7702 is also enabled. A direct 7702 test would require sending a signed type-4 transaction, which a key-less precheck can't do.

How it works

Init code (28 bytes, hex `0x61008060006101006000600b61fffffa503d151560005360016000f3`):

```
PUSH2 0x80 out_size = 128
PUSH1 0x00 out_offset
PUSH2 0x100 in_size = 256
PUSH1 0x00 in_offset
PUSH1 0x0b addr = BLS12_G1ADD
PUSH2 0xffff gas
STATICCALL
POP
RETURNDATASIZE
ISZERO ISZERO normalize to 0x01 if returndatasize > 0
PUSH1 0x00 MSTORE8
PUSH1 0x01 PUSH1 0x00 RETURN
```

  • Prague active: precompile returns 128 bytes → init code returns `0x01`
  • Prague not active: STATICCALL to empty address returns 0 bytes → init code returns `0x00`

Tested against

  • Arc (5042): ✅ SUPPORTED
  • Robinhood (4663): ✅ SUPPORTED

Both line up with Calibur (EIP-7702 delegate) deploying cleanly to the canonical `0x000000009b1d0af20d8c6d0a44e162d11f9b8f00` on each chain in companion PRs (#137, #144).

Test plan

  • Run `script/util/deploy_precheck.sh ` against a Pectra-enabled chain → reports `✅ SUPPORTED`
  • Run against a pre-Pectra chain (e.g. older L2) → should report `❌ UNSUPPORTED`
  • Numbered section comments stay sequential (3=Pectra, 4=Deterministic Deployer, 5=Permit2, 6=Chain ID, 7=Etherscan)

🤖 Generated with Claude Code

Adds an init-code probe that STATICCALLs the BLS12-381 G1ADD precompile
(EIP-2537) and returns 0x01 if returndatasize > 0, else 0x00. EIP-2537
and EIP-7702 ship in the same Pectra/Prague hardfork, so a positive
signal implies 7702 is also enabled (a direct 7702 test would require
signing a type-4 transaction, which a key-less precheck can't do).

Renumbered downstream sections (Deterministic Deployer 3→4, Permit2
4→5, Chain ID 5→6, Etherscan 6→7) to keep the numbered comments
sequential.

Tested against Arc (5042) + Robinhood (4663) — both report SUPPORTED,
consistent with Calibur (EIP-7702 delegate) deploying cleanly to
0x000000009b1d0af20d8c6d0a44e162d11f9b8f00 on each.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@david-uniswap david-uniswap merged commit a8973ae into main May 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants