InverterBeaconProxy_v1.sol
Inherits: Proxy
Author: Inverter Network
Acts as a proxy for Inverter Network's smart contracts, allowing for upgrades to contract implementations without affecting the existing state or contract addresses, thereby achieving upgradeable contracts.
Implements the Proxy pattern by referencing the {InverterBeacon_v1}, which holds the address of the current implementation to which calls are delegated.
State Variables
_beacon
{InverterBeacon_v1} instance that points to the implementation.
Functions
constructor
Constructs the InverterBeaconProxy_v1.
Sets the {InverterBeacon_v1} instance that contains the implementation address.
Parameters
beacon
IInverterBeacon_v1
version
Returns the version of the linked implementation.
This overrides the possible use of a "version" function in the modules that are called via the Proxy Beacon structure.
Returns
<none>
uint256
Major version.
<none>
uint256
Minor version.
<none>
uint256
Patch version.
receive
Fallback function to delegate calls to the implementation contract even if the call data is empty but msg.value > 0.
_implementation
This is a virtual function that should be overridden so it returns the address to which the fallback function and {_fallback} should delegate.
Events
BeaconUpgraded
Proxy upgraded to new {InverterBeacon_v1} instance.
Parameters
beacon
IInverterBeacon_v1
Last updated