eth-accounts-index

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

commit 1b37e0726aa8c9fca2d6ed7d749b1a936ab8c1ab
parent b278d2fb69f74d91b3da6eae7e1669b4c26dc42c
Author: nolash <dev@holbrook.no>
Date:   Tue,  8 Dec 2020 20:04:33 +0100

Add owner flag to deploy script

Diffstat:
Mpython/CHANGELOG | 2++
Mpython/eth_accounts_index/runnable/deploy.py | 3+++
Mpython/setup.cfg | 12+++++++++++-
3 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/python/CHANGELOG b/python/CHANGELOG @@ -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 diff --git a/python/eth_accounts_index/runnable/deploy.py b/python/eth_accounts_index/runnable/deploy.py @@ -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]}) diff --git a/python/setup.cfg b/python/setup.cfg @@ -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