A vanity address is computed, not assigned
When a contract is deployed with CREATE2, its address is fixed before the transaction is sent. That is what makes vanity addresses possible: the address is derived from the factory, the salt and the contract's init code, so you can keep changing the salt until the address looks the way you want. Nobody assigns it, and nothing about it is random after the fact.

The formula
CREATE2 derives the address like this:
address = keccak256(0xff ++ factory ++ salt ++ keccak256(init_code))[last 20 bytes]
factory — the contract that executes CREATE2. Change it and every computed address changes.
salt — a 32-byte value you choose. This is the only input you grind.
init_code — the creation bytecode plus the encoded constructor arguments.
What you grind, and what invalidates it
Grinding means trying salts until the output matches a target, usually a prefix or a suffix. The work multiplies by 16 for every extra hex character: 4 characters averages 16^4 = 65,536 attempts, 6 characters is about 16.7 million. That is why 4 characters is minutes on a laptop and 7 characters needs GPUs.
The fragile part is init_code. Change one character in the contract, change a constructor argument, or switch factories, and the hash changes — every salt you found becomes useless. Finish the contract, freeze the constructor arguments, then grind.
Why not just deploy normally?
A normal deployment uses CREATE, where the address depends on the deployer's nonce. You cannot predict it reliably, and you cannot re-roll it without spending transactions. CREATE2 gives you the address up front, which is what makes precomputed branding possible: the address can go into a logo, a listing or a pool configuration before the contract exists.
Step by step
Finalize the token contract and its constructor arguments.
Compile it and get the init code: creation bytecode plus encoded arguments.
Choose the target: a prefix, a suffix, or both.
Scan salts with a CREATE2 vanity tool. GTokenTool runs this in the browser: vanity address generator.
Deploy through the same factory with the salt you kept.
Verify on BscScan that the deployed address matches the computed one.
Common mistakes
Editing the contract after grinding.
Recompiling with a different compiler version or optimizer setting — the bytecode changes and so does the hash.
Deploying through a different factory than the one used in the computation.
Letting a third party keep the salt and factory. They can deploy first, or resell the address.
What a vanity address does not do
It does not make the contract safer. A honeypot with a beautiful address is still a honeypot. Address cosmetics and contract logic are separate concerns: audit the logic first, then decide whether the vanity step is worth it.
FAQ
Can I get a vanity contract address without writing code?
Yes. The generator scans salts for you and deploys through its factory; paste the same bytecode it hashed and deploy with the salt it found.
Why did my salt stop working?
The computed address depends on the init code and the factory. If the bytecode, constructor arguments or factory changed, that salt no longer produces the target address.
How long does a 4-character vanity address take?
About 65,536 attempts on average — seconds to a few minutes on a normal computer. Each extra character multiplies the work by 16.
Does a vanity address affect token security?
No. It only changes how the address looks. Security depends on the contract logic and on who holds admin rights.
The address is the cheapest part of a launch to get right. Decide it before deployment, because after CREATE2 runs the address cannot change.
