Skip to content

Commit

Permalink
restrict function types to pure
Browse files Browse the repository at this point in the history
  • Loading branch information
willemolding committed Oct 3, 2023
1 parent d45a93d commit cad52f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contracts/src/SyncStepLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ library SyncStepLib {
* @param keysPoseidonCommitment The commitment to the keys used in the sync step
* @return The public input commitment that can be sent to the verifier contract.
*/
function toInputCommitment(SyncStepInput memory args, bytes32 keysPoseidonCommitment) internal view returns (uint256) {
function toInputCommitment(SyncStepInput memory args, bytes32 keysPoseidonCommitment) internal pure returns (uint256) {
bytes32 h = sha256(abi.encodePacked(
toLittleEndian64(args.attestedSlot),
toLittleEndian64(args.finalizedSlot),
Expand Down
2 changes: 1 addition & 1 deletion contracts/test/SyncStepExternal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { SyncStepLib } from "../src/SyncStepLib.sol";
contract SyncStepExternal {
using SyncStepLib for SyncStepLib.SyncStepInput;

function toInputCommitment(SyncStepLib.SyncStepInput calldata args, bytes32 keysPoseidonCommitment) public view returns (uint256) {
function toInputCommitment(SyncStepLib.SyncStepInput calldata args, bytes32 keysPoseidonCommitment) public pure returns (uint256) {
return args.toInputCommitment(keysPoseidonCommitment);
}
}

0 comments on commit cad52f1

Please sign in to comment.