-
Notifications
You must be signed in to change notification settings - Fork 195
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
[SI] VaultHubViewer contract #905
base: feat/vaults
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀 Added some comments for further optimizations
} | ||
|
||
interface IVault is IStakingVault { | ||
function owner() external view returns (address); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be worth moving inside IStakingVault. Looks like may be used often.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
owner
here conflicts when moving to IStakingVault, because StakingVault is IStakingVault, ..., Ownable
A short summary of the changes.
Context
This PR introduces the
VaultHubViewerV1
contract for read-only interactions with theVaultHub
. It provides methods to:isOwner
verifies if an address is the owner of a vault.isHasRole
checks if an address holds a specific role in a vault.vaultsByOwner
returns vaults owned by a given address.vaultsByRole
returns vaults where an address holds a specified role._filterNonZeroVaults
ensures only valid vaults are included.The contract works with the
IVaultHub
interface. It also includes theZeroArgument
error for invalid zero address inputs.Key Features:
vaultHub
address.This contract offers a simple, efficient way to query vaults and roles without affecting the state.
Problem
What problem this PR solves, link relevant issue if it exists
Solution
Your proposed solution