Skip to content

improve getLimits natspec #105

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

Merged
merged 1 commit into from
Jun 17, 2025
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
4 changes: 3 additions & 1 deletion src/interfaces/IEulerSwap.sol
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ interface IEulerSwap {
returns (uint256);

/// @notice Upper-bounds on the amounts of each token that this pool can currently support swaps for.
function getLimits(address tokenIn, address tokenOut) external view returns (uint256, uint256);
/// @return limitIn Max amount of `tokenIn` that can be sold.
/// @return limitOut Max amount of `tokenOut` that can be bought.
function getLimits(address tokenIn, address tokenOut) external view returns (uint256 limitIn, uint256 limitOut);

/// @notice Optimistically sends the requested amounts of tokens to the `to`
/// address, invokes `eulerSwapCall` callback on `to` (if `data` was provided),
Expand Down
6 changes: 4 additions & 2 deletions src/interfaces/IEulerSwapPeriphery.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ interface IEulerSwapPeriphery {
view
returns (uint256);

/// @notice Upper-bound on the max amount that can be sold of tokenIn and bought of tokenOut
function getLimits(address eulerSwap, address tokenIn, address tokenOut) external view returns (uint256, uint256);
/// @notice Upper-bounds on the amounts of each token that this pool can currently support swaps for.
/// @return limitIn Max amount of `tokenIn` that can be sold.
/// @return limitOut Max amount of `tokenOut` that can be bought.
function getLimits(address eulerSwap, address tokenIn, address tokenOut) external view returns (uint256 limitIn, uint256 limitOut);
}
Loading