pancakeswap / pancake-v4-core

GNU General Public License v2.0
52 stars 36 forks source link

feat: [internal-r6] clear unused bits #157

Closed chefburger closed 2 months ago

ChefSnoopy commented 2 months ago

should we add signextend for tickLower , tickUpper in calculatePositionKey ? https://github.com/pancakeswap/pancake-v4-core/blob/main/src/pool-cl/libraries/CLPosition.sol#L41

and toBeforeSwapDelta 's input deltaUnspecified ? https://github.com/pancakeswap/pancake-v4-core/blob/main/src/types/BeforeSwapDelta.sol#L14

chefburger commented 2 months ago

should we add signextend for tickLower , tickUpper in calculatePositionKey ? https://github.com/pancakeswap/pancake-v4-core/blob/main/src/pool-cl/libraries/CLPosition.sol#L41

and toBeforeSwapDelta 's input deltaUnspecified ? https://github.com/pancakeswap/pancake-v4-core/blob/main/src/types/BeforeSwapDelta.sol#L14

i think it's ok because can see it's actually assembly version of abi.encodePacked i.e. the upper bits have already been overwritten by next field