Пример #1
0
 /// <summary>
 /// Parse ContractAbi from json
 /// </summary>
 /// <param name="json">Json</param>
 /// <returns>Return ContractAbi</returns>
 public static ContractAbi FromJson(JObject json)
 {
     return(new ContractAbi
     {
         Methods = ((JArray)json["methods"]).Select(u => ContractMethodDescriptor.FromJson(u)).ToArray(),
         Events = ((JArray)json["events"]).Select(u => ContractEventDescriptor.FromJson(u)).ToArray()
     });
 }
Пример #2
0
 /// <summary>
 /// Parse ContractAbi from json
 /// </summary>
 /// <param name="json">Json</param>
 /// <returns>Return ContractAbi</returns>
 public static ContractAbi FromJson(JObject json)
 {
     return(new ContractAbi
     {
         Hash = UInt160.Parse(json["hash"].AsString()),
         Methods = ((JArray)json["methods"]).Select(u => ContractMethodDescriptor.FromJson(u)).ToArray(),
         Events = ((JArray)json["events"]).Select(u => ContractEventDescriptor.FromJson(u)).ToArray()
     });
 }