Skip to content

feat: add reproducible CREATE2 deployment infrastructure#1874

Closed
0xAxiom wants to merge 9 commits intocoinbase:mainfrom
0xAxiom:feat/reproducible-create2-deployments
Closed

feat: add reproducible CREATE2 deployment infrastructure#1874
0xAxiom wants to merge 9 commits intocoinbase:mainfrom
0xAxiom:feat/reproducible-create2-deployments

Conversation

@0xAxiom
Copy link
Copy Markdown
Contributor

@0xAxiom 0xAxiom commented Mar 30, 2026

Problem

Third parties cannot reproduce x402 Permit2 Proxy deployments on new EVM chains because the init code hash depends on the exact compiler environment used during the original build. Different build environments produce different CBOR metadata, resulting in different init code hashes and breaking the CREATE2 deterministic address calculation.

This blocks ecosystem growth as new chains require manual deployment by Coinbase instead of community-driven deployment to the canonical vanity addresses.

Solution

This PR provides the infrastructure to solve the reproducible deployment problem:

🔧 ExtractInitCode.s.sol Script

  • Extracts raw creation bytecode + constructor args from current build
  • Computes init code hashes and expected CREATE2 addresses
  • Provides template for generating deployment artifacts

📁 Deployments Directory Structure

  • with organized deployment artifacts
  • Placeholder for and files
  • Complete deployment workflow documentation

📖 Comprehensive Documentation

  • Step-by-step deployment instructions using Arachnid CREATE2 deployer
  • Technical background on CREATE2 deterministic deployments
  • Troubleshooting guide for common deployment issues

🎯 Target Addresses

  • x402ExactPermit2Proxy:
  • x402UptoPermit2Proxy:

Next Steps

To complete the solution, someone with access to the original build environment or existing deployment transaction data needs to:

  1. Extract the original init code that produces the correct init code hashes
  2. Populate the and files in the deployments directory
  3. Verify the addresses match the canonical vanity addresses

Impact

Immediate: Provides framework and tooling for reproducible deployments
Future: Enables permissionless deployment to canonical addresses on any EVM chain

This directly addresses the MegaETH deployment request in #1800 and establishes a pattern for all future chain deployments.

Resolves #1800

0xAxiom added 9 commits March 24, 2026 05:29
Addresses issue coinbase#1759 - x402 agent onboarding complexity

Features:
- Zero-config wallet creation and discovery
- Drop-in fetch replacement with automatic payment handling
- Built-in spending limits for safety
- Multi-chain support (EVM + optional Solana)
- Simple API: createX402Client() -> client()

Before: Complex setup, multiple imports, manual configuration
After: One function call, automatic payment handling

This addresses user feedback that x402 has better protocol design
than MPP/Tempo but worse developer experience. Users can now start
making x402 payments with minimal setup while maintaining the
protocol's technical advantages.
…mit2 Proxies

Addresses issue coinbase#1800: enables third-party deployment to canonical vanity addresses by providing raw creation bytecode and deployment tooling.

Key components:
- ExtractInitCode.s.sol script for bytecode extraction
- deployments/ directory with README documentation
- Complete deployment instructions using Arachnid CREATE2 deployer
- Technical documentation of init code hash reproducibility issue

This infrastructure allows anyone to deploy x402 Permit2 Proxies to their canonical addresses (0x402085c248eea27d92e8b30b2c58ed07f9e20001 and 0x402039b3d6e6bec5a02c2c9fd937ac17a6940002) on any EVM chain without requiring access to the original build environment.

Next step: Extract original init code from existing deployments or build environment to populate the .initcode and .salt files.

Resolves: coinbase#1800
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 30, 2026

@0xAxiom is attempting to deploy a commit to the Coinbase Team on Vercel.

A member of the Team first needs to authorize it.

@cb-heimdall
Copy link
Copy Markdown

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

feat: publish creation bytecode for reproducible cross-chain CREATE2 deployments

3 participants