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

Show ScriptHash in list address #566

Merged
merged 10 commits into from
May 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-neo-cli.expect
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ expect {
}

expect {
"address:" { }
" Address:" { }
"error" { exit 2 }
timeout { exit 1 }
}
Expand Down
3 changes: 2 additions & 1 deletion neo-cli/CLI/MainService.Wallet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
}
Expand Down
10 changes: 6 additions & 4 deletions neo-cli/CLI/MainService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down