mirror of
https://github.com/chaintool-py/eth-erc20.git
synced 2024-11-22 09:46:46 +01:00
Add owner flag to deploy script
This commit is contained in:
parent
99679fe99f
commit
646fc8c1e1
@ -1,3 +1,5 @@
|
|||||||
|
* 0.0.5
|
||||||
|
- Add token owner flag to deploy script
|
||||||
* 0.0.4
|
* 0.0.4
|
||||||
- Bundle abi in data subfolder
|
- Bundle abi in data subfolder
|
||||||
* 0.0.3
|
* 0.0.3
|
||||||
|
@ -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('-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('-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('-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('-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('-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')
|
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()
|
f.close()
|
||||||
|
|
||||||
w3.eth.defaultAccount = w3.eth.accounts[0]
|
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)
|
c = w3.eth.contract(abi=abi, bytecode=bytecode)
|
||||||
tx_hash = c.constructor(args.n, args.s, args.d).transact()
|
tx_hash = c.constructor(args.n, args.s, args.d).transact()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = giftable-erc20-token
|
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.
|
description = Simple ERC20 contract with deployment script that lets any address mint and gift itself tokens.
|
||||||
author = Louis Holbrook
|
author = Louis Holbrook
|
||||||
author_email = dev@holbrook.no
|
author_email = dev@holbrook.no
|
||||||
|
Loading…
Reference in New Issue
Block a user