GaugeFactory
Description:
A factory contract for deploying new instances of the Gauge
contract. It allows specifying the core parameters (_pool
, _bribe
, _ve
) and either uses the factory caller (msg.sender
) as the Voter
address or allows specifying it explicitly.
createGauge
Description:
Deploys a new Gauge
contract instance. The caller (msg.sender
) of this function is automatically set as the _voter
address within the newly created Gauge
. Stores the address of the deployed gauge in last_gauge
. Typically called by the main Voter
contract.
Input Parameters:
_pool
address
The address of the LP token (stake) for the new Gauge.
_bribe
address
The address of the associated Bribe contract for the new Gauge.
_ve
address
The address of the VotingEscrow
contract for the new Gauge.
Return Value:
address
The address of the newly deployed Gauge contract.
createGaugeSingle
Description:
Deploys a new Gauge
contract instance, allowing the caller to explicitly specify the _voter
address. Stores the address of the deployed gauge in last_gauge
. Might be used for gauges associated with a different voter or deployed via an alternative mechanism.
Input Parameters:
_pool
address
The address of the LP token (stake) for the new Gauge.
_bribe
address
The address of the associated Bribe contract for the new Gauge.
_ve
address
The address of the VotingEscrow
contract for the new Gauge.
_voter
address
The explicit address to set as the Voter
for the new Gauge.
Return Value:
address
The address of the newly deployed Gauge contract.
Last updated