accounts-index

Accounts index evm contract tooling with permissioned writes
Log | Files | Refs

commit 05234aa73c131325bbe4a680436021ee61312ffc
parent 1b37e0726aa8c9fca2d6ed7d749b1a936ab8c1ab
Author: nolash <dev@holbrook.no>
Date:   Tue,  8 Dec 2020 20:54:21 +0100

Remove hardcoded sender address

Diffstat:
Mpython/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 @@ -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)