Skip to content

Instantly share code, notes, and snippets.

@anthonykasza
Last active June 22, 2022 14:04
Show Gist options
  • Save anthonykasza/c747dbc116cf6b8bd9ce6b1344c05984 to your computer and use it in GitHub Desktop.
Save anthonykasza/c747dbc116cf6b8bd9ce6b1344c05984 to your computer and use it in GitHub Desktop.
vanity EOA generator
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