mirror of
https://github.com/chaintool-py/eth-erc20.git
synced 2024-11-29 13:16:46 +01:00
Rehabilitate add script, add to packaging
This commit is contained in:
parent
484be11582
commit
a15fe1d6a8
@ -41,7 +41,7 @@ argparser.add_argument('-a', '--token-address', required='True', dest='a', type=
|
|||||||
argparser.add_argument('-y', '--key-file', dest='y', type=str, help='Ethereum keystore file to use for signing')
|
argparser.add_argument('-y', '--key-file', dest='y', type=str, help='Ethereum keystore file to use for signing')
|
||||||
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('--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('-v', action='store_true', help='Be verbose')
|
||||||
argparser.add_argument('minter_address', type=int, help='Minter address to add')
|
argparser.add_argument('minter_address', type=str, help='Minter address to add')
|
||||||
args = argparser.parse_args()
|
args = argparser.parse_args()
|
||||||
|
|
||||||
if args.v:
|
if args.v:
|
||||||
@ -86,13 +86,12 @@ def main():
|
|||||||
|
|
||||||
c = w3.eth.contract(abi=abi, address=args.a)
|
c = w3.eth.contract(abi=abi, address=args.a)
|
||||||
|
|
||||||
recipient = signer_address
|
if not web3.Web3.isChecksumAddress(args.minter_address):
|
||||||
if args.recipient != None:
|
raise ValueError('Minter is not a valid address {}'.format(args.minter_address))
|
||||||
recipient = args.recipient
|
|
||||||
|
|
||||||
(tx_hash, rcpt) = helper.sign_and_send(
|
(tx_hash, rcpt) = helper.sign_and_send(
|
||||||
[
|
[
|
||||||
c.functions.addMinter(args.recipient).buildTransaction,
|
c.functions.addMinter(args.minter_address).buildTransaction,
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = giftable-erc20-token
|
name = giftable-erc20-token
|
||||||
version = 0.0.7b9
|
version = 0.0.7b10
|
||||||
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
|
||||||
@ -39,3 +39,4 @@ install_requires =
|
|||||||
console_scripts =
|
console_scripts =
|
||||||
giftable-token-deploy = giftable_erc20_token.runnable.deploy:main
|
giftable-token-deploy = giftable_erc20_token.runnable.deploy:main
|
||||||
giftable-token-gift = giftable_erc20_token.runnable.gift:main
|
giftable-token-gift = giftable_erc20_token.runnable.gift:main
|
||||||
|
giftable-token-add = giftable_erc20_token.runnable.add:main
|
||||||
|
Loading…
Reference in New Issue
Block a user