Precompute contract addresses from deployer and nonce (CREATE) or salt and init code hash (CREATE2).
Loading tool
About CREATE / CREATE2 Address
Precompute a contract's address before it is deployed. CREATE mode takes the deployer address and nonce and lists the address for that nonce and the next nine. CREATE2 mode takes the factory address, a salt (hex, or text hashed with keccak256) and the init code or its hash, with presets for common factories such as the Deterministic Deployment Proxy, CreateX, Safe Singleton Factory and ImmutableCreate2Factory.
Common uses
- Know a contract's address in advance to configure other contracts or front ends
- Plan deployments that land at the same address on multiple chains
- Check the address a Foundry script will deploy to via the deterministic deployment proxy
- Verify that a factory deployed to the expected address
FAQ
- How is a contract address calculated with CREATE?
- It is the last 20 bytes of keccak256(rlp([sender, nonce])). For an EOA the nonce is its transaction count; for a contract it is the number of contracts it has created, starting at 1.
- How is a CREATE2 address calculated?
- It is the last 20 bytes of keccak256(0xff ++ deployer ++ salt ++ keccak256(init_code)), as defined in EIP-1014. It does not depend on the nonce.
- Why does my CREATE2 address differ from the deployed one?
- The init code must include the ABI-encoded constructor arguments, and the deployer must be the contract that executes CREATE2 (the factory), not your wallet. Some factories, such as CreateX, also transform the salt.