0xdeadbeef
Tool used for computing vanity Gnosis Safe addresses.
This tool is currently hard-coded to only support the v1.3.0
Safe deployment:
GnosisSafeProxyFactory
0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2
GnosisSafe
0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552
CompatibilityFallbackHandler
0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4
Since this version of the Safe proxy factory uses CREATE2
op-code, we can change the final address by fiddling with the user-specified saltNonce
parameter. It works by randomly trying out different values for the saltNonce
parameter until it find ones that creates an address matching the desired prefix.
Building
For longer prefixes, this can take a very long time, so be sure to build with release:
cargo build --release
Usage
deadbeef --help
For example, to generate calldata for creating a Safe with initial owners of 0x1111111111111111111111111111111111111111
and 0x2222222222222222222222222222222222222222
and prefix 0xdeadbeef
:
deadbeef \
--owner 0x1111111111111111111111111111111111111111 \
--owner 0x2222222222222222222222222222222222222222 \
--prefix 0xdeadbeef
Note that the owner signature threshold defaults to 1 but can optionally be specified with:
deadbeef ... --threshold 2 ...
This will output some result like:
address: 0xdeaDbeef17411A25478b0a27BE1aD71533FB9E79
factory: 0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2
singleton: 0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552
fallback: 0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4
owners: 0x1111111111111111111111111111111111111111
0x2222222222222222222222222222222222222222
threshold: 1
calldata: 0x1688f0b9000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee7095520000000000000000000000000000000000000000000000000000000000000060496bc3e394a70708faee280d08458bea16b2a0d43b3b2d02cebcdf5714619c710000000000000000000000000000000000000000000000000000000000000184b63e800d0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000f48f2b2d2a534e402487b3ee7c18c33aec0fe5e4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000011111111111111111111111111111111111111110000000000000000000000002222222222222222222222222222222222222222000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Creating the Safe
The above command will generate some calldata for creating a Safe with the specified owners and threshold. To create the safe, simply execute a transaction to the factory address with the generated calldata. The transaction can be executed from any account (it can be done in MetaMask directly for example).
🥦
?
Is This Vegan Friendly Of course! No actual cows were harmed in the creation or continual use of this tool.
% alias deadbeef=seedfeed
% seedfeed \
--owner 0x1111111111111111111111111111111111111111 \
--owner 0x2222222222222222222222222222222222222222 \
--owner 0x3333333333333333333333333333333333333333 \
--threshold 2 \
--prefix 0x5eedfeed
address: 0x5EedFeED446B211419EBac9253FbB8b9556781D1
factory: 0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2
singleton: 0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552
fallback: 0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4
owners: 0x1111111111111111111111111111111111111111
0x2222222222222222222222222222222222222222
0x3333333333333333333333333333333333333333
threshold: 2
calldata: 0x1688f0b9000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee70955200000000000000000000000000000000000000000000000000000000000000605b237da2310f4948260ac5661d88f5150e5e62ca1f4faa76e3598bd427f212e800000000000000000000000000000000000000000000000000000000000001a4b63e800d0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180000000000000000000000000f48f2b2d2a534e402487b3ee7c18c33aec0fe5e40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000111111111111111111111111111111111111111100000000000000000000000022222222222222222222222222222222222222220000000000000000000000003333333333333333333333333333333333333333000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000