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

Returns

Name
Type
Description

<none>

address

ImplementationAddress The address of the implementation.

emergencyModeActive

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

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.

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

restartImplementation

Restarts the {InverterBeacon_v1} and the system.

Only callable by owner.

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

Events

Constructed

The {InverterBeacon_v1} was constructed.

Parameters

Name
Type
Description

majorVersion

uint256

The majorVersion of the implementation contract.

Upgraded

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

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.

ShutdownReversed

The {InverterBeacon_v1} shutdown was reversed.

Errors

InverterBeacon__InvalidImplementation

Given implementation invalid.

InverterBeacon__InvalidImplementationMinorOrPatchVersion

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

Last updated