eth-erc20

ERC20 interface and example giftable token contract
Log | Files | Refs | LICENSE

commit ea06a984ce3601c8c19aad8969ed3bed2ef69fb7
parent 706a1fcd65b4811662672258f52de05cbce9b3ac
Author: nolash <dev@holbrook.no>
Date:   Fri, 11 Dec 2020 16:45:01 +0100

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

Diffstat:
Mpython/giftable_erc20_token/runnable/deploy.py | 5++++-
Mpython/giftable_erc20_token/runnable/gift.py | 5++++-
2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/python/giftable_erc20_token/runnable/deploy.py b/python/giftable_erc20_token/runnable/deploy.py @@ -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() diff --git a/python/giftable_erc20_token/runnable/gift.py b/python/giftable_erc20_token/runnable/gift.py @@ -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')