pub fn sign_transaction(&self, raw_tx: TransactionParameters) -> Vec<u8> {
        // According to the code in web3 <https://docs.rs/web3/latest/src/web3/api/accounts.rs.html#86>
        // We should use `max_fee_per_gas` as `gas_price` if we use EIP1559
        let gas_price = raw_tx.max_fee_per_gas;
        let max_priority_fee_per_gas = raw_tx.max_priority_fee_per_gas;
        let tx = Transaction {
            to: raw_tx.to,
            nonce: raw_tx.nonce,
            gas: raw_tx.gas,
            gas_price,
            value: raw_tx.value,
            data: raw_tx.data,
            transaction_type: raw_tx.transaction_type,
            access_list: raw_tx.access_list.unwrap_or_default(),
            max_priority_fee_per_gas,
            max_fee_per_blob_gas: raw_tx.max_fee_per_blob_gas,
            blob_versioned_hashes: raw_tx.blob_versioned_hashes,
        };
        let signed = tx.sign(&self.private_key, raw_tx.chain_id);
        signed.raw_transaction.0
    }
Signs and returns the RLP-encoded transaction.
core/lib/eth_signer/src/pk_signer.rs