Skip to content

Incorrect path encoding order in exactOutputSingle #1

Description

@zakrad

I was testing exactOutputSingle on Router and ran into an issue where the swap fails, but the same swap worked fine using exactOutput with a manually encoded path.
this implementation for exactOutputSingle

SwapCallbackData({ 
    path: abi.encodePacked(params.tokenOut, params.tokenIn, params.tickSpacing), 
    payer: msg.sender 
});

It seems like the path is being encoded as tokenOut + tokenIn + tickSpacing in exactOutputSingle while I am able to use exactOutput with tokenOut + tickSpacing + tokenIn
could this be causing the exactOutputSingle swap to fail due to the incorrect path format in the callback?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions