Created
January 20, 2023 14:36
-
-
Save a26nine/b0f905e7f1aeae6fa4a7ecfaefcb9042 to your computer and use it in GitHub Desktop.
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 web3 import Web3, HTTPProvider | |
endpoint = 'YOUR_ENDPOINT_URL_HERE' | |
connection = Web3(HTTPProvider(endpoint)) | |
address = input("Enter ETH wallet address: ") | |
balance = connection.fromWei( | |
connection.eth.getBalance(address, 'latest'), 'ether') | |
print(f"Balance: {balance} ether") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment