-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #188 from 1inch/feature/SC-1269
[SC-1269] Patch SolidlyOracle
- Loading branch information
Showing
6 changed files
with
95 additions
and
63 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity 0.8.23; | ||
|
||
import "./SolidlyOracle.sol"; | ||
|
||
contract SolidlyOracleZksync is SolidlyOracle { | ||
/// @dev keccak256("zksyncCreate2") | ||
bytes32 public constant CREATE2_PREFIX = 0x2020dba91b30cc0006188af794c2fb30dd8520db7e2c088b7fc7c103c00ca494; | ||
|
||
constructor(address _factory, bytes32 _initcodeHash) SolidlyOracle(_factory, _initcodeHash) {} | ||
|
||
function _pairFor(IERC20 tokenA, IERC20 tokenB, bool stable) internal override view returns (address pair) { | ||
pair = address(uint160(uint256(keccak256(abi.encodePacked( | ||
CREATE2_PREFIX, | ||
FACTORY, | ||
keccak256(abi.encodePacked(tokenA, tokenB, stable)), | ||
INITCODE_HASH, | ||
keccak256(abi.encodePacked("")) | ||
))))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters