bool success,bytesmemory data)= implementation.delegatecall(msg.data);
address public implementation;
address public owner;
owner
implementation
setOwner(address)
if (msg.sender == admin)
_fallback()internal virtual override {
if(msg.sender ==_getAdmin()){
_delegate(_getImplementation());
}else{
_delegate(_getImplementation());
}
}
Initializable
[Proxy2] → [Beacon] → [Implementation]
upgradeTo(address newImplementation)external onlyProxy {
_authorizeUpgrade(newImplementation);
_upgradeTo(newImplementation);
}
_authorizeUpgrade
internalconstant _IMPLEMENTATION_SLOT =
0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
keccak256("eip1967.proxy.implementation") - 1
upgradeTo()
_IMPLEMENTATION_SLOT
keccak256("eip1967.proxy.implementation") - 1
Initializable
selfdestruct
upgradeTo()
uint256[50] private __gap;

