Uniswap / v4-core

🦄 🦄 🦄 🦄 Core smart contracts of Uniswap v4
https://blog.uniswap.org/uniswap-v4
2.02k stars 972 forks source link

Change BalanceDelta and BeforeSwapDelta from int256 to bytes32 #878

Closed jeffishjeff closed 2 months ago

jeffishjeff commented 2 months ago

Description of changes

As these delta types are packed bytes of multiple variables, bytes32 would be a more "neutral" underlying type than int256. Arguably make code easier to understand and discourages direct integer manipulation.

hensha256 commented 2 months ago

Hi! Thanks so much for your contribution. Given the code has already completed 5 audits, we are not going to be making any new changes other than in the event that a bug is found.