Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update deps #300

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 2 additions & 22 deletions contracts/OrderMixin.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@1inch/solidity-utils/contracts/interfaces/IWETH.sol";
import "@1inch/solidity-utils/contracts/libraries/SafeERC20.sol";
import "@1inch/solidity-utils/contracts/OnlyWethReceiver.sol";
import "@1inch/solidity-utils/contracts/PermitAndCall.sol";

import "./helpers/PredicateHelper.sol";
import "./helpers/SeriesEpochManager.sol";
Expand All @@ -22,7 +23,7 @@ import "./libraries/RemainingInvalidatorLib.sol";
import "./OrderLib.sol";

/// @title Limit Order mixin
abstract contract OrderMixin is IOrderMixin, EIP712, OnlyWethReceiver, PredicateHelper, SeriesEpochManager {
abstract contract OrderMixin is IOrderMixin, EIP712, OnlyWethReceiver, PredicateHelper, SeriesEpochManager, PermitAndCall {
using SafeERC20 for IERC20;
using SafeERC20 for IWETH;
using OrderLib for IOrderMixin.Order;
Expand All @@ -41,27 +42,6 @@ abstract contract OrderMixin is IOrderMixin, EIP712, OnlyWethReceiver, Predicate
_WETH = weth;
}

/**
* @notice See {IOrderMixin-permitAndCall}.
*/
function permitAndCall(bytes calldata permit, bytes calldata action) external {
IERC20(address(bytes20(permit))).tryPermit(permit[20:]);
// solhint-disable-next-line no-inline-assembly
assembly ("memory-safe") {
let ptr := mload(0x40)
calldatacopy(ptr, action.offset, action.length)
let success := delegatecall(gas(), address(), ptr, action.length, 0, 0)
returndatacopy(ptr, 0, returndatasize())
switch success
case 0 {
revert(ptr, returndatasize())
}
default {
return(ptr, returndatasize())
}
}
}

/**
* @notice See {IOrderMixin-bitInvalidatorForOrder}.
*/
Expand Down
7 changes: 0 additions & 7 deletions contracts/interfaces/IOrderMixin.sol
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,6 @@ interface IOrderMixin {
uint256 slotValue
);

/**
* @notice Executes a permit and then calls a specified action using delegatecall.
* @param permit The permit data, including the token address, permit parameters and permit signature.
* @param action The action data to be executed using delegatecall.
*/
function permitAndCall(bytes calldata permit, bytes calldata action) external;

/**
* @notice Returns bitmask for double-spend invalidators based on lowest byte of order.info and filled quotes
* @param maker Maker address
Expand Down
2 changes: 1 addition & 1 deletion hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module.exports = {
],
},
zksolc: {
version: '1.3.17',
version: '1.3.22',
compilerSource: 'binary',
settings: {},
},
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@1inch/limit-order-protocol-contract",
"version": "4.0.0-prerelease-16",
"version": "4.0.0-prerelease-17",
"description": "1inch Limit Order Protocol",
"repository": {
"type": "git",
Expand All @@ -16,35 +16,35 @@
"test/helpers"
],
"dependencies": {
"@1inch/solidity-utils": "3.5.5",
"@1inch/solidity-utils": "3.6.0",
"@chainlink/contracts": "0.8.0",
"@openzeppelin/contracts": "5.0.1"
},
"devDependencies": {
"@matterlabs/hardhat-zksync-deploy": "1.1.1",
"@matterlabs/hardhat-zksync-solc": "1.0.5",
"@matterlabs/hardhat-zksync-verify": "1.2.1",
"@matterlabs/hardhat-zksync-deploy": "1.1.2",
"@matterlabs/hardhat-zksync-solc": "1.0.6",
"@matterlabs/hardhat-zksync-verify": "1.2.2",
"@metamask/eth-sig-util": "7.0.1",
"@nomicfoundation/hardhat-chai-matchers": "2.0.2",
"@nomicfoundation/hardhat-chai-matchers": "2.0.3",
"@nomicfoundation/hardhat-network-helpers": "1.0.10",
"@nomicfoundation/hardhat-verify": "2.0.3",
"@nomicfoundation/hardhat-ethers": "3.0.5",
"chai": "4.3.10",
"chai": "4.4.0",
"dotenv": "16.3.1",
"eslint": "8.56.0",
"eslint-config-standard": "17.1.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-n": "16.4.0",
"eslint-plugin-n": "16.6.2",
"eslint-plugin-promise": "6.1.1",
"ethers": "6.9.0",
"hardhat": "2.19.3",
"ethers": "6.10.0",
"hardhat": "2.19.4",
"hardhat-dependency-compiler": "1.1.3",
"hardhat-deploy": "0.11.45",
"hardhat-gas-reporter": "1.0.9",
"hardhat-tracer": "2.7.0",
"rimraf": "5.0.5",
"solc": "0.8.23",
"solhint": "3.6.2",
"solhint": "4.1.1",
"solidity-coverage": "0.8.5",
"solidity-docgen": "0.5.17",
"zksync-ethers": "6.0.0"
Expand Down
Loading
Loading