Skip to content

Conversation

rackstar
Copy link
Contributor

@rackstar rackstar commented Jul 8, 2024

Context

Closes #1166

Add NexusViewer to provide a unified view of system-wide data from various contracts within the Nexus Mutual platform

NOTE: this PR is behind #1164

Changes proposed in this pull request

  • Add NexusViewer
  • Add mocks
  • Add fork tests
  • Add unit tests

Test plan

  • Add fork tests
  • Add unit tests

Checklist

  • Rebased the base branch
  • Attached corresponding Github issue
  • Prefixed the name with the type of change (i.e. feat, chore, test)
  • Performed a self-review of my own code
  • Followed the style guidelines of this project
  • Made corresponding changes to the documentation
  • Didn't generate new warnings
  • Didn't generate failures on existing tests
  • Added tests that prove my fix is effective or that my feature works

Review

When reviewing a PR, please indicate intention in comments using the following emojis:

  • 🍰 = Nice to have but not essential.
  • 💡 = Suggestion or a comment based on personal opinion
  • 🔨 = I believe this should be changed.
  • 🤔 = I don’t understand something, do you mind giving me more context?
  • 🚀 = Feedback

@rackstar rackstar requested review from shark0der and roxdanila July 8, 2024 09:20
@rackstar rackstar self-assigned this Jul 8, 2024
@rackstar rackstar force-pushed the feat/contract-viewer-get-total-nxm branch from 1803b43 to 8dcacb3 Compare July 8, 2024 09:23
Copy link
Contributor

@roxdanila roxdanila left a comment

Choose a reason for hiding this comment

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

See comments

@roxdanila roxdanila linked an issue Jul 8, 2024 that may be closed by this pull request
@rackstar rackstar force-pushed the feat/contract-viewer-get-total-nxm branch from 8dcacb3 to 05fb658 Compare July 12, 2024 07:13
@rackstar rackstar force-pushed the feat/contract-viewer-get-total-nxm branch from 05fb658 to 006008b Compare July 12, 2024 07:18
* setAggregatedTokens to NVMockStakingViewer
@rackstar rackstar changed the title feat: Add NexusViewer DRAFT: feat: Add NexusViewer Jul 12, 2024
@rackstar
Copy link
Contributor Author

ready for review. but marking as DRAFT as it should not be merged until #1170 and #1164 are merged first

@rackstar rackstar force-pushed the feat/contract-viewer-get-total-nxm branch 3 times, most recently from 968e4b8 to de4d993 Compare July 12, 2024 07:41
@rackstar rackstar force-pushed the feat/contract-viewer-get-total-nxm branch from de4d993 to 2f70afd Compare July 12, 2024 07:49
@roxdanila roxdanila changed the title DRAFT: feat: Add NexusViewer feat: Add NexusViewer Jul 12, 2024
@roxdanila roxdanila changed the title feat: Add NexusViewer [MERGE AFTER COVER PRODUCTS] feat: Add NexusViewer Jul 12, 2024
@roxdanila roxdanila changed the title [MERGE AFTER COVER PRODUCTS] feat: Add NexusViewer feat: Add NexusViewer Jul 12, 2024
@rackstar rackstar force-pushed the feat/contract-viewer-get-total-nxm branch from b02bef1 to 344978d Compare July 12, 2024 10:28
@rackstar rackstar force-pushed the feat/contract-viewer-get-total-nxm branch from 344978d to 8970723 Compare July 12, 2024 10:31
Comment on lines 95 to 101
function getManagerTokenRewards(address manager) external view returns (Token[] memory tokens);

function getManagerTotalRewards(address member) external view returns (uint managerTotalRewards);

function getManagerPoolsAndRewards(address manager) external view returns (ManagerPoolsAndRewards memory);

function getManagerRewards(uint[] memory poolIds) external view returns (Token[] memory tokens);
Copy link
Contributor

@roxdanila roxdanila Jul 12, 2024

Choose a reason for hiding this comment

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

  1. please stay consistent with naming the function argument: either manager or member across these functions
  2. Slight scope creep: getManagerTokenRewards & getManagerRewards could be renamed to something a bit more descriptive: getManagerTokenRewardsByAddr, getManagerTokenRewardsByPoolIds,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'll change to getManagerTokenRewardsByAddr but we'll need to keep getManagerRewards to avoid a breaking change as its an existing method

@rackstar rackstar merged commit 7fc00cb into feat/staking-viewer-dashboard-updates Jul 12, 2024
@rackstar rackstar deleted the feat/contract-viewer-get-total-nxm branch July 12, 2024 12:05
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.

NexusViewer
3 participants