Skip to content

Commit 315c8fc

Browse files
committed
chore: reposition receive function to follow solidity style guide
1 parent adcfb49 commit 315c8fc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/Diamond.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ contract Diamond {
2121
LibDiamond._diamondCut(_diamondCut, _args.init, _args.initData);
2222
}
2323

24+
/// @notice Receive function to accept plain Ether transfers
25+
/// @dev Allows contract to receive Ether without data
26+
receive() external payable {}
27+
2428
/// @notice Fallback function that delegates calls to the appropriate facet based on function selector
2529
/// @dev Reads the facet address from diamond storage and performs a delegatecall; reverts if selector is not found
2630
fallback() external payable {
@@ -45,8 +49,4 @@ contract Diamond {
4549
default { return(0, returndatasize()) }
4650
}
4751
}
48-
49-
/// @notice Receive function to accept plain Ether transfers
50-
/// @dev Allows contract to receive Ether without data
51-
receive() external payable {}
5252
}

0 commit comments

Comments
 (0)