-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding --dry-run
& --quiet
Arguments for Testing Vanity Safe Addresses
#457
base: main
Are you sure you want to change the base?
Conversation
All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document, and I hereby sign the CLA. |
I have read the CLA Document and I hereby sign the CLA |
recheck |
@dysbulic I like your idea. I guess this runs inside of a script. So I think the solution should be to edit the code to allow vanity addresses, right? Could you share the script you are using with your code? |
#!/bin/bash
COUNT=${1:-30000}
OWNERS=(
'0xDfCc1215c82e39F89A617b1e587704090E84e536'
'0xAA82FB0Df1B866e4F04B154dE51ACd8734D7E688'
'0xEb4E3e9fA819E69e5Df4ea35b9C7973062C96de9'
'0x8a11D42Be55217369ff6C5cEE519D22c60952cfB'
)
KEY="0x$(cat /dev/urandom | tr -dc A-F0-9 | head -c64)"
while [[ $COUNT -gt 0 ]]; do
SALT=$(cat /dev/urandom | tr -dc 0-9 | head -c${2:-25})
ADDR=$(docker run -it safe-cli:testing safe-creator --threshold 2 --owners ${OWNERS[@]} --salt-nonce $SALT --dry-run --quiet https://mainnet.optimism.io $KEY)
echo "$(printf '%4d' $COUNT): $SALT: $ADDR"
COUNT=$((COUNT - 1))
done It's pretty slow, but it illustrates the procedure. (Also, I renamed |
--only-generate
& --quiet
Arguments for Testing Vanity Safe Addresses--dry-run
& --quiet
Arguments for Testing Vanity Safe Addresses
This PR adds support for two new arguments to the
safe-creator
command:--dry-run
and--quiet
.--dry-run
will cause the system to stop after the projected Safe address is generated. It also prevents the system from prompting before doing the generation.--quiet
limits the amount of information output to the console to prompts, errors, and the address of the generated Safe. If used in conjunction with--dry-run
, only the projected Safe address will be output, making it suitable for easy scripting.