Rename contracts-dir flag to abi-dir, correct default data path

This commit is contained in:
nolash 2020-12-11 16:45:01 +01:00
parent 706a1fcd65
commit ea06a984ce
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
2 changed files with 8 additions and 2 deletions

View File

@ -22,6 +22,9 @@ 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('-n', '--name', dest='n', default='Giftable Token', type=str, help='Token name')
@ -30,7 +33,7 @@ argparser.add_argument('-d', '--decimals', dest='d', default=18, type=int, help=
argparser.add_argument('-o', '--owner', dest='o', type=str, help='Reserve owner account')
argparser.add_argument('-a', '--account', dest='a', action='append', type=str, help='Account to fund')
argparser.add_argument('-m', '--minter', dest='m', action='append', type=str, help='Minter to add')
argparser.add_argument('--abi-dir', dest='abi_dir', type=str, 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')
argparser.add_argument('amount', type=int, help='Initial token supply (will be owned by contract creator)')
args = argparser.parse_args()

View File

@ -22,11 +22,14 @@ 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('-t', '--token-address', required='True', dest='t', type=str, help='Giftable token address')
argparser.add_argument('-m', '--minter-address', dest='m', type=str, help='Minter account address')
argparser.add_argument('--abi-dir', dest='abi_dir', type=str, 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')
argparser.add_argument('-r', '--recipient-address', dest='r', type=str, help='Recipient account address')
argparser.add_argument('amount', type=int, help='Amount of tokens to mint and gift')