eth-erc20

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

commit 646fc8c1e1259f3871475c9fdf4ba0e0eeafbd50
parent 99679fe99f5f54716cf74f1b3a18131cb9659b6c
Author: nolash <dev@holbrook.no>
Date:   Tue,  8 Dec 2020 19:37:20 +0100

Add owner flag to deploy script

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

diff --git a/python/CHANGELOG b/python/CHANGELOG @@ -1,3 +1,5 @@ +* 0.0.5 + - Add token owner flag to deploy script * 0.0.4 - Bundle abi in data subfolder * 0.0.3 diff --git a/python/giftable_erc20_token/runnable/deploy.py b/python/giftable_erc20_token/runnable/deploy.py @@ -27,6 +27,7 @@ argparser.add_argument('-p', '--provider', dest='p', default='http://localhost:8 argparser.add_argument('-n', '--name', dest='n', default='Giftable Token', type=str, help='Token name') argparser.add_argument('-s', '--symbol', dest='s', default='GFT', type=str, help='Token symbol') argparser.add_argument('-d', '--decimals', dest='d', default=18, type=int, help='Token decimals') +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('--contracts-dir', dest='contracts_dir', type=str, default='.', help='Directory containing bytecode and abi') @@ -49,6 +50,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(args.n, args.s, args.d).transact() diff --git a/python/setup.cfg b/python/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = giftable-erc20-token -version = 0.0.4 +version = 0.0.5 description = Simple ERC20 contract with deployment script that lets any address mint and gift itself tokens. author = Louis Holbrook author_email = dev@holbrook.no