๐ What Is a Precomputed Address?
A precomputed address is the future address of a smart contract that has not yet been deployed, but can be known in advance using the CREATE2 opcode.
Unlike the normal CREATE, which depends on a walletโs nonce (not predictable by others), CREATE2 lets you generate a guaranteed contract address in advance based on:
- Deployer address (e.g., factory contract)
- A
salt value (random or user-specific)
- Contract creation bytecode (including constructor args)
๐ Why Use Precomputed Addresses?
๐ช Main Reason: You know the contractโs address before it's deployed
This lets you:
- Send ETH, tokens, NFTs to that address early
- Use it in off-chain logic
- Create gasless onboarding flows
- Build systems like counterfactual wallets, airdrops, and bridges
๐ How the Flow Works
1. Predict the address
- Call a function like
getAddress(owner, salt) on a factory contract.
- This returns the address where the smart contract will be deployed later.