PrimaryLendingPlatformProxyAdmin
Overview
License: MIT
The PrimaryLendingPlatformProxyAdmin contract is the contract that provides the functionality for upgrading the proxy contracts.
Contract that provides the functionality for upgrading the proxy contracts. Inherit from ProxyAdmin.
Structs info
UpgradeData
Events info
SetDelayPeriod
Emitted when the delay period is set.
Parameters:
Name | Type | Description |
---|---|---|
oldDelayPeriod | uint256 | The old delay period value. |
newDelayPeriod | uint256 | The new delay period value. |
AppendUpgrade
Emitted when a new upgrade is appended to the upgrade schedule.
Parameters:
Name | Type | Description |
---|---|---|
proxy | address | The address of the proxy contract being upgraded. |
appendTimestamp | uint256 | The timestamp when the upgrade was appended to the schedule. |
delayPeriod | uint256 | The delay period before the upgrade can be executed. |
oldImplementation | address | The address of the current implementation contract. |
newImplementation | address | The address of the new implementation contract. |
Upgrade
Emitted when a proxy contract is upgraded to a new implementation.
Parameters:
Name | Type | Description |
---|---|---|
proxy | address | The address of the upgraded proxy contract. |
upgradeTimestamp | uint256 | The timestamp of the upgrade. |
oldImplementation | address | The address of the old implementation contract. |
newImplementation | address | The address of the new implementation contract. |
Constants info
minimumDelayPeriod (0xf6a01ab1)
State variables info
delayPeriod (0xb1c94d94)
upgradeData (0xbbd0f915)
Functions info
constructor
setDelayPeriod (0x3d572107)
Sets the delay period for the PrimaryLendingPlatformProxyAdmin contract.
Parameters:
Name | Type | Description |
---|---|---|
_delayPeriod | uint256 | The new delay period to be set. |
Requirements:
The caller must be the owner of the contract.
_delayPeriod
must be greater than or equal to the minimum delay period. |
changeProxyAdmin (0x7eff275e)
Changes the admin of a transparent proxy.
Parameters:
Name | Type | Description |
---|---|---|
proxy | contract ITransparentUpgradeableProxy | The address of the proxy to change the admin of. |
newAdmin | address | The address of the new admin. |
Requirements:
The caller must be the owner of the contract.
This function is forbidden and will always revert. |
appendUpgrade (0xb14faf17)
Appends an upgrade to the upgrade queue for the given proxy contract.
Parameters:
Name | Type | Description |
---|---|---|
proxy | contract ITransparentUpgradeableProxy | The proxy contract to upgrade. |
newImplementation | address | The address of the new implementation contract. |
Requirements:
The caller must be the owner of the contract.
The upgrade queue for the given proxy contract must be empty.
Effects:
Sets the append timestamp for the upgrade.
Sets the delay period for the upgrade.
Sets the old implementation for the upgrade.
Sets the new implementation for the upgrade. |
upgrade (0x99a88ec4)
Upgrades the implementation of a transparent proxy contract.
Parameters:
Name | Type | Description |
---|---|---|
proxy | contract ITransparentUpgradeableProxy | The transparent proxy contract to upgrade. |
implementation | address | The address of the new implementation contract. |
Requirements:
The caller must be the owner of the contract.
The
appendUpgrade
function must have been called before.The delay period must have passed since the
appendUpgrade
function was called.The new implementation address must match the one provided in the
appendUpgrade
function. |
upgradeAndCall (0x9623609d)
This function is deprecated. Upgrades the implementation of the transparent proxy to a new implementation and calls a function on the new implementation. This function is only callable by the contract owner.
Parameters:
Name | Type | Description |
---|---|---|
proxy | contract ITransparentUpgradeableProxy | The transparent proxy to be upgraded. |
implementation | address | The address of the new implementation contract. |
data | bytes | The data to be passed to the new implementation contract. |
Last updated