Skip to main content

Create2Lib (V2)

Source reference for public revision e3b9d12. For deployed configuration, select the pool's engine on the parameter page.

Git Source

Functions
​

deploy
​

Deploys a contract using CREATE2 opcode for deterministic addresses

Reverts with "CREATE2 failed" if deployment returns zero address

function deploy(uint256 value, bytes32 salt, bytes memory code) internal returns (address addr);

Parameters

NameTypeDescription
valueuint256The amount of wei to send to the new contract
saltbytes32The CREATE2 salt for deterministic address generation
codebytesThe initialization bytecode of the contract to deploy

Returns

NameTypeDescription
addraddressThe address of the deployed contract
Table of Contents