Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
invoke* use base64 script (#673)
Browse files Browse the repository at this point in the history
* 打开钱包当文件不存在时错误提示更友好

* Show wallet height when executing "show state" command. Keep in line with neo-gui.

* fixed bug

* 修复Bug

* optimize

* fix

* invoke* use base64 script

Co-authored-by: Erik Zhang <erik@vcage.com>
  • Loading branch information
陈志同 and Erik Zhang authored Oct 15, 2020
1 parent 184db44 commit 00946fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions neo-cli/CLI/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ public static bool IsYes(this string input)

return input == "yes" || input == "y";
}

public static string ToBase64String(this byte[] input) => System.Convert.ToBase64String(input);
}
}
4 changes: 2 additions & 2 deletions neo-cli/CLI/MainService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ private void SendTransaction(byte[] script, UInt160 account = null)
try
{
Transaction tx = CurrentWallet.MakeTransaction(script, account, signers);
Console.WriteLine($"Invoking script with: '{tx.Script.ToHexString()}'");
Console.WriteLine($"Invoking script with: '{tx.Script.ToBase64String()}'");

using (ApplicationEngine engine = ApplicationEngine.Run(tx.Script, container: tx))
{
Expand Down Expand Up @@ -529,7 +529,7 @@ private StackItem OnInvokeWithResult(UInt160 scriptHash, string operation, IVeri
{
scriptBuilder.EmitAppCall(scriptHash, operation, parameters.ToArray());
script = scriptBuilder.ToArray();
Console.WriteLine($"Invoking script with: '{script.ToHexString()}'");
Console.WriteLine($"Invoking script with: '{script.ToBase64String()}'");
}

if (verificable is Transaction tx)
Expand Down

0 comments on commit 00946fd

Please sign in to comment.