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(contracts): BoltManagerV3 #551

Merged
merged 8 commits into from
Jan 16, 2025
Merged

feat(contracts): BoltManagerV3 #551

merged 8 commits into from
Jan 16, 2025

Conversation

merklefruit
Copy link
Collaborator

@merklefruit merklefruit commented Dec 12, 2024

This PR introduces a new version of BoltManager that allows for fetching operator data through view methods.

New functionality

  • function updateOperatorRPC(string calldata rpc) external to update an operator's RPC endpoint
  • function getOperatorData(address operator) external view returns (EnumerableMapV3.Operator memory operatorData) to get the current operator data, like middleware, start time and rpc endpoint.
  • function getAllOperatorsData() external view returns (EnumerableMapV3.Operator[] memory operatorData) to get all operators data in a single call.

@merklefruit
Copy link
Collaborator Author

tests are working locally for me, not sure what's going on with CI 🥲
cc @mempirate @estensen

@estensen
Copy link
Contributor

tests are working locally for me, not sure what's going on with CI 🥲 cc @mempirate @estensen

not sure, tests pass locally for me too

@merklefruit
Copy link
Collaborator Author

We also need a function to check if an operator has enough stake:

  • isOperatorActive(operator) -> boolean: that returns if an operator has enough stake in the network
  • getOperatorTotalStake(operator) -> uint256: that returns the total amount of collateral staked for an operator

@merklefruit merklefruit marked this pull request as ready for review January 16, 2025 12:00
@merklefruit merklefruit requested a review from mempirate January 16, 2025 12:00
Copy link
Contributor

@mempirate mempirate left a comment

Choose a reason for hiding this comment

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

LGTM, testing fork

Copy link
Contributor

@thedevbirb thedevbirb Jan 16, 2025

Choose a reason for hiding this comment

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

This file has a wrong name -- it should be IBoltManagerV3.sol and not IBoltManagerv3.sol

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh damn, I totally missed that, probably why CI fails haha

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yup that was it, thanks for noticing this!!

@thedevbirb
Copy link
Contributor

We also need a function to check if an operator has enough stake:

  • isOperatorActive(operator) -> boolean: that returns if an operator has enough stake in the network
  • getOperatorTotalStake(operator) -> uint256: that returns the total amount of collateral staked for an operator

Do you want to add them or will you add them in the next iteration?

@merklefruit
Copy link
Collaborator Author

We also need a function to check if an operator has enough stake:

  • isOperatorActive(operator) -> boolean: that returns if an operator has enough stake in the network
  • getOperatorTotalStake(operator) -> uint256: that returns the total amount of collateral staked for an operator

Do you want to add them or will you add them in the next iteration?

Since this is a last-minute change and we're going to deprecate this contract with the new OperatorsRegistry, I am going to drop those updates from here as it would be a waste of time. They will be part of the work in new contracts (WIP)

@merklefruit
Copy link
Collaborator Author

Deployed on Holesky

@merklefruit merklefruit merged commit bbe3e86 into unstable Jan 16, 2025
3 checks passed
@merklefruit merklefruit deleted the nico/feat/manager-v3 branch January 16, 2025 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants