예제 #1
0
 public static RpcNativeContract FromJson(JObject json)
 {
     return(new RpcNativeContract
     {
         Id = (int)json["id"].AsNumber(),
         Hash = UInt160.Parse(json["hash"].AsString()),
         Nef = RpcNefFile.FromJson(json["nef"]),
         Manifest = ContractManifest.FromJson(json["manifest"]),
         UpdateHistory = json["updatehistory"].GetArray().Select(u => (uint)u.GetInt32()).ToArray()
     });
 }
예제 #2
0
 public static RpcNativeContract FromJson(JObject json)
 {
     return(new RpcNativeContract
     {
         Id = (int)json["id"].AsNumber(),
         Hash = UInt160.Parse(json["hash"].AsString()),
         Nef = RpcNefFile.FromJson(json["nef"]),
         Manifest = ContractManifest.FromJson(json["manifest"]),
         ActiveBlockIndex = (uint)(json["activeblockindex"]?.AsNumber() ?? 0)
     });
 }
예제 #3
0
 public static RpcContractState FromJson(JObject json)
 {
     return(new RpcContractState
     {
         ContractState = new ContractState
         {
             Id = (int)json["id"].AsNumber(),
             UpdateCounter = (ushort)json["updatecounter"].AsNumber(),
             Hash = UInt160.Parse(json["hash"].AsString()),
             Nef = RpcNefFile.FromJson(json["nef"]),
             Manifest = ContractManifest.FromJson(json["manifest"])
         }
     });
 }