Skip to content
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

Generating accounts with defined "internal" hex digits using cast wallet vanity #8285

Closed
radeksvarz opened this issue Jun 28, 2024 · 2 comments
Labels
T-feature Type: feature

Comments

@radeksvarz
Copy link

Component

Cast

Describe the feature you would like

cast wallet vanity has --start-with and --end-with options

That is useful for gas savings when starting / ending with zeros.

Another use case emerged - the vanity addresses with "labels" , ie. some specific hex digits - like 0xdead

The problem is that starting/ending with these "labels" has impact on the security when phishing actors try to mimic the accounts. ( The root cause is that the wallets are presenting the account with 4 starting and 4 ending hex digits.)

The proposal is to add option --having (<what>, <position>), where are the desired hex digits and is the starting 0 based position of these hex digits in the account address.

Examples:

cast wallet vanity --having (0xbeef, 4)
Address: 0xCe11beef58de187b01804dBC35393BEa04EB3405

Additional context

No response

@radeksvarz radeksvarz added the T-feature Type: feature label Jun 28, 2024
@DaniPopes
Copy link
Member

Maybe it should be documented better, but you can already achieve this with a regex:

$ cast wallet vanity --starts-with '.{4}beef'
Starting to generate vanity address...
Successfully found vanity address in 0 seconds.
Address: 0x6c81beEf97f0B1b3bab68c6465033BA8FD854DA1
Private Key: 0x59e00586d198ce469ee2c6f31a1c21e806c03eb0bccb795bb39dd0e5d86830ca

@radeksvarz
Copy link
Author

Maybe it should be documented better, but you can already achieve this with a regex:

$ cast wallet vanity --starts-with '.{4}beef'

This is even better. I already wanted to suggest pattern like templating.

Can we reopen this ticket for the doc improvement? (Just checked the book, indeed it is not there.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-feature Type: feature
Projects
None yet
Development

No branches or pull requests

2 participants