Skip to content

Commit 56e044a

Browse files
committed
chore: use calldata instead of memory
Signed-off-by: Tomás Migone <[email protected]>
1 parent adf520e commit 56e044a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/horizon/contracts/payments/collectors/GraphTallyCollector.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ contract GraphTallyCollector is EIP712, GraphDirectory, Authorizable, IGraphTall
6060
* @notice REVERT: This function may revert if ECDSA.recover fails, check ECDSA library for details.
6161
*/
6262
/// @inheritdoc IPaymentsCollector
63-
function collect(IGraphPayments.PaymentTypes paymentType, bytes memory data) external override returns (uint256) {
63+
function collect(IGraphPayments.PaymentTypes paymentType, bytes calldata data) external override returns (uint256) {
6464
return _collect(paymentType, data, 0);
6565
}
6666

6767
/// @inheritdoc IGraphTallyCollector
6868
function collect(
6969
IGraphPayments.PaymentTypes paymentType,
70-
bytes memory data,
70+
bytes calldata data,
7171
uint256 tokensToCollect
7272
) external override returns (uint256) {
7373
return _collect(paymentType, data, tokensToCollect);
@@ -93,7 +93,7 @@ contract GraphTallyCollector is EIP712, GraphDirectory, Authorizable, IGraphTall
9393
*/
9494
function _collect(
9595
IGraphPayments.PaymentTypes _paymentType,
96-
bytes memory _data,
96+
bytes calldata _data,
9797
uint256 _tokensToCollect
9898
) private returns (uint256) {
9999
(SignedRAV memory signedRAV, uint256 dataServiceCut) = abi.decode(_data, (SignedRAV, uint256));

packages/subgraph-service/contracts/DisputeManager.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ contract DisputeManager is
285285
}
286286

287287
/// @inheritdoc IDisputeManager
288-
function encodeReceipt(Attestation.Receipt memory receipt) external view override returns (bytes32) {
288+
function encodeReceipt(Attestation.Receipt calldata receipt) external view override returns (bytes32) {
289289
return _encodeReceipt(receipt);
290290
}
291291

@@ -310,8 +310,8 @@ contract DisputeManager is
310310

311311
/// @inheritdoc IDisputeManager
312312
function areConflictingAttestations(
313-
Attestation.State memory attestation1,
314-
Attestation.State memory attestation2
313+
Attestation.State calldata attestation1,
314+
Attestation.State calldata attestation2
315315
) external pure override returns (bool) {
316316
return Attestation.areConflicting(attestation1, attestation2);
317317
}

0 commit comments

Comments
 (0)