Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamed-mehany committed Jan 20, 2025
1 parent 9c47fdd commit 402840a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"moment": "^2.30.1",
"prettier": "^3.3.3",
"prettier-plugin-solidity": "^1.4.1",
"solhint": "^5.0.5",
"solhint": "^5.0.3",
"solhint-plugin-chainlink-solidity": "git+https://github.com/smartcontractkit/chainlink-solhint-rules.git#v1.2.1",
"solhint-plugin-prettier": "^0.1.0",
"ts-node": "^10.9.2",
Expand Down
2 changes: 1 addition & 1 deletion contracts/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
pragma solidity ^0.8.19;

import {FunctionsRouter} from "../v1_0_0/FunctionsRouter.sol";
import {CallWithExactGasZKSync} from "../../shared/call/CallWithExactGasZKSync.sol";
Expand Down Expand Up @@ -42,7 +42,7 @@ contract ZKSyncFunctionsRouter is FunctionsRouter {
);

// 3. Use our library to enforce an exact gas call
(bool success, uint256 gasUsed, bytes memory returnData) = CallWithExactGasZKSync._callWithExactGas(
(bool success, uint256 gasUsed, bytes memory returnData) = CallWithExactGasZKSync._callWithExactGasSafeReturnData(
client,
callbackGasLimit,
encodedCallback,
Expand Down
7 changes: 5 additions & 2 deletions contracts/src/v0.8/shared/call/CallWithExactGasZKSync.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
pragma solidity ^0.8.19;

import {EfficientCall} from "@zksync/contracts/system-contracts/contracts/libraries/EfficientCall.sol";
import {ISystemContext} from "@zksync/contracts/gas-bound-caller/contracts/ISystemContext.sol";
Expand Down Expand Up @@ -33,7 +33,10 @@ library CallWithExactGasZKSync {
/// @param _maxtotalgas the maximum amount of gas that can be spent by the call.
/// @param _data The calldata for the call.
/// @param _maxReturnBytes the maximum amount of bytes that can be returned by the call.
function _callWithExactGas(
/// @return success whether the call succeeded
/// @return retData the return data from the call, capped at maxReturnBytes bytes
/// @return gasUsed the gas used by the external call. Does not include the overhead of this function.
function _callWithExactGasSafeReturnData(
address _to,
uint256 _maxTotalGas,
bytes calldata _data,
Expand Down

0 comments on commit 402840a

Please sign in to comment.