-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4843d57
commit 4106cd5
Showing
6 changed files
with
552 additions
and
2 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
packages/contracts-rfq/contracts/legacy/router/interfaces/IDefaultExtendedPool.sol
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
2 changes: 1 addition & 1 deletion
2
packages/contracts-rfq/contracts/legacy/router/interfaces/IDefaultPool.sol
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
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,55 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.17; | ||
|
||
import {IDefaultPool} from "../../contracts/legacy/router/interfaces/IDefaultPool.sol"; | ||
|
||
// solhint-disable no-empty-blocks | ||
contract DefaultPoolMock is IDefaultPool { | ||
uint8 private constant TOKENS = 3; | ||
|
||
/// @notice We include an empty "test" function so that this contract does not appear in the coverage report. | ||
function testDefaultPoolMock() external {} | ||
|
||
function swap( | ||
uint8 tokenIndexFrom, | ||
uint8 tokenIndexTo, | ||
uint256 dx, | ||
uint256 minDy, | ||
uint256 deadline | ||
) | ||
external | ||
returns (uint256 amountOut) | ||
{} | ||
|
||
function calculateSwap( | ||
uint8 tokenIndexFrom, | ||
uint8 tokenIndexTo, | ||
uint256 dx | ||
) | ||
external | ||
view | ||
returns (uint256 amountOut) | ||
{} | ||
|
||
function swapStorage() | ||
external | ||
view | ||
returns ( | ||
uint256 initialA, | ||
uint256 futureA, | ||
uint256 initialATime, | ||
uint256 futureATime, | ||
uint256 swapFee, | ||
uint256 adminFee, | ||
address lpToken | ||
) | ||
{} | ||
|
||
function getToken(uint8 index) external pure returns (address token) { | ||
if (index < TOKENS) { | ||
// Will be overridden by vm.mockCall | ||
return address(uint160(1 + index)); | ||
} | ||
revert("Token does not exist"); | ||
} | ||
} |
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,20 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.4; | ||
|
||
import {ISwapQuoter, LimitedToken, SwapQuery} from "../../contracts/legacy/rfq/interfaces/ISwapQuoter.sol"; | ||
|
||
// solhint-disable no-empty-blocks | ||
contract SwapQuoterMock is ISwapQuoter { | ||
/// @notice We include an empty "test" function so that this contract does not appear in the coverage report. | ||
function testSwapQuoterMock() external {} | ||
|
||
function getAmountOut( | ||
LimitedToken memory tokenIn, | ||
address tokenOut, | ||
uint256 amountIn | ||
) | ||
external | ||
view | ||
returns (SwapQuery memory query) | ||
{} | ||
} |
Oops, something went wrong.