Upgradeable Beacon

This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their implementation contract, which is where they will delegate all function calls. An owner is able to change the implementation the beacon points to, thus upgrading the proxies that use this beacon.

Methods

implementation

function implementation() external view returns (address)

Returns the current implementation address.

Returns

Name
Type
Description

_0

address

undefined

owner

function owner() external view returns (address)

Returns the address of the current owner.

Returns

Name
Type
Description

_0

address

undefined

renounceOwnership

function renounceOwnership() external nonpayable

Leaves the contract without owner. It will not be possible to call onlyOwner functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.

transferOwnership

function transferOwnership(address newOwner) external nonpayable

Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.

Parameters

Name
Type
Description

newOwner

address

undefined

upgradeTo

function upgradeTo(address newImplementation) external nonpayable

Upgrades the beacon to a new implementation. Emits an {Upgraded} event. Requirements: - msg.sender must be the owner of the contract. - newImplementation must be a contract.

Parameters

Name
Type
Description

newImplementation

address

undefined

Events

OwnershipTransferred

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

Parameters

Name
Type
Description

previousOwner indexed

address

undefined

newOwner indexed

address

undefined

Upgraded

event Upgraded(address indexed implementation)

Emitted when the implementation returned by the beacon is changed.

Parameters

Name
Type
Description

implementation indexed

address

undefined

Last updated