From c1dc4c3424dddc73d422d66f132f81136e2d6da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=BF=97=E5=90=8C?= Date: Tue, 23 Jun 2020 18:20:19 +0800 Subject: [PATCH] Add 'nativecontract' command (#607) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 打开钱包当文件不存在时错误提示更友好 * Show wallet height when executing "show state" command. Keep in line with neo-gui. * fixed bug * 修复Bug * optimize * fix * Add 'nativecontract' command * update * update Co-authored-by: Erik Zhang Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com> --- neo-cli/CLI/MainService.Native.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 neo-cli/CLI/MainService.Native.cs diff --git a/neo-cli/CLI/MainService.Native.cs b/neo-cli/CLI/MainService.Native.cs new file mode 100644 index 000000000..21de56436 --- /dev/null +++ b/neo-cli/CLI/MainService.Native.cs @@ -0,0 +1,19 @@ +using Neo.ConsoleService; +using Neo.SmartContract.Native; +using System; +using System.Linq; + +namespace Neo.CLI +{ + partial class MainService + { + /// + /// Process "list nativecontract" command + /// + [ConsoleCommand("list nativecontract", Category = "Native Contract")] + private void OnListNativeContract() + { + NativeContract.Contracts.ToList().ForEach(p => Console.WriteLine("\t" + p.Name + "\t" + p.Hash)); + } + } +}