Exemplo n.º 1
0
        private User(byte[] rlp)
        {
            var decoder = new RlpDecoder(rlp);

            Id           = Encoding.UTF8.GetString(decoder.Next());
            PassHash     = Encoding.UTF8.GetString(decoder.Next());
            RegisterDate = Encoding.UTF8.GetString(decoder.Next());
        }
Exemplo n.º 2
0
        private Item(byte[] rlp)
        {
            var decoder = new RlpDecoder(rlp);

            Code  = Encoding.UTF8.GetString(decoder.Next());
            Name  = Encoding.UTF8.GetString(decoder.Next());
            Price = Hex.ToNumber <decimal>(decoder.Next());
        }
Exemplo n.º 3
0
        private Sales(byte[] rlp)
        {
            var decoder = new RlpDecoder(rlp);

            Order    = Encoding.UTF8.GetString(decoder.Next());
            Seller   = Encoding.UTF8.GetString(decoder.Next());
            ItemCode = Encoding.UTF8.GetString(decoder.Next());
            ItemName = Encoding.UTF8.GetString(decoder.Next());
            Price    = Coin.ToCoin(Hex.ToNumber <ulong>(decoder.Next()));
        }
Exemplo n.º 4
0
        private Inventory(byte[] rlp) : base()
        {
            var decoder = new RlpDecoder(rlp);

            for (int i = 0; i < decoder.Count; i++)
            {
                Add(Encoding.UTF8.GetString(decoder.Next()));
            }
        }
Exemplo n.º 5
0
        protected Tx(byte[] rlp)
        {
            var decoder = new RlpDecoder(rlp);

            chain   = decoder.Next();
            version = decoder.Next();
            to      = decoder.Next();
            value   = decoder.Next();
            gas     = decoder.Next();
            nonce   = decoder.Next();
            data    = decoder.Next();
            extra   = decoder.Next();

            // signature rsv
            seal = decoder.Next();

            // metadata
            metadata = decoder.Next();
        }