Esempio n. 1
0
        public static RpcNep5Transfers FromJson(JObject json)
        {
            RpcNep5Transfers transfers = new RpcNep5Transfers
            {
                Sent           = ((JArray)json["sent"]).Select(p => RpcNep5Transfer.FromJson(p)).ToList(),
                Received       = ((JArray)json["received"]).Select(p => RpcNep5Transfer.FromJson(p)).ToList(),
                UserScriptHash = json["address"].AsString().ToScriptHash()
            };

            return(transfers);
        }
Esempio n. 2
0
        public static RpcNep5Transfer FromJson(JObject json)
        {
            RpcNep5Transfer transfer = new RpcNep5Transfer();

            transfer.TimestampMS         = (ulong)json["timestamp"].AsNumber();
            transfer.AssetHash           = UInt160.Parse(json["asset_hash"].AsString());
            transfer.UserScriptHash      = json["transfer_address"].AsString().ToScriptHash();
            transfer.Amount              = BigInteger.Parse(json["amount"].AsString());
            transfer.BlockIndex          = (uint)json["block_index"].AsNumber();
            transfer.TransferNotifyIndex = (ushort)json["transfer_notify_index"].AsNumber();
            transfer.TxHash              = UInt256.Parse(json["tx_hash"].AsString());
            return(transfer);
        }