Skip to content

Commit

Permalink
config - default_contract_owner
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdefinitelyahuman committed Feb 18, 2019
1 parent b04cc90 commit 1e3f643
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config.json
Expand Up @@ -17,7 +17,8 @@
},
"test":{
"always_transact": true,
"gas_limit": 6500000
"gas_limit": 6500000,
"default_contract_owner": false
},
"solc":{
"optimize": true,
Expand Down
5 changes: 5 additions & 0 deletions lib/components/contract.py
Expand Up @@ -213,6 +213,11 @@ def __init__(self, address, build, owner, tx=None):
super().__init__(build)
self.tx = tx
self.bytecode = web3.eth.getCode(address).hex()[2:]
if (
config.ARGV['mode'] != "console" and not
CONFIG['test']['default_contract_owner']
):
owner = None
self._owner = owner
self._contract = web3.eth.contract(address = address, abi = self.abi)
for i in [i for i in self.abi if i['type']=="function"]:
Expand Down

0 comments on commit 1e3f643

Please sign in to comment.