InverterBeacon_v1.sol
Last updated
Last updated
Inherits: , ,
Author: Inverter Network
Manages upgrades and versioning for smart contract implementations, allowing contract administrators to dynamically change contract logic while maintaining the state. Supports emergency shutdown mechanisms to halt operations if needed.
Extends for interface detection and implements both and . Uses modifiers to enforce constraints on implementation upgrades. Unique features include emergency mode control and strict version handling with major, minor and patch version concepts.
The address of the contract that will revert all transactions. Can only be set via the constructor()
function.
The InverterBeacon_v1's implementation address. Can only be changed via the _setImplementation()
function.
The 's current implementation pointer. In case of emergency can be set to _reverterAddress
to pause functionality.
The major version of the implementation.
The minor version of the implementation.
The patch version of the implementation.
Modifier to ensure the implementation is valid.
Modifier to ensure the new minor or patch version is valid.
Must return an address that can be used as a delegate call target. {UpgradeableBeacon} will check that this address is a contract.
Returns
<none>
address
ReverterAddress The address of the reverter contract.
Returns
<none>
address
ImplementationAddress The address of the implementation.
Returns
<none>
bool
emergencyModeActive Is the beacon in emergency mode.
Returns the version of the linked implementation.
Returns
<none>
uint256
Major version.
<none>
uint256
Minor version.
<none>
uint256
Patch version.
Only callable by owner.
Parameters
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.
Only callable by owner.
Only callable by owner.
Internal function to upgrade the implementation.
Parameters
newImplementation
address
The new implementation address.
newMinorVersion
uint256
The new minor version.
newPatchVersion
uint256
The new patch version.
overrideShutdown
bool
If the upgrade process should override the shutdown.
Internal function to set the implementation.
Parameters
newImplementation
address
The new implementation address.
overrideShutdown
bool
If the upgrade process should override the shutdown.
Is the shut down / in emergency mode.
See .
Returns the of the .
Returns the implementation address of the .
Returns wether the } is in emergency mode or not.
Upgrades the } to a new implementation address.
Shuts down the } and stops the system.
Restarts the } and the system.