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

Updates and tests user referral queries, adds GetUserReferralFees.query #10522

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Rotorsoft
Copy link
Contributor

Link to Issue

Closes: #10494

Description of Changes

  • Updates queries and models to use BIGINT in timestamp
  • Adds block details to EVM events so we don't have to query blocks in handlers
  • Adds GetUserReferralFees.query
  • Updates unit test with full referral flow

"How We Fixed It"

Test Plan

  • TBD

Deployment Plan

Other Considerations

@Rotorsoft
Copy link
Contributor Author

@timolegros when you review this PR, can you suggest the proper attributes in the EVM block we should be appending to events? I just added a few as examples, but probably never used by any handler.

Copy link
Collaborator

@timolegros timolegros left a comment

Choose a reason for hiding this comment

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

Let's just use the following properties:

  • miner
  • hash
  • logsBloom
  • nonce
  • parentHash
  • timestamp
  • number
  • gasUsed

@Rotorsoft
Copy link
Contributor Author

Let's just use the following properties:

  • miner
  • hash
  • logsBloom
  • nonce
  • parentHash
  • timestamp
  • number
  • gasUsed

Done, pls check if types are OK @timolegros

@Rotorsoft
Copy link
Contributor Author

@timolegros should we update the real chain event unit tests to make sure blocks are coming in this PR? or do you want to do that in a separate PR?

@Rotorsoft Rotorsoft requested a review from masvelio January 8, 2025 21:12
@Rotorsoft
Copy link
Contributor Author

@masvelio can you verify that the new GetUserReferralFees query satisfies your view #10327

@timolegros
Copy link
Collaborator

@timolegros should we update the real chain event unit tests to make sure blocks are coming in this PR? or do you want to do that in a separate PR?

I'm fine with doing it later. I just want to get this in fast so I can begin working on removing Ethers.js

Copy link
Contributor

@masvelio masvelio left a comment

Choose a reason for hiding this comment

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

schema looks good to me but have some questions

@Rotorsoft

  1. Correct me if I am wrong, but on the last meeting we have agreed that we should display earnings per address, not per action (so addresses are unique in the list). Does it work this way?
  2. I will use GetUserReferrals for this view below. Where GetUserReferralFees should I use?
    image
  3. How about sorting, pagination? In different PR?

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.

Update GetUserReferrals.query to support new user level view
3 participants