pair_for
Documentation for eth_defi.uniswap_v2.utils.pair_for function.
- pair_for(factory, token_a, token_b, magical_hash)[source]
Deduct the Uniswap pair contract address
- Parameters
factory (eth_typing.evm.HexAddress) – Factory contract address
token_a (eth_typing.evm.HexAddress) – Base token
token_b (eth_typing.evm.HexAddress) – Quote token
magical_hash (eth_typing.encoding.HexStr) – Init code hash of the Uniswap instance. Set None to use the default Sushiswap hash.
- Returns
Pair contract address
- Return type
eth_typing.evm.HexAddress