Open Muhammad-Altabba opened 10 months ago
Can you run the command from "init-holders" folder?
It produced the exact same error when running from inside init-holders
.
Updating the content of private-key.py to the following resolved the issue:
#!/usr/bin/env python3
from web3 import Web3, HTTPProvider
import os
private_keys = './init-holders'
idx = 1
w3 = Web3(HTTPProvider('http://localhost:8545', request_kwargs={'timeout': 120}))
for keystore_file in os.listdir(private_keys):
with open("%s/%s" % (private_keys, keystore_file)) as keyfile:
encrypted_file = keyfile.read()
private_key = w3.eth.account.decrypt(encrypted_file, '')
acct = w3.eth.account.from_key(private_key)
print('Account %s: %s, private key: %s' % (idx, Web3.to_checksum_address(acct.address), private_key.hex()))
idx = idx + 1
I opened a PR for this.
I am trying to run for dev environment on Linux machine. I found the steps are bit confusing for just running for a dev env. Additionally when I run
python3 private-key.py
it givesWhat do you suggest? Thanks,