Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow private transaction receipts to bail out before transaction acceptance #2280

Conversation

bitwise-constructs
Copy link
Contributor

What I did

Made it so private transactions won't time out awaiting confirmations that will never show.

fixes: ApeWorX/ape-alchemy#82
Fixes: APE-1805

How I did it

In the provider method for getting a receipt, moved around the logic to pass through transaction info to receipt data earlier so that private transactions can early return a partial receipt.

How to verify it

Add the private=True kwarg to provider.get_receipt()

Checklist

  • All changes are completed
  • New test cases have been added
  • Documentation has been updated

antazoey
antazoey previously approved these changes Sep 12, 2024
Copy link
Member

@antazoey antazoey left a comment

Choose a reason for hiding this comment

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

After this review, I am thinking we really need the promise-based receipt functionality (As much as we can in the 0.8 range and for 0.9 make it a lot more usable with any breaking changes necessary).

src/ape_ethereum/provider.py Outdated Show resolved Hide resolved
src/ape_ethereum/provider.py Outdated Show resolved Hide resolved
src/ape_ethereum/provider.py Outdated Show resolved Hide resolved
tests/functional/test_provider.py Outdated Show resolved Hide resolved
@antazoey antazoey changed the title feat: allow private transaction receipts to bail out before awaiting confirmations feat: allow private transaction receipts to bail out before transaction acceptance Sep 18, 2024
…transactions, but an early partial receipt to be returned if they time out
Copy link
Member

@antazoey antazoey left a comment

Choose a reason for hiding this comment

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

commented out code left over?

tests/functional/test_provider.py Outdated Show resolved Hide resolved
antazoey
antazoey previously approved these changes Sep 19, 2024
@bitwise-constructs bitwise-constructs merged commit eac9d5e into ApeWorX:main Sep 20, 2024
16 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.

fix: send private tx timeout
2 participants