def test_invoke_contract(self, args):
if not self.Wallet:
print("please open a wallet")
return
if args and len(args) > 0:
tx, fee, results, num_ops = TestInvokeContract(self.Wallet, args)
if tx is not None and results is not None:
print("\n-------------------------------------------------------------------------------------------------------------------------------------")
print("Test invoke successful")
print("Total operations: %s " % num_ops)
print("Results %s " % [str(item) for item in results])
print("Invoke TX gas cost: %s " % (tx.Gas.value / Fixed8.D))
print("Invoke TX Fee: %s " % (fee.value / Fixed8.D))
print("-------------------------------------------------------------------------------------------------------------------------------------\n")
print("Enter your password to continue and invoke on the network\n")
passwd = prompt("[password]> ", is_password=True)
if not self.Wallet.ValidatePassword(passwd):
return print("Incorrect password")
result = InvokeContract(self.Wallet, tx, fee)
return
else:
print("Error testing contract invoke")
return
print("please specify a contract to invoke")
评论列表
文章目录