diff --git a/neo.UnitTests/SmartContract/Manifest/UT_ContractManifest.cs b/neo.UnitTests/SmartContract/Manifest/UT_ContractManifest.cs index 647fd561ce1..2c27dd90610 100644 --- a/neo.UnitTests/SmartContract/Manifest/UT_ContractManifest.cs +++ b/neo.UnitTests/SmartContract/Manifest/UT_ContractManifest.cs @@ -89,13 +89,15 @@ public void ParseFromJson_Groups() [TestMethod] public void ParseFromJson_Contacts() { - var json = @"{""groups"":[],""features"":{""storage"":false,""payable"":false},""abi"":{""hash"":""0x0000000000000000000000000000000000000000"",""entryPoint"":{""name"":""Main"",""parameters"":[{""name"":""operation"",""type"":""String""},{""name"":""args"",""type"":""Array""}],""returnType"":""Any""},""methods"":[],""events"":[]},""permissions"":[{""contract"":""*"",""methods"":""*""}],""trusts"":[],""safeMethods"":[],""contact"":{""author"":""author"",""email"":""email""}}"; + var json = @"{""groups"":[],""features"":{""storage"":false,""payable"":false},""abi"":{""hash"":""0x0000000000000000000000000000000000000000"",""entryPoint"":{""name"":""Main"",""parameters"":[{""name"":""operation"",""type"":""String""},{""name"":""args"",""type"":""Array""}],""returnType"":""Any""},""methods"":[],""events"":[]},""permissions"":[{""contract"":""*"",""methods"":""*""}],""trusts"":[],""safeMethods"":[],""contact"":{""author"":""author"",""email"":""email"",""description"":""description"",""website"":""website""}}"; var manifest = ContractManifest.Parse(json); var manifestString = manifest.ToString(); Assert.AreEqual(manifestString, json); Assert.AreEqual("author", manifest.Contact.Author); Assert.AreEqual("email", manifest.Contact.Email); + Assert.AreEqual("description", manifest.Contact.Description); + Assert.AreEqual("website", manifest.Contact.Website); } [TestMethod] diff --git a/neo/SmartContract/Manifest/ContractContactInformation.cs b/neo/SmartContract/Manifest/ContractContactInformation.cs index 92c8e02a4d7..9257e673f74 100644 --- a/neo/SmartContract/Manifest/ContractContactInformation.cs +++ b/neo/SmartContract/Manifest/ContractContactInformation.cs @@ -11,12 +11,18 @@ public class ContractContactInformation public string Email { get; set; } = ""; + public string Description { get; set; } = ""; + + public string Website { get; set; } = ""; + public static ContractContactInformation FromJson(JObject jsonObject) { return jsonObject != null ? new ContractContactInformation { Author = jsonObject["author"]?.AsString(), Email = jsonObject["email"]?.AsString(), + Description = jsonObject["description"]?.AsString(), + Website = jsonObject["website"]?.AsString(), } : new ContractContactInformation(); } @@ -25,6 +31,8 @@ public JObject ToJson() var json = new JObject(); json["author"] = Author; json["email"] = Email; + json["description"] = Description; + json["website"] = Website; return json; } }