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

refactor: add nonce tracking in TaskResult to index app.signer txns #89

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fubuloubu
Copy link
Member

@fubuloubu fubuloubu commented Jun 4, 2024

What I did

Added nonce tracking logic into SilverbackMiddleware, which updates a label in .post_execute that gets stored in TaskResult. If you know the account address, you can do additional parsing post-task (assuming that the transaction has been finalized) to obtain the transaction receipt information from this combination.

fixes: #88
fixes SBK-463

How I did it

Realized that SilverbackSettings was already passing itself to SIlverbackMiddleware

How to verify it

I ran the example app with --account <My wallet> and then separately sent a transaction from that wallet address in ape console

In production, it will be strongly suggested to never mix keys like this as it is not a good idea anyways (due to requirement for stateful nonce tracking), but it will also give you a false positive of what transactions occured in the task.

Checklist

  • Passes all linting checks (pre-commit and CI jobs)
  • New test cases have been added and are passing
  • Documentation has been updated
  • PR title follows Conventional Commit standard (will be automatically included in the changelog)

Copy link

linear bot commented Jun 13, 2024

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.

Track app.signer transactions in TaskResult
1 participant