> For the complete documentation index, see [llms.txt](https://docs.ironblocks.com/firewall/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ironblocks.com/firewall/smart-contracts/firewallproxyadmin.sol.md).

# FirewallProxyAdmin.sol

`FirewallProxyAdmin` is Ironblocks' extended version of OpenZeppelins [`ProxyAdmin`](https://docs.openzeppelin.com/contracts/3.x/api/proxy#ProxyAdmin).

Everything is the same except that there are additional methods for setting/getting the new fields `firewall` and `firewallAdmin`.

## Methods

### changeFirewall()

#### `function changeFirewall(FirewallTransparentUpgradeableProxy proxy, address newFirewall)`

Callable only by the [Firewall Proxy Admin](/firewall/glossary.md#firewall-proxy-admin), Changes the [Firewall](/firewall/glossary.md#firewall) of `proxy` to `newFirewall`.

<table><thead><tr><th width="178.33333333333331">Parameter Name</th><th width="382">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>proxy</code></td><td><code>FirewallTransparentUpgradeableProxy</code></td><td>the <a href="/firewall/glossary.md#firewall-proxy">Firewall Proxy</a> that this contract is the <a href="/firewall/glossary.md#firewall-admin">Firewall Admin</a> of</td></tr><tr><td><code>newFirewall</code></td><td><code>address</code></td><td>the new <a href="/firewall/glossary.md#firewall">Firewall</a> that the <a href="/firewall/glossary.md#firewall-proxy">Firewall Proxy</a> will use</td></tr></tbody></table>

### changeFirewallAdmin()

#### `function changeFirewallAdmin(FirewallTransparentUpgradeableProxy proxy, address newFirewallAdmin)`

Callable only by the [Firewall Proxy Admin](/firewall/glossary.md#firewall-proxy-admin), changes the [Firewall Admin](/firewall/glossary.md#firewall-admin) of the [Firewall Proxy](/firewall/glossary.md#firewall-proxy) `proxy` to `newFirewallAdmin`.

<table><thead><tr><th width="218.33333333333331">Parameter Name</th><th width="385">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>proxy</code></td><td><code>FirewallTransparentUpgradeableProxy</code></td><td>the <a href="/firewall/glossary.md#firewall-proxy">Firewall Proxy</a> whose <a href="/firewall/glossary.md#firewall-admin">Firewall Admin</a> we want to set</td></tr><tr><td><code>newFirewallAdmin</code></td><td><code>address</code></td><td>the new <a href="/firewall/glossary.md#firewall-admin">Firewall Admin</a></td></tr></tbody></table>

## View Functions

### getProxyFirewall()

#### `function getProxyFirewall(FirewallTransparentUpgradeableProxy proxy)`

Returns the address of the current [Firewall](/firewall/glossary.md#firewall) of `proxy`.

| Parameter Name | Type                                  | Description                                    |
| -------------- | ------------------------------------- | ---------------------------------------------- |
| `proxy`        | `FirewallTransparentUpgradeableProxy` | the `proxy` that this contract is the admin of |

### getProxyFirewallAdmin()

#### `function getProxyFirewallAdmin(FirewallTransparentUpgradeableProxy proxy)`

Returns the address of the [Firewall Admin](/firewall/glossary.md#firewall-admin) of the [Firewall](/firewall/glossary.md#firewall) that `proxy` uses *(i.e. the admin that can manage firewall policies)*.

| Parameter Name | Type                                  | Description                                    |
| -------------- | ------------------------------------- | ---------------------------------------------- |
| `proxy`        | `FirewallTransparentUpgradeableProxy` | the `proxy` that this contract is the admin of |

## Source Code

On our GitLab repository: [FirewallProxyAdmin.sol](https://github.com/ironblocks/onchain-firewall/blob/main/packages/onchain-firewall/contracts/proxy/FirewallProxyAdmin.sol)
