OwnedUpgradeabilityProxy (OwnedUpgradeabilityProxy.sol)
View Source: contracts/proxy/OwnedUpgradeabilityProxy.sol
↗ Extends: UpgradeabilityProxy ↘ Derived Contracts: BlacklistTransferManagerProxy, CappedSTOProxy, CountTransferManagerProxy, DummySTOProxy, ERC20DividendCheckpointProxy, EtherDividendCheckpointProxy, GeneralPermissionManagerProxy, GeneralTransferManagerProxy, LockUpTransferManagerProxy, ManualApprovalTransferManagerProxy, ModuleRegistryProxy, PercentageTransferManagerProxy, PLCRVotingCheckpointProxy, PreSaleSTOProxy, SecurityTokenProxy, SecurityTokenRegistryProxy, USDTieredSTOProxy, VestingEscrowWalletProxy, VolumeRestrictionTMProxy, WeightedVoteCheckpointProxy
OwnedUpgradeabilityProxy
This contract combines an upgradeability proxy with basic authorization control functionalities
Contract Members
Constants & Variables
address private __upgradeabilityOwner;
Events
event ProxyOwnershipTransferred(address _previousOwner, address _newOwner);
Modifiers
ifOwner
Throws if called by any account other than the owner.
modifier ifOwner() internal
Arguments
Name
Type
Description
Functions
the constructor sets the original owner of the contract to the sender account.
function () public nonpayable
Arguments
Name
Type
Description
_upgradeabilityOwner
Tells the address of the owner
function _upgradeabilityOwner() internal view
returns(address)
Returns
the address of the owner
Arguments
Name
Type
Description
_setUpgradeabilityOwner
Sets the address of the owner
function _setUpgradeabilityOwner(address _newUpgradeabilityOwner) internal nonpayable
Arguments
Name
Type
Description
_newUpgradeabilityOwner
address
_implementation
⤾ overrides Proxy._implementation
Internal function to provide the address of the implementation contract
function _implementation() internal view
returns(address)
Arguments
Name
Type
Description
proxyOwner
Tells the address of the proxy owner
function proxyOwner() external nonpayable ifOwner
returns(address)
Returns
the address of the proxy owner
Arguments
Name
Type
Description
version
Tells the version name of the current implementation
function version() external nonpayable ifOwner
returns(string)
Returns
string representing the name of the current version
Arguments
Name
Type
Description
implementation
Tells the address of the current implementation
function implementation() external nonpayable ifOwner
returns(address)
Returns
address of the current implementation
Arguments
Name
Type
Description
transferProxyOwnership
Allows the current owner to transfer control of the contract to a newOwner.
function transferProxyOwnership(address _newOwner) external nonpayable ifOwner
Arguments
Name
Type
Description
_newOwner
address
The address to transfer ownership to.
upgradeTo
Allows the upgradeability owner to upgrade the current version of the proxy.
function upgradeTo(string _newVersion, address _newImplementation) external nonpayable ifOwner
Arguments
Name
Type
Description
_newVersion
string
representing the version name of the new implementation to be set.
_newImplementation
address
representing the address of the new implementation to be set.
upgradeToAndCall
Allows the upgradeability owner to upgrade the current version of the proxy and call the new implementation to initialize whatever is needed through a low level call.
function upgradeToAndCall(string _newVersion, address _newImplementation, bytes _data) external payable ifOwner
Arguments
Name
Type
Description
_newVersion
string
representing the version name of the new implementation to be set.
_newImplementation
address
representing the address of the new implementation to be set.
_data
bytes
represents the msg.data to bet sent in the low level call. This parameter may include the function
signature of the implementation to be called with the needed payload |
_upgradeToAndCall
function _upgradeToAndCall(string _newVersion, address _newImplementation, bytes _data) internal nonpayable
Arguments
Name
Type
Description
_newVersion
string
_newImplementation
address
_data
bytes
Last updated
Was this helpful?