Uniswap / v4-periphery

🦄 🦄 🦄 🦄 Peripheral smart contracts for interacting with Uniswap v4
https://blog.uniswap.org/uniswap-v4
MIT License
716 stars 495 forks source link

audit: add reverse mapping #317

Closed snreynolds closed 3 months ago

snreynolds commented 3 months ago

This introduces two new mappings:

mapping(uint256 tokenId => PositionInfo) positionInfo and mapping(bytes25 poolId => PoolKey) poolKeys

which exposes information about positions on chain.

PositionInfo is a custom type wrapped around a uint256 that holds:

This change is meant to allow for better interface standardization around ERC7211s and to make unchain integrations easier. (For example, position descriptor can now read information about the position).