Stats
Public Functions
7
Event Types
3
Code Size
7,184 bytes
Events (3)
keyboard_arrow_up
NewPendingOwner
Event
Parameters
help
Event parameters list the data that an event contains.
currentOwner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
pendingOwner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
ProxyOwnershipTransferred
Event
Parameters
help
Event parameters list the data that an event contains.
previousOwner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
newOwner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
Upgraded
Event
Parameters
help
Event parameters list the data that an event contains.
implementation |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
Constants (3)
keyboard_arrow_up
proxyOwnerPosition
Constant
bytes32
help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
pendingProxyOwnerPosition
Constant
bytes32
help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
implementationPosition
Constant
bytes32
help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
implementation
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Source Code
function implementation() public view returns (address impl) {
bytes32 position = implementationPosition;
assembly {
impl := sload(position)
}
}
constructor
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
payable
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function() external payable {
address _impl = implementation();
require(_impl != address(0), "implementation contract not set");
assembly {
let ptr := mload(0x40)
calldatacopy(ptr, 0, calldatasize)
let result := delegatecall(gas, _impl, ptr, calldatasize, 0, 0)
let size := returndatasize
returndatacopy(ptr, 0, size)
switch result
case 0 {
revert(ptr, size)
}
default {
return(ptr, size)
}
}
}
proxyOwner
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Source Code
function proxyOwner() public view returns (address owner) {
bytes32 position = proxyOwnerPosition;
assembly {
owner := sload(position)
}
}
pendingProxyOwner
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Source Code
function pendingProxyOwner() public view returns (address pendingOwner) {
bytes32 position = pendingProxyOwnerPosition;
assembly {
pendingOwner := sload(position)
}
}
transferProxyOwnership
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
newOwner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Modifiers
help
Modifiers are additions to a function that typically make various checks before
the function is run.
onlyProxyOwner
checks for the following:
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function transferProxyOwnership(address newOwner) external onlyProxyOwner {
require(newOwner != address(0));
_setPendingUpgradeabilityOwner(newOwner);
emit NewPendingOwner(proxyOwner(), newOwner);
}
claimProxyOwnership
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Modifiers
help
Modifiers are additions to a function that typically make various checks before
the function is run.
onlyPendingProxyOwner
checks for the following:
Source Code
function claimProxyOwnership() external onlyPendingProxyOwner {
emit ProxyOwnershipTransferred(proxyOwner(), pendingProxyOwner());
_setUpgradeabilityOwner(pendingProxyOwner());
_setPendingUpgradeabilityOwner(address(0));
}
upgradeTo
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
implementation |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Modifiers
help
Modifiers are additions to a function that typically make various checks before
the function is run.
onlyProxyOwner
checks for the following:
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function upgradeTo(address implementation) external onlyProxyOwner {
_upgradeTo(implementation);
}
Internal functions are parts of the contract that can't be used directly, but instead are used by
the public functions listed above.
internal OwnedUpgradeabilityProxy._setUpgradeabilityOwner
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
newProxyOwner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Source Code
function _setUpgradeabilityOwner(address newProxyOwner) internal {
bytes32 position = proxyOwnerPosition;
assembly {
sstore(position, newProxyOwner)
}
}
internal OwnedUpgradeabilityProxy._setPendingUpgradeabilityOwner
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
newPendingProxyOwner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Source Code
function _setPendingUpgradeabilityOwner(address newPendingProxyOwner) internal {
bytes32 position = pendingProxyOwnerPosition;
assembly {
sstore(position, newPendingProxyOwner)
}
}
internal UpgradeabilityProxy._setImplementation
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
newImplementation |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Source Code
function _setImplementation(address newImplementation) internal {
bytes32 position = implementationPosition;
assembly {
sstore(position, newImplementation)
}
}
internal UpgradeabilityProxy._upgradeTo
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
newImplementation |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _upgradeTo(address newImplementation) internal {
address currentImplementation = implementation();
require(currentImplementation != newImplementation);
_setImplementation(newImplementation);
emit Upgraded(newImplementation);
}