Skip to content

Commit

Permalink
[chore] Use named return values for getNodes (#13462)
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-cordenier authored Jun 7, 2024
1 parent 69a95d8 commit 8c75b1a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 16 deletions.
10 changes: 5 additions & 5 deletions contracts/src/v0.8/keystone/CapabilityRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -574,12 +574,12 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface {
}

/// @notice Gets all nodes
/// @return NodeInfo[] All nodes in the capability registry
/// @return uint32[] All the config counts for the nodes in the capability registry
function getNodes() external view returns (NodeInfo[] memory, uint32[] memory) {
/// @return nodeInfo NodeInfo[] All nodes in the capability registry
/// @return configCounts uint32[] All the config counts for the nodes in the capability registry
function getNodes() external view returns (NodeInfo[] memory nodeInfo, uint32[] memory configCounts) {
bytes32[] memory p2pIds = s_nodeP2PIds.values();
NodeInfo[] memory nodeInfo = new NodeInfo[](p2pIds.length);
uint32[] memory configCounts = new uint32[](p2pIds.length);
nodeInfo = new NodeInfo[](p2pIds.length);
configCounts = new uint32[](p2pIds.length);

for (uint256 i; i < p2pIds.length; ++i) {
(nodeInfo[i], configCounts[i]) = getNode(p2pIds[i]);
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GETH_VERSION: 1.13.8
forwarder: ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.abi ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.bin ec6e94293700d400ca7b22989d54793e905d6febce3b84054727a58c473b9cf3
keystone_capability_registry: ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.abi ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.bin 07b0d5eae760a400aaf3616201adb1ab962f92f77e05184677d94c8fc158f347
keystone_capability_registry: ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.abi ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.bin be7e699bfab89cb95e8d1318dfc74c2af9465d7347478792d6d4afd06ac85402
ocr3_capability: ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.abi ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.bin 9dcbdf55bd5729ba266148da3f17733eb592c871c2108ccca546618628fd9ad2

0 comments on commit 8c75b1a

Please sign in to comment.