Migrator
State Variables
_IMPLEMENTATION_SLOT
Storage slot with the address of the current implementation.
keccak256('eip1967.proxy.implementation') - 1.
uint256 private constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
fromImplementation
The implementation to migrate proxies from.
address public immutable fromImplementation;
toImplementation
The implementation to migrate proxies to.
address public immutable toImplementation;
Functions
constructor
Constructs the contract such that it proxies calls to the given implementation.
constructor(address fromImplementation_, address toImplementation_);
Parameters
| Name | Type | Description |
|---|---|---|
fromImplementation_ | address | The address of the implementation to migrate a proxy from. |
toImplementation_ | address | The address of the implementation to migrate a proxy to. |
fallback
Migrates a proxy to the new implementation.
fallback() external;
Errors
ZeroFromImplementation
Thrown when the from implementation is the zero address.
error ZeroFromImplementation();
ZeroToImplementation
Thrown when the to implementation is the zero address.
error ZeroToImplementation();
UnexpectedImplementation
Thrown when the implementation is not the expected implementation.
error UnexpectedImplementation();