コード例 #1
0
 public Rlp Encode(Transaction item, RlpBehaviors rlpBehaviors = RlpBehaviors.None)
 {
     return(Rlp.Encode(item, false));
 }
コード例 #2
0
ファイル: RlpStream.cs プロジェクト: vicnaum/nethermind
        public void Encode(BigInteger bigInteger, int outputLength = -1)
        {
            Rlp rlp = bigInteger == 0 ? Rlp.OfEmptyByteArray : Rlp.Encode(bigInteger.ToBigEndianByteArray(outputLength));

            Write(rlp.Bytes);
        }
コード例 #3
0
        public Rlp Encode(TransactionReceipt item, RlpBehaviors rlpBehaviors = RlpBehaviors.None)
        {
            if (rlpBehaviors.HasFlag(RlpBehaviors.Storage))
            {
                return(Rlp.Encode(
                           rlpBehaviors.HasFlag(RlpBehaviors.Eip658Receipts) ? Rlp.Encode(item.StatusCode) : Rlp.Encode(item.PostTransactionState),
                           Rlp.Encode(item.BlockHash),
                           Rlp.Encode(item.BlockNumber),
                           Rlp.Encode(item.Index),
                           Rlp.Encode(item.Sender),
                           Rlp.Encode(item.Recipient),
                           Rlp.Encode(item.ContractAddress),
                           Rlp.Encode(item.GasUsed),
                           Rlp.Encode(item.GasUsedTotal),
                           Rlp.Encode(item.Bloom),
                           Rlp.Encode(item.Logs),
                           Rlp.Encode(item.Error)));
            }

            return(Rlp.Encode(
                       rlpBehaviors.HasFlag(RlpBehaviors.Eip658Receipts) ? Rlp.Encode(item.StatusCode) : Rlp.Encode(item.PostTransactionState),
                       Rlp.Encode(item.GasUsedTotal),
                       Rlp.Encode(item.Bloom),
                       Rlp.Encode(item.Logs)));
        }
コード例 #4
0
 public Rlp Encode(TransactionReceipt item, RlpBehaviors rlpBehaviors = RlpBehaviors.None)
 {
     return(Rlp.Encode(
                rlpBehaviors.HasFlag(RlpBehaviors.Eip658Receipts) ? Rlp.Encode(item.StatusCode) : Rlp.Encode(item.PostTransactionState),
                Rlp.Encode(item.GasUsed),
                Rlp.Encode(item.Bloom),
                Rlp.Encode(item.Logs)));
 }