lib/eth/tx/eip1559.rb
def unsigned_copy(tx)

        # not checking transaction validity unless it's of a different class
        raise TransactionTypeError, "Cannot copy transaction of different payload type!" unless tx.instance_of? Tx::Eip1559

        # populate class attributes
        @signer_nonce = tx.signer_nonce
        @max_priority_fee_per_gas = tx.max_priority_fee_per_gas
        @max_fee_per_gas = tx.max_fee_per_gas
        @gas_limit = tx.gas_limit
        @destination = tx.destination
        @amount = tx.amount
        @payload = tx.payload
        @access_list = tx.access_list
        @chain_id = tx.chain_id

        # force-set signature to unsigned
        _set_signature(nil, 0, 0)

        # keep the 'from' field blank
        @sender = Tx.sanitize_address nil

        # last but not least, set the type.
        @type = TYPE_1559
      end
# Creates an unsigned copy of a transaction payload.
#
# @param tx [Eth::Tx::Eip1559] an EIP-1559 transaction payload.
# @return [Eth::Tx::Eip1559] an unsigned EIP-1559 transaction payload.
# @raise [TransactionTypeError] if transaction type does not match.
Creates an unsigned copy of a transaction payload.
Creates an unsigned copy of a transaction payload .
def unsigned_copy(tx)
        raise TransactionTypeError, "Cannot copy transaction of different payload type!" unless tx.instance_of? Tx::Eip1559
        @signer_nonce = tx.signer_nonce
        @max_priority_fee_per_gas = tx.max_priority_fee_per_gas
        @max_fee_per_gas = tx.max_fee_per_gas
        @gas_limit = tx.gas_limit
        @destination = tx.destination
        @amount = tx.amount
        @payload = tx.payload
        @access_list = tx.access_list
        @chain_id = tx.chain_id
        _set_signature(nil, 0, 0)
        @sender = Tx.sanitize_address nil
        @type = TYPE_1559
      end
def unsigned_copy ( tx ) raise TransactionTypeError , "Cannot copy transaction of different payload type!" unless tx . instance_of? Tx :: Eip1559 @signer_nonce = tx . signer_nonce @max_priority_fee_per_gas = tx . max_priority_fee_per_gas @max_fee_per_gas = tx . max_fee_per_gas @gas_limit = tx . gas_limit @destination = tx . destination @amount = tx . amount @payload = tx . payload @access_list = tx . access_list @chain_id = tx . chain_id _set_signature ( nil , 0 , 0 ) @sender = Tx . sanitize_address nil @type = TYPE_1559 end
Creates an unsigned copy of a transaction payload.
Creates an unsigned copy of a transaction payload .
# not checking transaction validity unless it's of a different class # populate class attributes # force-set signature to unsigned # keep the 'from' field blank # last but not least, set the type.
an unsigned EIP-1559 transaction payload.
an unsigned EIP - 1559 transaction payload .
Eth::Tx::Eip1559
[TransactionTypeError] if transaction type does not match.
[ TransactionTypeError ] if transaction type does not match .
tx
an EIP-1559 transaction payload.
an EIP - 1559 transaction payload .