Skip to content

minor: update EtherFiViewer #263

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

Merged
merged 7 commits into from
Jun 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion script/deploys/DeployEtherFiViewer.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ contract DeployEtherFiViewer is Script {
EtherFiViewer viewer = EtherFiViewer(address(0x2ecd155405cA52a5ca0e552981fF44A8252FAb81));
viewer.upgradeTo(address(impl));
vm.stopBroadcast();

}
}
23 changes: 23 additions & 0 deletions src/helpers/EtherFiViewer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,29 @@ contract EtherFiViewer is Initializable, OwnableUpgradeable, UUPSUpgradeable {
}
}

function EtherFiNode_withdrawableBalanceInExecutionLayer(address[] memory _etherFiNodes) external view returns (uint256[] memory _withdrawableBalance) {
_withdrawableBalance = new uint256[](_etherFiNodes.length);

for (uint256 i = 0; i < _etherFiNodes.length; i++) {
_withdrawableBalance[i] = IEtherFiNode(_etherFiNodes[i]).withdrawableBalanceInExecutionLayer();
}
}

function EtherFiNode_numAssociatedValidators(address[] memory _etherFiNodes) external view returns (uint256[] memory _numAssociatedValidators) {
_numAssociatedValidators = new uint256[](_etherFiNodes.length);
for (uint256 i = 0; i < _etherFiNodes.length; i++) {
_numAssociatedValidators[i] = IEtherFiNode(_etherFiNodes[i]).numAssociatedValidators();
}
}

function EtherFiNode_version(address[] memory _etherFiNodes) external view returns (uint256[] memory _versions) {
_versions = new uint256[](_etherFiNodes.length);
for (uint256 i = 0; i < _etherFiNodes.length; i++) {
_versions[i] = IEtherFiNode(_etherFiNodes[i]).version();
}
}


function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}

}
Loading