Skip to main content

Proxy

internal function createERC1967Proxy

Free function to create a ERC-1967 proxy contract based on the passed base contract address.

function createERC1967Proxy(address _logic, bytes _data) internal returns (address)
InputTypeDescription
_logicaddressThe base contract address.
_databytesThe constructor arguments for this contract.
Output
0addressThe address of the proxy contract created.

Initializes the upgradeable proxy with an initial implementation specified by _logic. If _data is non-empty, it’s used as data in a delegate call to _logic. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor (see OpenZeppelin ERC1967Proxy-constructor).

© 2024