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

Write unit tests for order settlements indexer #289

Open
chibie opened this issue Feb 7, 2024 · 3 comments
Open

Write unit tests for order settlements indexer #289

chibie opened this issue Feb 7, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@chibie
Copy link
Contributor

chibie commented Feb 7, 2024

User Story

As a developer, I want to write tests for the IndexOrderSettled and IndexOrderSettledTron functions so that the settlement indexing logic is thoroughly tested.

Acceptance Criteria

  1. GIVEN the IndexOrderSettled and IndexOrderSettledTron method
    WHEN testing
    THEN validate it handles RPC client connection, filterer initialization, settlement event fetching & handling

  2. GIVEN the UpdateOrderStatusSettled method
    WHEN testing
    THEN validate it updates the order status based on the settlement details

Product & Design Links

Tech Details

  • Deploy contracts to Ganache and use it's provided RPC client

Open Questions

Notes/Assumptions

@xlassix
Copy link

xlassix commented Jul 25, 2024

incomplete data
missing

  • Add mint functional to test
  • Mint test token
  • initial a transfer
  • validate event emitted and filterer initialization
  • validate the settlement event

@chibie

@Supa-mega
Copy link

Let me try this one!

@viktrified
Copy link

May I take this issue on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants