From 05234aa73c131325bbe4a680436021ee61312ffc Mon Sep 17 00:00:00 2001 From: nolash Date: Tue, 8 Dec 2020 20:54:21 +0100 Subject: [PATCH] Remove hardcoded sender address --- python/eth_accounts_index/runnable/deploy.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/eth_accounts_index/runnable/deploy.py b/python/eth_accounts_index/runnable/deploy.py index 293557a..bf7646e 100644 --- a/python/eth_accounts_index/runnable/deploy.py +++ b/python/eth_accounts_index/runnable/deploy.py @@ -47,10 +47,11 @@ def main(): w3.eth.defaultAccount = w3.eth.accounts[0] if args.o != None: - w3.eth.defaultAccount = web3.Web3.toChecksumAddress(args.o) + w3.eth.defaultAccount = args.o + logg.debug('owner address {}'.format(w3.eth.defaultAccount)) c = w3.eth.contract(abi=abi, bytecode=bytecode) - tx_hash = c.constructor().transact({'from': w3.eth.accounts[0]}) + tx_hash = c.constructor().transact() rcpt = w3.eth.getTransactionReceipt(tx_hash) @@ -72,7 +73,7 @@ def main(): if not args.k: logg.debug('deleting sender for write list') - c.functions.deleteWriter(w3.eth.accounts[0]).transact() + c.functions.deleteWriter(w3.eth.defaultAccount).transact() print(address)