vacp2p / staking-reward-streamer

MIT License
0 stars 0 forks source link

feat(StakeManager): add capabilities to register vaults #71

Open 0x-r4bbit opened 3 weeks ago

0x-r4bbit commented 3 weeks ago

This commit introduces changes related to vault registrations in the stake manager.

The stake manager needs to keep track of the vaults a users creates so it can aggregate accumulated MP across vaults for any given user.

The StakeVault now comes with a register() function which needs to be called to register itself with the stake manager. StakeManager has a new onlyRegisteredVault modifier that ensures only registered vaults can actually stake and unstake.

Closes #70

Checklist

Ensure you completed all of the steps below before submitting your pull request:

0x-r4bbit commented 2 weeks ago

@gravityblast I've updated the PR according to your comments, accept for https://github.com/vacp2p/staking-reward-streamer/pull/71#discussion_r1822531593