コード例 #1
0
        public EthRequest Decode(Nethermind.Core.Encoding.Rlp.DecoderContext context, RlpBehaviors rlpBehaviors = RlpBehaviors.None)
        {
            var sequenceLength = context.ReadSequenceLength();

            if (sequenceLength == 0)
            {
                return(null);
            }

            var id              = context.DecodeKeccak();
            var host            = context.DecodeString();
            var address         = context.DecodeAddress();
            var value           = context.DecodeUInt256();
            var requestedAt     = DateTimeOffset.FromUnixTimeSeconds(context.DecodeLong()).UtcDateTime;
            var transactionHash = context.DecodeKeccak();

            return(new EthRequest(id, host, address, value, requestedAt, transactionHash));
        }