Add owner flag to deploy script

This commit is contained in:
nolash 2020-12-08 20:04:33 +01:00
parent b278d2fb69
commit 1b37e0726a
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
3 changed files with 16 additions and 1 deletions

View File

@ -1,3 +1,5 @@
- 0.0.6
* Add owner flag to deploy script
- 0.0.5
* Rename solidity file, add return values from evm functions
- 0.0.4

View File

@ -24,6 +24,7 @@ logging.getLogger('urllib3').setLevel(logging.WARNING)
argparser = argparse.ArgumentParser()
argparser.add_argument('-p', '--provider', dest='p', default='http://localhost:8545', type=str, help='Web3 provider url (http only)')
argparser.add_argument('-w', '--writer', dest='w', action='append', type=str, help='Writer to add')
argparser.add_argument('-o', '--owner', dest='o', type=str, help='Accounts index owner')
argparser.add_argument('-a', '--account', dest='a', action='append', type=str, help='Account to add')
argparser.add_argument('-k', '--keep-sender', dest='k', action='store_true', help='If set, sender will be kept as writer')
argparser.add_argument('--contracts-dir', dest='contracts_dir', default='.', help='Directory containing bytecode and abi')
@ -45,6 +46,8 @@ def main():
f.close()
w3.eth.defaultAccount = w3.eth.accounts[0]
if args.o != None:
w3.eth.defaultAccount = web3.Web3.toChecksumAddress(args.o)
c = w3.eth.contract(abi=abi, bytecode=bytecode)
tx_hash = c.constructor().transact({'from': w3.eth.accounts[0]})

View File

@ -1,6 +1,6 @@
[metadata]
name = eth-accounts-index
version = 0.0.5
version = 0.0.6
description = Accounts index evm contract tooling with permissioned writes
author = Louis Holbrook
author_email = dev@holbrook.no
@ -29,6 +29,16 @@ packages =
install_requires =
confini==0.3.2
web3==5.12.2
tests_require =
pytest==6.0.1
eth-tester==0.5.0b2
py-evm==0.3.0a20
[options.extras_require]
testing =
pytest==6.0.1
eth-tester==0.5.0b2
py-evm==0.3.0a20
[options.package_data]
* = **/*.abi.json