Skip to content

Commit 9efd40b

Browse files
authored
BM-276: Move clientSignature args to calldata from memory (github#89)
1 parent 4a2f4a3 commit 9efd40b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

contracts/src/IProofMarket.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,14 @@ interface IProofMarket {
141141
/// @notice Submit a request such that it is publicly available for provers to evaluate and bid on.
142142
/// Any `msg.value` sent with the call will be added to the balance of `msg.sender`.
143143
/// @dev Submitting the transaction only broadcasting it, and is not a required step.
144-
function submitRequest(ProvingRequest calldata request, bytes memory clientSignature) external payable;
144+
function submitRequest(ProvingRequest calldata request, bytes calldata clientSignature) external payable;
145145

146146
/// @notice Lock the proving request to the prover, giving them exclusive rights to be paid to
147147
/// fulfill this request, and also making them subject to slashing penalties if they fail to
148148
/// deliver. At this point, the price for fulfillment is also set, based on the reverse Dutch
149149
/// auction parameters and the block at which this transaction is processed.
150150
/// @dev This method should be called from the address of the prover.
151-
function lockin(ProvingRequest calldata request, bytes memory clientSignature) external;
151+
function lockin(ProvingRequest calldata request, bytes calldata clientSignature) external;
152152

153153
/// @notice Lock the proving request to the prover, giving them exclusive rights to be paid to
154154
/// fulfill this request, and also making them subject to slashing penalties if they fail to
@@ -157,7 +157,7 @@ interface IProofMarket {
157157
/// @dev This method uses the provided signature to authenticate the prover.
158158
function lockinWithSig(
159159
ProvingRequest calldata request,
160-
bytes memory clientSignature,
160+
bytes calldata clientSignature,
161161
bytes calldata proverSignature
162162
) external;
163163

contracts/src/ProofMarket.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,12 @@ contract ProofMarket is IProofMarket, EIP712 {
166166
return uint256(accounts[addr].balance);
167167
}
168168

169-
function submitRequest(ProvingRequest calldata request, bytes memory clientSignature) external payable {
169+
function submitRequest(ProvingRequest calldata request, bytes calldata clientSignature) external payable {
170170
accounts[msg.sender].balance += msg.value.toUint96();
171171
emit RequestSubmitted(request, clientSignature);
172172
}
173173

174-
function lockin(ProvingRequest calldata request, bytes memory clientSignature) external {
174+
function lockin(ProvingRequest calldata request, bytes calldata clientSignature) external {
175175
(address client, uint32 idx) = (ProofMarketLib.requestFrom(request.id), ProofMarketLib.requestIndex(request.id));
176176

177177
// Recover the prover address and require the client address to equal the address part of the ID.
@@ -183,7 +183,7 @@ contract ProofMarket is IProofMarket, EIP712 {
183183

184184
function lockinWithSig(
185185
ProvingRequest calldata request,
186-
bytes memory clientSignature,
186+
bytes calldata clientSignature,
187187
bytes calldata proverSignature
188188
) external {
189189
(address client, uint32 idx) = (ProofMarketLib.requestFrom(request.id), ProofMarketLib.requestIndex(request.id));

0 commit comments

Comments
 (0)