Пример #1
0
        public static RpcTransaction FromJson(JObject json)
        {
            RpcTransaction transaction = new RpcTransaction();

            transaction.Transaction = Transaction.FromJson(json);
            if (json["confirmations"] != null)
            {
                transaction.BlockHash     = UInt256.Parse(json["blockhash"].AsString());
                transaction.Confirmations = (int)json["confirmations"].AsNumber();
                transaction.BlockTime     = (uint)json["blocktime"].AsNumber();
            }
            return(transaction);
        }
Пример #2
0
        public static RpcTransaction FromJson(JObject json)
        {
            RpcTransaction transaction = new RpcTransaction();

            transaction.Transaction = Utility.TransactionFromJson(json);
            if (json["confirmations"] != null)
            {
                transaction.BlockHash     = UInt256.Parse(json["blockhash"].AsString());
                transaction.Confirmations = (uint)json["confirmations"].AsNumber();
                transaction.BlockTime     = (ulong)json["blocktime"].AsNumber();
                transaction.VMState       = json["vm_state"]?.TryGetEnum <VMState>();
            }
            return(transaction);
        }