From cad52f1c4757e8623fd8ee1575ecc0d3bd5d6a5e Mon Sep 17 00:00:00 2001 From: Willem Olding Date: Tue, 3 Oct 2023 16:12:53 +1100 Subject: [PATCH] restrict function types to pure --- contracts/src/SyncStepLib.sol | 2 +- contracts/test/SyncStepExternal.sol | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/src/SyncStepLib.sol b/contracts/src/SyncStepLib.sol index d187d887..37a1e51b 100644 --- a/contracts/src/SyncStepLib.sol +++ b/contracts/src/SyncStepLib.sol @@ -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), diff --git a/contracts/test/SyncStepExternal.sol b/contracts/test/SyncStepExternal.sol index e2df1407..9d804844 100644 --- a/contracts/test/SyncStepExternal.sol +++ b/contracts/test/SyncStepExternal.sol @@ -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); } }