-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add C4 audit, start to add weth router
- Loading branch information
Showing
3 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
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,15 @@ | ||
// SPDX-Identifier: MIT | ||
|
||
pragma solidity 0.8.16; | ||
|
||
interface IWETH10 { | ||
/// @dev `msg.value` of ETH sent to this contract grants caller account a matching increase in WETH10 token balance. | ||
/// Emits {Transfer} event to reflect WETH10 token mint of `msg.value` from `address(0)` to caller account. | ||
function deposit() external payable; | ||
|
||
/// @dev Burn `value` WETH10 token from caller account and withdraw matching ETH to account (`to`). | ||
/// Emits {Transfer} event to reflect WETH10 token burn of `value` to `address(0)` from caller account. | ||
/// Requirements: | ||
/// - caller account must have at least `value` balance of WETH10 token. | ||
function withdrawTo(address payable to, uint256 value) external; | ||
} |
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,41 @@ | ||
// SPDX-Identifier: MIT | ||
|
||
pragma solidity 0.8.16; | ||
|
||
import "./ISeawaterAMM.sol"; | ||
import "./IWETH10.sol"; | ||
|
||
contract WETHRouter { | ||
IWETH10 immutable WETH; | ||
ISeawaterAMM immutable SEAWATER; | ||
|
||
constructor(IWETH10 _weth, ISeawaterAMM _amm) { | ||
WETH = _weth; | ||
SEAWATER = _amm; | ||
} | ||
|
||
function swapIn32502CA71( | ||
address _token, | ||
uint256 _amount, | ||
uint256 _minOut | ||
) external returns (int256, int256) { | ||
|
||
} | ||
|
||
function swapOut5E08A399( | ||
address _token, | ||
uint256 _amount, | ||
uint256 _minOut | ||
) external returns (int256, int256) { | ||
|
||
} | ||
|
||
function swap2ExactInED91BB1D( | ||
address _tokenA, | ||
address _tokenB, | ||
uint256 _amount, | ||
uint256 _minOut | ||
) external returns (uint256, uint256) { | ||
|
||
} | ||
} |