IInverterBeacon_v1.sol

Git Source

Inherits: IBeacon

Functions

version

Returns the version of the linked implementation.

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} of the {InverterBeacon_v1}.

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}.

function getImplementationAddress() external returns (address);

Returns

Name
Type
Description

<none>

address

ImplementationAddress The address of the implementation.

emergencyModeActive

Returns wether the {InverterBeacon_v1} is in emergency mode or not.

function emergencyModeActive() external view returns (bool);

Returns

Name
Type
Description

<none>

bool

emergencyModeActive Is the beacon in emergency mode.

upgradeTo

Upgrades the {InverterBeacon_v1} to a new implementation address.

Only callable by owner.

overrideShutdown Doesn't do anything if {InverterBeacon_v1} is not in emergency mode.

Revert if new implementation invalid.

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} and stops the system.

Only callable by owner.

Changes the implementation address to address(0).

function shutDownImplementation() external;

restartImplementation

Restarts the {InverterBeacon_v1} and the system.

Only callable by owner.

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

function restartImplementation() external;

Events

Constructed

The {InverterBeacon_v1} was constructed.

event Constructed(uint majorVersion);

Parameters

Name
Type
Description

majorVersion

uint256

The majorVersion of the implementation contract.

Upgraded

The {InverterBeacon_v1} was upgraded to a new implementation address.

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} shutdown was initiated.

event ShutdownInitiated();

ShutdownReversed

The {InverterBeacon_v1} shutdown was reversed.

event ShutdownReversed();

Errors

InverterBeacon__InvalidImplementation

Given implementation invalid.

error InverterBeacon__InvalidImplementation();

InverterBeacon__InvalidImplementationMinorOrPatchVersion

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

error InverterBeacon__InvalidImplementationMinorOrPatchVersion();

Last updated