cast create2
NAME
cast-create2 - Generate a deterministic contract address using CREATE2
SYNOPSIS
cast create2
[options]
DESCRIPTION
Generate a deterministic contract address using CREATE2
OPTIONS
--starts-with
hex
Prefix for the contract address.
--ends-with
hex
Suffix for the contract address
--matching
hex
Sequence that the address has to match
--case-sensitive
Case sensitive matching
--deployer
address
Address of the contract deployer [default: 0x4e59b44847b379578588920ca78fbf26c0b4956c
]
--init-code
hex
Init code of the contract to be deployed
--init-code-hash
hash
Init code hash of the contract to be deployed
--jobs
jobs
Number of threads to use. Defaults to and caps at the number of logical cores
--caller
address
Address of the caller. Used for the first 20 bytes of the salt
Common Options
-h
--help
Prints help information.
EXAMPLES
-
Generate a contract address that starts with
dead
:cast create2 --starts-with dead
-
Generate a contract address that ends with
beef
:cast create2 --ends-with beef
-
A more complex example:
cast create2 --starts-with dead --case-sensitive --deployer 0x0000000000FFe8B47B3e2130213B802212439497 --init-code-hash 0x0c591f26891d6443cf08c5be3584c1e6ae10a4c2f07c5c53218741e9755fb9cd