Skip to main content

UniswapV4DeployerCompetition

Git Source - Generated with forge doc

Inherits: IUniswapV4DeployerCompetition

A contract to crowdsource a salt for the best Uniswap V4 address

State Variables​

bestAddressSalt​

The salt for the best address found so far

bytes32 public bestAddressSalt;

bestAddressSubmitter​

The submitter of the best address found so far

address public bestAddressSubmitter;

competitionDeadline​

The deadline for the competition

uint256 public immutable competitionDeadline;

initCodeHash​

The init code hash of the V4 contract

bytes32 public immutable initCodeHash;

deployer​

The deployer who can initiate the deployment of the v4 PoolManager, until the exclusive deploy deadline.

After this deadline anyone can deploy.

address public immutable deployer;

exclusiveDeployDeadline​

The deadline for exclusive deployment by deployer after deadline

uint256 public immutable exclusiveDeployDeadline;

Functions​

constructor​

constructor(
bytes32 _initCodeHash,
uint256 _competitionDeadline,
address _exclusiveDeployer,
uint256 _exclusiveDeployLength
);

updateBestAddress​

Updates the best address if the new address has a better vanity score

The first 20 bytes of the salt must be either address(0) or msg.sender

function updateBestAddress(bytes32 salt) external;

Parameters

NameTypeDescription
saltbytes32The salt to use to compute the new address with CREATE2

deploy​

deploys the Uniswap v4 PoolManager contract

The bytecode must match the initCodeHash

function deploy(bytes memory bytecode) external;

Parameters

NameTypeDescription
bytecodebytesThe bytecode of the Uniswap v4 PoolManager contract

bestAddress​

returns the best address found so far

function bestAddress() public view returns (address);