sort_tokens

Documentation for eth_defi.uniswap_v2.utils.sort_tokens function.

sort_tokens(token_a, token_b)[source]

Put lower address first, as Uniswap wants.

Parameters
  • token_a (HexAddress) –

  • token_b (HexAddress) –

Return type

Tuple[HexAddress, HexAddress]