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(NexusViewer): add pool manager NXM locked for MV timestamp #1280

Open
wants to merge 4 commits into
base: feat/assessment-stake-lockup-expiry
Choose a base branch
from

Conversation

mixplore
Copy link
Contributor

@mixplore mixplore commented Nov 12, 2024

Description

Alternative for UI multicall https://github.com/NexusMutual/frontend-next/pull/1049 to support https://github.com/NexusMutual/frontend-next/issues/1044.

The advantage of this approach would be saving an on chain call on the UI, the disadvantage being this implies a smart contract deployment + not sure about how computationally heavy the added logic is. The UI approach is faster in terms of going live with the fix, but I don't think this is an urgent issue so we can decide based on the other criteria.

Testing

NexusViewer implementation address: 0x6874ABAf1c8a1694b08066e5bB38487D680fa38d
NexusViewer implementation ABI:

[{"type":"constructor","payable":false,"inputs":[{"type":"address","name":"_master"},{"type":"address","name":"_stakingViewer"},{"type":"address","name":"_assessmentViewer"},{"type":"address","name":"_nxm"}]},{"type":"error","name":"RevertedWithoutReason","inputs":[{"type":"uint256","name":"index"}]},{"type":"function","name":"assessmentViewer","constant":true,"stateMutability":"view","payable":false,"inputs":[],"outputs":[{"type":"address"}]},{"type":"function","name":"getClaimableNXM","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"address","name":"member"},{"type":"uint256[]","name":"tokenIds"}],"outputs":[{"type":"tuple","components":[{"type":"uint256","name":"governanceRewards"},{"type":"uint256","name":"assessmentRewards"},{"type":"uint256","name":"assessmentStake"},{"type":"uint256","name":"stakingPoolTotalRewards"},{"type":"uint256","name":"stakingPoolTotalExpiredStake"},{"type":"uint256","name":"stakingPoolManagerIsNXMLockedForMV"},{"type":"uint256","name":"managerTotalRewards"},{"type":"uint256","name":"legacyPooledStakeRewards"},{"type":"uint256","name":"legacyPooledStakeDeposits"},{"type":"uint256","name":"legacyClaimAssessmentTokens"},{"type":"uint256","name":"legacyCoverNoteDeposits"}]}]},{"type":"function","name":"getStakedNXM","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"address","name":"member"},{"type":"uint256[]","name":"tokenIds"}],"outputs":[{"type":"tuple","components":[{"type":"uint256","name":"stakingPoolTotalActiveStake"},{"type":"uint256","name":"assessmentStake"},{"type":"uint256","name":"assessmentStakeLockupExpiry"},{"type":"uint256","name":"assessmentRewards"}]}]},{"type":"function","name":"master","constant":true,"stateMutability":"view","payable":false,"inputs":[],"outputs":[{"type":"address"}]},{"type":"function","name":"multicall","constant":false,"payable":false,"inputs":[{"type":"bytes[]","name":"data"}],"outputs":[{"type":"bytes[]","name":"results"}]},{"type":"function","name":"nxm","constant":true,"stateMutability":"view","payable":false,"inputs":[],"outputs":[{"type":"address"}]},{"type":"function","name":"stakingViewer","constant":true,"stateMutability":"view","payable":false,"inputs":[],"outputs":[{"type":"address"}]}]
  • getClaimableNXM call should return stakingPoolManagerIsNXMLockedForMV in the result

OR

  • on local node: HARDHAT_NETWORK=localhost node scripts/get-claimable-nxm.js

Checklist

  • Performed a self-review of my own code
  • Made corresponding changes to the documentation

@mixplore mixplore self-assigned this Nov 12, 2024
@mixplore mixplore force-pushed the feat/pool-manager-nxm-locked-for-mv branch from 7c0eefb to eb3d23e Compare November 12, 2024 17:53
@mixplore mixplore changed the title feat: add pool manager NXM locked for MV timestamp to NexusViewer feat(NexusViewer): add pool manager NXM locked for MV timestamp to NexusViewer Nov 12, 2024
@mixplore mixplore changed the title feat(NexusViewer): add pool manager NXM locked for MV timestamp to NexusViewer feat(NexusViewer): add pool manager NXM locked for MV timestamp Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

1 participant