Uniswap / v4-periphery

🦄 🦄 🦄 🦄 Peripheral smart contracts for interacting with Uniswap v4
https://blog.uniswap.org/uniswap-v4
GNU General Public License v2.0
707 stars 483 forks source link

add mint position event #279

Closed snreynolds closed 2 months ago

snreynolds commented 2 months ago

while this does add gas, we saved ~30k/40k gas not storing the PositionConfig so we're still net negative with that design change, and this is necessary to inform offchain integrations of a tokenId's associated PositionConfig

made it super minimal (no liquidity param), as anything related to getting liquidity value should be picked up from core events

snreynolds commented 2 months ago

looks good and makes sense why we need it

also worth mentioning _modifyLiquidity cannot re-enter posm to mint a position so we wont have out-of-order events 👍

I guess if a hook is the initial caller they could..