lib/eth/tx/eip2930.rb
# Encodes the unsigned transaction payload in an EIP-2930 envelope,
# required for signing.
#
# @return [String] an RLP-encoded, unsigned, enveloped EIP-2930 transaction.
Encodes the unsigned transaction payload in an EIP-2930 envelope,
required for signing.
Encodes the unsigned transaction payload in an EIP - 2930 envelope required for signing .
def unsigned_encoded
        tx_data = []
        tx_data.push Util.serialize_int_to_big_endian @chain_id
        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 Rlp::Sedes.infer(@access_list).serialize @access_list
        tx_encoded = Rlp.encode tx_data
        tx_type = Util.serialize_int_to_big_endian @type
        return "#{tx_type}#{tx_encoded}"
      end
def unsigned_encoded tx_data = [ ] tx_data . push Util . serialize_int_to_big_endian @chain_id 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 Rlp :: Sedes . infer ( @access_list ) . serialize @access_list tx_encoded = Rlp . encode tx_data tx_type = Util . serialize_int_to_big_endian @type return "#{tx_type}#{tx_encoded}" end
Encodes the unsigned transaction payload in an EIP-2930 envelope,
required for signing.
Encodes the unsigned transaction payload in an EIP - 2930 envelope required for signing .
# create an EIP-2718 envelope with EIP-2930 type payload (unsigned)
an RLP-encoded, unsigned, enveloped EIP-2930 transaction.
an RLP - encoded unsigned enveloped EIP - 2930 transaction .
String