> For the complete documentation index, see [llms.txt](https://docs.inverter.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inverter.network/contracts/technical-reference/proxies/interfaces/iinverterbeacon_v1.sol.md).

# IInverterBeacon\_v1.sol

[Git Source](https://github.com/InverterNetwork/inverter-contracts/blob/2a8a4c80ff4f24a59546d4e6126b81bc51228c94/src/proxies/interfaces/IInverterBeacon_v1.sol)

**Inherits:** [IBeacon](<https://github.com/OpenZeppelin/openzeppelin-contracts/blob/19a657bef8354f2a655900654955739b70dfbde9/contracts/proxy/beacon/IBeacon.sol&#xA;>)

### Functions

#### version

Returns the version of the linked implementation.

```solidity
function version() external view returns (uint, uint, uint);
```

**Returns**

| Name     | Type      | Description    |
| -------- | --------- | -------------- |
| `<none>` | `uint256` | Major version. |
| `<none>` | `uint256` | Minor version. |
| `<none>` | `uint256` | Patch version. |

#### getReverterAddress

Returns the[ {InverterReverter\_v1} ](/contracts/technical-reference/external/reverter/inverterreverter_v1.sol.md)of the [{InverterBeacon\_v1}](https://docs.inverter.network/contracts/technical-reference/proxies/inverterbeacon_v1.sol).

```solidity
function getReverterAddress() external returns (address);
```

**Returns**

| Name     | Type      | Description                                           |
| -------- | --------- | ----------------------------------------------------- |
| `<none>` | `address` | ReverterAddress The address of the reverter contract. |

#### getImplementationAddress

Returns the implementation address of the [{InverterBeacon\_v1}](https://docs.inverter.network/contracts/technical-reference/proxies/inverterbeacon_v1.sol).

```solidity
function getImplementationAddress() external returns (address);
```

**Returns**

| Name     | Type      | Description                                              |
| -------- | --------- | -------------------------------------------------------- |
| `<none>` | `address` | ImplementationAddress The address of the implementation. |

#### emergencyModeActive

Returns wether the [{InverterBeacon\_v1}](https://docs.inverter.network/contracts/technical-reference/proxies/inverterbeacon_v1.sol) is in emergency mode or not.

```solidity
function emergencyModeActive() external view returns (bool);
```

**Returns**

| Name     | Type   | Description                                          |
| -------- | ------ | ---------------------------------------------------- |
| `<none>` | `bool` | emergencyModeActive Is the beacon in emergency mode. |

#### upgradeTo

Upgrades the [{InverterBeacon\_v1}](https://docs.inverter.network/contracts/technical-reference/proxies/inverterbeacon_v1.sol) to a new implementation address.

*Only callable by owner.*

*`overrideShutdown` Doesn't do anything if* [*{InverterBeacon\_v1}*](https://docs.inverter.network/contracts/technical-reference/proxies/inverterbeacon_v1.sol) *is not in emergency mode.*

*Revert if new implementation invalid.*

```solidity
function upgradeTo(
    address newImplementation,
    uint newMinorVersion,
    uint newPatchVersion,
    bool overrideShutdown
) external;
```

**Parameters**

| Name                | Type      | Description                                                 |
| ------------------- | --------- | ----------------------------------------------------------- |
| `newImplementation` | `address` | The new implementation address.                             |
| `newMinorVersion`   | `uint256` | The new minor version of the implementation contract.       |
| `newPatchVersion`   | `uint256` | The new patch version of the implementation contract.       |
| `overrideShutdown`  | `bool`    | Flag to enable upgradeTo function to override the shutdown. |

#### shutDownImplementation

Shuts down the [{InverterBeacon\_v1}](https://docs.inverter.network/contracts/technical-reference/proxies/inverterbeacon_v1.sol) and stops the system.

*Only callable by owner.*

*Changes the implementation address to address(0).*

```solidity
function shutDownImplementation() external;
```

#### restartImplementation

Restarts the [{InverterBeacon\_v1}](https://docs.inverter.network/contracts/technical-reference/proxies/inverterbeacon_v1.sol) and the system.

*Only callable by owner.*

*Changes the implementation address from address(0) to the original implementation.*

```solidity
function restartImplementation() external;
```

### Events

#### Constructed

The [{InverterBeacon\_v1}](https://docs.inverter.network/contracts/technical-reference/proxies/inverterbeacon_v1.sol) was constructed.

```solidity
event Constructed(uint majorVersion);
```

**Parameters**

| Name           | Type      | Description                                      |
| -------------- | --------- | ------------------------------------------------ |
| `majorVersion` | `uint256` | The majorVersion of the implementation contract. |

#### Upgraded

The [{InverterBeacon\_v1}](https://docs.inverter.network/contracts/technical-reference/proxies/inverterbeacon_v1.sol) was upgraded to a new implementation address.

```solidity
event Upgraded(
    address indexed implementation, uint newMinorVersion, uint newPatchVersion
);
```

**Parameters**

| Name              | Type      | Description                                           |
| ----------------- | --------- | ----------------------------------------------------- |
| `implementation`  | `address` | The new implementation address.                       |
| `newMinorVersion` | `uint256` | The new minor version of the implementation contract. |
| `newPatchVersion` | `uint256` | The new patch version of the implementation contract. |

#### ShutdownInitiated

The [{InverterBeacon\_v1}](https://docs.inverter.network/contracts/technical-reference/proxies/inverterbeacon_v1.sol) shutdown was initiated.

```solidity
event ShutdownInitiated();
```

#### ShutdownReversed

The [{InverterBeacon\_v1}](https://docs.inverter.network/contracts/technical-reference/proxies/inverterbeacon_v1.sol) shutdown was reversed.

```solidity
event ShutdownReversed();
```

### Errors

#### InverterBeacon\_\_InvalidImplementation

Given implementation invalid.

```solidity
error InverterBeacon__InvalidImplementation();
```

#### InverterBeacon\_\_InvalidImplementationMinorOrPatchVersion

Given implementation minor and patch version is not higher than previous minor version.

```solidity
error InverterBeacon__InvalidImplementationMinorOrPatchVersion();
```
