Documentation for eth_defi.uniswap_v3.utils.encode_path function.
- encode_path(path, fees, exact_output=False)[source]
Encode the routing path to be suitable to use with Quoter and SwapRouter.
- For example if we would like to route the swap from token1 -> token3 through 2 pools:
then encoded path would have this format: token1 - pool1’s fee - token2 - pool2’s - token3, in which each token address length is 20 bytes and fee length is 3 bytes