lib/eth/tx/legacy.rb
def encoded
        unless Tx.is_signed? self
          raise Signature::SignatureError, "Transaction is not signed!"
        end
        tx_data = []
        tx_data.push Util.serialize_int_to_big_endian @signer_nonce
        tx_data.push Util.serialize_int_to_big_endian @gas_price
        tx_data.push Util.serialize_int_to_big_endian @gas_limit
        tx_data.push Util.hex_to_bin @destination
        tx_data.push Util.serialize_int_to_big_endian @amount
        tx_data.push Rlp::Sedes.binary.serialize @payload
        tx_data.push Util.serialize_int_to_big_endian @signature_v
        tx_data.push Util.serialize_int_to_big_endian @signature_r
        tx_data.push Util.serialize_int_to_big_endian @signature_s
        Rlp.encode tx_data
      end
# Encodes a raw transaction object.
#
# @return [String] a raw, RLP-encoded legacy transaction.
# @raise [Signature::SignatureError] if the transaction is not yet signed.
Encodes a raw transaction object.
Encodes a raw transaction object .
def encoded
        unless Tx.is_signed? self
          raise Signature::SignatureError, "Transaction is not signed!"
        end
        tx_data = []
        tx_data.push Util.serialize_int_to_big_endian @signer_nonce
        tx_data.push Util.serialize_int_to_big_endian @gas_price
        tx_data.push Util.serialize_int_to_big_endian @gas_limit
        tx_data.push Util.hex_to_bin @destination
        tx_data.push Util.serialize_int_to_big_endian @amount
        tx_data.push Rlp::Sedes.binary.serialize @payload
        tx_data.push Util.serialize_int_to_big_endian @signature_v
        tx_data.push Util.serialize_int_to_big_endian @signature_r
        tx_data.push Util.serialize_int_to_big_endian @signature_s
        Rlp.encode tx_data
      end
def encoded unless Tx . is_signed? self raise Signature :: SignatureError , "Transaction is not signed!" end tx_data = [ ] tx_data . push Util . serialize_int_to_big_endian @signer_nonce tx_data . push Util . serialize_int_to_big_endian @gas_price tx_data . push Util . serialize_int_to_big_endian @gas_limit tx_data . push Util . hex_to_bin @destination tx_data . push Util . serialize_int_to_big_endian @amount tx_data . push Rlp :: Sedes . binary . serialize @payload tx_data . push Util . serialize_int_to_big_endian @signature_v tx_data . push Util . serialize_int_to_big_endian @signature_r tx_data . push Util . serialize_int_to_big_endian @signature_s Rlp . encode tx_data end
Encodes a raw transaction object.
Encodes a raw transaction object .
a raw, RLP-encoded legacy transaction.
a raw RLP - encoded legacy transaction .
String
[Signature::SignatureError] if the transaction is not yet signed.
[ Signature :: SignatureError ] if the transaction is not yet signed .