mirror of
git://holbrook.no/eth-accounts-index
synced 2024-11-16 14:46:45 +01:00
Remove hardcoded sender address
This commit is contained in:
parent
1b37e0726a
commit
05234aa73c
@ -47,10 +47,11 @@ def main():
|
|||||||
|
|
||||||
w3.eth.defaultAccount = w3.eth.accounts[0]
|
w3.eth.defaultAccount = w3.eth.accounts[0]
|
||||||
if args.o != None:
|
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)
|
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)
|
rcpt = w3.eth.getTransactionReceipt(tx_hash)
|
||||||
|
|
||||||
@ -72,7 +73,7 @@ def main():
|
|||||||
|
|
||||||
if not args.k:
|
if not args.k:
|
||||||
logg.debug('deleting sender for write list')
|
logg.debug('deleting sender for write list')
|
||||||
c.functions.deleteWriter(w3.eth.accounts[0]).transact()
|
c.functions.deleteWriter(w3.eth.defaultAccount).transact()
|
||||||
|
|
||||||
print(address)
|
print(address)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user