mirror of
git://holbrook.no/eth-accounts-index
synced 2024-11-22 00:56:46 +01:00
Rename contracts-dir flag to abi-dir, use package-data as abi dir
This commit is contained in:
parent
05234aa73c
commit
f8a6a67c26
@ -1,3 +1,6 @@
|
||||
- 0.0.7
|
||||
- Rename contracts-dir flag to abi-dir
|
||||
- Use package data dir as default abi dir
|
||||
- 0.0.6
|
||||
* Add owner flag to deploy script
|
||||
- 0.0.5
|
||||
|
@ -21,13 +21,16 @@ logg = logging.getLogger()
|
||||
logging.getLogger('web3').setLevel(logging.WARNING)
|
||||
logging.getLogger('urllib3').setLevel(logging.WARNING)
|
||||
|
||||
script_dir = os.path.dirname(__file__)
|
||||
data_dir = os.path.join(script_dir, '..', 'data')
|
||||
|
||||
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')
|
||||
argparser.add_argument('--abi-dir', dest='abi_dir', type=str, default=data_dir, help='Directory containing bytecode and abi (default: {})'.format(data_dir))
|
||||
argparser.add_argument('-v', action='store_true', help='Be verbose')
|
||||
args = argparser.parse_args()
|
||||
|
||||
@ -37,11 +40,11 @@ if args.v:
|
||||
def main():
|
||||
w3 = web3.Web3(web3.Web3.HTTPProvider(args.p))
|
||||
|
||||
f = open(os.path.join(args.contracts_dir, 'AccountsIndex.abi.json'), 'r')
|
||||
f = open(os.path.join(args.abi_dir, 'AccountsIndex.abi.json'), 'r')
|
||||
abi = json.load(f)
|
||||
f.close()
|
||||
|
||||
f = open(os.path.join(args.contracts_dir, 'AccountsIndex.bin'), 'r')
|
||||
f = open(os.path.join(args.abi_dir, 'AccountsIndex.bin'), 'r')
|
||||
bytecode = f.read()
|
||||
f.close()
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[metadata]
|
||||
name = eth-accounts-index
|
||||
version = 0.0.6
|
||||
version = 0.0.7
|
||||
description = Accounts index evm contract tooling with permissioned writes
|
||||
author = Louis Holbrook
|
||||
author_email = dev@holbrook.no
|
||||
|
Loading…
Reference in New Issue
Block a user