Skip to content

Commit

Permalink
named imports
Browse files Browse the repository at this point in the history
  • Loading branch information
ConjunctiveNormalForm committed Nov 28, 2023
1 parent 9fb0ab4 commit 3f0e6a7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions contracts/interfaces/IQuoter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ interface IQuoter {
error InvalidQuoteTypeInRevert();
error InvalidLockAcquiredSender();
error InvalidQuoteBatchParams();
error NotSelf();
error UnexpectedRevertBytes();

struct PoolDeltas {
Expand Down
18 changes: 17 additions & 1 deletion contracts/lens/Quoter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ import {BalanceDelta} from "@uniswap/v4-core/contracts/types/BalanceDelta.sol";
import {Currency} from "@uniswap/v4-core/contracts/types/Currency.sol";
import {PoolKey} from "@uniswap/v4-core/contracts/types/PoolKey.sol";
import {PoolIdLibrary} from "@uniswap/v4-core/contracts/types/PoolId.sol";
import "../libraries/SwapIntention.sol";
import {
SwapType,
SwapInfo,
SwapIntention,
ExactInputSingleParams,
ExactInputSingleBatchParams,
ExactInputParams,
ExactOutputSingleParams,
ExactOutputSingleBatchParams,
ExactOutputParams
} from "../libraries/SwapIntention.sol";
import {IQuoter} from "../interfaces/IQuoter.sol";
import {PoolTicksCounter} from "../libraries/PoolTicksCounter.sol";

Expand All @@ -31,6 +41,12 @@ contract Quoter is IQuoter {
/// @dev int128[2] + sqrtPriceX96After padded to 32bytes + intializeTicksLoaded padded to 32bytes
uint256 internal constant MINIMUM_VALID_REASON_LENGTH = 96;

/// @dev Only this address may call this function
modifier selfOnly() {
if (msg.sender != address(this)) revert NotSelf();
_;
}

constructor(address _poolManager) {
manager = IPoolManager(_poolManager);
}
Expand Down

0 comments on commit 3f0e6a7

Please sign in to comment.