Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.17 KB

OZ UpgradeableBeacon.md

File metadata and controls

31 lines (24 loc) · 1.17 KB

OpenZeppelin UpgradeableBeacon: 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.

  1. constructor(address implementation)`: Sets the address of the initial implementation, and the deployer account as the owner who can upgrade the beacon.

  2. implementation()address: Returns the current implementation address.

  3. upgradeTo(address newImplementation): Upgrades the beacon to a new implementation. Emits an Upgraded event. Requirements:

  4. msg.sender must be the owner of the contract

  5. newImplementation must be a contract.


Slide Screenshot

190.jpg


Slide Text

  • UpgradeableBeacon -> BeaconProxy
  • Owner -> Change Impl
  • Constructor -> Impl Init
  • Deployer -> Owner
  • _implementation()
  • _ugpradeTo(newImplementation)

References


Tags