deploy_trading_pair

Documentation for eth_defi.uniswap_v2.deployment.deploy_trading_pair function.

deploy_trading_pair(web3, deployer, deployment, token_a, token_b, liquidity_a, liquidity_b)[source]

Deploy a new trading pair on Uniswap v2.

Assumes deployer has enough token balance to add the initial liquidity. The deployer will also receive LP tokens for newly added liquidity.

See UniswapV2Factory.createPair() for details.

Parameters
Returns

Pair contract address

Return type

HexAddress