diff --git a/.github/workflows/test-neo-cli.expect b/.github/workflows/test-neo-cli.expect index ff1f1ba88..d726413b3 100755 --- a/.github/workflows/test-neo-cli.expect +++ b/.github/workflows/test-neo-cli.expect @@ -36,7 +36,7 @@ expect { } expect { - "address:" { } + " Address:" { } "error" { exit 2 } timeout { exit 1 } } diff --git a/neo-cli/CLI/MainService.Wallet.cs b/neo-cli/CLI/MainService.Wallet.cs index 4664f9ce5..0eb2115a9 100644 --- a/neo-cli/CLI/MainService.Wallet.cs +++ b/neo-cli/CLI/MainService.Wallet.cs @@ -311,7 +311,8 @@ private void OnListAddressCommand() type = "Deployed-Nonstandard"; } - Console.WriteLine($"{contract.Address}\t{type}"); + Console.WriteLine($"{" Address: "}{contract.Address}\t{type}"); + Console.WriteLine($"{"ScriptHash: "}{contract.ScriptHash}\n"); } } } diff --git a/neo-cli/CLI/MainService.cs b/neo-cli/CLI/MainService.cs index b11ab2d87..b80a39bc6 100644 --- a/neo-cli/CLI/MainService.cs +++ b/neo-cli/CLI/MainService.cs @@ -140,8 +140,9 @@ public void CreateWallet(string path, string password) { UserWallet wallet = UserWallet.Create(path, password); WalletAccount account = wallet.CreateAccount(); - Console.WriteLine($"address: {account.Address}"); - Console.WriteLine($" pubkey: {account.GetKey().PublicKey.EncodePoint(true).ToHexString()}"); + Console.WriteLine($" Address: {account.Address}"); + Console.WriteLine($" Pubkey: {account.GetKey().PublicKey.EncodePoint(true).ToHexString()}"); + Console.WriteLine($"ScriptHash: {account.ScriptHash}"); CurrentWallet = wallet; } break; @@ -151,8 +152,9 @@ public void CreateWallet(string path, string password) wallet.Unlock(password); WalletAccount account = wallet.CreateAccount(); wallet.Save(); - Console.WriteLine($"address: {account.Address}"); - Console.WriteLine($" pubkey: {account.GetKey().PublicKey.EncodePoint(true).ToHexString()}"); + Console.WriteLine($" Address: {account.Address}"); + Console.WriteLine($" Pubkey: {account.GetKey().PublicKey.EncodePoint(true).ToHexString()}"); + Console.WriteLine($"ScriptHash: {account.ScriptHash}"); CurrentWallet = wallet; } break;