📖
Docs
  • Protocol
    • 🤟What is Phase?
    • ⚠️Acknowledgments
    • 📜License
  • Vaults
    • 🏦Yield on Collateral
    • 💳Credit Accounts
  • CASH Stablecoin
    • 🪙$CASH
    • 🔁PSM
    • 🏗️Vault Structure
  • Liquidation
    • 📠Math behind Liquidations
    • 🤩Become a Liquidator
  • Proxies
    • 💡Overview
    • 👮Admin Upgradeable Proxy
    • 📦Storage Upgradeable Proxy
    • 💎Diamonds
  • 🔗Socials
  • 📖Devdocs
Powered by GitBook
On this page
  1. Proxies

Admin Upgradeable Proxy

The Admin Upgradeable Proxy is based on having the target stored on a specific storage slot changeable by the proxy's owner.

AdminUpgradeableProxy.sol
contract AdminUpgradeableProxy is ProxyOwnable, Proxy {
  bytes32 internal constant _IMPLEMENTATION_SLOT =
    bytes32(uint256(keccak256("proxy.implementation")) - 1);

  event Upgraded(address indexed _implementation);

  constructor(
    address _owner,
    address _target,
    bytes memory _initialCall
  );

  function upgradeTo(
    address _newImplementation,
    bytes memory _oldImplementationData,
    bytes memory _newImplementationData
  ) external;

  function implementation()
    public
    view
    override
    returns (address _implementation);

  function proxyType() public pure override returns (uint256 _type);

  function _setImplementation(address _newImplementation) internal;
}
PreviousOverviewNextStorage Upgradeable Proxy

Last updated 1 year ago

👮