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

make natspec consistent #414

Merged
merged 1 commit into from
Dec 10, 2024
Merged
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
3 changes: 2 additions & 1 deletion src/interfaces/IEIP712_v4.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @notice This interface is used for an EIP712 implementation
/// @title IEIP712_v4
/// @notice Interface for the EIP712 contract
interface IEIP712_v4 {
/// @notice Returns the domain separator for the current chain.
/// @return bytes32 The domain separator
4 changes: 2 additions & 2 deletions src/interfaces/IERC721Permit_v4.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title ERC721 with permit
/// @notice Extension to ERC721 that includes a permit function for signature based approvals
/// @title IERC721Permit_v4
/// @notice Interface for the ERC721Permit_v4 contract
interface IERC721Permit_v4 {
error SignatureDeadlineExpired();
error NoSelfPermit();
3 changes: 2 additions & 1 deletion src/interfaces/IImmutableState.sol
Original file line number Diff line number Diff line change
@@ -3,7 +3,8 @@ pragma solidity ^0.8.0;

import {IPoolManager} from "@uniswap/v4-core/src/interfaces/IPoolManager.sol";

/// @title Interface for ImmutableState
/// @title IImmutableState
/// @notice Interface for the ImmutableState contract
interface IImmutableState {
/// @notice The Uniswap v4 PoolManager contract
function poolManager() external view returns (IPoolManager);
4 changes: 2 additions & 2 deletions src/interfaces/IMulticall_v4.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title Multicall_v4 interface
/// @notice Enables calling multiple methods in a single call to the contract
/// @title IMulticall_v4
/// @notice Interface for the Multicall_v4 contract
interface IMulticall_v4 {
/// @notice Call multiple functions in the current contract and return the data from all of them if they all succeed
/// @dev The `msg.value` is passed onto all subcalls, even if a previous subcall has consumed the ether.
3 changes: 2 additions & 1 deletion src/interfaces/INotifier.sol
Original file line number Diff line number Diff line change
@@ -3,7 +3,8 @@ pragma solidity ^0.8.0;

import {ISubscriber} from "./ISubscriber.sol";

/// @notice This interface is used to opt in to sending updates to external contracts about position modifications or transfers
/// @title INotifier
/// @notice Interface for the Notifier contract
interface INotifier {
/// @notice Thrown when unsubscribing without a subscriber
error NotSubscribed();
2 changes: 2 additions & 0 deletions src/interfaces/IPoolInitializer_v4.sol
Original file line number Diff line number Diff line change
@@ -3,6 +3,8 @@ pragma solidity ^0.8.0;

import {PoolKey} from "@uniswap/v4-core/src/types/PoolKey.sol";

/// @title IPoolInitializer_v4
/// @notice Interface for the PoolInitializer_v4 contract
interface IPoolInitializer_v4 {
/// @notice Initialize a Uniswap v4 Pool
/// @dev If the pool is already initialized, this function will not revert and just return type(int24).max
3 changes: 2 additions & 1 deletion src/interfaces/IPositionDescriptor.sol
Original file line number Diff line number Diff line change
@@ -4,7 +4,8 @@ pragma solidity ^0.8.24;
import "./IPositionManager.sol";
import {IPoolManager} from "@uniswap/v4-core/src/interfaces/IPoolManager.sol";

/// @title Describes position NFT tokens via URI
/// @title IPositionDescriptor
/// @notice Interface for the PositionDescriptor contract
interface IPositionDescriptor {
error InvalidTokenId(uint256 tokenId);

5 changes: 2 additions & 3 deletions src/interfaces/IStateView.sol
Original file line number Diff line number Diff line change
@@ -7,9 +7,8 @@ import {IPoolManager} from "@uniswap/v4-core/src/interfaces/IPoolManager.sol";
import {Position} from "@uniswap/v4-core/src/libraries/Position.sol";
import {IImmutableState} from "../interfaces/IImmutableState.sol";

/// @title StateView Interface
/// @notice A view only contract wrapping the StateLibrary.sol library for reading storage in v4-core.
/// @dev The contract is intended for offchain clients. Use StateLibrary.sol directly if reading state onchain.
/// @title IStateView
/// @notice Interface for the StateView contract
interface IStateView is IImmutableState {
/// @notice Get Slot0 of the pool: sqrtPriceX96, tick, protocolFee, lpFee
/// @dev Corresponds to pools[poolId].slot0
1 change: 1 addition & 0 deletions src/interfaces/ISubscriber.sol
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ pragma solidity ^0.8.0;
import {BalanceDelta} from "@uniswap/v4-core/src/types/BalanceDelta.sol";
import {PositionInfo} from "../libraries/PositionInfoLibrary.sol";

/// @title ISubscriber
/// @notice Interface that a Subscriber contract should implement to receive updates from the v4 position manager
interface ISubscriber {
/// @notice Called when a position subscribes to this subscriber contract
4 changes: 2 additions & 2 deletions src/interfaces/IUniswapV4DeployerCompetition.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;

/// @title UniswapV4DeployerCompetition
/// @notice A competition to deploy the UniswapV4 contract with the best address
/// @title IUniswapV4DeployerCompetition
/// @notice Interface for the UniswapV4DeployerCompetition contract
interface IUniswapV4DeployerCompetition {
event NewAddressFound(address indexed bestAddress, address indexed submitter, uint256 score);

2 changes: 1 addition & 1 deletion src/interfaces/IUnorderedNonce.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title UnorderedNonce Interface
/// @title IUnorderedNonce
/// @notice Interface for the UnorderedNonce contract
interface IUnorderedNonce {
error NonceAlreadyUsed();
7 changes: 2 additions & 5 deletions src/interfaces/IV4Quoter.sol
Original file line number Diff line number Diff line change
@@ -6,11 +6,8 @@ import {Currency} from "@uniswap/v4-core/src/types/Currency.sol";
import {PathKey} from "../libraries/PathKey.sol";
import {IImmutableState} from "./IImmutableState.sol";

/// @title V4 Quoter Interface
/// @notice Supports quoting the delta amounts for exact input or exact output swaps.
/// @notice For each pool also tells you the sqrt price of the pool after the swap.
/// @dev These functions are not marked view because they rely on calling non-view functions and reverting
/// to compute the result. They are also not gas efficient and should not be called on-chain.
/// @title IV4Quoter
/// @notice Interface for the V4Quoter contract
interface IV4Quoter is IImmutableState {
struct QuoteExactSingleParams {
PoolKey poolKey;
2 changes: 1 addition & 1 deletion src/interfaces/IV4Router.sol
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ import {PathKey} from "../libraries/PathKey.sol";
import {IImmutableState} from "./IImmutableState.sol";

/// @title IV4Router
/// @notice Interface containing all the structs and errors for different v4 swap types
/// @notice Interface for the V4Router contract
interface IV4Router is IImmutableState {
/// @notice Emitted when an exactInput swap does not receive its minAmountOut
error V4TooLittleReceived(uint256 minAmountOutReceived, uint256 amountReceived);
2 changes: 1 addition & 1 deletion src/interfaces/external/IWETH9.sol
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ pragma solidity ^0.8.0;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

/// @title Interface for WETH9
/// @title IWETH9
interface IWETH9 is IERC20 {
/// @notice Deposit ether to get wrapped ether
function deposit() external payable;
1 change: 1 addition & 0 deletions src/lens/StateView.sol
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ import {ImmutableState} from "../base/ImmutableState.sol";
import {IStateView} from "../interfaces/IStateView.sol";

/// @notice A view only contract wrapping the StateLibrary.sol library for reading storage in v4-core.
/// @dev The contract is intended for offchain clients. Use StateLibrary.sol directly if reading state onchain.
contract StateView is ImmutableState, IStateView {
using StateLibrary for IPoolManager;

5 changes: 5 additions & 0 deletions src/lens/V4Quoter.sol
Original file line number Diff line number Diff line change
@@ -11,6 +11,11 @@ import {PathKey, PathKeyLibrary} from "../libraries/PathKey.sol";
import {QuoterRevert} from "../libraries/QuoterRevert.sol";
import {BaseV4Quoter} from "../base/BaseV4Quoter.sol";

/// @title V4Quoter
/// @notice Supports quoting the delta amounts for exact input or exact output swaps.
/// @notice For each pool also tells you the sqrt price of the pool after the swap.
/// @dev These functions are not marked view because they rely on calling non-view functions and reverting
/// to compute the result. They are also not gas efficient and should not be called on-chain.
contract V4Quoter is IV4Quoter, BaseV4Quoter {
using PathKeyLibrary for PathKey;
using QuoterRevert for *;
Loading