Request form
ERC1967Factory
  • ERC1967
  • Audited
  • No-Code Deploy
Docs
Source
ChefGPT

ERC1967Factory

The ERC1967Factory contract is a factory contract that allows for the deployment, upgrade, and administration of proxy contracts. It provides functions to change the admin of a proxy, upgrade the implementation of a proxy, and deploy new proxies. It also emits events for admin changes, upgrades, and deployments. The contract uses assembly code to interact with the proxy contracts and handle error conditions.

ERC1967Factory :
AdminChanged(address,address) :
The admin of a proxy contract has been changed.
Deployed(address,address,address) :
A proxy has been deployed.
Upgraded(address,address) :
The implementation for a proxy has been upgraded.
adminOf(address) :
Returns the admin of the proxy.
changeAdmin(address,address) :
Sets the admin of the proxy. The caller of this function must be the admin of the proxy on this factory.
deploy(address,address) :
Deploys a proxy for `implementation`, with `admin`, and returns its address. The value passed into this function will be forwarded to the proxy.
deployAndCall(address,address,bytes) :
Deploys a proxy for `implementation`, with `admin`, and returns its address. The value passed into this function will be forwarded to the proxy. Then, calls the proxy with abi encoded `data`.
deployDeterministic(address,address,bytes32) :
Deploys a proxy for `implementation`, with `admin`, `salt`, and returns its deterministic address. The value passed into this function will be forwarded to the proxy.
deployDeterministicAndCall(address,address,bytes32,bytes) :
Deploys a proxy for `implementation`, with `admin`, `salt`, and returns its deterministic address. The value passed into this function will be forwarded to the proxy. Then, calls the proxy with abi encoded `data`.
initCodeHash() :
Returns the initialization code hash of the proxy. Used for mining vanity addresses with create2crunch.
predictDeterministicAddress(bytes32) :
Returns the address of the proxy deployed with `salt`.
upgrade(address,address) :
Upgrades the proxy to point to `implementation`. The caller of this function must be the admin of the proxy on this factory.
upgradeAndCall(address,address,bytes) :
Upgrades the proxy to point to `implementation`. Then, calls the proxy with abi encoded `data`. The caller of this function must be the admin of the proxy on this factory.
ERC1967Factory.sol

14 downloads

Solidity Version

0.8.15

Creator

Solady
Solady / ERC1967Factory
  • ERC1967
  • Audited
  • No-Code Deploy
Docs
Source
ChefGPT
Expand
Share

Get Cookin'
star icon14

14 downloads

Solidity Version

0.8.15

Creator

Solady

ERC1967Factory

The ERC1967Factory contract is a factory contract that allows for the deployment, upgrade, and administration of proxy contracts. It provides functions to change the admin of a proxy, upgrade the implementation of a proxy, and deploy new proxies. It also emits events for admin changes, upgrades, and deployments. The contract uses assembly code to interact with the proxy contracts and handle error conditions.

ERC1967Factory :
AdminChanged(address,address) :
The admin of a proxy contract has been changed.
Deployed(address,address,address) :
A proxy has been deployed.
Upgraded(address,address) :
The implementation for a proxy has been upgraded.
adminOf(address) :
Returns the admin of the proxy.
changeAdmin(address,address) :
Sets the admin of the proxy. The caller of this function must be the admin of the proxy on this factory.
deploy(address,address) :
Deploys a proxy for `implementation`, with `admin`, and returns its address. The value passed into this function will be forwarded to the proxy.
deployAndCall(address,address,bytes) :
Deploys a proxy for `implementation`, with `admin`, and returns its address. The value passed into this function will be forwarded to the proxy. Then, calls the proxy with abi encoded `data`.
deployDeterministic(address,address,bytes32) :
Deploys a proxy for `implementation`, with `admin`, `salt`, and returns its deterministic address. The value passed into this function will be forwarded to the proxy.
deployDeterministicAndCall(address,address,bytes32,bytes) :
Deploys a proxy for `implementation`, with `admin`, `salt`, and returns its deterministic address. The value passed into this function will be forwarded to the proxy. Then, calls the proxy with abi encoded `data`.
initCodeHash() :
Returns the initialization code hash of the proxy. Used for mining vanity addresses with create2crunch.
predictDeterministicAddress(bytes32) :
Returns the address of the proxy deployed with `salt`.
upgrade(address,address) :
Upgrades the proxy to point to `implementation`. The caller of this function must be the admin of the proxy on this factory.
upgradeAndCall(address,address,bytes) :
Upgrades the proxy to point to `implementation`. Then, calls the proxy with abi encoded `data`. The caller of this function must be the admin of the proxy on this factory.
ERC1967Factory.sol