def token_mint(wallet, args, prompt_passwd=True):
token = get_asset_id(wallet, args[0])
mint_to_addr = args[1]
if len(args) < 3:
raise Exception("please specify assets to attach")
asset_attachments = args[2:]
tx, fee, results = token.Mint(wallet, mint_to_addr, asset_attachments)
if results[0].GetBigInteger() > 0:
print("\n-----------------------------------------------------------")
print("[%s] Will mint tokens to address: %s " % (token.symbol, mint_to_addr))
print("Fee: %s " % (fee.value / Fixed8.D))
print("-------------------------------------------------------------\n")
if prompt_passwd:
passwd = prompt("[Password]> ", is_password=True)
if not wallet.ValidatePassword(passwd):
print("incorrect password")
return
return InvokeWithTokenVerificationScript(wallet, tx, token, fee)
else:
print("Could not register addresses: %s " % str(results[0]))
return False
评论列表
文章目录