This repository contains the core contracts for the L2 Angstrom hook.
$ forge build$ forge test- Foundry installed
- vanity-miner-rust for mining CREATE3 vanity addresses (used with sub-zero-contracts)
- Wallet with funds on the target chain
We use vanity-miner-rust to mine a salt for CREATE3 deployment that results in a desired address property (e.g., leading zeros).
$ cargo run --release -- --owner <DEPLOYER_ADDRESS> --zeros 6This outputs a DEPLOY_TOKEN_ID and DEPLOY_TOKEN_NONCE used by the deploy script.
To sign the permit to give up vanity token so that we can call SUB_ZERO.claimGivenUpWithSig, use the following command:
$ cast wallet sign --data --from-file script/eip712.jsonAdjust the script/eip712.json file with the correct DEPLOY_TOKEN_ID and nonce accordingly.
With the output signature, update the signature in the deployment script.
Reference script/config.toml — currently configured for Base and Unichain with their respective Uniswap V4 PoolManager addresses.
The factory deployment script (script/AngstromL2Factory.s.sol) handles:
- Deploying the Huff-based hook address miner
- Claiming the vanity token from Sub Zero (if not already minted)
- Deploying
AngstromL2FactoryviaSUB_ZERO.deploy()
$ forge script script/AngstromL2Factory.s.sol --broadcast --sender <SENDER>- See audit for a list of audits done previously
- See SECURITY.md for security policies and disclosures.