Skip to content

Conversation

@wakamex
Copy link
Contributor

@wakamex wakamex commented Jun 24, 2025

Summary

This PR adds support for creating EulerSwap pools that are compatible with Uniswap v4's hook system.

Problem Solved

EulerSwap pools must act as Uniswap v4 hooks, which requires their addresses to have specific permission bits. Since EulerSwap uses MetaProxy deployment, we need to mine salts that produce valid hook addresses.

Solution

  • Added scenario that automatically mines valid salts using HookMiner
  • Added utility script for mining salts with custom pool configurations
  • Added comprehensive documentation in

Changes

  • New scenario: - Deploys a USDC/USDT pool with automatic salt mining
  • Salt mining utility: - Standalone script for mining salts
  • Documentation: - Complete guide on pool creation
  • Script improvement: Added flag and error handling to

Usage

# Deploy pool with automatic salt mining
./deploy-scenario.sh EulerSwapPoolCreation

# Mine salt for custom pool configuration
forge script script/MineSaltForPool.s.sol

The solution successfully creates pools on fresh anvil instances by finding salts that produce addresses with the correct hook permission bits (0x28A8).

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

wakamex added 3 commits June 22, 2025 12:50
- Add EulerSwapPoolCreation scenario that automatically mines valid salts
- Add MineSaltForPool script for custom pool configurations
- Add comprehensive documentation in POOL_CREATION.md
- Successfully creates pools compatible with Uniswap v4 hook requirements

The solution uses HookMiner to find salts that produce addresses with correct
permission bits, solving the MetaProxy deployment challenge.
- Add -vv flag for better visibility of console.log statements
- Add || true to evm_* commands to handle RPC methods that may not be supported
@hoytech hoytech merged commit 687bda1 into euler-xyz:master Jun 24, 2025
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