Deploy your BTB Finance token with a custom vanity address across multiple chains using LayerZero.
- Find Your Vanity Address
# Run the vanity address finder (replace BB with your desired prefix/suffix)
node scripts/findVanityAddressParallel.js BB BB
# Example output:
# Found matching address!
# Contract Address: 0xBB...BB
# Deployer Address: 0x...
# Private Key: 0x...
- Set Up Environment
# Copy the private key from step 1
cp .env.example .env
# Add your private key to .env
PRIVATE_KEY=your_private_key_from_step_1
- Deploy Contracts
# Make script executable
chmod +x deploy-all.sh
# Deploy to all chains
./deploy-all.sh
The contract will be deployed to:
- Ethereum
- Polygon
- Arbitrum
- Optimism (Main Chain - where tokens are minted)
- Base
- BNB Chain
- Blast
- World
- Avalanche
- Zora
node scripts/findVanityAddressParallel.js <prefix> <suffix> [caseSensitive]
# Examples:
# Find address starting and ending with 'BB' (case insensitive)
node scripts/findVanityAddressParallel.js BB BB
# Find address starting with 'Aa' and ending with 'Zz' (case sensitive)
node scripts/findVanityAddressParallel.js Aa Zz true
The script will:
- Generate addresses until it finds one matching your pattern
- Save the result to
vanity-addresses.json
- Display the private key to use for deployment
- Save Your Private Key: After finding your vanity address, immediately save the private key
- Funding: Ensure your deployer address has enough native tokens on each chain
- Main Chain: Optimism is set as the main chain where the initial token supply is minted
- Cross-Chain: Use LayerZero's OFT features to transfer tokens between chains
- Total Supply: 1 billion tokens
- Minting: Only on Optimism (main chain)
- Cross-Chain: LayerZero OFT integration for seamless transfers
- Vanity: Custom contract address matching your pattern
├── contracts/ # Smart contracts
│ └── BTBFinance.sol # Main token contract
├── script/ # Deployment scripts
│ └── DeployAll.s.sol
├── scripts/ # Utility scripts
│ └── findVanityAddressParallel.js
└── deploy-all.sh # Main deployment script
# Format code
pnpm prettier
# Type check
pnpm typecheck
# Run tests
pnpm test
# Build for production
pnpm build
-
Deployment Fails
- Ensure you have enough native tokens on each chain
- Check RPC endpoints in
.env
file - Try deploying to one chain at a time
-
Vanity Address Issues
- Try shorter patterns for faster results
- Use case-insensitive mode for more matches
- Check
vanity-addresses.json
for saved results
-
Cross-Chain Transfers
- Wait for LayerZero confirmation
- Ensure destination chain has gas
- Always keep your private key secure and never share it
- Test the deployment on testnets first before deploying to mainnet
- Ensure you have enough native tokens on each chain for deployment
- Use TypeScript's type system to catch potential errors early
For issues or questions:
- Check the troubleshooting section
- Open an issue in this repository