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.
Mine with --owner set to the deployer: the first 20 bytes of the token ID are its owner, and the
deploy scripts call SUB_ZERO.mint directly, which only the owner can do.
If the salt was mined for a different owner, that owner has to sign a permit that lets the
deployer call SUB_ZERO.claimGivenUpWithSig instead:
$ cast wallet sign --data --from-file script/eip712.jsonAdjust the script/eip712.json file with the correct DEPLOY_TOKEN_ID, nonce and claimer
accordingly, and replace the script's SUB_ZERO.mint call with claimGivenUpWithSig.
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
- Minting 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.