-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: dynamic fee incorrect encoding #40
base: main
Are you sure you want to change the base?
Conversation
@hensha256 i did notice, that mixed-quoter lib v4-periphery @ 47e3c30 is 3 weeks ago, and if i were to update v4-periphery import, it would break https://github.com/Uniswap/mixed-quoter/blob/main/src/MixedRouteQuoterV2.sol#L84 |
/// for example, a v4 fee 100% is 1000000, or 000011110100001001000000 | ||
/// 000011110100001001000000 & 100011111111111111111111 = 000011110100001001000000 | ||
/// if v4 fee is dynamic, then it's 100000000000000000000000 | ||
/// 100000000000000000000000 & 100011111111111111111111 = 100000000000000000000000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would love a comment explaining what the 3 0s are for to explain the mask more clearly
uint24 encodedFee = (uint24(protocolVersion) << v4FeeShift) + fee; | ||
uint8 v3ProtocolVersion = uint8(3); | ||
uint24 encodedV3Fee = (uint24(v3ProtocolVersion) << v4FeeShift) + fee; | ||
console.log(encodedV3Fee); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove?
nonEncodableData[0] = (IMixedRouteQuoterV2.NonEncodableData({hookData: hookData})); | ||
nonEncodableData[1] = (IMixedRouteQuoterV2.NonEncodableData({hookData: hookData})); | ||
|
||
// bytes memory path = abi.encodePacked(V4_SEPOLIA_OP_ADDRESS, fee,tickSpacing, hooks, V4_SEPOLIA_USDC_ADDRESS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove?
No description provided.