Skip to content

Instantly share code, notes, and snippets.

@eum602
Created February 24, 2024 18:30
Show Gist options
  • Save eum602/2083ee109fc8f558f3e69eceaa934701 to your computer and use it in GitHub Desktop.
Save eum602/2083ee109fc8f558f3e69eceaa934701 to your computer and use it in GitHub Desktop.
Proxy Pattern Openzeppelin 2024
classDiagram
Proxy <|-- ERC1967Proxy
ERC1967Utils --o ERC1967Proxy
ERC1967Proxy <|-- TransparentUpgradeableProxy
Ownable <|-- ProxyAdmin
TransparentUpgradeableProxy o-- ProxyAdmin
Proxy <|-- BeaconProxy
BeaconProxy o-- IBeacon
BeaconProxy o-- ERC1967Utils
IBeacon <|-- UpgradeableBeacon
Ownable <|-- UpgradeableBeacon
ERC1967Utils --o UUPSUpgradeable
IERC1822Proxiable <|-- UUPSUpgradeable
class IERC1822Proxiable {
proxiableUUID():bytes32
}
class ERC1967Utils{
upgradeBeaconToAndCall(beaconAddr, data)
getImplementation():address
}
class UUPSUpgradeable{
<<abstract>>
proxiableUUID()
upgradeToAndCall(impl, data)
}
class Initializable {
<<abstract>>
}
class Clones {
}
class UpgradeableBeacon {
implementation()
upgradeTo(newImpl)
}
class BeaconProxy{
_beacon:address
_implementation()
_getBeacon()
}
class Proxy {
<<abstract>>
_delegate()
_implementation()
fallback()
}
class ERC1967Proxy{
_implementation():address
}
class TransparentUpgradeableProxy {
}
class IBeacon {
<<Interface>>
implementation()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment