Skip to content

Instantly share code, notes, and snippets.

@Aviksaikat
Created April 22, 2023 19:32
Show Gist options
  • Save Aviksaikat/b583ae73fb80e498cdf12c564bc52068 to your computer and use it in GitHub Desktop.
Save Aviksaikat/b583ae73fb80e498cdf12c564bc52068 to your computer and use it in GitHub Desktop.
Get the public address of an EOA from private key
from brownie import web3
private_key = "0x5381b53e8e72bd93697d74c7b4581a7291392794e409d81367d2a90dd2fd7030"
PA = web3.eth.account.from_key(private_key)
# Get public address from a signer wallet
Public_Address = PA.address
print(Public_Address)
# 0xF4c5a911AdB8521d716d4d5824Fa19880D376eF6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment