deploy_factory_sushi

Documentation for eth_defi.uniswap_v2.deployment.deploy_factory_sushi function.

deploy_factory_sushi(web3, deployer)[source]

Deploy a Uniswap V2 factory contract.

This deployment has to be the init code hash hard coded in UniswapV2Library.sol. We specifically deploy a hash compatible Sushiv2Factory. This makes the Uniswap deployment non-recompilable, as the source code files refer to the hashes of a certain compilation version.

We create a bytecode hash identical deployment by replaying the transaction that deployed Sushiv2Factory contract.

Parameters
  • web3 (web3.main.Web3) – Web3 instance

  • deployer (str) – Deployer adresss

Returns

Factory contract instance

Return type

web3.contract.Contract