# ProxyAdmin

[Git Source](https://github.com/Ion-Protocol/ion-protocol/blob/88cc595825f1dc2eb738fb93e172a3e8ab7a5c43/src/admin/ProxyAdmin.sol)

**Inherits:** Ownable2Step

Copy OpenZeppelin's `ProxyAdmin` that uses `Ownable2Step` instead of `Ownable`

*This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.*

### [State Variables](https://docs.ionprotocol.io/devs/smart-contract-architecture/admin/broken-reference) <a href="#state-variables" id="state-variables"></a>

#### [UPGRADE\_INTERFACE\_VERSION](https://docs.ionprotocol.io/devs/smart-contract-architecture/admin/broken-reference) <a href="#upgrade_interface_version" id="upgrade_interface_version"></a>

*The version of the upgrade interface of the contract. If this getter is missing, both `upgrade(address)` and `upgradeAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called, while `upgradeAndCall` will invoke the `receive` function if the second argument is the empty byte string. If the getter returns `"5.0.0"`, only `upgradeAndCall(address,bytes)` is present, and the second argument must be the empty byte string if no function should be called, making it impossible to invoke the `receive` function during an upgrade.*

```
string public constant UPGRADE_INTERFACE_VERSION = "5.0.0";
```

### [Functions](https://docs.ionprotocol.io/devs/smart-contract-architecture/admin/broken-reference) <a href="#functions" id="functions"></a>

#### [constructor](https://docs.ionprotocol.io/devs/smart-contract-architecture/admin/broken-reference) <a href="#constructor" id="constructor"></a>

*Sets the initial owner who can perform upgrades.*

```
constructor(address initialOwner) Ownable(initialOwner);
```

#### [upgradeAndCall](https://docs.ionprotocol.io/devs/smart-contract-architecture/admin/broken-reference) <a href="#upgradeandcall" id="upgradeandcall"></a>

\*Upgrades `proxy` to `implementation` and calls a function on the new implementation. See [TransparentUpgradeableProxy-\_dispatchUpgradeToAndCall](https://about/src/admin/TransparentUpgradeableProxy.sol/contract.TransparentUpgradeableProxy.html#_dispatchupgradetoandcall). Requirements:

* This contract must be the admin of `proxy`.
* If `data` is empty, `msg.value` must be zero.\*

```
function upgradeAndCall(
    ITransparentUpgradeableProxy proxy,
    address implementation,
    bytes memory data
)
    public
    payable
    virtual
    onlyOwner;
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionprotocol.io/devs/smart-contract-architecture/admin/proxyadmin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
