Last active
June 22, 2022 14:04
-
-
Save anthonykasza/c747dbc116cf6b8bd9ce6b1344c05984 to your computer and use it in GitHub Desktop.
vanity EOA generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from eth_account import Account | |
import secrets | |
prefix = "0xbca9" | |
while True: | |
priv = secrets.token_hex(32) | |
private_key = "0x" + priv | |
acct = Account.from_key(private_key) | |
if acct.address.startswith(prefix): | |
print("private key:", private_key) | |
print("Address:", acct.address) | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment