Skip to content

Conversation

@penandlim
Copy link
Collaborator

No description provided.

@penandlim penandlim requested a review from Copilot July 15, 2025 12:25
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds support for sending private transactions via QuickNode’s Flashbots Protect add-on and includes tests for various success and error scenarios.

  • Implements send_private_transaction in the QuickNode provider
  • Imports HexBytes and logger, and adjusts the receipt logging and chaining logic
  • Adds fixtures and tests in tests/test_provider.py to cover successful sends (with and without preferences) and error handling

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
ape_quicknode/provider.py Implements send_private_transaction, imports HexBytes and logs, and refines get_receipt invocation
tests/test_provider.py Adds fixtures (mock_transaction_api, mock_receipt_api, mock_web3) and tests for private transaction flows and error cases
Comments suppressed due to low confidence (1)

ape_quicknode/provider.py:209

  • The Sphinx reference is incorrect and missing a dot: it should be :class:~ape.api.transactions.TransactionAPI``.
            txn: (:class:`~ape.api.transactionsTransactionAPI`): The transaction.

timeout=timeout,
)
logger.info(
f"Confirmed {receipt.txn_hash} (private) (total fees paid = {receipt.total_fees_paid})"
Copy link

Copilot AI Jul 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code references receipt.txn_hash, but the ReceiptAPI uses transaction_hash. This will raise an AttributeError at runtime. Update to receipt.transaction_hash.

Suggested change
f"Confirmed {receipt.txn_hash} (private) (total fees paid = {receipt.total_fees_paid})"
f"Confirmed {receipt.transaction_hash} (private) (total fees paid = {receipt.total_fees_paid})"

Copilot uses AI. Check for mistakes.
@penandlim penandlim merged commit 46e72a0 into main Jul 15, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants