load_wallet
Function
def load_wallet(address, secret):
file_path = "./data/wallets/{}/keystore".format(address)
if not os.path.exists(file_path):
raise FileNotFoundError
keystore = "\n".join([line.strip() for line in open(file_path, 'r+')])
private_key = web3.eth.account.decrypt(keystore, secret)
return web3.eth.account.from_key(private_key)